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

  • CodeCommit.Client.exceptions.RepositoryNameRequiredException

  • CodeCommit.Client.exceptions.RepositoryDoesNotExistException

  • CodeCommit.Client.exceptions.InvalidRepositoryNameException

  • CodeCommit.Client.exceptions.EncryptionKeyRequiredException

  • CodeCommit.Client.exceptions.EncryptionIntegrityChecksFailedException

  • CodeCommit.Client.exceptions.EncryptionKeyAccessDeniedException

  • CodeCommit.Client.exceptions.EncryptionKeyInvalidIdException

  • CodeCommit.Client.exceptions.EncryptionKeyInvalidUsageException

  • CodeCommit.Client.exceptions.EncryptionKeyDisabledException

  • CodeCommit.Client.exceptions.EncryptionKeyNotFoundException

  • CodeCommit.Client.exceptions.EncryptionKeyUnavailableException