Class CfnAccessKey
Creates a new AWS secret access key and corresponding AWS access key ID for the specified user.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.IAM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnAccessKey : CfnResource, IInspectable
Syntax (vb)
Public Class CfnAccessKey
Inherits CfnResource
Implements IInspectable
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-accesskey.html
CloudformationResource: AWS::IAM::AccessKey
ExampleMetadata: fixture=_generated
Examples
// 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 cfnAccessKey = new CfnAccessKey(this, "MyCfnAccessKey", new CfnAccessKeyProps {
UserName = "userName",
// the properties below are optional
Serial = 123,
Status = "status"
});
Synopsis
Constructors
CfnAccessKey(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnAccessKey(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnAccessKey(Construct, String, ICfnAccessKeyProps) |
Properties
AttrId | |
AttrSecretAccessKey | Returns the secret access key for the specified AWS::IAM::AccessKey resource. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Serial | This value is specific to CloudFormation and can only be incremented . |
Status | The status of the access key. |
UserName | The name of the IAM user that the new key will belong to. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnAccessKey(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnAccessKey(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnAccessKey(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnAccessKey(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnAccessKey(Construct, String, ICfnAccessKeyProps)
public CfnAccessKey(Construct scope, string id, ICfnAccessKeyProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnAccessKeyProps
Resource properties.
Properties
AttrId
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
AttrSecretAccessKey
Returns the secret access key for the specified AWS::IAM::AccessKey resource.
public virtual string AttrSecretAccessKey { get; }
Property Value
System.String
Remarks
For example: wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY.
CloudformationAttribute: SecretAccessKey
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Serial
This value is specific to CloudFormation and can only be incremented .
public virtual Nullable<double> Serial { get; set; }
Property Value
System.Nullable<System.Double>
Status
The status of the access key.
public virtual string Status { get; set; }
Property Value
System.String
UserName
The name of the IAM user that the new key will belong to.
public virtual string UserName { get; set; }
Property Value
System.String
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>