Skip to content
v2.278.0

CfnAccessKeyProps Struct ​

Properties for defining a CfnAccessKey.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iam as iam } from 'aws-cdk-lib';
const cfnAccessKeyProps: iam.CfnAccessKeyProps = {
  userName: 'userName',

  // the properties below are optional
  serial: 123,
  status: 'status',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_iam as iam

cfn_access_key_props = iam.CfnAccessKeyProps(
    user_name="userName",

    # the properties below are optional
    serial=123,
    status="status"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.iam.*;

CfnAccessKeyProps cfnAccessKeyProps = CfnAccessKeyProps.builder()
        .userName("userName")

        // the properties below are optional
        .serial(123)
        .status("status")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.IAM;

var cfnAccessKeyProps = new CfnAccessKeyProps {
    UserName = "userName",

    // the properties below are optional
    Serial = 123,
    Status = "status"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnAccessKeyProps := &CfnAccessKeyProps{
	UserName: jsii.String("userName"),

	// the properties below are optional
	Serial: jsii.Number(123),
	Status: jsii.String("status"),
}

Properties ​

serialoptionalnumberserialoptionalint | floatserialoptionalNumberSerialoptionaldoubleSerialoptional*float64 #
This value is specific to CloudFormation and can only be *incremented* .

Incrementing this value notifies CloudFormation that you want to rotate your access key. When you update your stack, CloudFormation will replace the existing access key with a new key.

statusoptionalstringstatusoptionalstrstatusoptionalStringStatusoptionalstringStatusoptional*string #
The status of the access key.

Active means that the key is valid for API calls, while Inactive means it is not.

userNamestringuser_namestruserNameStringUserNamestringUserName*string required #
The name of the IAM user that the new key will belong to.
notes

This parameter allows (through its regex pattern ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-