/*
* 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 RevokeGrant operation.
/// Deletes the specified grant. You revoke a grant to terminate the permissions that
/// the grant allows. For more information, see Retiring
/// and revoking grants in the Key Management Service Developer Guide .
///
///
///
/// When you create, retire, or revoke a grant, there might be a brief delay, usually
/// less than five minutes, until the grant is available throughout KMS. This state is
/// known as eventual consistency. For details, see Eventual
/// consistency in the Key Management Service Developer Guide .
///
///
///
/// For detailed information about grants, including grant terminology, see Grants
/// in KMS in the Key Management Service Developer Guide . For examples
/// of working with grants in several programming languages, see Programming
/// grants.
///
///
///
/// Cross-account use: Yes. To perform this operation on a KMS key in a different
/// Amazon Web Services account, specify the key ARN in the value of the KeyId
/// parameter.
///
///
///
/// Required permissions: kms:RevokeGrant
/// (key policy).
///
///
///
/// Related operations:
///
///
///
public partial class RevokeGrantRequest : AmazonKeyManagementServiceRequest
{
private bool? _dryRun;
private string _grantId;
private string _keyId;
///
/// Gets and sets the property DryRun.
///
/// Checks if your request will succeed. DryRun
is an optional parameter.
///
///
///
///
/// To learn more about how to use this parameter, see Testing
/// your KMS API calls in the Key Management Service Developer Guide.
///
///
public bool DryRun
{
get { return this._dryRun.GetValueOrDefault(); }
set { this._dryRun = value; }
}
// Check to see if DryRun property is set
internal bool IsSetDryRun()
{
return this._dryRun.HasValue;
}
///
/// Gets and sets the property GrantId.
///
/// Identifies the grant to revoke. To get the grant ID, use CreateGrant, ListGrants,
/// or ListRetirableGrants.
///
///
[AWSProperty(Required=true, Min=1, Max=128)]
public string GrantId
{
get { return this._grantId; }
set { this._grantId = value; }
}
// Check to see if GrantId property is set
internal bool IsSetGrantId()
{
return this._grantId != null;
}
///
/// Gets and sets the property KeyId.
///
/// A unique identifier for the KMS key associated with the grant. To get the key ID and
/// key ARN for a KMS key, use ListKeys or DescribeKey.
///
///
///
/// Specify the key ID or key ARN of the KMS key. To specify a KMS key in a different
/// Amazon Web Services account, you must use the key 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
///
///
///
///
/// To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
///
///
[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;
}
}
}