Struct: kms.GetParametersForImportInput

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

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

The identifier of the KMS key that will be associated with the imported key material. The Origin of the KMS key must be EXTERNAL.

All KMS key types are supported, including multi-Region keys. However, you cannot import key material into a KMS key in a custom key store.

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.

KeyId is a required field

WrappingAlgorithm *string `type:"string" required:"true" enum:"AlgorithmSpec"`

The algorithm you will use with the RSA public key (PublicKey) in the response to protect your key material during import. For more information, see Select a wrapping algorithm (kms/latest/developerguide/importing-keys-get-public-key-and-token.html#select-wrapping-algorithm) in the Key Management Service Developer Guide.

For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping algorithms, you encrypt your key material directly with the RSA public key from KMS.

The wrapping algorithms that you can use depend on the type of key material that you are importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm.

  • RSA_AES_KEY_WRAP_SHA_256 — Supported for wrapping RSA and ECC key material.

  • RSA_AES_KEY_WRAP_SHA_1 — Supported for wrapping RSA and ECC key material.

  • RSAES_OAEP_SHA_256 — Supported for all types of key material, except RSA key material (private key). You cannot use the RSAES_OAEP_SHA_256 wrapping algorithm with the RSA_2048 wrapping key spec to wrap ECC_NIST_P521 key material.

  • RSAES_OAEP_SHA_1 — Supported for all types of key material, except RSA key material (private key). You cannot use the RSAES_OAEP_SHA_1 wrapping algorithm with the RSA_2048 wrapping key spec to wrap ECC_NIST_P521 key material.

  • RSAES_PKCS1_V1_5 (Deprecated) — Supported only for symmetric encryption key material (and only in legacy mode).

WrappingAlgorithm is a required field

WrappingKeySpec *string `type:"string" required:"true" enum:"WrappingKeySpec"`

The type of wrapping key (public key) to return in the response. Only 2048-bit RSA public keys are supported.

WrappingKeySpec is a required field

_ struct{} `type:"structure"`

Method Details

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



12575
12576
12577
// File 'service/kms/api.go', line 12575

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

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

SetKeyId sets the KeyId field's value.



12602
12603
12604
12605
// File 'service/kms/api.go', line 12602

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

func (s *GetParametersForImportInput) SetWrappingAlgorithm(v string) *GetParametersForImportInput

SetWrappingAlgorithm sets the WrappingAlgorithm field's value.



12608
12609
12610
12611
// File 'service/kms/api.go', line 12608

func (s *GetParametersForImportInput) SetWrappingAlgorithm(v string) *GetParametersForImportInput { s.WrappingAlgorithm = &v return s }

func (s *GetParametersForImportInput) SetWrappingKeySpec(v string) *GetParametersForImportInput

SetWrappingKeySpec sets the WrappingKeySpec field's value.



12614
12615
12616
12617
// File 'service/kms/api.go', line 12614

func (s *GetParametersForImportInput) SetWrappingKeySpec(v string) *GetParametersForImportInput { s.WrappingKeySpec = &v return s }

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



12566
12567
12568
// File 'service/kms/api.go', line 12566

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

func (s *GetParametersForImportInput) Validate() error

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



12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
// File 'service/kms/api.go', line 12580

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