public class CreateGrantRequest extends AmazonWebServiceRequest implements Serializable
CreateGrant operation
.
Adds a grant to a key to specify who can access the key and under what conditions. Grants are alternate permission mechanisms to key policies. If absent, access to the key is evaluated based on IAM policies attached to the user. By default, grants do not expire. Grants can be listed, retired, or revoked as indicated by the following APIs. Typically, when you are finished using a grant, you retire it. When you want to end a grant immediately, revoke it. For more information about grants, see Grants .
NOOP
Constructor and Description |
---|
CreateGrantRequest() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
GrantConstraints |
getConstraints()
Specifies the conditions under which the actions specified by the
Operations parameter are allowed. |
String |
getGranteePrincipal()
Principal given permission by the grant to use the key identified by
the
keyId parameter. |
List<String> |
getGrantTokens()
List of grant tokens.
|
String |
getKeyId()
A unique key identifier for a customer master key.
|
List<String> |
getOperations()
List of operations permitted by the grant.
|
String |
getRetiringPrincipal()
Principal given permission to retire the grant.
|
int |
hashCode() |
void |
setConstraints(GrantConstraints constraints)
Specifies the conditions under which the actions specified by the
Operations parameter are allowed. |
void |
setGranteePrincipal(String granteePrincipal)
Principal given permission by the grant to use the key identified by
the
keyId parameter. |
void |
setGrantTokens(Collection<String> grantTokens)
List of grant tokens.
|
void |
setKeyId(String keyId)
A unique key identifier for a customer master key.
|
void |
setOperations(Collection<String> operations)
List of operations permitted by the grant.
|
void |
setRetiringPrincipal(String retiringPrincipal)
Principal given permission to retire the grant.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CreateGrantRequest |
withConstraints(GrantConstraints constraints)
Specifies the conditions under which the actions specified by the
Operations parameter are allowed. |
CreateGrantRequest |
withGranteePrincipal(String granteePrincipal)
Principal given permission by the grant to use the key identified by
the
keyId parameter. |
CreateGrantRequest |
withGrantTokens(Collection<String> grantTokens)
List of grant tokens.
|
CreateGrantRequest |
withGrantTokens(String... grantTokens)
List of grant tokens.
|
CreateGrantRequest |
withKeyId(String keyId)
A unique key identifier for a customer master key.
|
CreateGrantRequest |
withOperations(Collection<String> operations)
List of operations permitted by the grant.
|
CreateGrantRequest |
withOperations(GrantOperation... operations)
List of operations permitted by the grant.
|
CreateGrantRequest |
withOperations(String... operations)
List of operations permitted by the grant.
|
CreateGrantRequest |
withRetiringPrincipal(String retiringPrincipal)
Principal given permission to retire the grant.
|
copyBaseTo, copyPrivateRequestParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public String getKeyId()
Constraints:
Length: 1 - 256
public void setKeyId(String keyId)
Constraints:
Length: 1 - 256
keyId
- A unique key identifier for a customer master key. This value can be a
globally unique identifier, an ARN, or an alias.public CreateGrantRequest withKeyId(String keyId)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 256
keyId
- A unique key identifier for a customer master key. This value can be a
globally unique identifier, an ARN, or an alias.public String getGranteePrincipal()
keyId
parameter.
Constraints:
Length: 1 - 256
keyId
parameter.public void setGranteePrincipal(String granteePrincipal)
keyId
parameter.
Constraints:
Length: 1 - 256
granteePrincipal
- Principal given permission by the grant to use the key identified by
the keyId
parameter.public CreateGrantRequest withGranteePrincipal(String granteePrincipal)
keyId
parameter.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 256
granteePrincipal
- Principal given permission by the grant to use the key identified by
the keyId
parameter.public String getRetiringPrincipal()
Constraints:
Length: 1 - 256
public void setRetiringPrincipal(String retiringPrincipal)
Constraints:
Length: 1 - 256
retiringPrincipal
- Principal given permission to retire the grant. For more information,
see RetireGrant.public CreateGrantRequest withRetiringPrincipal(String retiringPrincipal)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 256
retiringPrincipal
- Principal given permission to retire the grant. For more information,
see RetireGrant.public List<String> getOperations()
public void setOperations(Collection<String> operations)
operations
- List of operations permitted by the grant. This can be any combination
of one or more of the following values: public CreateGrantRequest withOperations(String... operations)
Returns a reference to this object so that method calls can be chained together.
operations
- List of operations permitted by the grant. This can be any combination
of one or more of the following values: public CreateGrantRequest withOperations(Collection<String> operations)
Returns a reference to this object so that method calls can be chained together.
operations
- List of operations permitted by the grant. This can be any combination
of one or more of the following values: public CreateGrantRequest withOperations(GrantOperation... operations)
Returns a reference to this object so that method calls can be chained together.
operations
- List of operations permitted by the grant. This can be any combination
of one or more of the following values: public GrantConstraints getConstraints()
Operations
parameter are allowed.Operations
parameter are allowed.public void setConstraints(GrantConstraints constraints)
Operations
parameter are allowed.constraints
- Specifies the conditions under which the actions specified by the
Operations
parameter are allowed.public CreateGrantRequest withConstraints(GrantConstraints constraints)
Operations
parameter are allowed.
Returns a reference to this object so that method calls can be chained together.
constraints
- Specifies the conditions under which the actions specified by the
Operations
parameter are allowed.public List<String> getGrantTokens()
Constraints:
Length: 0 - 10
public void setGrantTokens(Collection<String> grantTokens)
Constraints:
Length: 0 - 10
grantTokens
- List of grant tokens.public CreateGrantRequest withGrantTokens(String... grantTokens)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 10
grantTokens
- List of grant tokens.public CreateGrantRequest withGrantTokens(Collection<String> grantTokens)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 10
grantTokens
- List of grant tokens.public String toString()
toString
in class Object
Object.toString()
Copyright © 2014. All rights reserved.