KeyAlias class

Resource for managing an AWS Payment Cryptography Control Plane Key Alias.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const test = new aws.paymentcryptography.Key("test", {
    keyAttributes: [{
        keyModesOfUses: [{
            decrypt: true,
            encrypt: true,
            wrap: true,
            unwrap: true,
        }],
        keyAlgorithm: "TDES_3KEY",
        keyClass: "SYMMETRIC_KEY",
        keyUsage: "TR31_P0_PIN_ENCRYPTION_KEY",
    }],
    exportable: true,
});
const testKeyAlias = new aws.paymentcryptography.KeyAlias("test", {
    aliasName: "alias/test-alias",
    keyArn: test.arn,
});
import pulumi
import pulumi_aws as aws

test = aws.paymentcryptography.Key("test",
    key_attributes=[{
        "key_modes_of_uses": [{
            "decrypt": True,
            "encrypt": True,
            "wrap": True,
            "unwrap": True,
        }],
        "key_algorithm": "TDES_3KEY",
        "key_class": "SYMMETRIC_KEY",
        "key_usage": "TR31_P0_PIN_ENCRYPTION_KEY",
    }],
    exportable=True)
test_key_alias = aws.paymentcryptography.KeyAlias("test",
    alias_name="alias/test-alias",
    key_arn=test.arn)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var test = new Aws.PaymentCryptography.Key("test", new()
    {
        KeyAttributes = new[]
        {
            new Aws.PaymentCryptography.Inputs.KeyKeyAttributeArgs
            {
                KeyModesOfUses = new[]
                {
                    new Aws.PaymentCryptography.Inputs.KeyKeyAttributeKeyModesOfUseArgs
                    {
                        Decrypt = true,
                        Encrypt = true,
                        Wrap = true,
                        Unwrap = true,
                    },
                },
                KeyAlgorithm = "TDES_3KEY",
                KeyClass = "SYMMETRIC_KEY",
                KeyUsage = "TR31_P0_PIN_ENCRYPTION_KEY",
            },
        },
        Exportable = true,
    });

    var testKeyAlias = new Aws.PaymentCryptography.KeyAlias("test", new()
    {
        AliasName = "alias/test-alias",
        KeyArn = test.Arn,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/paymentcryptography"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		test, err := paymentcryptography.NewKey(ctx, "test", &paymentcryptography.KeyArgs{
			KeyAttributes: paymentcryptography.KeyKeyAttributeArray{
				&paymentcryptography.KeyKeyAttributeArgs{
					KeyModesOfUses: paymentcryptography.KeyKeyAttributeKeyModesOfUseArray{
						&paymentcryptography.KeyKeyAttributeKeyModesOfUseArgs{
							Decrypt: pulumi.Bool(true),
							Encrypt: pulumi.Bool(true),
							Wrap:    pulumi.Bool(true),
							Unwrap:  pulumi.Bool(true),
						},
					},
					KeyAlgorithm: pulumi.String("TDES_3KEY"),
					KeyClass:     pulumi.String("SYMMETRIC_KEY"),
					KeyUsage:     pulumi.String("TR31_P0_PIN_ENCRYPTION_KEY"),
				},
			},
			Exportable: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_, err = paymentcryptography.NewKeyAlias(ctx, "test", &paymentcryptography.KeyAliasArgs{
			AliasName: pulumi.String("alias/test-alias"),
			KeyArn:    test.Arn,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_paymentcryptography_key" "test" {
  key_attributes {
    key_modes_of_uses {
      decrypt = true
      encrypt = true
      wrap    = true
      unwrap  = true
    }
    key_algorithm = "TDES_3KEY"
    key_class     = "SYMMETRIC_KEY"
    key_usage     = "TR31_P0_PIN_ENCRYPTION_KEY"
  }
  exportable = true
}
resource "aws_paymentcryptography_keyalias" "test" {
  alias_name = "alias/test-alias"
  key_arn    = aws_paymentcryptography_key.test.arn
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.paymentcryptography.Key;
import com.pulumi.aws.paymentcryptography.KeyArgs;
import com.pulumi.aws.paymentcryptography.inputs.KeyKeyAttributeArgs;
import com.pulumi.aws.paymentcryptography.inputs.KeyKeyAttributeKeyModesOfUseArgs;
import com.pulumi.aws.paymentcryptography.KeyAlias;
import com.pulumi.aws.paymentcryptography.KeyAliasArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var test = new Key("test", KeyArgs.builder()
            .keyAttributes(KeyKeyAttributeArgs.builder()
                .keyModesOfUses(KeyKeyAttributeKeyModesOfUseArgs.builder()
                    .decrypt(true)
                    .encrypt(true)
                    .wrap(true)
                    .unwrap(true)
                    .build())
                .keyAlgorithm("TDES_3KEY")
                .keyClass("SYMMETRIC_KEY")
                .keyUsage("TR31_P0_PIN_ENCRYPTION_KEY")
                .build())
            .exportable(true)
            .build());

        var testKeyAlias = new KeyAlias("testKeyAlias", KeyAliasArgs.builder()
            .aliasName("alias/test-alias")
            .keyArn(test.arn())
            .build());

    }
}
resources:
  test:
    type: aws:paymentcryptography:Key
    properties:
      keyAttributes:
        - keyModesOfUses:
            - decrypt: true
              encrypt: true
              wrap: true
              unwrap: true
          keyAlgorithm: TDES_3KEY
          keyClass: SYMMETRIC_KEY
          keyUsage: TR31_P0_PIN_ENCRYPTION_KEY
      exportable: true
  testKeyAlias:
    type: aws:paymentcryptography:KeyAlias
    name: test
    properties:
      aliasName: alias/test-alias
      keyArn: ${test.arn}

Import

Using pulumi import, import Payment Cryptography Control Plane Key Alias using the alias/4681482429376900170. For example:

$ pulumi import aws:paymentcryptography/keyAlias:KeyAlias example alias/4681482429376900170

Constructors

KeyAlias(String name, {KeyAliasArgs? args, CustomResourceOptions? options})
Creates a new KeyAlias. name The Pulumi resource name. args Arguments used to configure this KeyAlias. The set of arguments for KeyAlias. options Resource options controlling this resource's behavior.
KeyAlias.reference(String urn)
Creates a typed reference to an existing KeyAlias resource.

Properties

aliasName ↔ Output<String>
Name of the Key Alias.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
keyArn ↔ Output<String?>
ARN of the key.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {KeyAliasState? state, CustomResourceOptions? options}) → KeyAlias
Gets an existing KeyAlias resource's state with the given name and id.