AWS Native is in preview. AWS Classic is fully supported.
aws-native.kms.getAlias
Explore with Pulumi AI
AWS Native is in preview. AWS Classic is fully supported.
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:
- Alias
Name string - Specifies the alias name. This value must begin with
alias/
followed by a name, such asalias/ExampleAlias
. If you change the value of theAliasName
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 withalias/aws/
. Thealias/aws/
prefix is reserved for .
- Alias
Name string - Specifies the alias name. This value must begin with
alias/
followed by a name, such asalias/ExampleAlias
. If you change the value of theAliasName
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 withalias/aws/
. Thealias/aws/
prefix is reserved for .
- alias
Name String - Specifies the alias name. This value must begin with
alias/
followed by a name, such asalias/ExampleAlias
. If you change the value of theAliasName
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 withalias/aws/
. Thealias/aws/
prefix is reserved for .
- alias
Name string - Specifies the alias name. This value must begin with
alias/
followed by a name, such asalias/ExampleAlias
. If you change the value of theAliasName
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 withalias/aws/
. Thealias/aws/
prefix is reserved for .
- alias_
name str - Specifies the alias name. This value must begin with
alias/
followed by a name, such asalias/ExampleAlias
. If you change the value of theAliasName
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 withalias/aws/
. Thealias/aws/
prefix is reserved for .
- alias
Name String - Specifies the alias name. This value must begin with
alias/
followed by a name, such asalias/ExampleAlias
. If you change the value of theAliasName
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 withalias/aws/
. Thealias/aws/
prefix is reserved for .
getAlias Result
The following output properties are available:
- Target
Key stringId 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.
- Key ID:
- Target
Key stringId 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.
- Key ID:
- target
Key StringId 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.
- Key ID:
- target
Key stringId 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.
- Key ID:
- target_
key_ strid 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.
- Key ID:
- target
Key StringId 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.
- Key ID:
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
AWS Native is in preview. AWS Classic is fully supported.