Interface GetPublicKeyResponse.Builder
-
- All Superinterfaces:
AwsResponse.Builder,Buildable,CopyableBuilder<GetPublicKeyResponse.Builder,GetPublicKeyResponse>,KmsResponse.Builder,SdkBuilder<GetPublicKeyResponse.Builder,GetPublicKeyResponse>,SdkPojo,SdkResponse.Builder
- Enclosing class:
- GetPublicKeyResponse
public static interface GetPublicKeyResponse.Builder extends KmsResponse.Builder, SdkPojo, CopyableBuilder<GetPublicKeyResponse.Builder,GetPublicKeyResponse>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description GetPublicKeyResponse.BuildercustomerMasterKeySpec(String customerMasterKeySpec)Deprecated.This field has been deprecated.GetPublicKeyResponse.BuildercustomerMasterKeySpec(CustomerMasterKeySpec customerMasterKeySpec)Deprecated.This field has been deprecated.GetPublicKeyResponse.BuilderencryptionAlgorithms(Collection<EncryptionAlgorithmSpec> encryptionAlgorithms)The encryption algorithms that KMS supports for this key.GetPublicKeyResponse.BuilderencryptionAlgorithms(EncryptionAlgorithmSpec... encryptionAlgorithms)The encryption algorithms that KMS supports for this key.GetPublicKeyResponse.BuilderencryptionAlgorithmsWithStrings(String... encryptionAlgorithms)The encryption algorithms that KMS supports for this key.GetPublicKeyResponse.BuilderencryptionAlgorithmsWithStrings(Collection<String> encryptionAlgorithms)The encryption algorithms that KMS supports for this key.GetPublicKeyResponse.BuilderkeyAgreementAlgorithms(Collection<KeyAgreementAlgorithmSpec> keyAgreementAlgorithms)The key agreement algorithm used to derive a shared secret.GetPublicKeyResponse.BuilderkeyAgreementAlgorithms(KeyAgreementAlgorithmSpec... keyAgreementAlgorithms)The key agreement algorithm used to derive a shared secret.GetPublicKeyResponse.BuilderkeyAgreementAlgorithmsWithStrings(String... keyAgreementAlgorithms)The key agreement algorithm used to derive a shared secret.GetPublicKeyResponse.BuilderkeyAgreementAlgorithmsWithStrings(Collection<String> keyAgreementAlgorithms)The key agreement algorithm used to derive a shared secret.GetPublicKeyResponse.BuilderkeyId(String keyId)The Amazon Resource Name (key ARN) of the asymmetric KMS key from which the public key was downloaded.GetPublicKeyResponse.BuilderkeySpec(String keySpec)The type of the of the public key that was downloaded.GetPublicKeyResponse.BuilderkeySpec(KeySpec keySpec)The type of the of the public key that was downloaded.GetPublicKeyResponse.BuilderkeyUsage(String keyUsage)The permitted use of the public key.GetPublicKeyResponse.BuilderkeyUsage(KeyUsageType keyUsage)The permitted use of the public key.GetPublicKeyResponse.BuilderpublicKey(SdkBytes publicKey)The exported public key.GetPublicKeyResponse.BuildersigningAlgorithms(Collection<SigningAlgorithmSpec> signingAlgorithms)The signing algorithms that KMS supports for this key.GetPublicKeyResponse.BuildersigningAlgorithms(SigningAlgorithmSpec... signingAlgorithms)The signing algorithms that KMS supports for this key.GetPublicKeyResponse.BuildersigningAlgorithmsWithStrings(String... signingAlgorithms)The signing algorithms that KMS supports for this key.GetPublicKeyResponse.BuildersigningAlgorithmsWithStrings(Collection<String> signingAlgorithms)The signing algorithms that KMS supports for this key.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.services.kms.model.KmsResponse.Builder
build, responseMetadata, responseMetadata
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Methods inherited from interface software.amazon.awssdk.core.SdkResponse.Builder
sdkHttpResponse, sdkHttpResponse
-
-
-
-
Method Detail
-
keyId
GetPublicKeyResponse.Builder keyId(String keyId)
The Amazon Resource Name (key ARN) of the asymmetric KMS key from which the public key was downloaded.
- Parameters:
keyId- The Amazon Resource Name (key ARN) of the asymmetric KMS key from which the public key was downloaded.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
publicKey
GetPublicKeyResponse.Builder publicKey(SdkBytes publicKey)
The exported public key.
The value is a DER-encoded X.509 public key, also known as
SubjectPublicKeyInfo(SPKI), as defined in RFC 5280. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.- Parameters:
publicKey- The exported public key.The value is a DER-encoded X.509 public key, also known as
SubjectPublicKeyInfo(SPKI), as defined in RFC 5280. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
customerMasterKeySpec
@Deprecated GetPublicKeyResponse.Builder customerMasterKeySpec(String customerMasterKeySpec)
Deprecated.This field has been deprecated. Instead, use the KeySpec field.Instead, use the
KeySpecfield in theGetPublicKeyresponse.The
KeySpecandCustomerMasterKeySpecfields have the same value. We recommend that you use theKeySpecfield in your code. However, to avoid breaking changes, KMS supports both fields.- Parameters:
customerMasterKeySpec- Instead, use theKeySpecfield in theGetPublicKeyresponse.The
KeySpecandCustomerMasterKeySpecfields have the same value. We recommend that you use theKeySpecfield in your code. However, to avoid breaking changes, KMS supports both fields.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
CustomerMasterKeySpec,CustomerMasterKeySpec
-
customerMasterKeySpec
@Deprecated GetPublicKeyResponse.Builder customerMasterKeySpec(CustomerMasterKeySpec customerMasterKeySpec)
Deprecated.This field has been deprecated. Instead, use the KeySpec field.Instead, use the
KeySpecfield in theGetPublicKeyresponse.The
KeySpecandCustomerMasterKeySpecfields have the same value. We recommend that you use theKeySpecfield in your code. However, to avoid breaking changes, KMS supports both fields.- Parameters:
customerMasterKeySpec- Instead, use theKeySpecfield in theGetPublicKeyresponse.The
KeySpecandCustomerMasterKeySpecfields have the same value. We recommend that you use theKeySpecfield in your code. However, to avoid breaking changes, KMS supports both fields.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
CustomerMasterKeySpec,CustomerMasterKeySpec
-
keySpec
GetPublicKeyResponse.Builder keySpec(String keySpec)
The type of the of the public key that was downloaded.
-
keySpec
GetPublicKeyResponse.Builder keySpec(KeySpec keySpec)
The type of the of the public key that was downloaded.
-
keyUsage
GetPublicKeyResponse.Builder keyUsage(String keyUsage)
The permitted use of the public key. Valid values for asymmetric key pairs are
ENCRYPT_DECRYPT,SIGN_VERIFY, andKEY_AGREEMENT.This information is critical. For example, if a public key with
SIGN_VERIFYkey usage encrypts data outside of KMS, the ciphertext cannot be decrypted.- Parameters:
keyUsage- The permitted use of the public key. Valid values for asymmetric key pairs areENCRYPT_DECRYPT,SIGN_VERIFY, andKEY_AGREEMENT.This information is critical. For example, if a public key with
SIGN_VERIFYkey usage encrypts data outside of KMS, the ciphertext cannot be decrypted.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
KeyUsageType,KeyUsageType
-
keyUsage
GetPublicKeyResponse.Builder keyUsage(KeyUsageType keyUsage)
The permitted use of the public key. Valid values for asymmetric key pairs are
ENCRYPT_DECRYPT,SIGN_VERIFY, andKEY_AGREEMENT.This information is critical. For example, if a public key with
SIGN_VERIFYkey usage encrypts data outside of KMS, the ciphertext cannot be decrypted.- Parameters:
keyUsage- The permitted use of the public key. Valid values for asymmetric key pairs areENCRYPT_DECRYPT,SIGN_VERIFY, andKEY_AGREEMENT.This information is critical. For example, if a public key with
SIGN_VERIFYkey usage encrypts data outside of KMS, the ciphertext cannot be decrypted.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
KeyUsageType,KeyUsageType
-
encryptionAlgorithmsWithStrings
GetPublicKeyResponse.Builder encryptionAlgorithmsWithStrings(Collection<String> encryptionAlgorithms)
The encryption algorithms that KMS supports for this key.
This information is critical. If a public key encrypts data outside of KMS by using an unsupported encryption algorithm, the ciphertext cannot be decrypted.
This field appears in the response only when the
KeyUsageof the public key isENCRYPT_DECRYPT.- Parameters:
encryptionAlgorithms- The encryption algorithms that KMS supports for this key.This information is critical. If a public key encrypts data outside of KMS by using an unsupported encryption algorithm, the ciphertext cannot be decrypted.
This field appears in the response only when the
KeyUsageof the public key isENCRYPT_DECRYPT.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
encryptionAlgorithmsWithStrings
GetPublicKeyResponse.Builder encryptionAlgorithmsWithStrings(String... encryptionAlgorithms)
The encryption algorithms that KMS supports for this key.
This information is critical. If a public key encrypts data outside of KMS by using an unsupported encryption algorithm, the ciphertext cannot be decrypted.
This field appears in the response only when the
KeyUsageof the public key isENCRYPT_DECRYPT.- Parameters:
encryptionAlgorithms- The encryption algorithms that KMS supports for this key.This information is critical. If a public key encrypts data outside of KMS by using an unsupported encryption algorithm, the ciphertext cannot be decrypted.
This field appears in the response only when the
KeyUsageof the public key isENCRYPT_DECRYPT.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
encryptionAlgorithms
GetPublicKeyResponse.Builder encryptionAlgorithms(Collection<EncryptionAlgorithmSpec> encryptionAlgorithms)
The encryption algorithms that KMS supports for this key.
This information is critical. If a public key encrypts data outside of KMS by using an unsupported encryption algorithm, the ciphertext cannot be decrypted.
This field appears in the response only when the
KeyUsageof the public key isENCRYPT_DECRYPT.- Parameters:
encryptionAlgorithms- The encryption algorithms that KMS supports for this key.This information is critical. If a public key encrypts data outside of KMS by using an unsupported encryption algorithm, the ciphertext cannot be decrypted.
This field appears in the response only when the
KeyUsageof the public key isENCRYPT_DECRYPT.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
encryptionAlgorithms
GetPublicKeyResponse.Builder encryptionAlgorithms(EncryptionAlgorithmSpec... encryptionAlgorithms)
The encryption algorithms that KMS supports for this key.
This information is critical. If a public key encrypts data outside of KMS by using an unsupported encryption algorithm, the ciphertext cannot be decrypted.
This field appears in the response only when the
KeyUsageof the public key isENCRYPT_DECRYPT.- Parameters:
encryptionAlgorithms- The encryption algorithms that KMS supports for this key.This information is critical. If a public key encrypts data outside of KMS by using an unsupported encryption algorithm, the ciphertext cannot be decrypted.
This field appears in the response only when the
KeyUsageof the public key isENCRYPT_DECRYPT.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
signingAlgorithmsWithStrings
GetPublicKeyResponse.Builder signingAlgorithmsWithStrings(Collection<String> signingAlgorithms)
The signing algorithms that KMS supports for this key.
This field appears in the response only when the
KeyUsageof the public key isSIGN_VERIFY.- Parameters:
signingAlgorithms- The signing algorithms that KMS supports for this key.This field appears in the response only when the
KeyUsageof the public key isSIGN_VERIFY.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
signingAlgorithmsWithStrings
GetPublicKeyResponse.Builder signingAlgorithmsWithStrings(String... signingAlgorithms)
The signing algorithms that KMS supports for this key.
This field appears in the response only when the
KeyUsageof the public key isSIGN_VERIFY.- Parameters:
signingAlgorithms- The signing algorithms that KMS supports for this key.This field appears in the response only when the
KeyUsageof the public key isSIGN_VERIFY.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
signingAlgorithms
GetPublicKeyResponse.Builder signingAlgorithms(Collection<SigningAlgorithmSpec> signingAlgorithms)
The signing algorithms that KMS supports for this key.
This field appears in the response only when the
KeyUsageof the public key isSIGN_VERIFY.- Parameters:
signingAlgorithms- The signing algorithms that KMS supports for this key.This field appears in the response only when the
KeyUsageof the public key isSIGN_VERIFY.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
signingAlgorithms
GetPublicKeyResponse.Builder signingAlgorithms(SigningAlgorithmSpec... signingAlgorithms)
The signing algorithms that KMS supports for this key.
This field appears in the response only when the
KeyUsageof the public key isSIGN_VERIFY.- Parameters:
signingAlgorithms- The signing algorithms that KMS supports for this key.This field appears in the response only when the
KeyUsageof the public key isSIGN_VERIFY.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
keyAgreementAlgorithmsWithStrings
GetPublicKeyResponse.Builder keyAgreementAlgorithmsWithStrings(Collection<String> keyAgreementAlgorithms)
The key agreement algorithm used to derive a shared secret. This field is present only when the KMS key has a
KeyUsagevalue ofKEY_AGREEMENT.- Parameters:
keyAgreementAlgorithms- The key agreement algorithm used to derive a shared secret. This field is present only when the KMS key has aKeyUsagevalue ofKEY_AGREEMENT.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
keyAgreementAlgorithmsWithStrings
GetPublicKeyResponse.Builder keyAgreementAlgorithmsWithStrings(String... keyAgreementAlgorithms)
The key agreement algorithm used to derive a shared secret. This field is present only when the KMS key has a
KeyUsagevalue ofKEY_AGREEMENT.- Parameters:
keyAgreementAlgorithms- The key agreement algorithm used to derive a shared secret. This field is present only when the KMS key has aKeyUsagevalue ofKEY_AGREEMENT.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
keyAgreementAlgorithms
GetPublicKeyResponse.Builder keyAgreementAlgorithms(Collection<KeyAgreementAlgorithmSpec> keyAgreementAlgorithms)
The key agreement algorithm used to derive a shared secret. This field is present only when the KMS key has a
KeyUsagevalue ofKEY_AGREEMENT.- Parameters:
keyAgreementAlgorithms- The key agreement algorithm used to derive a shared secret. This field is present only when the KMS key has aKeyUsagevalue ofKEY_AGREEMENT.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
keyAgreementAlgorithms
GetPublicKeyResponse.Builder keyAgreementAlgorithms(KeyAgreementAlgorithmSpec... keyAgreementAlgorithms)
The key agreement algorithm used to derive a shared secret. This field is present only when the KMS key has a
KeyUsagevalue ofKEY_AGREEMENT.- Parameters:
keyAgreementAlgorithms- The key agreement algorithm used to derive a shared secret. This field is present only when the KMS key has aKeyUsagevalue ofKEY_AGREEMENT.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-