Skip to content

Commit d1ce446

Browse files
authored
Fix urls (Azure#39246)
1 parent ebd70dc commit d1ce446

23 files changed

+51
-51
lines changed

sdk/cosmos/azure-cosmos/CHANGELOG.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ For more on the `CosmosHttpLoggingPolicy` see our [README](https://github.com/Az
190190
### 4.3.1b1 (2022-09-19)
191191

192192
#### Features Added
193-
- GA release of integrated cache functionality. For more information on integrated cache please see [Azure Cosmos DB integrated cache](https://docs.microsoft.com/azure/cosmos-db/integrated-cache).
194-
- Added ability to replace analytical ttl on containers. For more information on analytical ttl please see [Azure Cosmos DB analytical store](https://docs.microsoft.com/azure/cosmos-db/analytical-store-introduction).
193+
- GA release of integrated cache functionality. For more information on integrated cache please see [Azure Cosmos DB integrated cache](https://learn.microsoft.com/azure/cosmos-db/integrated-cache).
194+
- Added ability to replace analytical ttl on containers. For more information on analytical ttl please see [Azure Cosmos DB analytical store](https://learn.microsoft.com/azure/cosmos-db/analytical-store-introduction).
195195
- Added `CosmosHttpLoggingPolicy` to replace `HttpLoggingPolicy` for logging HTTP sessions.
196196
- Added the ability to create containers and databases with autoscale properties for the sync and async clients.
197197
- Added the ability to update autoscale throughput properties.
@@ -234,21 +234,21 @@ Method call will now require an 'id' field to be present in the document body.
234234
> their clients.
235235
> Default consistency level for the sync and async clients is no longer "Session" and will instead be set to the
236236
consistency level of the user's cosmos account setting on initialization if not passed during client initialization.
237-
> Please see [Consistency Levels in Azure Cosmos DB](https://docs.microsoft.com/azure/cosmos-db/consistency-levels)
237+
> Please see [Consistency Levels in Azure Cosmos DB](https://learn.microsoft.com/azure/cosmos-db/consistency-levels)
238238
> for more details on consistency levels, or the README section on this change [here](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cosmos/azure-cosmos#note-on-client-consistency-levels).
239239
240240
#### Features Added
241241
- Added new **provisional** `max_integrated_cache_staleness_in_ms` parameter to read item and query items APIs in order
242242
to make use of the **preview** CosmosDB integrated cache functionality [See PR #22946](https://github.com/Azure/azure-sdk-for-python/pull/22946).
243-
Please see [Azure Cosmos DB integrated cache](https://docs.microsoft.com/azure/cosmos-db/integrated-cache) for more details.
243+
Please see [Azure Cosmos DB integrated cache](https://learn.microsoft.com/azure/cosmos-db/integrated-cache) for more details.
244244
- Added support for split-proof queries for the async client.
245245

246246
### Bugs fixed
247247
- Default consistency level for the sync and async clients is no longer `Session` and will instead be set to the
248248
consistency level of the user's cosmos account setting on initialization if not passed during client initialization.
249249
This change will impact client application in terms of RUs and latency. Users relying on default `Session` consistency
250250
will need to pass it explicitly if their account consistency is different than `Session`.
251-
Please see [Consistency Levels in Azure Cosmos DB](https://docs.microsoft.com/azure/cosmos-db/consistency-levels) for more details.
251+
Please see [Consistency Levels in Azure Cosmos DB](https://learn.microsoft.com/azure/cosmos-db/consistency-levels) for more details.
252252
- Fixed invalid request body being sent when passing in `serverScript` body parameter to replace operations for trigger, sproc and udf resources.
253253
- Moved `is_system_key` logic in async client.
254254
- Fixed TypeErrors not being thrown when passing in invalid connection retry policies to the client.

sdk/cosmos/azure-cosmos/README.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Use the Azure Cosmos DB SQL API SDK for Python to manage databases and the JSON
1919
| [Product documentation][cosmos_docs]
2020
| [Samples][cosmos_samples]
2121

22-
> This SDK is used for the [SQL API](https://docs.microsoft.com/azure/cosmos-db/sql-query-getting-started). For all other APIs, please check the [Azure Cosmos DB documentation](https://docs.microsoft.com/azure/cosmos-db/introduction) to evaluate the best SDK for your project.
22+
> This SDK is used for the [SQL API](https://learn.microsoft.com/azure/cosmos-db/sql-query-getting-started). For all other APIs, please check the [Azure Cosmos DB documentation](https://learn.microsoft.com/azure/cosmos-db/introduction) to evaluate the best SDK for your project.
2323
2424
## Getting started
2525

@@ -107,7 +107,7 @@ aad_credentials = DefaultAzureCredential()
107107
client = CosmosClient(url, aad_credentials)
108108
```
109109
Always ensure that the managed identity you use for AAD authentication has `readMetadata` permissions. <br>
110-
More information on how to set up AAD authentication: [Set up RBAC for AAD authentication](https://docs.microsoft.com/azure/cosmos-db/how-to-setup-rbac) <br>
110+
More information on how to set up AAD authentication: [Set up RBAC for AAD authentication](https://learn.microsoft.com/azure/cosmos-db/how-to-setup-rbac) <br>
111111
More information on allowed operations for AAD authenticated clients: [RBAC Permission Model](https://aka.ms/cosmos-native-rbac)
112112

113113
## Key concepts
@@ -171,7 +171,7 @@ Streamable queries like `SELECT * FROM WHERE` *do* support continuation tokens.
171171

172172
### Control Plane Limitations Workaround
173173

174-
Typically, you can use [Azure Portal](https://portal.azure.com/), [Azure Cosmos DB Resource Provider REST API](https://docs.microsoft.com/rest/api/cosmos-db-resource-provider), [Azure CLI](https://docs.microsoft.com/cli/azure/azure-cli-reference-for-cosmos-db) or [PowerShell](https://docs.microsoft.com/azure/cosmos-db/manage-with-powershell) for the control plane unsupported limitations.
174+
Typically, you can use [Azure Portal](https://portal.azure.com/), [Azure Cosmos DB Resource Provider REST API](https://learn.microsoft.com/rest/api/cosmos-db-resource-provider), [Azure CLI](https://learn.microsoft.com/cli/azure/azure-cli-reference-for-cosmos-db) or [PowerShell](https://learn.microsoft.com/azure/cosmos-db/manage-with-powershell) for the control plane unsupported limitations.
175175

176176
### Using The Async Client as a Workaround to Bulk
177177
While the SDK supports transactional batch, support for bulk requests is not yet implemented in the Python SDK. You can use the async client along with this [concurrency sample][cosmos_concurrency_sample] we have developed as a reference for a possible workaround.
@@ -182,17 +182,17 @@ While the SDK supports transactional batch, support for bulk requests is not yet
182182

183183
## Boolean Data Type
184184

185-
While the Python language [uses](https://docs.python.org/3/library/stdtypes.html?highlight=boolean#truth-value-testing) "True" and "False" for boolean types, Cosmos DB [accepts](https://docs.microsoft.com/azure/cosmos-db/sql-query-is-bool) "true" and "false" only. In other words, the Python language uses Boolean values with the first uppercase letter and all other lowercase letters, while Cosmos DB and its SQL language use only lowercase letters for those same Boolean values. How to deal with this challenge?
185+
While the Python language [uses](https://docs.python.org/3/library/stdtypes.html?highlight=boolean#truth-value-testing) "True" and "False" for boolean types, Cosmos DB [accepts](https://learn.microsoft.com/azure/cosmos-db/sql-query-is-bool) "true" and "false" only. In other words, the Python language uses Boolean values with the first uppercase letter and all other lowercase letters, while Cosmos DB and its SQL language use only lowercase letters for those same Boolean values. How to deal with this challenge?
186186

187187
* Your JSON documents created with Python must use "True" and "False", to pass the language validation. The SDK will convert it to "true" and "false" for you. Meaning that "true" and "false" is what will be stored in Cosmos DB.
188188
* If you retrieve those documents with the Cosmos DB Portal's Data Explorer, you will see "true" and "false".
189189
* If you retrieve those documents with this Python SDK, "true" and "false" values will be automatically converted to "True" and "False".
190190

191191
## SQL Queries x FROM Clause Subitems
192192

193-
This SDK uses the [query_items](https://docs.microsoft.com/python/api/azure-cosmos/azure.cosmos.containerproxy?preserve-view=true&view=azure-python#query-items-query--parameters-none--partition-key-none--enable-cross-partition-query-none--max-item-count-none--enable-scan-in-query-none--populate-query-metrics-none----kwargs-) method to submit SQL queries to Azure Cosmos DB.
193+
This SDK uses the [query_items](https://learn.microsoft.com/python/api/azure-cosmos/azure.cosmos.containerproxy?preserve-view=true&view=azure-python#query-items-query--parameters-none--partition-key-none--enable-cross-partition-query-none--max-item-count-none--enable-scan-in-query-none--populate-query-metrics-none----kwargs-) method to submit SQL queries to Azure Cosmos DB.
194194

195-
Cosmos DB SQL language allows you to [get subitems by using the FROM clause](https://docs.microsoft.com/azure/cosmos-db/sql-query-from#get-subitems-by-using-the-from-clause), to reduce the source to a smaller subset. As an example, you can use `select * from Families.children` instead of `select * from Families`. But please note that:
195+
Cosmos DB SQL language allows you to [get subitems by using the FROM clause](https://learn.microsoft.com/azure/cosmos-db/sql-query-from#get-subitems-by-using-the-from-clause), to reduce the source to a smaller subset. As an example, you can use `select * from Families.children` instead of `select * from Families`. But please note that:
196196

197197
* For SQL queries using the `query_items` method, this SDK demands that you specify the `partition_key` or use the `enable_cross_partition_query` flag.
198198
* If you are getting subitems and specifying the `partition_key`, please make sure that your partition key is included in the subitems, which is not true for most of the cases.
@@ -260,7 +260,7 @@ except exceptions.CosmosHttpResponseError:
260260

261261
### Create an analytical store enabled container
262262

263-
This example creates a container with [Analytical Store](https://docs.microsoft.com/azure/cosmos-db/analytical-store-introduction) enabled, for reporting, BI, AI, and Advanced Analytics with [Azure Synapse Link](https://docs.microsoft.com/azure/cosmos-db/synapse-link).
263+
This example creates a container with [Analytical Store](https://learn.microsoft.com/azure/cosmos-db/analytical-store-introduction) enabled, for reporting, BI, AI, and Advanced Analytics with [Azure Synapse Link](https://learn.microsoft.com/azure/cosmos-db/synapse-link).
264264

265265
The options for analytical_storage_ttl are:
266266

@@ -988,29 +988,29 @@ be used with our SDK. This works the same way regardless of the Cosmos client yo
988988

989989
## Next steps
990990

991-
For more extensive documentation on the Cosmos DB service, see the [Azure Cosmos DB documentation][cosmos_docs] on docs.microsoft.com.
991+
For more extensive documentation on the Cosmos DB service, see the [Azure Cosmos DB documentation][cosmos_docs] on learn.microsoft.com.
992992

993993
<!-- LINKS -->
994-
[azure_cli]: https://docs.microsoft.com/cli/azure
994+
[azure_cli]: https://learn.microsoft.com/cli/azure
995995
[azure_portal]: https://portal.azure.com
996996
[azure_sub]: https://azure.microsoft.com/free/
997-
[cloud_shell]: https://docs.microsoft.com/azure/cloud-shell/overview
998-
[cosmos_account_create]: https://docs.microsoft.com/azure/cosmos-db/how-to-manage-database-account
999-
[cosmos_account]: https://docs.microsoft.com/azure/cosmos-db/account-overview
1000-
[cosmos_container]: https://docs.microsoft.com/azure/cosmos-db/databases-containers-items#azure-cosmos-containers
1001-
[cosmos_database]: https://docs.microsoft.com/azure/cosmos-db/databases-containers-items#azure-cosmos-databases
1002-
[cosmos_docs]: https://docs.microsoft.com/azure/cosmos-db/
997+
[cloud_shell]: https://learn.microsoft.com/azure/cloud-shell/overview
998+
[cosmos_account_create]: https://learn.microsoft.com/azure/cosmos-db/how-to-manage-database-account
999+
[cosmos_account]: https://learn.microsoft.com/azure/cosmos-db/account-overview
1000+
[cosmos_container]: https://learn.microsoft.com/azure/cosmos-db/databases-containers-items#azure-cosmos-containers
1001+
[cosmos_database]: https://learn.microsoft.com/azure/cosmos-db/databases-containers-items#azure-cosmos-databases
1002+
[cosmos_docs]: https://learn.microsoft.com/azure/cosmos-db/
10031003
[cosmos_samples]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cosmos/azure-cosmos/samples
10041004
[cosmos_pypi]: https://pypi.org/project/azure-cosmos/
1005-
[cosmos_http_status_codes]: https://docs.microsoft.com/rest/api/cosmos-db/http-status-codes-for-cosmosdb
1006-
[cosmos_item]: https://docs.microsoft.com/azure/cosmos-db/databases-containers-items#azure-cosmos-items
1005+
[cosmos_http_status_codes]: https://learn.microsoft.com/rest/api/cosmos-db/http-status-codes-for-cosmosdb
1006+
[cosmos_item]: https://learn.microsoft.com/azure/cosmos-db/databases-containers-items#azure-cosmos-items
10071007
[cosmos_models]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cosmos/azure-cosmos/azure/cosmos/_models.py
1008-
[cosmos_request_units]: https://docs.microsoft.com/azure/cosmos-db/request-units
1009-
[cosmos_resources]: https://docs.microsoft.com/azure/cosmos-db/databases-containers-items
1010-
[cosmos_sql_queries]: https://docs.microsoft.com/azure/cosmos-db/how-to-sql-query
1011-
[cosmos_ttl]: https://docs.microsoft.com/azure/cosmos-db/time-to-live
1012-
[cosmos_integrated_cache]: https://docs.microsoft.com/azure/cosmos-db/integrated-cache
1013-
[cosmos_configure_integrated_cache]: https://docs.microsoft.com/azure/cosmos-db/how-to-configure-integrated-cache
1008+
[cosmos_request_units]: https://learn.microsoft.com/azure/cosmos-db/request-units
1009+
[cosmos_resources]: https://learn.microsoft.com/azure/cosmos-db/databases-containers-items
1010+
[cosmos_sql_queries]: https://learn.microsoft.com/azure/cosmos-db/how-to-sql-query
1011+
[cosmos_ttl]: https://learn.microsoft.com/azure/cosmos-db/time-to-live
1012+
[cosmos_integrated_cache]: https://learn.microsoft.com/azure/cosmos-db/integrated-cache
1013+
[cosmos_configure_integrated_cache]: https://learn.microsoft.com/azure/cosmos-db/how-to-configure-integrated-cache
10141014
[python]: https://www.python.org/downloads/
10151015
[ref_container_delete_item]: https://aka.ms/azsdk-python-cosmos-ref-delete-item
10161016
[ref_container_query_items]: https://aka.ms/azsdk-python-cosmos-ref-query-items

sdk/cosmos/azure-cosmos/azure/cosmos/aio/_database.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ async def create_container(
199199
:paramtype match_condition: ~azure.core.MatchConditions
200200
:keyword List[Dict[str, str]] computed_properties: **provisional** Sets The computed properties for this
201201
container in the Azure Cosmos DB Service. For more Information on how to use computed properties visit
202-
`here: https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/computed-properties?tabs=dotnet`
202+
`here: https://learn.microsoft.com/azure/cosmos-db/nosql/query/computed-properties?tabs=dotnet`
203203
:keyword response_hook: A callable invoked with the response metadata.
204204
:paramtype response_hook: Callable[[Dict[str, str], Dict[str, Any]], None]
205205
:keyword int analytical_storage_ttl: Analytical store time to live (TTL) for items in the container. A value of
@@ -324,7 +324,7 @@ async def create_container_if_not_exists(
324324
:paramtype match_condition: ~azure.core.MatchConditions
325325
:keyword List[Dict[str, str]] computed_properties: **provisional** Sets The computed properties for this
326326
container in the Azure Cosmos DB Service. For more Information on how to use computed properties visit
327-
`here: https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/computed-properties?tabs=dotnet`
327+
`here: https://learn.microsoft.com/azure/cosmos-db/nosql/query/computed-properties?tabs=dotnet`
328328
:keyword response_hook: A callable invoked with the response metadata.
329329
:paramtype response_hook: Callable[[Dict[str, str], Dict[str, Any]], None]
330330
:keyword int analytical_storage_ttl: Analytical store time to live (TTL) for items in the container. A value of

sdk/cosmos/azure-cosmos/azure/cosmos/database.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def create_container( # pylint:disable=docstring-missing-param
201201
note that analytical storage can only be enabled on Synapse Link enabled accounts.
202202
:keyword List[Dict[str, str]] computed_properties: **provisional** Sets The computed properties for this
203203
container in the Azure Cosmos DB Service. For more Information on how to use computed properties visit
204-
`here: https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/computed-properties?tabs=dotnet`
204+
`here: https://learn.microsoft.com/azure/cosmos-db/nosql/query/computed-properties?tabs=dotnet`
205205
:keyword Dict[str, Any] vector_embedding_policy: **provisional** The vector embedding policy for the container.
206206
Each vector embedding possesses a predetermined number of dimensions, is associated with an underlying
207207
data type, and is generated for a particular distance function.
@@ -327,7 +327,7 @@ def create_container_if_not_exists( # pylint:disable=docstring-missing-param
327327
note that analytical storage can only be enabled on Synapse Link enabled accounts.
328328
:keyword List[Dict[str, str]] computed_properties: **provisional** Sets The computed properties for this
329329
container in the Azure Cosmos DB Service. For more Information on how to use computed properties visit
330-
`here: https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/computed-properties?tabs=dotnet`
330+
`here: https://learn.microsoft.com/azure/cosmos-db/nosql/query/computed-properties?tabs=dotnet`
331331
:keyword Dict[str, Any] vector_embedding_policy: The vector embedding policy for the container. Each vector
332332
embedding possesses a predetermined number of dimensions, is associated with an underlying data type, and
333333
is generated for a particular distance function.

sdk/cosmos/azure-cosmos/azure/cosmos/partition_key.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class _Infinity:
9393
class PartitionKey(dict):
9494
"""Key used to partition a container into logical partitions.
9595
96-
See https://docs.microsoft.com/azure/cosmos-db/partitioning-overview#choose-partitionkey
96+
See https://learn.microsoft.com/azure/cosmos-db/partitioning-overview#choose-partitionkey
9797
for information on how to choose partition keys.
9898
9999
:ivar str path: The path of the partition key

sdk/cosmos/azure-cosmos/doc/setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ The unit tests can be run by right-clicking a specific test file or specific tes
133133
<!-- LINKS -->
134134
[cosmos_db_sdk_repo]: https://github.com/Azure/azure-sdk-for-python
135135
[azure_sub]: https://azure.microsoft.com/free/
136-
[cosmos_account]: https://docs.microsoft.com/azure/cosmos-db/account-overview
136+
[cosmos_account]: https://learn.microsoft.com/azure/cosmos-db/account-overview
137137
[python]: https://www.python.org/downloads/
138138
[pycharm]: https://www.jetbrains.com/pycharm/
139139
[cosmos_db_emulator]: https://learn.microsoft.com/azure/cosmos-db/emulator

sdk/cosmos/azure-cosmos/samples/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ The following are code samples that show common scenario operations with the Azu
5252
## Prerequisites
5353
* Python 3.8+
5454
* You must have an [Azure subscription](https://azure.microsoft.com/free/) and an
55-
[Azure Cosmos DB account](https://docs.microsoft.com/azure/cosmos-db/create-sql-api-python#create-a-database-account) to run these samples.
55+
[Azure Cosmos DB account](https://learn.microsoft.com/azure/cosmos-db/create-sql-api-python#create-a-database-account) to run these samples.
5656

5757
## Setup
5858

sdk/cosmos/azure-cosmos/samples/access_cosmos_with_aad.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# Prerequisites -
1414
#
1515
# 1. An Azure Cosmos account -
16-
# https://docs.microsoft.com/azure/cosmos-db/create-sql-api-python#create-a-database-account
16+
# https://learn.microsoft.com/azure/cosmos-db/create-sql-api-python#create-a-database-account
1717
#
1818
# 2. Microsoft Azure Cosmos
1919
# pip install azure-cosmos>=4.3.0b4

sdk/cosmos/azure-cosmos/samples/access_cosmos_with_aad_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# Prerequisites -
1515
#
1616
# 1. An Azure Cosmos account -
17-
# https://docs.microsoft.com/azure/cosmos-db/create-sql-api-python#create-a-database-account
17+
# https://learn.microsoft.com/azure/cosmos-db/create-sql-api-python#create-a-database-account
1818
#
1919
# 2. Microsoft Azure Cosmos
2020
# pip install azure-cosmos>=4.3.0b4

sdk/cosmos/azure-cosmos/samples/access_cosmos_with_resource_token.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# Prerequisites -
1818
#
1919
# 1. An Azure Cosmos account -
20-
# https://docs.microsoft.com/azure/cosmos-db/create-sql-api-python#create-a-database-account
20+
# https://learn.microsoft.com/azure/cosmos-db/create-sql-api-python#create-a-database-account
2121
#
2222
# 2. Microsoft Azure Cosmos
2323
# pip install azure-cosmos>=4.0.0

0 commit comments

Comments
 (0)