Class CfnVirtualMFADevice
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
AWS::IAM::VirtualMFADevice
.
Creates a new virtual MFA device for the AWS account . After creating the virtual MFA, use EnableMFADevice to attach the MFA device to an IAM user. For more information about creating and working with virtual MFA devices, see Using a virtual MFA device in the IAM User Guide .
For information about the maximum number of MFA devices you can create, see IAM and AWS STS quotas in the IAM User Guide .
The seed information contained in the QR code and the Base32 string should be treated like any other secret access information. In other words, protect the seed information as you would your AWS access keys or your passwords. After you provision your virtual device, you should ensure that the information is destroyed following secure procedures.
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.*; CfnVirtualMFADevice cfnVirtualMFADevice = CfnVirtualMFADevice.Builder.create(this, "MyCfnVirtualMFADevice") .users(List.of("users")) // the properties below are optional .path("path") .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .virtualMfaDeviceName("virtualMfaDeviceName") .build();
-
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.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.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
ModifierConstructorDescriptionCfnVirtualMFADevice
(Construct scope, String id, CfnVirtualMFADeviceProps props) Create a newAWS::IAM::VirtualMFADevice
.protected
CfnVirtualMFADevice
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnVirtualMFADevice
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionReturns the serial number for the specifiedAWS::IAM::VirtualMFADevice
resource.getPath()
The path for the virtual MFA device.getTags()
A list of tags that you want to attach to the new IAM virtual MFA device.getUsers()
The IAM user associated with this virtual MFA device.The name of the virtual MFA device, which must be unique.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
The path for the virtual MFA device.void
The IAM user associated with this virtual MFA device.void
setVirtualMfaDeviceName
(String value) The name of the virtual MFA device, which must be unique.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
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
-
CfnVirtualMFADevice
protected CfnVirtualMFADevice(software.amazon.jsii.JsiiObjectRef objRef) -
CfnVirtualMFADevice
protected CfnVirtualMFADevice(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnVirtualMFADevice
@Stability(Stable) public CfnVirtualMFADevice(@NotNull Construct scope, @NotNull String id, @NotNull CfnVirtualMFADeviceProps props) Create a newAWS::IAM::VirtualMFADevice
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrSerialNumber
Returns the serial number for the specifiedAWS::IAM::VirtualMFADevice
resource. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
A list of tags that you want to attach to the new IAM virtual MFA device.Each tag consists of a key name and an associated value. For more information about tagging, see Tagging IAM resources in the IAM User Guide .
If any one of the tags is invalid or if you exceed the allowed maximum number of tags, then the entire request fails and the resource is not created.
-
getUsers
The IAM user associated with this virtual MFA device. -
setUsers
The IAM user associated with this virtual MFA device. -
getPath
The path for the virtual MFA device.For more information about paths, see IAM identifiers in the IAM User Guide .
This parameter is optional. If it is not included, it defaults to a slash (/).
This parameter allows (through its regex pattern ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (
\ u0021
) through the DEL character (\ u007F
), including most punctuation characters, digits, and upper and lowercased letters. -
setPath
The path for the virtual MFA device.For more information about paths, see IAM identifiers in the IAM User Guide .
This parameter is optional. If it is not included, it defaults to a slash (/).
This parameter allows (through its regex pattern ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (
\ u0021
) through the DEL character (\ u007F
), including most punctuation characters, digits, and upper and lowercased letters. -
getVirtualMfaDeviceName
The name of the virtual MFA device, which must be unique.Use with path to uniquely identify a virtual MFA device.
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: _+=,.@-
-
setVirtualMfaDeviceName
The name of the virtual MFA device, which must be unique.Use with path to uniquely identify a virtual MFA device.
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: _+=,.@-
-