/* * 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 kms-2014-11-01.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.KeyManagementService.Model { /// /// Container for the parameters to the DescribeKey operation. /// Provides detailed information about a KMS key. You can run DescribeKey /// on a customer /// managed key or an Amazon /// Web Services managed key. /// /// /// /// This detailed information includes the key ARN, creation date (and deletion date, /// if applicable), the key state, and the origin and expiration date (if any) of the /// key material. It includes fields, like KeySpec, that help you distinguish /// different types of KMS keys. It also displays the key usage (encryption, signing, /// or generating and verifying MACs) and the algorithms that the KMS key supports. /// /// /// /// For multi-Region /// keys, DescribeKey displays the primary key and all related replica /// keys. For KMS keys in CloudHSM /// key stores, it includes information about the key store, such as the key store /// ID and the CloudHSM cluster ID. For KMS keys in external /// key stores, it includes the custom key store ID and the ID of the external key. /// /// /// /// DescribeKey does not return the following information: /// /// /// /// In general, DescribeKey is a non-mutating operation. It returns data /// about KMS keys, but doesn't change them. However, Amazon Web Services services use /// DescribeKey to create Amazon /// Web Services managed keys from a predefined Amazon Web Services alias with /// no key ID. /// /// /// /// Cross-account use: Yes. To perform this operation with a KMS key in a different /// Amazon Web Services account, specify the key ARN or alias ARN in the value of the /// KeyId parameter. /// /// /// /// Required permissions: kms:DescribeKey /// (key policy) /// /// /// /// Related operations: /// /// /// public partial class DescribeKeyRequest : AmazonKeyManagementServiceRequest { private List _grantTokens = new List(); private string _keyId; /// /// Gets and sets the property GrantTokens. /// /// A list of grant tokens. /// /// /// /// Use a grant token when your permission to call this operation comes from a new grant /// that has not yet achieved eventual consistency. For more information, see Grant /// token and Using /// a grant token in the Key Management Service Developer Guide. /// /// [AWSProperty(Min=0, Max=10)] public List GrantTokens { get { return this._grantTokens; } set { this._grantTokens = value; } } // Check to see if GrantTokens property is set internal bool IsSetGrantTokens() { return this._grantTokens != null && this._grantTokens.Count > 0; } /// /// Gets and sets the property KeyId. /// /// Describes the specified KMS key. /// /// /// /// If you specify a predefined Amazon Web Services alias (an Amazon Web Services alias /// with no key ID), KMS associates the alias with an Amazon /// Web Services managed key and returns its KeyId and Arn /// in the response. /// /// /// /// To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using /// an alias name, prefix it with "alias/". To specify a KMS key in a different /// Amazon Web Services account, you must use the key ARN or alias ARN. /// /// /// /// For example: /// ///
  • /// /// Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab /// ///
  • /// /// Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab /// /// ///
  • /// /// Alias name: alias/ExampleAlias /// ///
  • /// /// Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias /// ///
/// /// To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. /// To get the alias name and alias ARN, use ListAliases. /// ///
[AWSProperty(Required=true, Min=1, Max=2048)] public string KeyId { get { return this._keyId; } set { this._keyId = value; } } // Check to see if KeyId property is set internal bool IsSetKeyId() { return this._keyId != null; } } }