Method: Aws::CodeCommit::Client#update_repository_encryption_key

Defined in:
lib/aws-sdk-codecommit/client.rb

#update_repository_encryption_key(params = {}) ⇒ Types::UpdateRepositoryEncryptionKeyOutput

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

Examples:

Request syntax with placeholder values


resp = client.update_repository_encryption_key({
  repository_name: "RepositoryName", # required
  kms_key_id: "KmsKeyId", # required
})

Response structure


resp.repository_id #=> String
resp.kms_key_id #=> String
resp.original_kms_key_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :repository_name (required, String)

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

  • :kms_key_id (required, String)

    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][1

    in the Decrypt API description in the *Key Management

    Service API Reference*.

    [1]: docs.aws.amazon.com/APIReference/API_Decrypt.html#KMS-Decrypt-request-KeyId

Returns:

See Also:



5106
5107
5108
5109
# File 'lib/aws-sdk-codecommit/client.rb', line 5106

def update_repository_encryption_key(params = {}, options = {})
  req = build_request(:update_repository_encryption_key, params)
  req.send_request(options)
end