Class CfnAccessKey
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.iam.CfnAccessKey
- All Implemented Interfaces:
IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-10-11T15:55:59.930Z")
@Stability(Stable)
public class CfnAccessKey
extends CfnResource
implements IInspectable
Creates a new AWS secret access key and corresponding AWS access key ID for the specified user.
The default status for new keys is Active
.
For information about quotas on the number of keys you can create, see IAM and AWS STS quotas in the IAM User Guide .
To ensure the security of your AWS account , the secret access key is accessible only during key and user creation. You must save the key (for example, in a text file) if you want to be able to access it again. If a secret key is lost, you can rotate access keys by increasing the value of the
serial
property.
Example:
// 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.*; CfnAccessKey cfnAccessKey = CfnAccessKey.Builder.create(this, "MyCfnAccessKey") .userName("userName") // the properties below are optional .serial(123) .status("status") .build();
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnAccessKey
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnAccessKey
(software.amazon.jsii.JsiiObjectRef objRef) CfnAccessKey
(software.constructs.Construct scope, String id, CfnAccessKeyProps props) -
Method Summary
Modifier and TypeMethodDescriptionReturns the secret access key for the specified AWS::IAM::AccessKey resource.This value is specific to CloudFormation and can only be incremented .The status of the access key.The name of the IAM user that the new key will belong to.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
This value is specific to CloudFormation and can only be incremented .void
The status of the access key.void
setUserName
(String value) The name of the IAM user that the new key will belong to.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnAccessKey
protected CfnAccessKey(software.amazon.jsii.JsiiObjectRef objRef) -
CfnAccessKey
protected CfnAccessKey(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnAccessKey
@Stability(Stable) public CfnAccessKey(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnAccessKeyProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrId
-
getAttrSecretAccessKey
Returns the secret access key for the specified AWS::IAM::AccessKey resource.For example: wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY.
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getUserName
The name of the IAM user that the new key will belong to. -
setUserName
The name of the IAM user that the new key will belong to. -
getSerial
This value is specific to CloudFormation and can only be incremented . -
setSerial
This value is specific to CloudFormation and can only be incremented . -
getStatus
The status of the access key. -
setStatus
The status of the access key.
-