Class AccessKey
Define a new IAM Access Key.
public class AccessKey : Resource, IAccessKey, IResource, IConstruct, IConstruct, IDependable
- Inheritance
-
AccessKey
- Implements
-
IResourceIConstructIConstructIDependable
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
Constructid
stringprops
IAccessKeyProps
Properties
AccessKeyId
The Access Key ID.
public virtual string AccessKeyId { get; }
Property Value
SecretAccessKey
The Secret Access Key.
public virtual SecretValue SecretAccessKey { get; }
Property Value
- SecretValue