public class CreateKeyRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
CreateKey operation.
Creates a customer master key. Customer master keys can be used to encrypt small amounts of data (less than 4K) directly, but they are most commonly used to encrypt or envelope data keys that are then used to encrypt customer data. For more information about data keys, see GenerateDataKey and GenerateDataKeyWithoutPlaintext.
NOOP| Constructor and Description |
|---|
CreateKeyRequest() |
| Modifier and Type | Method and Description |
|---|---|
CreateKeyRequest |
clone()
Creates a shallow clone of this request.
|
boolean |
equals(Object obj) |
String |
getDescription()
Description of the key.
|
String |
getKeyUsage()
Specifies the intended use of the key.
|
String |
getPolicy()
Policy to be attached to the key.
|
int |
hashCode() |
void |
setDescription(String description)
Description of the key.
|
void |
setKeyUsage(KeyUsageType keyUsage)
Specifies the intended use of the key.
|
void |
setKeyUsage(String keyUsage)
Specifies the intended use of the key.
|
void |
setPolicy(String policy)
Policy to be attached to the key.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CreateKeyRequest |
withDescription(String description)
Description of the key.
|
CreateKeyRequest |
withKeyUsage(KeyUsageType keyUsage)
Specifies the intended use of the key.
|
CreateKeyRequest |
withKeyUsage(String keyUsage)
Specifies the intended use of the key.
|
CreateKeyRequest |
withPolicy(String policy)
Policy to be attached to the key.
|
copyBaseTo, copyPrivateRequestParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollectorpublic String getPolicy()
Constraints:
Length: 1 - 131072
Pattern: [\u0009\u000A\u000D\u0020-\u00FF]+
public void setPolicy(String policy)
Constraints:
Length: 1 - 131072
Pattern: [\u0009\u000A\u000D\u0020-\u00FF]+
policy - Policy to be attached to the key. This is required and delegates back
to the account. The key is the root of trust.public CreateKeyRequest withPolicy(String policy)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 131072
Pattern: [\u0009\u000A\u000D\u0020-\u00FF]+
policy - Policy to be attached to the key. This is required and delegates back
to the account. The key is the root of trust.public String getDescription()
Constraints:
Length: 0 - 8192
public void setDescription(String description)
Constraints:
Length: 0 - 8192
description - Description of the key. We recommend that you choose a description
that helps your customer decide whether the key is appropriate for a
task.public CreateKeyRequest withDescription(String description)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 8192
description - Description of the key. We recommend that you choose a description
that helps your customer decide whether the key is appropriate for a
task.public String getKeyUsage()
Constraints:
Allowed Values: ENCRYPT_DECRYPT
KeyUsageTypepublic void setKeyUsage(String keyUsage)
Constraints:
Allowed Values: ENCRYPT_DECRYPT
keyUsage - Specifies the intended use of the key. Currently this defaults to
ENCRYPT/DECRYPT, and only symmetric encryption and decryption are
supported.KeyUsageTypepublic CreateKeyRequest withKeyUsage(String keyUsage)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: ENCRYPT_DECRYPT
keyUsage - Specifies the intended use of the key. Currently this defaults to
ENCRYPT/DECRYPT, and only symmetric encryption and decryption are
supported.KeyUsageTypepublic void setKeyUsage(KeyUsageType keyUsage)
Constraints:
Allowed Values: ENCRYPT_DECRYPT
keyUsage - Specifies the intended use of the key. Currently this defaults to
ENCRYPT/DECRYPT, and only symmetric encryption and decryption are
supported.KeyUsageTypepublic CreateKeyRequest withKeyUsage(KeyUsageType keyUsage)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: ENCRYPT_DECRYPT
keyUsage - Specifies the intended use of the key. Currently this defaults to
ENCRYPT/DECRYPT, and only symmetric encryption and decryption are
supported.KeyUsageTypepublic String toString()
toString in class ObjectObject.toString()public CreateKeyRequest clone()
AmazonWebServiceRequestclone in class AmazonWebServiceRequestObject.clone()Copyright © 2015. All rights reserved.