Skip to content

Commit 11f79a5

Browse files
authored
Merge pull request #205276 from TimShererWithAquent/us1970076g
Azure CLI deprecated commands.
2 parents 772dc73 + 6e177bd commit 11f79a5

File tree

2 files changed

+2
-132
lines changed

2 files changed

+2
-132
lines changed

articles/active-directory/managed-identities-azure-resources/tutorial-linux-vm-access-cosmos-db.md

Lines changed: 1 addition & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -152,71 +152,7 @@ The CURL response gives you the list of Keys. For example, if you get the read-
152152
"secondaryReadonlyMasterKey":"38v5ns...7bA=="}
153153
```
154154

155-
Now that you have the access key for the Cosmos DB account you can pass it to a Cosmos DB SDK and make calls to access the account. For a quick example, you can pass the access key to the Azure CLI. You can get the `<COSMOS DB CONNECTION URL>` from the **Overview** tab on the Cosmos DB account blade in the Azure portal. Replace the `<ACCESS KEY>` with the value you obtained above:
156-
157-
```azurecli-interactive
158-
az cosmosdb collection show -c <COLLECTION ID> -d <DATABASE ID> --url-connection "<COSMOS DB CONNECTION URL>" --key <ACCESS KEY>
159-
```
160-
161-
This CLI command returns details about the collection:
162-
163-
```output
164-
{
165-
"collection": {
166-
"_conflicts": "conflicts/",
167-
"_docs": "docs/",
168-
"_etag": "\"00006700-0000-0000-0000-5a8271e90000\"",
169-
"_rid": "Es5SAM2FDwA=",
170-
"_self": "dbs/Es5SAA==/colls/Es5SAM2FDwA=/",
171-
"_sprocs": "sprocs/",
172-
"_triggers": "triggers/",
173-
"_ts": 1518498281,
174-
"_udfs": "udfs/",
175-
"id": "Test",
176-
"indexingPolicy": {
177-
"automatic": true,
178-
"excludedPaths": [],
179-
"includedPaths": [
180-
{
181-
"indexes": [
182-
{
183-
"dataType": "Number",
184-
"kind": "Range",
185-
"precision": -1
186-
},
187-
{
188-
"dataType": "String",
189-
"kind": "Range",
190-
"precision": -1
191-
},
192-
{
193-
"dataType": "Point",
194-
"kind": "Spatial"
195-
}
196-
],
197-
"path": "/*"
198-
}
199-
],
200-
"indexingMode": "consistent"
201-
}
202-
},
203-
"offer": {
204-
"_etag": "\"00006800-0000-0000-0000-5a8271ea0000\"",
205-
"_rid": "f4V+",
206-
"_self": "offers/f4V+/",
207-
"_ts": 1518498282,
208-
"content": {
209-
"offerIsRUPerMinuteThroughputEnabled": false,
210-
"offerThroughput": 400
211-
},
212-
"id": "f4V+",
213-
"offerResourceId": "Es5SAM2FDwA=",
214-
"offerType": "Invalid",
215-
"offerVersion": "V2",
216-
"resource": "dbs/Es5SAA==/colls/Es5SAM2FDwA=/"
217-
}
218-
}
219-
```
155+
Now that you have the access key for the Cosmos DB account you can pass it to a Cosmos DB SDK and make calls to access the account.
220156

221157
## Next steps
222158

articles/active-directory/managed-identities-azure-resources/tutorial-windows-vm-access-cosmos-db.md

Lines changed: 1 addition & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -131,79 +131,13 @@ The response gives you the list of Keys. For example, if you get read-only keys
131131
{"primaryReadonlyMasterKey":"bWpDxS...dzQ==",
132132
"secondaryReadonlyMasterKey":"38v5ns...7bA=="}
133133
```
134-
Now that you have the access key for the Cosmos DB account you can pass it to a Cosmos DB SDK and make calls to access the account. For a quick example, you can pass the access key to the Azure CLI. You can get the `<COSMOS DB CONNECTION URL>` from the **Overview** tab on the Cosmos DB account blade in the Azure portal. Replace the `<ACCESS KEY>` with the value you obtained above:
135-
136-
```azurecli
137-
az cosmosdb collection show -c <COLLECTION ID> -d <DATABASE ID> --url-connection "<COSMOS DB CONNECTION URL>" --key <ACCESS KEY>
138-
```
139-
140-
This CLI command returns details about the collection:
141-
142-
```output
143-
{
144-
"collection": {
145-
"_conflicts": "conflicts/",
146-
"_docs": "docs/",
147-
"_etag": "\"00006700-0000-0000-0000-5a8271e90000\"",
148-
"_rid": "Es5SAM2FDwA=",
149-
"_self": "dbs/Es5SAA==/colls/Es5SAM2FDwA=/",
150-
"_sprocs": "sprocs/",
151-
"_triggers": "triggers/",
152-
"_ts": 1518498281,
153-
"_udfs": "udfs/",
154-
"id": "Test",
155-
"indexingPolicy": {
156-
"automatic": true,
157-
"excludedPaths": [],
158-
"includedPaths": [
159-
{
160-
"indexes": [
161-
{
162-
"dataType": "Number",
163-
"kind": "Range",
164-
"precision": -1
165-
},
166-
{
167-
"dataType": "String",
168-
"kind": "Range",
169-
"precision": -1
170-
},
171-
{
172-
"dataType": "Point",
173-
"kind": "Spatial"
174-
}
175-
],
176-
"path": "/*"
177-
}
178-
],
179-
"indexingMode": "consistent"
180-
}
181-
},
182-
"offer": {
183-
"_etag": "\"00006800-0000-0000-0000-5a8271ea0000\"",
184-
"_rid": "f4V+",
185-
"_self": "offers/f4V+/",
186-
"_ts": 1518498282,
187-
"content": {
188-
"offerIsRUPerMinuteThroughputEnabled": false,
189-
"offerThroughput": 400
190-
},
191-
"id": "f4V+",
192-
"offerResourceId": "Es5SAM2FDwA=",
193-
"offerType": "Invalid",
194-
"offerVersion": "V2",
195-
"resource": "dbs/Es5SAA==/colls/Es5SAM2FDwA=/"
196-
}
197-
}
198-
```
199134

135+
Now that you have the access key for the Cosmos DB account you can pass it to a Cosmos DB SDK and make calls to access the account.
200136

201137
## Disable
202138

203139
[!INCLUDE [msi-tut-disable](../../../includes/active-directory-msi-tut-disable.md)]
204140

205-
206-
207141
## Next steps
208142

209143
In this tutorial, you learned how to use a Windows VM system-assigned identity to access Cosmos DB. To learn more about Cosmos DB see:

0 commit comments

Comments
 (0)