Struct: kms.GetPublicKeyOutput

import "../ibm-cos-sdk-go/service/kms"

Implemented Interfaces

s3crypto.Cipher, s3manager.ReadSeekerWriteTo, s3manager.WriterReadFrom

Structure Field Summary collapse

Service Operations collapse

Structure Field Details

CustomerMasterKeySpec *string `type:"string" enum:"CustomerMasterKeySpec"`

Instead, use the KeySpec field in the GetPublicKey response.

The KeySpec and CustomerMasterKeySpec fields have the same value. We recommend that you use the KeySpec field in your code. However, to avoid breaking changes, KMS supports both fields.

EncryptionAlgorithms []*string `type:"list" enum:"EncryptionAlgorithmSpec"`

The encryption algorithms that AWS KMS supports for this key.

This information is critical. If a public key encrypts data outside of AWS KMS by using an unsupported encryption algorithm, the ciphertext cannot be decrypted.

This field appears in the response only when the KeyUsage of the public key is ENCRYPT_DECRYPT.

KeyId *string `min:"1" type:"string"`

The Amazon Resource Name (key ARN (docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN)) of the asymmetric KMS key from which the public key was downloaded.

KeyUsage *string `type:"string" enum:"KeyUsageType"`

The permitted use of the public key. Valid values are ENCRYPT_DECRYPT or SIGN_VERIFY.

This information is critical. If a public key with SIGN_VERIFY key usage encrypts data outside of KMS, the ciphertext cannot be decrypted.

PublicKey []byte `min:"1" type:"blob"`

The exported public key.

The value is a DER-encoded X.509 public key, also known as SubjectPublicKeyInfo (SPKI), as defined in RFC 5280 (tools.ietf.org/html/rfc5280). When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded. PublicKey is automatically base64 encoded/decoded by the SDK.

SigningAlgorithms []*string `type:"list" enum:"SigningAlgorithmSpec"`

The signing algorithms that KMS supports for this key.

This field appears in the response only when the KeyUsage of the public key is SIGN_VERIFY.

_ struct{} `type:"structure"`

Method Details

func (s GetPublicKeyOutput) GoString() string

GoString returns the string representation.

API parameter values that are decorated as “sensitive” in the API will not be included in the string output. The member name will be present, but the value will be replaced with “sensitive”.



12829
12830
12831
// File 'service/kms/api.go', line 12829

func (s GetPublicKeyOutput) GoString() string { return s.String() }

func (s *GetPublicKeyOutput) SetCustomerMasterKeySpec(v string) *GetPublicKeyOutput

SetCustomerMasterKeySpec sets the CustomerMasterKeySpec field's value.



12834
12835
12836
12837
// File 'service/kms/api.go', line 12834

func (s *GetPublicKeyOutput) SetCustomerMasterKeySpec(v string) *GetPublicKeyOutput { s.CustomerMasterKeySpec = &v return s }

func (s *GetPublicKeyOutput) SetEncryptionAlgorithms(v []*string) *GetPublicKeyOutput

SetEncryptionAlgorithms sets the EncryptionAlgorithms field's value.



12840
12841
12842
12843
// File 'service/kms/api.go', line 12840

func (s *GetPublicKeyOutput) SetEncryptionAlgorithms(v []*string) *GetPublicKeyOutput { s.EncryptionAlgorithms = v return s }

func (s *GetPublicKeyOutput) SetKeyId(v string) *GetPublicKeyOutput

SetKeyId sets the KeyId field's value.



12846
12847
12848
12849
// File 'service/kms/api.go', line 12846

func (s *GetPublicKeyOutput) SetKeyId(v string) *GetPublicKeyOutput { s.KeyId = &v return s }

func (s *GetPublicKeyOutput) SetKeyUsage(v string) *GetPublicKeyOutput

SetKeyUsage sets the KeyUsage field's value.



12852
12853
12854
12855
// File 'service/kms/api.go', line 12852

func (s *GetPublicKeyOutput) SetKeyUsage(v string) *GetPublicKeyOutput { s.KeyUsage = &v return s }

func (s *GetPublicKeyOutput) SetPublicKey(v []byte) *GetPublicKeyOutput

SetPublicKey sets the PublicKey field's value.



12858
12859
12860
12861
// File 'service/kms/api.go', line 12858

func (s *GetPublicKeyOutput) SetPublicKey(v []byte) *GetPublicKeyOutput { s.PublicKey = v return s }

func (s *GetPublicKeyOutput) SetSigningAlgorithms(v []*string) *GetPublicKeyOutput

SetSigningAlgorithms sets the SigningAlgorithms field's value.



12864
12865
12866
12867
// File 'service/kms/api.go', line 12864

func (s *GetPublicKeyOutput) SetSigningAlgorithms(v []*string) *GetPublicKeyOutput { s.SigningAlgorithms = v return s }

func (s GetPublicKeyOutput) String() string

String returns the string representation.

API parameter values that are decorated as “sensitive” in the API will not be included in the string output. The member name will be present, but the value will be replaced with “sensitive”.



12820
12821
12822
// File 'service/kms/api.go', line 12820

func (s GetPublicKeyOutput) String() string { return awsutil.Prettify(s) }