public class GrantConstraints
extends java.lang.Object
implements java.io.Serializable
A structure for specifying the conditions under which the operations permitted by the grant are allowed.
You can use this structure to allow the operations permitted by the grant only when a specified encryption context is present. For more information about encryption context, see Encryption Context in the AWS Key Management Service Developer Guide.
Constructor and Description |
---|
GrantConstraints() |
Modifier and Type | Method and Description |
---|---|
GrantConstraints |
addEncryptionContextEqualsEntry(java.lang.String key,
java.lang.String value)
Contains a list of key-value pairs that must be present in the encryption
context of a subsequent operation permitted by the grant.
|
GrantConstraints |
addEncryptionContextSubsetEntry(java.lang.String key,
java.lang.String value)
Contains a list of key-value pairs, a subset of which must be present in
the encryption context of a subsequent operation permitted by the grant.
|
GrantConstraints |
clearEncryptionContextEqualsEntries()
Removes all the entries added into EncryptionContextEquals.
|
GrantConstraints |
clearEncryptionContextSubsetEntries()
Removes all the entries added into EncryptionContextSubset.
|
boolean |
equals(java.lang.Object obj) |
java.util.Map<java.lang.String,java.lang.String> |
getEncryptionContextEquals()
Contains a list of key-value pairs that must be present in the encryption
context of a subsequent operation permitted by the grant.
|
java.util.Map<java.lang.String,java.lang.String> |
getEncryptionContextSubset()
Contains a list of key-value pairs, a subset of which must be present in
the encryption context of a subsequent operation permitted by the grant.
|
int |
hashCode() |
void |
setEncryptionContextEquals(java.util.Map<java.lang.String,java.lang.String> encryptionContextEquals)
Contains a list of key-value pairs that must be present in the encryption
context of a subsequent operation permitted by the grant.
|
void |
setEncryptionContextSubset(java.util.Map<java.lang.String,java.lang.String> encryptionContextSubset)
Contains a list of key-value pairs, a subset of which must be present in
the encryption context of a subsequent operation permitted by the grant.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
GrantConstraints |
withEncryptionContextEquals(java.util.Map<java.lang.String,java.lang.String> encryptionContextEquals)
Contains a list of key-value pairs that must be present in the encryption
context of a subsequent operation permitted by the grant.
|
GrantConstraints |
withEncryptionContextSubset(java.util.Map<java.lang.String,java.lang.String> encryptionContextSubset)
Contains a list of key-value pairs, a subset of which must be present in
the encryption context of a subsequent operation permitted by the grant.
|
public java.util.Map<java.lang.String,java.lang.String> getEncryptionContextSubset()
Contains a list of key-value pairs, a subset of which must be present in the encryption context of a subsequent operation permitted by the grant. When a subsequent operation permitted by the grant includes an encryption context that matches this list or is a subset of this list, the grant allows the operation. Otherwise, the operation is not allowed.
Contains a list of key-value pairs, a subset of which must be present in the encryption context of a subsequent operation permitted by the grant. When a subsequent operation permitted by the grant includes an encryption context that matches this list or is a subset of this list, the grant allows the operation. Otherwise, the operation is not allowed.
public void setEncryptionContextSubset(java.util.Map<java.lang.String,java.lang.String> encryptionContextSubset)
Contains a list of key-value pairs, a subset of which must be present in the encryption context of a subsequent operation permitted by the grant. When a subsequent operation permitted by the grant includes an encryption context that matches this list or is a subset of this list, the grant allows the operation. Otherwise, the operation is not allowed.
encryptionContextSubset
- Contains a list of key-value pairs, a subset of which must be present in the encryption context of a subsequent operation permitted by the grant. When a subsequent operation permitted by the grant includes an encryption context that matches this list or is a subset of this list, the grant allows the operation. Otherwise, the operation is not allowed.
public GrantConstraints withEncryptionContextSubset(java.util.Map<java.lang.String,java.lang.String> encryptionContextSubset)
Contains a list of key-value pairs, a subset of which must be present in the encryption context of a subsequent operation permitted by the grant. When a subsequent operation permitted by the grant includes an encryption context that matches this list or is a subset of this list, the grant allows the operation. Otherwise, the operation is not allowed.
Returns a reference to this object so that method calls can be chained together.
encryptionContextSubset
- Contains a list of key-value pairs, a subset of which must be present in the encryption context of a subsequent operation permitted by the grant. When a subsequent operation permitted by the grant includes an encryption context that matches this list or is a subset of this list, the grant allows the operation. Otherwise, the operation is not allowed.
public GrantConstraints addEncryptionContextSubsetEntry(java.lang.String key, java.lang.String value)
Contains a list of key-value pairs, a subset of which must be present in the encryption context of a subsequent operation permitted by the grant. When a subsequent operation permitted by the grant includes an encryption context that matches this list or is a subset of this list, the grant allows the operation. Otherwise, the operation is not allowed.
The method adds a new key-value pair into EncryptionContextSubset parameter, and returns a reference to this object so that method calls can be chained together.
key
- The key of the entry to be added into EncryptionContextSubset.value
- The corresponding value of the entry to be added into
EncryptionContextSubset.public GrantConstraints clearEncryptionContextSubsetEntries()
Returns a reference to this object so that method calls can be chained together.
public java.util.Map<java.lang.String,java.lang.String> getEncryptionContextEquals()
Contains a list of key-value pairs that must be present in the encryption context of a subsequent operation permitted by the grant. When a subsequent operation permitted by the grant includes an encryption context that matches this list, the grant allows the operation. Otherwise, the operation is not allowed.
Contains a list of key-value pairs that must be present in the encryption context of a subsequent operation permitted by the grant. When a subsequent operation permitted by the grant includes an encryption context that matches this list, the grant allows the operation. Otherwise, the operation is not allowed.
public void setEncryptionContextEquals(java.util.Map<java.lang.String,java.lang.String> encryptionContextEquals)
Contains a list of key-value pairs that must be present in the encryption context of a subsequent operation permitted by the grant. When a subsequent operation permitted by the grant includes an encryption context that matches this list, the grant allows the operation. Otherwise, the operation is not allowed.
encryptionContextEquals
- Contains a list of key-value pairs that must be present in the encryption context of a subsequent operation permitted by the grant. When a subsequent operation permitted by the grant includes an encryption context that matches this list, the grant allows the operation. Otherwise, the operation is not allowed.
public GrantConstraints withEncryptionContextEquals(java.util.Map<java.lang.String,java.lang.String> encryptionContextEquals)
Contains a list of key-value pairs that must be present in the encryption context of a subsequent operation permitted by the grant. When a subsequent operation permitted by the grant includes an encryption context that matches this list, the grant allows the operation. Otherwise, the operation is not allowed.
Returns a reference to this object so that method calls can be chained together.
encryptionContextEquals
- Contains a list of key-value pairs that must be present in the encryption context of a subsequent operation permitted by the grant. When a subsequent operation permitted by the grant includes an encryption context that matches this list, the grant allows the operation. Otherwise, the operation is not allowed.
public GrantConstraints addEncryptionContextEqualsEntry(java.lang.String key, java.lang.String value)
Contains a list of key-value pairs that must be present in the encryption context of a subsequent operation permitted by the grant. When a subsequent operation permitted by the grant includes an encryption context that matches this list, the grant allows the operation. Otherwise, the operation is not allowed.
The method adds a new key-value pair into EncryptionContextEquals parameter, and returns a reference to this object so that method calls can be chained together.
key
- The key of the entry to be added into EncryptionContextEquals.value
- The corresponding value of the entry to be added into
EncryptionContextEquals.public GrantConstraints clearEncryptionContextEqualsEntries()
Returns a reference to this object so that method calls can be chained together.
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 © 2010 Amazon Web Services, Inc. All Rights Reserved.