alias#

State module for managing Amazon KMS Alias.

async idem_aws.states.aws.kms.alias.present(hub, ctx, name: str, target_key_id: str, resource_id: str = None) Dict[str, Any][source]#

Creates a friendly name for a KMS key.

You can associate the alias with any customer managed key in the same Amazon Web Services Region. Each alias is associated with only one KMS key at a time, but a KMS key can have multiple aliases. A valid KMS key is required. You can’t create an alias without a KMS key.

The alias must be unique in the account and Region, but you can have aliases with the same name in different Regions

Parameters:
  • name (str) – The name of the alias. This value must begin with alias/ followed by a name, such as alias/ExampleAlias. The AliasName value must be string of 1-256 characters. It can contain only alphanumeric characters, forward slashes (/), underscores (_), and dashes (-). The alias name cannot begin with alias/aws/. The alias/aws/ prefix is reserved for Amazon Web Services managed keys.

  • target_key_id (str) – Associates the alias with the specified customer managed key . The KMS key must be in the same Amazon Web Services Region..

  • resource_id (str, Optional) – The name of the alias in Amazon Web Services.

Request Syntax:
[idem_test_aws_kms_alias]:
  aws.kms.alias.present:
    - name: 'string'
    - target_key_id: 'string'
    - resource_id: 'string'
Returns:

Dict[str, Any]

Examples

idem_test_aws_kms_alias:
  aws.kms.alias.present:
      - name: alias/my-kms-key
      - target_key_id: 1234abcd-12ab-34cd-56ef-1234567890ab
async idem_aws.states.aws.kms.alias.absent(hub, ctx, name: str, resource_id: str = None) Dict[str, Any][source]#

Deletes an AWS KMS alias.

Because an alias is not a property of a KMS key, you can delete and change the aliases of a KMS key without affecting the KMS key.

Parameters:
  • name (str) – The name of the alias.

  • resource_id (str, Optional) – The name of the alias in Amazon Web Services.

Returns:

Dict[str, Any]

Request Syntax:
[idem_test_aws_kms_alias]:
  aws.kms.alias.absent:
    - name: 'string'
    - resource_id: 'string'

Examples

idem_test_aws_kms_alias:
  aws.kms.alias.absent:
    - name: alias/my-kms-key
    - resource_id: alias/my-kms-key
async idem_aws.states.aws.kms.alias.describe(hub, ctx) Dict[str, Dict[str, Any]][source]#

Describes AWS KMS alias in a way that can be recreated/managed with the corresponding “present” function.

Returns:

Dict[str, Dict[str, Any]]

Examples

$ idem describe aws.kms.alias