-
Notifications
You must be signed in to change notification settings - Fork 46
New CosmosDbAccountMasterKey
This will regenerate a specific master key for an existing Cosmos DB account in Azure.
New-CosmosDbAccountMasterKey -Name <String> -ResourceGroupName <String> [-MasterKeyType <String>]
[<CommonParameters>]
You should change the access keys to your Azure Cosmos DB account periodically to help keep your connections more secure. Two access keys are assigned to enable you to maintain connections to the Azure Cosmos DB account using one access key while you regenerate the other access key.
This function will enable you to regenerate the master keys.
PS C:\> New-CosmosDbAccountMasterKey -Name 'MyCosmosDBAccount' -ResourceGroupName 'MyResourceGroup'
Regenerate the Primary Master Key for the 'MyCosmosDBAccount' in the resource group 'MyResourceGroup'.
PS C:\> Get-CosmosDbAccountMasterKey -Name 'MyCosmosDBAccount' -ResourceGroupName 'MyResourceGroup' -MasterKeyType 'SecondaryReadonlyMasterKey'
Regenerate the Secondary Readonly Master Key for the 'MyCosmosDBAccount' in the resource group 'MyResourceGroup'.
The master key type to regenerate.
Type: String
Parameter Sets: (All)
Aliases:
Accepted values: PrimaryMasterKey, SecondaryMasterKey, PrimaryReadonlyMasterKey, SecondaryReadonlyMasterKey
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The name of the Cosmos DB account to return the connection strings for.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The resource group containing the Cosmos DB account.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
- ConvertTo-CosmosDbTokenDateString
- Get-CosmosDbAccount
- Get-CosmosDbAccountConnectionString
- Get-CosmosDbAccountMasterKey
- Get-CosmosDbAttachment
- Get-CosmosDbAttachmentResourcePath
- Get-CosmosDbAuthorizationHeaderFromContext
- Get-CosmosDbCollection
- Get-CosmosDbCollectionResourcePath
- Get-CosmosDbDatabase
- Get-CosmosDbDatabaseResourcePath
- Get-CosmosDbDocument
- Get-CosmosDbDocumentResourcePath
- Get-CosmosDbEntraIdToken
- Get-CosmosDbOffer
- Get-CosmosDbOfferResourcePath
- Get-CosmosDbPermission
- Get-CosmosDbPermissionResourcePath
- Get-CosmosDbStoredProcedure
- Get-CosmosDbStoredProcedureResourcePath
- Get-CosmosDbTrigger
- Get-CosmosDbTriggerResourcePath
- Get-CosmosDbUri
- Get-CosmosDbUser
- Get-CosmosDbUserDefinedFunction
- Get-CosmosDbUserDefinedFunctionResourcePath
- Get-CosmosDbUserResourcePath
- Invoke-CosmosDbRequest
- Invoke-CosmosDbStoredProcedure
- New-CosmosDbAccount
- New-CosmosDbAccountMasterKey
- New-CosmosDbAttachment
- New-CosmosDbBackoffPolicy
- New-CosmosDbContext
- New-CosmosDbCollection
- New-CosmosDbCollectionExcludedPath
- New-CosmosDbCollectionIncludedPath
- New-CosmosDbCollectionIncludedPathIndex
- New-CosmosDbCollectionIndexingPolicy
- New-CosmosDbCollectionUniqueKey
- New-CosmosDbCollectionUniqueKeyPolicy
- New-CosmosDbDatabase
- New-CosmosDbDocument
- New-CosmosDbInvalidArgumentException
- New-CosmosDbInvalidOperationException
- New-CosmosDbPermission
- New-CosmosDbStoredProcedure
- New-CosmosDbTrigger
- New-CosmosDbUser
- New-CosmosDbUserDefinedFunction
- Remove-CosmosDbAccount
- Remove-CosmosDbAttachment
- Remove-CosmosDbCollection
- Remove-CosmosDbDatabase
- Remove-CosmosDbDocument
- Remove-CosmosDbPermission
- Remove-CosmosDbStoredProcedure
- Remove-CosmosDbTrigger
- Remove-CosmosDbUser
- Remove-CosmosDbUserDefinedFunction
- Set-CosmosDbAccount
- Set-CosmosDbAttachment
- Set-CosmosDbAttachmentType
- Set-CosmosDbCollectionType
- Set-CosmosDbDatabaseType
- Set-CosmosDbDocument
- Set-CosmosDbDocumentType
- Set-CosmosDbOffer
- Set-CosmosDbOfferType
- Set-CosmosDbPermissionType
- Set-CosmosDbStoredProcedure
- Set-CosmosDbStoredProcedureType
- Set-CosmosDbTrigger
- Set-CosmosDbTriggerType
- Set-CosmosDbUser
- Set-CosmosDbUserDefinedFunction
- Set-CosmosDbUserDefinedFunctionType
- Set-CosmosDbUserType