CodeCommit / Client / update_repository_encryption_key

update_repository_encryption_key#

CodeCommit.Client.update_repository_encryption_key(**kwargs)#

Updates the Key Management Service encryption key used to encrypt and decrypt a CodeCommit repository.

See also: AWS API Documentation

Request Syntax

response = client.update_repository_encryption_key(
    repositoryName='string',
    kmsKeyId='string'
)
Parameters:
  • repositoryName (string) –

    [REQUIRED]

    The name of the repository for which you want to update the KMS encryption key used to encrypt and decrypt the repository.

  • kmsKeyId (string) –

    [REQUIRED]

    The ID of the encryption key. You can view the ID of an encryption key in the KMS console, or use the KMS APIs to programmatically retrieve a key ID. For more information about acceptable values for keyID, see KeyId in the Decrypt API description in the Key Management Service API Reference.

Return type:

dict

Returns:

Response Syntax

{
    'repositoryId': 'string',
    'kmsKeyId': 'string',
    'originalKmsKeyId': 'string'
}

Response Structure

  • (dict) –

    • repositoryId (string) –

      The ID of the repository.

    • kmsKeyId (string) –

      The ID of the encryption key.

    • originalKmsKeyId (string) –

      The ID of the encryption key formerly used to encrypt and decrypt the repository.

Exceptions