Modifier

Partager via


Get-AzCosmosDbClientEncryptionKey

Gets the CosmosDB Client Encryption Key.

Syntax

Get-AzCosmosDbClientEncryptionKey
   -ResourceGroupName <String>
   [-Name <String>]
   [-DefaultProfile <IAzureContextContainer>]
   -AccountName <String>
   -DatabaseName <String>
   [<CommonParameters>]
Get-AzCosmosDbClientEncryptionKey
   [-Name <String>]
   -SqlDatabaseObject <PSSqlDatabaseGetResults>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Get-AzCosmosDbClientEncryptionKey cmdlet gets the list of all existing CosmosDB Client Encryption Key for a given ResourceGroupName, AccountName and DatabaseName and gets a single CosmosDB Client Encryption Key for a given ResourceGroupName, AccountName, DatabaseName and ClientEncryptionKeyName.

Examples

Example 1

Get-AzCosmosDbClientEncryptionKey -AccountName myAccountName -DatabaseName myDatabaseName -ResourceGroupName myRgName

Name                     : {clientEncryptionKeyName}
Id                       : Id
Resource                 : Microsoft.Azure.Commands.CosmosDB.Models.PSSqlClientEncryptionKeyGetPropertiesResource

The command gets all the client encryption keys in the database as set in myRgName.

Parameters

-AccountName

Name of the Cosmos DB database account.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-DatabaseName

Database name.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Client Encryption Key name.

Type:String
Aliases:ClientEncryptionKeyName
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Name of resource group.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SqlDatabaseObject

Sql Database object.

Type:PSSqlDatabaseGetResults
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Inputs

PSSqlDatabaseGetResults

Outputs

PSSqlClientEncryptionKeyGetResults