Class CreateAliasRequest
- java.lang.Object
-
- software.amazon.awssdk.core.SdkRequest
-
- software.amazon.awssdk.awscore.AwsRequest
-
- software.amazon.awssdk.services.kms.model.KmsRequest
-
- software.amazon.awssdk.services.kms.model.CreateAliasRequest
-
- All Implemented Interfaces:
SdkPojo,ToCopyableBuilder<CreateAliasRequest.Builder,CreateAliasRequest>
@Generated("software.amazon.awssdk:codegen") public final class CreateAliasRequest extends KmsRequest implements ToCopyableBuilder<CreateAliasRequest.Builder,CreateAliasRequest>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceCreateAliasRequest.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringaliasName()Specifies the alias name.static CreateAliasRequest.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()List<SdkField<?>>sdkFields()static Class<? extends CreateAliasRequest.Builder>serializableBuilderClass()StringtargetKeyId()Associates the alias with the specified customer managed key.CreateAliasRequest.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
Methods inherited from class software.amazon.awssdk.awscore.AwsRequest
overrideConfiguration
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
aliasName
public final String aliasName()
Specifies the alias name. This value must begin with
alias/followed by a name, such asalias/ExampleAlias.Do not include confidential or sensitive information in this field. This field may be displayed in plaintext in CloudTrail logs and other output.
The
AliasNamevalue must be string of 1-256 characters. It can contain only alphanumeric characters, forward slashes (/), underscores (_), and dashes (-). The alias name cannot begin withalias/aws/. Thealias/aws/prefix is reserved for Amazon Web Services managed keys.- Returns:
- Specifies the alias name. This value must begin with
alias/followed by a name, such asalias/ExampleAlias.Do not include confidential or sensitive information in this field. This field may be displayed in plaintext in CloudTrail logs and other output.
The
AliasNamevalue must be string of 1-256 characters. It can contain only alphanumeric characters, forward slashes (/), underscores (_), and dashes (-). The alias name cannot begin withalias/aws/. Thealias/aws/prefix is reserved for Amazon Web Services managed keys.
-
targetKeyId
public final String targetKeyId()
Associates the alias with the specified customer managed key. The KMS key must be in the same Amazon Web Services Region.
A valid key ID is required. If you supply a null or empty string value, this operation returns an error.
For help finding the key ID and ARN, see Finding the Key ID and ARN in the Key Management Service Developer Guide .
Specify the key ID or key ARN of the KMS key.
For example:
-
Key ID:
1234abcd-12ab-34cd-56ef-1234567890ab -
Key ARN:
arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- Returns:
- Associates the alias with the specified customer managed
key. The KMS key must be in the same Amazon Web Services Region.
A valid key ID is required. If you supply a null or empty string value, this operation returns an error.
For help finding the key ID and ARN, see Finding the Key ID and ARN in the Key Management Service Developer Guide .
Specify the key ID or key ARN of the KMS key.
For example:
-
Key ID:
1234abcd-12ab-34cd-56ef-1234567890ab -
Key ARN:
arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
-
-
-
toBuilder
public CreateAliasRequest.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<CreateAliasRequest.Builder,CreateAliasRequest>- Specified by:
toBuilderin classKmsRequest
-
builder
public static CreateAliasRequest.Builder builder()
-
serializableBuilderClass
public static Class<? extends CreateAliasRequest.Builder> serializableBuilderClass()
-
hashCode
public final int hashCode()
- Overrides:
hashCodein classAwsRequest
-
equals
public final boolean equals(Object obj)
- Overrides:
equalsin classAwsRequest
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
getValueForField
public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
- Overrides:
getValueForFieldin classSdkRequest
-
-