Key class
Resource for managing an AWS Payment Cryptography Control Plane Key.
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,
});
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)
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,
});
});
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 {
_, 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
}
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
}
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 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());
}
}
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
Import
Identity Schema
Required
arn(String) ARN of the Payment Cryptography key.
Using pulumi import, import Payment Cryptography Control Plane Key using the arn:aws:payment-cryptography:us-east-1:123456789012:key/qtbojf64yshyvyzf. For example:
$ pulumi import aws:paymentcryptography/key:Key example arn:aws:payment-cryptography:us-east-1:123456789012:key/qtbojf64yshyvyzf
Constructors
- Key(String name, {KeyArgs? args, CustomResourceOptions? options})
-
Creates a new Key.
nameThe Pulumi resource name.argsArguments used to configure this Key. The set of arguments for Key.optionsResource options controlling this resource's behavior. - Key.reference(String urn)
- Creates a typed reference to an existing Key resource.
Properties
-
arn
↔ Output<
String> -
ARN of the key.
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
deletionWindowInDays
↔ Output<
int> -
latefinal
-
enabled
↔ Output<
bool> -
Whether to enable the key.
latefinal
-
exportable
↔ Output<
bool> -
Whether the key is exportable from the service.
latefinal
- 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
-
keyAttributes
↔ Output<
List< KeyKeyAttribute> ?> -
Role of the key, the algorithm it supports, and the cryptographic operations allowed with the key.
latefinal
-
keyCheckValue
↔ Output<
String> -
Key check value (KCV) is used to check if all parties holding a given key have the same key or to detect that a key has changed.
latefinal
-
keyCheckValueAlgorithm
↔ Output<
String> -
Algorithm that AWS Payment Cryptography uses to calculate the key check value (KCV).
latefinal
-
keyOrigin
↔ Output<
String> -
Source of the key material.
latefinal
-
keyState
↔ Output<
String> -
State of key that is being created or deleted.
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
-
Map of tags assigned to the WorkSpaces Connection Alias. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.latefinal -
Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.latefinal -
timeouts
↔ Output<
KeyTimeouts?> -
latefinal
-
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