Table of Contents

Class AccessKey

Namespace
Amazon.CDK.AWS.IAM
Assembly
Amazon.CDK.AWS.IAM.dll

Define a new IAM Access Key.

public class AccessKey : Resource, IAccessKey, IResource, IConstruct, IConstruct, IDependable
Inheritance
AccessKey
Implements
IResource
IConstruct
IConstruct
IDependable

Examples

// Creates a new IAM user, access and secret keys, and stores the secret access key in a Secret.
            var user = new User(this, "User");
            var accessKey = new AccessKey(this, "AccessKey", new AccessKeyProps { User = user });
            var secretValue = SecretStringValueBeta1.FromToken(accessKey.SecretAccessKey.ToString());
            new Secret(this, "Secret", new SecretProps {
                SecretStringBeta1 = secretValue
            });

Remarks

ExampleMetadata: infused

Constructors

AccessKey(Construct, string, IAccessKeyProps)

public AccessKey(Construct scope, string id, IAccessKeyProps props)

Parameters

scope Construct
id string
props IAccessKeyProps

Properties

AccessKeyId

The Access Key ID.

public virtual string AccessKeyId { get; }

Property Value

string

SecretAccessKey

The Secret Access Key.

public virtual SecretValue SecretAccessKey { get; }

Property Value

SecretValue