public class CreateGrantRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
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. For more information about grants, see Grants in the developer guide. If a grant is absent, access to the key is evaluated based on IAM policies attached to the user.
NOOP
Constructor and Description |
---|
CreateGrantRequest() |
Modifier and Type | Method and Description |
---|---|
CreateGrantRequest |
clone()
Creates a shallow clone of this request.
|
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()
For more information, see Grant
Tokens.
|
String |
getKeyId()
A unique identifier for the 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)
For more information, see Grant
Tokens.
|
void |
setKeyId(String keyId)
A unique identifier for the 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)
For more information, see Grant
Tokens.
|
CreateGrantRequest |
withGrantTokens(String... grantTokens)
For more information, see Grant
Tokens.
|
CreateGrantRequest |
withKeyId(String keyId)
A unique identifier for the 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, 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 identifier for the customer master key. This value can be a
globally unique identifier or the fully specified ARN to a key. 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 identifier for the customer master key. This value can be a
globally unique identifier or the fully specified ARN to a key. 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)
NOTE: This method appends the values to the existing list (if
any). Use setOperations(java.util.Collection)
or withOperations(java.util.Collection)
if you want to override the
existing values.
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
- For more information, see Grant
Tokens.public CreateGrantRequest withGrantTokens(String... grantTokens)
NOTE: This method appends the values to the existing list (if
any). Use setGrantTokens(java.util.Collection)
or withGrantTokens(java.util.Collection)
if you want to override the
existing values.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 10
grantTokens
- For more information, see 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
- For more information, see Grant
Tokens.public String toString()
toString
in class Object
Object.toString()
public CreateGrantRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()
Copyright © 2015. All rights reserved.