Struct: kms.ImportKeyMaterialInput
Implemented Interfaces
s3crypto.Cipher, s3manager.ReadSeekerWriteTo, request.Validator, s3manager.WriterReadFrom
Structure Field Summary collapse
-
EncryptedKeyMaterial []byte
The encrypted key material to import.
-
ExpirationModel *string
Specifies whether the key material expires.
-
ImportToken []byte
The import token that you received in the response to a previous GetParametersForImport request.
-
KeyId *string
The identifier of the KMS key that will be associated with the imported key material.
-
ValidTo *time.Time
The date and time when the imported key material expires.
- _ struct{}
Service Operations collapse
-
GoString() string
operation
GoString returns the string representation.
-
SetEncryptedKeyMaterial([]byte) *ImportKeyMaterialInput
operation
SetEncryptedKeyMaterial sets the EncryptedKeyMaterial field's value.
-
SetExpirationModel(string) *ImportKeyMaterialInput
operation
SetExpirationModel sets the ExpirationModel field's value.
-
SetImportToken([]byte) *ImportKeyMaterialInput
operation
SetImportToken sets the ImportToken field's value.
-
SetKeyId(string) *ImportKeyMaterialInput
operation
SetKeyId sets the KeyId field's value.
-
SetValidTo(time.Time) *ImportKeyMaterialInput
operation
SetValidTo sets the ValidTo field's value.
-
String() string
operation
String returns the string representation.
-
Validate() error
operation
Validate inspects the fields of the type to determine if they are valid.
Structure Field Details
EncryptedKeyMaterial []byte
`min:"1" type:"blob" required:"true"`
The encrypted key material to import. The key material must be encrypted under the public wrapping key that GetParametersForImport returned, using the wrapping algorithm that you specified in the same GetParametersForImport request. EncryptedKeyMaterial is automatically base64 encoded/decoded by the SDK.
EncryptedKeyMaterial is a required field
ExpirationModel *string
`type:"string" enum:"ExpirationModelType"`
Specifies whether the key material expires. The default is KEY_MATERIAL_EXPIRES. For help with this choice, see Setting an expiration time (docs.aws.amazon.com/en_us/kms/latest/developerguide/importing-keys.html#importing-keys-expiration) in the Key Management Service Developer Guide.
When the value of ExpirationModel is KEY_MATERIAL_EXPIRES, you must specify a value for the ValidTo parameter. When value is KEY_MATERIAL_DOES_NOT_EXPIRE, you must omit the ValidTo parameter.
You cannot change the ExpirationModel or ValidTo values for the current import after the request completes. To change either value, you must reimport the key material.
ImportToken []byte
`min:"1" type:"blob" required:"true"`
The import token that you received in the response to a previous GetParametersForImport request. It must be from the same response that contained the public key that you used to encrypt the key material. ImportToken is automatically base64 encoded/decoded by the SDK.
ImportToken is a required field
KeyId *string
`min:"1" type:"string" required:"true"`
The identifier of the KMS key that will be associated with the imported key material. This must be the same KMS key specified in the KeyID parameter of the corresponding GetParametersForImport request. The Origin of the KMS key must be EXTERNAL and its KeyState must be PendingImport.
The KMS key can be a symmetric encryption KMS key, HMAC KMS key, asymmetric encryption KMS key, or asymmetric signing KMS key, including a multi-Region key (kms/latest/developerguide/multi-region-keys-overview.html) of any supported type. You cannot perform this operation on a KMS key in a custom key store, or on a KMS key in a different Amazon Web Services account.
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
ValidTo *time.Time
`type:"timestamp"`
The date and time when the imported key material expires. This parameter is required when the value of the ExpirationModel parameter is KEY_MATERIAL_EXPIRES. Otherwise it is not valid.
The value of this parameter must be a future date and time. The maximum value is 365 days from the request date.
When the key material expires, KMS deletes the key material from the KMS key. Without its key material, the KMS key is unusable. To use the KMS key in cryptographic operations, you must reimport the same key material.
You cannot change the ExpirationModel or ValidTo values for the current import after the request completes. To change either value, you must delete (DeleteImportedKeyMaterial) and reimport the key material.
_ struct{}
`type:"structure"`
Method Details
func (s ImportKeyMaterialInput) 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”.
13139 13140 13141 |
// File 'service/kms/api.go', line 13139
|
func (s *ImportKeyMaterialInput) SetEncryptedKeyMaterial(v []byte) *ImportKeyMaterialInput
SetEncryptedKeyMaterial sets the EncryptedKeyMaterial field's value.
13172 13173 13174 13175 |
// File 'service/kms/api.go', line 13172
|
func (s *ImportKeyMaterialInput) SetExpirationModel(v string) *ImportKeyMaterialInput
SetExpirationModel sets the ExpirationModel field's value.
13178 13179 13180 13181 |
// File 'service/kms/api.go', line 13178
|
func (s *ImportKeyMaterialInput) SetImportToken(v []byte) *ImportKeyMaterialInput
SetImportToken sets the ImportToken field's value.
13184 13185 13186 13187 |
// File 'service/kms/api.go', line 13184
|
func (s *ImportKeyMaterialInput) SetKeyId(v string) *ImportKeyMaterialInput
SetKeyId sets the KeyId field's value.
13190 13191 13192 13193 |
// File 'service/kms/api.go', line 13190
|
func (s *ImportKeyMaterialInput) SetValidTo(v time.Time) *ImportKeyMaterialInput
SetValidTo sets the ValidTo field's value.
13196 13197 13198 13199 |
// File 'service/kms/api.go', line 13196
|
func (s ImportKeyMaterialInput) 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”.
13130 13131 13132 |
// File 'service/kms/api.go', line 13130
|
func (s *ImportKeyMaterialInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
13144 13145 13146 13147 13148 13149 13150 13151 13152 13153 13154 13155 13156 13157 13158 13159 13160 13161 13162 13163 13164 13165 13166 13167 13168 13169 |
// File 'service/kms/api.go', line 13144
|