AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the RetireGrant operation. Retires a grant. To clean up, you can retire a grant when you're done using it. You should revoke a grant when you intend to actively deny operations that depend on it. The following are permitted to call this API:

You must identify the grant to retire by its grant token or by a combination of the grant ID and the Amazon Resource Name (ARN) of the customer master key (CMK). A grant token is a unique variable-length base64-encoded string. A grant ID is a 64 character unique identifier of a grant. The CreateGrant operation returns both.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.KeyManagementService.AmazonKeyManagementServiceRequest
      Amazon.KeyManagementService.Model.RetireGrantRequest

Namespace: Amazon.KeyManagementService.Model
Assembly: AWSSDK.KeyManagementService.dll
Version: 3.x.y.z

Syntax

C#
public class RetireGrantRequest : AmazonKeyManagementServiceRequest
         IAmazonWebServiceRequest

The RetireGrantRequest type exposes the following members

Constructors

NameDescription
Public Method RetireGrantRequest()

Properties

NameTypeDescription
Public Property GrantId System.String

Gets and sets the property GrantId.

Unique identifier of the grant to retire. The grant ID is returned in the response to a CreateGrant operation.

  • Grant ID Example - 0123456789012345678901234567890123456789012345678901234567890123

Public Property GrantToken System.String

Gets and sets the property GrantToken.

Token that identifies the grant to be retired.

Public Property KeyId System.String

Gets and sets the property KeyId.

The Amazon Resource Name of the CMK associated with the grant. Example:

  • arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab

Examples

The following example retires a grant.

To retire a grant


var response = client.RetireGrant(new RetireGrantRequest 
{
    GrantId = "0c237476b39f8bc44e45212e08498fbe3151305030726c0590dd8d3e9f3d6a60", // The identifier of the grant to retire.
    KeyId = "arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab" // The Amazon Resource Name (ARN) of the customer master key (CMK) associated with the grant.
});


            

Version Information

.NET Standard:
Supported in: 1.3

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms