Class AccessKey
Define a new IAM Access Key.
Inherited Members
Namespace: Amazon.CDK.AWS.IAM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class AccessKey : Resource, IAccessKey, IResource, IConstruct, IDependable
Syntax (vb)
Public Class AccessKey Inherits Resource Implements IAccessKey, IResource, IConstruct, IDependable
Remarks
ExampleMetadata: infused
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 secret = new Secret(this, "Secret", new SecretProps {
SecretStringValue = accessKey.SecretAccessKey
});
Synopsis
Constructors
AccessKey(Construct, string, IAccessKeyProps) | Define a new IAM Access Key. |
Properties
AccessKeyId | The Access Key ID. |
PROPERTY_INJECTION_ID | Uniquely identifies this class. |
SecretAccessKey | The Secret Access Key. |
Constructors
AccessKey(Construct, string, IAccessKeyProps)
Define a new IAM Access Key.
public AccessKey(Construct scope, string id, IAccessKeyProps props)
Parameters
- scope Construct
- id string
- props IAccessKeyProps
Remarks
ExampleMetadata: infused
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 secret = new Secret(this, "Secret", new SecretProps {
SecretStringValue = accessKey.SecretAccessKey
});
Properties
AccessKeyId
The Access Key ID.
public virtual string AccessKeyId { get; }
Property Value
Remarks
ExampleMetadata: infused
PROPERTY_INJECTION_ID
Uniquely identifies this class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
ExampleMetadata: infused
SecretAccessKey
The Secret Access Key.
public virtual SecretValue SecretAccessKey { get; }
Property Value
Remarks
ExampleMetadata: infused
Implements
Constructs.IConstruct
Constructs.IDependable