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, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public 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
KeyUsageType
public 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.KeyUsageType
public 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.KeyUsageType
public 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.KeyUsageType
public 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.KeyUsageType
public String toString()
toString
in class Object
Object.toString()
public CreateKeyRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()
Copyright © 2015. All rights reserved.