/*
* 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 RetireGrant operation.
/// Deletes a grant. Typically, you retire a grant when you no longer need its permissions.
/// To identify the grant to retire, use a grant
/// token, or both the grant ID and a key identifier (key ID or key ARN) of the KMS
/// key. The CreateGrant operation returns both values.
///
///
///
/// This operation can be called by the retiring principal for a grant, by the
/// grantee principal if the grant allows the RetireGrant
operation,
/// and by the Amazon Web Services account in which the grant is created. It can also
/// be called by principals to whom permission for retiring a grant is delegated. For
/// details, see Retiring
/// and revoking grants 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. You can retire a grant on a KMS key in a different
/// Amazon Web Services account.
///
///
///
/// Required permissions::Permission to retire a grant is determined primarily
/// by the grant. For details, see Retiring
/// and revoking grants in the Key Management Service Developer Guide.
///
///
///
/// Related operations:
///
///
///
public partial class RetireGrantRequest : AmazonKeyManagementServiceRequest
{
private bool? _dryRun;
private string _grantId;
private string _grantToken;
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 retire. To get the grant ID, use CreateGrant, ListGrants,
/// or ListRetirableGrants.
///
/// -
///
/// Grant ID Example - 0123456789012345678901234567890123456789012345678901234567890123
///
///
///
[AWSProperty(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 GrantToken.
///
/// Identifies the grant to be retired. You can use a grant token to identify a new grant
/// even before it has achieved eventual consistency.
///
///
///
/// Only the CreateGrant operation returns a grant token. For details, see Grant
/// token and Eventual
/// consistency in the Key Management Service Developer Guide.
///
///
[AWSProperty(Min=1, Max=8192)]
public string GrantToken
{
get { return this._grantToken; }
set { this._grantToken = value; }
}
// Check to see if GrantToken property is set
internal bool IsSetGrantToken()
{
return this._grantToken != null;
}
///
/// Gets and sets the property KeyId.
///
/// The key ARN KMS key associated with the grant. To find the key ARN, use the ListKeys
/// operation.
///
///
///
/// For example: arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab
///
///
///
[AWSProperty(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;
}
}
}