public class RetireGrantRequest extends AmazonWebServiceRequest implements java.io.Serializable
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:
The AWS account (root user) under which the grant was created
The RetiringPrincipal
, if present in the grant
The GranteePrincipal
, if RetireGrant
is an
operation specified in the grant
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.
Cross-account use: Yes. You can retire a grant on a CMK in a different AWS account.
Required permissions:: Permission to retire a grant is specified in the grant. You cannot control access to this operation in a policy. For more information, see Using grants in the AWS Key Management Service Developer Guide.
Related operations:
Constructor and Description |
---|
RetireGrantRequest() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getGrantId()
Unique identifier of the grant to retire.
|
java.lang.String |
getGrantToken()
Token that identifies the grant to be retired.
|
java.lang.String |
getKeyId()
The Amazon Resource Name (ARN) of the CMK associated with the grant.
|
int |
hashCode() |
void |
setGrantId(java.lang.String grantId)
Unique identifier of the grant to retire.
|
void |
setGrantToken(java.lang.String grantToken)
Token that identifies the grant to be retired.
|
void |
setKeyId(java.lang.String keyId)
The Amazon Resource Name (ARN) of the CMK associated with the grant.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
RetireGrantRequest |
withGrantId(java.lang.String grantId)
Unique identifier of the grant to retire.
|
RetireGrantRequest |
withGrantToken(java.lang.String grantToken)
Token that identifies the grant to be retired.
|
RetireGrantRequest |
withKeyId(java.lang.String keyId)
The Amazon Resource Name (ARN) of the CMK associated with the grant.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public java.lang.String getGrantToken()
Token that identifies the grant to be retired.
Constraints:
Length: 1 - 8192
Token that identifies the grant to be retired.
public void setGrantToken(java.lang.String grantToken)
Token that identifies the grant to be retired.
Constraints:
Length: 1 - 8192
grantToken
- Token that identifies the grant to be retired.
public RetireGrantRequest withGrantToken(java.lang.String grantToken)
Token that identifies the grant to be retired.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 8192
grantToken
- Token that identifies the grant to be retired.
public java.lang.String getKeyId()
The Amazon Resource Name (ARN) of the CMK associated with the grant.
For example:
arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab
Constraints:
Length: 1 - 2048
The Amazon Resource Name (ARN) of the CMK associated with the grant.
For example:
arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab
public void setKeyId(java.lang.String keyId)
The Amazon Resource Name (ARN) of the CMK associated with the grant.
For example:
arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab
Constraints:
Length: 1 - 2048
keyId
- The Amazon Resource Name (ARN) of the CMK associated with the grant.
For example:
arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab
public RetireGrantRequest withKeyId(java.lang.String keyId)
The Amazon Resource Name (ARN) of the CMK associated with the grant.
For example:
arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 2048
keyId
- The Amazon Resource Name (ARN) of the CMK associated with the grant.
For example:
arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab
public java.lang.String getGrantId()
Unique identifier of the grant to retire. The grant ID is returned in the
response to a CreateGrant
operation.
Grant ID Example - 0123456789012345678901234567890123456789012345678901234567890123
Constraints:
Length: 1 - 128
Unique identifier of the grant to retire. The grant ID is
returned in the response to a CreateGrant
operation.
Grant ID Example - 0123456789012345678901234567890123456789012345678901234567890123
public void setGrantId(java.lang.String grantId)
Unique identifier of the grant to retire. The grant ID is returned in the
response to a CreateGrant
operation.
Grant ID Example - 0123456789012345678901234567890123456789012345678901234567890123
Constraints:
Length: 1 - 128
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 RetireGrantRequest withGrantId(java.lang.String grantId)
Unique identifier of the grant to retire. The grant ID is returned in the
response to a CreateGrant
operation.
Grant ID Example - 0123456789012345678901234567890123456789012345678901234567890123
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 128
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 java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.