/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the iam-2010-05-08.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.IdentityManagement.Model { /// /// Contains information about an Amazon Web Services access key. /// /// /// /// This data type is used as a response element in the CreateAccessKey and ListAccessKeys /// operations. /// /// /// /// The SecretAccessKey value is returned only in response to CreateAccessKey. /// You can get a secret access key only when you first create an access key; you cannot /// recover the secret access key later. If you lose a secret access key, you must create /// a new access key. /// /// /// public partial class AccessKey { private string _accessKeyId; private DateTime? _createDate; private string _secretAccessKey; private StatusType _status; private string _userName; /// /// Empty constructor used to set properties independently even when a simple constructor is available /// public AccessKey() { } /// /// Instantiates AccessKey with the parameterized properties /// /// The name of the IAM user that the access key is associated with. /// The ID for this access key. /// The status of the access key. Active means that the key is valid for API calls, while Inactive means it is not. /// The secret key used to sign requests. public AccessKey(string userName, string accessKeyId, StatusType status, string secretAccessKey) { _userName = userName; _accessKeyId = accessKeyId; _status = status; _secretAccessKey = secretAccessKey; } /// /// Gets and sets the property AccessKeyId. /// /// The ID for this access key. /// /// [AWSProperty(Required=true, Min=16, Max=128)] public string AccessKeyId { get { return this._accessKeyId; } set { this._accessKeyId = value; } } // Check to see if AccessKeyId property is set internal bool IsSetAccessKeyId() { return this._accessKeyId != null; } /// /// Gets and sets the property CreateDate. /// /// The date when the access key was created. /// /// public DateTime CreateDate { get { return this._createDate.GetValueOrDefault(); } set { this._createDate = value; } } // Check to see if CreateDate property is set internal bool IsSetCreateDate() { return this._createDate.HasValue; } /// /// Gets and sets the property SecretAccessKey. /// /// The secret key used to sign requests. /// /// [AWSProperty(Required=true, Sensitive=true)] public string SecretAccessKey { get { return this._secretAccessKey; } set { this._secretAccessKey = value; } } // Check to see if SecretAccessKey property is set internal bool IsSetSecretAccessKey() { return this._secretAccessKey != null; } /// /// Gets and sets the property Status. /// /// The status of the access key. Active means that the key is valid for /// API calls, while Inactive means it is not. /// /// [AWSProperty(Required=true)] public StatusType Status { get { return this._status; } set { this._status = value; } } // Check to see if Status property is set internal bool IsSetStatus() { return this._status != null; } /// /// Gets and sets the property UserName. /// /// The name of the IAM user that the access key is associated with. /// /// [AWSProperty(Required=true, Min=1, Max=64)] public string UserName { get { return this._userName; } set { this._userName = value; } } // Check to see if UserName property is set internal bool IsSetUserName() { return this._userName != null; } } }