1. Packages
  2. AWS Native
  3. API Docs
  4. kms
  5. getAlias

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.102.0 published on Tuesday, Apr 16, 2024 by Pulumi

aws-native.kms.getAlias

Explore with Pulumi AI

aws-native logo

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.102.0 published on Tuesday, Apr 16, 2024 by Pulumi

    The AWS::KMS::Alias resource specifies a display name for a KMS key. You can use an alias to identify a KMS key in the KMS console, in the DescribeKey operation, and in cryptographic operations, such as Decrypt and GenerateDataKey. Adding, deleting, or updating an alias can allow or deny permission to the KMS key. For details, see ABAC for in the Developer Guide. Using an alias to refer to a KMS key can help you simplify key management. For example, an alias in your code can be associated with different KMS keys i

    Using getAlias

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getAlias(args: GetAliasArgs, opts?: InvokeOptions): Promise<GetAliasResult>
    function getAliasOutput(args: GetAliasOutputArgs, opts?: InvokeOptions): Output<GetAliasResult>
    def get_alias(alias_name: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetAliasResult
    def get_alias_output(alias_name: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetAliasResult]
    func LookupAlias(ctx *Context, args *LookupAliasArgs, opts ...InvokeOption) (*LookupAliasResult, error)
    func LookupAliasOutput(ctx *Context, args *LookupAliasOutputArgs, opts ...InvokeOption) LookupAliasResultOutput

    > Note: This function is named LookupAlias in the Go SDK.

    public static class GetAlias 
    {
        public static Task<GetAliasResult> InvokeAsync(GetAliasArgs args, InvokeOptions? opts = null)
        public static Output<GetAliasResult> Invoke(GetAliasInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAliasResult> getAlias(GetAliasArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws-native:kms:getAlias
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AliasName string
    Specifies the alias name. This value must begin with alias/ followed by a name, such as alias/ExampleAlias. If you change the value of the AliasName property, the existing alias is deleted and a new alias is created for the specified KMS key. This change can disrupt applications that use the alias. It can also allow or deny access to a KMS key affected by attribute-based access control (ABAC). The alias 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 .
    AliasName string
    Specifies the alias name. This value must begin with alias/ followed by a name, such as alias/ExampleAlias. If you change the value of the AliasName property, the existing alias is deleted and a new alias is created for the specified KMS key. This change can disrupt applications that use the alias. It can also allow or deny access to a KMS key affected by attribute-based access control (ABAC). The alias 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 .
    aliasName String
    Specifies the alias name. This value must begin with alias/ followed by a name, such as alias/ExampleAlias. If you change the value of the AliasName property, the existing alias is deleted and a new alias is created for the specified KMS key. This change can disrupt applications that use the alias. It can also allow or deny access to a KMS key affected by attribute-based access control (ABAC). The alias 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 .
    aliasName string
    Specifies the alias name. This value must begin with alias/ followed by a name, such as alias/ExampleAlias. If you change the value of the AliasName property, the existing alias is deleted and a new alias is created for the specified KMS key. This change can disrupt applications that use the alias. It can also allow or deny access to a KMS key affected by attribute-based access control (ABAC). The alias 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 .
    alias_name str
    Specifies the alias name. This value must begin with alias/ followed by a name, such as alias/ExampleAlias. If you change the value of the AliasName property, the existing alias is deleted and a new alias is created for the specified KMS key. This change can disrupt applications that use the alias. It can also allow or deny access to a KMS key affected by attribute-based access control (ABAC). The alias 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 .
    aliasName String
    Specifies the alias name. This value must begin with alias/ followed by a name, such as alias/ExampleAlias. If you change the value of the AliasName property, the existing alias is deleted and a new alias is created for the specified KMS key. This change can disrupt applications that use the alias. It can also allow or deny access to a KMS key affected by attribute-based access control (ABAC). The alias 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 .

    getAlias Result

    The following output properties are available:

    TargetKeyId string

    Associates the alias with the specified . The KMS key must be in the same AWS-account and Region. A valid key ID is required. If you supply a null or empty string value, this operation returns an error. For help finding the key ID and ARN, see Finding the key ID and ARN in the Developer Guide. Specify the key ID or the key ARN of the KMS key. For example:

    • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
    • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

    To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

    TargetKeyId string

    Associates the alias with the specified . The KMS key must be in the same AWS-account and Region. A valid key ID is required. If you supply a null or empty string value, this operation returns an error. For help finding the key ID and ARN, see Finding the key ID and ARN in the Developer Guide. Specify the key ID or the key ARN of the KMS key. For example:

    • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
    • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

    To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

    targetKeyId String

    Associates the alias with the specified . The KMS key must be in the same AWS-account and Region. A valid key ID is required. If you supply a null or empty string value, this operation returns an error. For help finding the key ID and ARN, see Finding the key ID and ARN in the Developer Guide. Specify the key ID or the key ARN of the KMS key. For example:

    • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
    • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

    To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

    targetKeyId string

    Associates the alias with the specified . The KMS key must be in the same AWS-account and Region. A valid key ID is required. If you supply a null or empty string value, this operation returns an error. For help finding the key ID and ARN, see Finding the key ID and ARN in the Developer Guide. Specify the key ID or the key ARN of the KMS key. For example:

    • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
    • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

    To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

    target_key_id str

    Associates the alias with the specified . The KMS key must be in the same AWS-account and Region. A valid key ID is required. If you supply a null or empty string value, this operation returns an error. For help finding the key ID and ARN, see Finding the key ID and ARN in the Developer Guide. Specify the key ID or the key ARN of the KMS key. For example:

    • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
    • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

    To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

    targetKeyId String

    Associates the alias with the specified . The KMS key must be in the same AWS-account and Region. A valid key ID is required. If you supply a null or empty string value, this operation returns an error. For help finding the key ID and ARN, see Finding the key ID and ARN in the Developer Guide. Specify the key ID or the key ARN of the KMS key. For example:

    • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
    • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

    To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    AWS Native is in preview. AWS Classic is fully supported.

    AWS Native v0.102.0 published on Tuesday, Apr 16, 2024 by Pulumi