Skip to content

Commit f9b1908

Browse files
authored
Fixed Az.CosmosDB examples (Azure#16791)
1 parent 5630ece commit f9b1908

7 files changed

+64
-51
lines changed

src/CosmosDB/CosmosDB/help/New-AzCosmosDBGremlinIndexingPolicy.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,13 @@ The **New-AzCosmosDBGremlinIndexingPolicy** cmdlet creates a new object of type
2626
### Example 1
2727
```powershell
2828
PS C:\> $ipath1 = New-AzCosmosDBGremlinIncludedPathIndex -DataType String -Precision -1 -Kind Hash
29-
PS C:\>> $ipath2 = New-AzCosmosDBGremlinIncludedPathIndex -DataType String -Precision -1 -Kind Hash
30-
PS C:\>> $IncludedPath = New-AzCosmosDBGremlinIncludedPath -Path "/*" -Index $ipath1, $ipath2
31-
PS C:\>> $SpatialSpec = New-AzCosmosDBGremlinSpatialSpec -Path "/mySpatialPath/*" -Type "Point", "LineString", "Polygon", "MultiPolygon"
32-
PS C:\>> $cp1 = New-AzCosmosDBGremlinCompositePath -Path "/abc" -Order Ascending
33-
PS C:\>> $cp2 = New-AzCosmosDBGremlinCompositePath -Path "/aberc" -Order Descending
34-
PS C:\>> $compositePath = (($cp1, $cp2), ($cp2, $cp1))
35-
PS C:\>> New-AzCosmosDBGremlinIndexingPolicy -IncludedPath $IncludedPath -SpatialSpec $SpatialSpec -CompositePath $compositePath -ExcludedPath "/myPathToNotIndex/*" -Automatic 1 -IndexingMode Consistent
36-
29+
PS C:\> $ipath2 = New-AzCosmosDBGremlinIncludedPathIndex -DataType String -Precision -1 -Kind Hash
30+
PS C:\> $IncludedPath = New-AzCosmosDBGremlinIncludedPath -Path "/*" -Index $ipath1, $ipath2
31+
PS C:\> $SpatialSpec = New-AzCosmosDBGremlinSpatialSpec -Path "/mySpatialPath/*" -Type "Point", "LineString", "Polygon", "MultiPolygon"
32+
PS C:\> $cp1 = New-AzCosmosDBGremlinCompositePath -Path "/abc" -Order Ascending
33+
PS C:\> $cp2 = New-AzCosmosDBGremlinCompositePath -Path "/aberc" -Order Descending
34+
PS C:\> $compositePath = (($cp1, $cp2), ($cp2, $cp1))
35+
PS C:\> New-AzCosmosDBGremlinIndexingPolicy -IncludedPath $IncludedPath -SpatialSpec $SpatialSpec -CompositePath $compositePath -ExcludedPath "/myPathToNotIndex/*" -Automatic 1 -IndexingMode Consistent
3736
3837
Automatic : True
3938
IndexingMode : Consistent
@@ -44,8 +43,6 @@ CompositeIndexes : {Microsoft.Azure.Commands.CosmosDB.Models.PSCompositePath Mic
4443
SpatialIndexes : {Microsoft.Azure.Commands.CosmosDB.Models.PSSpatialSpec}
4544
```
4645

47-
{{ Add example description here }}
48-
4946
## PARAMETERS
5047

5148
### -Automatic

src/CosmosDB/CosmosDB/help/New-AzCosmosDBSqlConflictResolutionPolicy.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ Mode ConflictResolutionPath ConflictResolutionProcedure
3131
LastWriterWins /myPath
3232
```
3333

34-
{{ Add example description here }}
35-
3634
## PARAMETERS
3735

3836
### -ConflictResolutionProcedure

src/CosmosDB/CosmosDB/help/Update-AzCosmosDBAccountFailoverPriority.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ schema: 2.0.0
88
# Update-AzCosmosDBAccountFailoverPriority
99

1010
## SYNOPSIS
11-
{{ Fill in the Synopsis }}
11+
Update Failover Region Priority of a CosmosDB Account.
1212

1313
## SYNTAX
1414

@@ -31,13 +31,34 @@ Update-AzCosmosDBAccountFailoverPriority -FailoverPolicy <String[]> -InputObject
3131
```
3232

3333
## DESCRIPTION
34-
{{ Fill in the Description }}
34+
Update Failover Region Priority of a CosmosDB Account.
3535

3636
## EXAMPLES
3737

3838
### Example 1
3939
```powershell
40-
PS C:\> Update-AzCosmosDBAccountFailoverPriority -ResourceGroupName rg -Name dbname -FailoverPolicy "region1, region2, region3"
40+
PS C:\> Update-AzCosmosDBAccountFailoverPriority -ResourceGroupName rg -Name dbname -FailoverPolicy "region1", "region2", "region3"
41+
42+
Id : /subscriptions/{subscriptionid}/resourceGroups/rg/providers/Microsoft.DocumentDB/databaseAccounts/dbname
43+
Name : dbname
44+
Location : region1
45+
Tags : {}
46+
EnableCassandraConnector :
47+
EnableMultipleWriteLocations : True
48+
VirtualNetworkRules : {}
49+
FailoverPolicies : {dbname-region1, dbname-region2, dbname-region3}
50+
Locations : {dbname-region1, dbname-region2, dbname-region3}
51+
ReadLocations : {dbname-region1, dbname-region2, dbname-region3}
52+
WriteLocations : {dbname-region1}
53+
Capabilities : {}
54+
ConsistencyPolicy : Microsoft.Azure.Management.CosmosDB.Fluent.Models.ConsistencyPolicy
55+
EnableAutomaticFailover : False
56+
IsVirtualNetworkFilterEnabled : False
57+
IpRules : {}
58+
DatabaseAccountOfferType : Standard
59+
DocumentEndpoint : https://dbname.documents.azure.com:443/
60+
ProvisioningState : Succeeded
61+
Kind : GlobalDocumentDB
4162
```
4263

4364
FailoverPolicies updated with region1 as FailoverPriority 1, region2 as FailoverPriority 2 and region3 as FailoverPriority 3.

src/CosmosDB/CosmosDB/help/Update-AzCosmosDBAccountRegion.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -34,35 +34,36 @@ Update-AzCosmosDBAccountRegion [-Location <String[]>] [-LocationObject <PSLocati
3434

3535
## DESCRIPTION
3636
Update Regions of a CosmosDB Account. Location can be provided either as an object of type PSLocation or as strings of Location Name ordered by failover priority.
37-
LocationObject parameter expects the list of current locations (failover prioritiies included) appended by the new LocationObjects corresponding to new locations to be added.
37+
LocationObject parameter expects the list of current locations (failover priorities included) appended by the new LocationObjects corresponding to new locations to be added.
3838
Location parameter expects the list of current location(ordered by failover priority) and the new locations.
3939
Please note, we only support Addition of Regions. Please provide either Location or LocationObject.
4040

4141
## EXAMPLES
4242

4343
### Example 1
4444
```powershell
45-
PS C:\> Update-AzCosmosDBAccountRegion -ResourceGroupName rg1 -Name dbname -Location "location1, location2"
45+
PS C:\> Update-AzCosmosDBAccountRegion -ResourceGroupName rg -Name dbname -Location "location1", "location2"
4646
47-
Kind : GlobalDocumentDB
48-
ProvisioningState : Succeeded
49-
DocumentEndpoint : https://dbname.documents.azure.com:443/
50-
DatabaseAccountOfferType : Standard
51-
IpRangeFilter :
52-
IsVirtualNetworkFilterEnabled : False
53-
EnableAutomaticFailover : False
54-
ConsistencyPolicy : Microsoft.Azure.Management.CosmosDB.Fluent.Models.ConsistencyPolicy
55-
Capabilities : {}
56-
WriteLocations : {dbname-location1}
57-
ReadLocations : {dbname-location2}
58-
FailoverPolicies : {dbname-location1, dbname-location2}
59-
VirtualNetworkRules : {}
60-
EnableMultipleWriteLocations : False
47+
Id : /subscriptions/{subscriptionid}/resourceGroups/rg/providers/Microsoft.DocumentDB/databaseAccounts/dbname
48+
Name : dbname
6149
Location : location1
6250
Tags : {}
63-
Id : /subscriptions/{subscriptionid}/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/dbname
64-
Name : dbname
65-
Type : Microsoft.DocumentDB/databaseAccounts
51+
EnableCassandraConnector :
52+
EnableMultipleWriteLocations : True
53+
VirtualNetworkRules : {}
54+
FailoverPolicies : {dbname-location1, dbname-location2}
55+
Locations : {dbname-location1, dbname-location2}
56+
ReadLocations : {dbname-location1, dbname-location2}
57+
WriteLocations : {dbname-location1}
58+
Capabilities : {}
59+
ConsistencyPolicy : Microsoft.Azure.Management.CosmosDB.Fluent.Models.ConsistencyPolicy
60+
EnableAutomaticFailover : False
61+
IsVirtualNetworkFilterEnabled : False
62+
IpRules : {}
63+
DatabaseAccountOfferType : Standard
64+
DocumentEndpoint : https://dbname.documents.azure.com:443/
65+
ProvisioningState : Succeeded
66+
Kind : GlobalDocumentDB
6667
```
6768

6869
## PARAMETERS

src/CosmosDB/CosmosDB/help/Update-AzCosmosDBCassandraTable.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,14 @@ Updates the CosmosDB Cassandra Table. Performs a client side patch operation by
4444
### Example 1
4545
```powershell
4646
PS C:\> Update-AzCosmosDBCassandraTable -AccountName myAccountName -ResourceGroupName myRgName -KeyspaceName myKeyspaceName -Name myTableName -Schema updatedSchema
47-
Name : myTable
48-
Id : /subscriptions/mySubId/resourceGroups/myRgName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/cassandraKeyspaces/myKeyspaceName/t
49-
ables/myTableName
50-
Location :
51-
Tags :
52-
Resource : Microsoft.Azure.Commands.CosmosDB.Models.PSCassandraTableGetPropertiesResource
53-
```
5447
55-
{{ Add example description here }}
48+
Name : myTable
49+
Id : /subscriptions/mySubId/resourceGroups/myRgName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/cassandraKeyspaces/myKeyspaceName/t
50+
ables/myTableName
51+
Location :
52+
Tags :
53+
Resource : Microsoft.Azure.Commands.CosmosDB.Models.PSCassandraTableGetPropertiesResource
54+
```
5655

5756
## PARAMETERS
5857

src/CosmosDB/CosmosDB/help/Update-AzCosmosDBMongoDBCollectionThroughput.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,14 @@ Updates the throughput value of a CosmosDB MongoDB Collection.
4141
### Example 1
4242
```powershell
4343
PS C:\> Update-AzCosmosDBMongoDBCollectionThroughput -AccountName {myAccountName} -ResourceGroupName {myResourceGroupName} -DatabaseName {mydatabaseName} -Name {myCollectionName} -Throughput {updatedThroughputValue}
44+
4445
Name : mxGp
4546
Id : /subscriptions/{mySubscriptionId}/resourceGroups/{myResourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{myAccountName}/mongodbDatabase/{mydatabaseName}/collections/{myCollectionName}/throughputSettings/default
4647
Throughput : {updatedThroughputValue}
4748
MinimumThroughput : 400
4849
OfferReplacePending :
4950
```
5051

51-
{{ Add example description here }}
52-
5352
## PARAMETERS
5453

5554
### -AccountName

src/CosmosDB/CosmosDB/help/Update-AzCosmosDBSqlRoleAssignment.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,18 @@ RoleDefinitionId and Id can be either fully qualified or just the Guid.
4343

4444
### Example 1
4545
```
46-
PS C:\> Update-AzCosmosDBSqlRoleAssignment
47-
-AccountName accountName
48-
-ResourceGroupName resourceGroupName
49-
-Id roleAssignmentId
50-
-RoleDefinitionId "/subscriptions/subId/resourceGroups/resourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/accountName/sqlRoleDefinitions/roleDefinitionId"
46+
PS C:\> Update-AzCosmosDBSqlRoleAssignment `
47+
-AccountName accountName `
48+
-ResourceGroupName resourceGroupName `
49+
-Id roleAssignmentId `
50+
-RoleDefinitionId "/subscriptions/subId/resourceGroups/resourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/accountName/sqlRoleDefinitions/roleDefinitionId"
5151
5252
Id : /subscriptions/subId/resourceGroups/resourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/accountName/sqlRoleAssignments/roleAssignmentId
5353
Scope : /subscriptions/subId/resourceGroups/resourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/accountName/
5454
RoleDefinitionId : /subscriptions/subId/resourceGroups/resourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/accountName/sqlRoleDefinitions/roleDefinitionId
5555
PrincipalId : principalId
5656
```
5757

58-
{{ Add example description here }}
59-
6058
## PARAMETERS
6159

6260
### -AccountName

0 commit comments

Comments
 (0)