Struct: kms.GetPublicKeyInput

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

Implemented Interfaces

s3crypto.Cipher, s3manager.ReadSeekerWriteTo, request.Validator, s3manager.WriterReadFrom

Structure Field Summary collapse

Service Operations collapse

Structure Field Details

GrantTokens []*string `type:"list"`

A list of grant tokens.

For more information, see Grant Tokens (docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) in the AWS Key Management Service Developer Guide.

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

Identifies the asymmetric KMS key that includes the public key.

To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with “alias/”. To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

  • Alias name: alias/ExampleAlias

  • Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name and alias ARN, use ListAliases.

KeyId is a required field

_ struct{} `type:"structure"`

Method Details

func (s GetPublicKeyInput) 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”.



12736
12737
12738
// File 'service/kms/api.go', line 12736

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

func (s *GetPublicKeyInput) SetGrantTokens(v []*string) *GetPublicKeyInput

SetGrantTokens sets the GrantTokens field's value.



12757
12758
12759
12760
// File 'service/kms/api.go', line 12757

func (s *GetPublicKeyInput) SetGrantTokens(v []*string) *GetPublicKeyInput { s.GrantTokens = v return s }

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

SetKeyId sets the KeyId field's value.



12763
12764
12765
12766
// File 'service/kms/api.go', line 12763

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

func (s GetPublicKeyInput) 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”.



12727
12728
12729
// File 'service/kms/api.go', line 12727

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

func (s *GetPublicKeyInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.



12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
// File 'service/kms/api.go', line 12741

func (s *GetPublicKeyInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetPublicKeyInput"} if s.KeyId == nil { invalidParams.Add(request.NewErrParamRequired("KeyId")) } if s.KeyId != nil && len(*s.KeyId) < 1 { invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil }