Skip to content
v2.273.0

AccessKeyProps Struct ​

Properties for defining an IAM access key.

Example ​

ts
// Creates a new IAM user, access and secret keys, and stores the secret access key in a Secret.
const user = new iam.User(this, 'User');
const accessKey = new iam.AccessKey(this, 'AccessKey', { user });
const secret = new secretsmanager.Secret(this, 'Secret', {
	secretStringValue: accessKey.secretAccessKey,
});

Properties ​

serialnumberserialint | floatserialNumberSerialdoubleSerial*float64= No serial value#
A CloudFormation-specific value that signifies the access key should be replaced/rotated.

This value can only be incremented. Incrementing this value will cause CloudFormation to replace the Access Key resource.

statusAccessKeyStatusstatusAccessKeyStatusstatusAccessKeyStatusStatusAccessKeyStatusStatusAccessKeyStatus= The access key is active#
The status of the access key.

An Active access key is allowed to be used to make API calls; An Inactive key cannot.

userIUseruserIUseruserIUserUserIUserUserIUserrequired#
The IAM user this key will belong to.

Changing this value will result in the access key being deleted and a new access key (with a different ID and secret value) being assigned to the new user.

Used as props by ​