Struct: kms.KeyMetadata

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

Overview

Contains metadata about a KMS key.

This data type is used as a response element for the CreateKey, DescribeKey, and ReplicateKey operations.

Implemented Interfaces

s3crypto.Cipher, s3manager.ReadSeekerWriteTo, s3manager.WriterReadFrom

Structure Field Summary collapse

Service Operations collapse

Structure Field Details

AWSAccountId *string `type:"string"`

The twelve-digit account ID of the Amazon Web Services account that owns the KMS key.

Arn *string `min:"20" type:"string"`

The Amazon Resource Name (ARN) of the KMS key. For examples, see Key Management Service (KMS) (docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms) in the Example ARNs section of the Amazon Web Services General Reference.

CloudHsmClusterId *string `min:"19" type:"string"`

The cluster ID of the CloudHSM cluster that contains the key material for the KMS key. When you create a KMS key in an CloudHSM custom key store (docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html), KMS creates the key material for the KMS key in the associated CloudHSM cluster. This field is present only when the KMS key is created in an CloudHSM key store.

CreationDate *time.Time `type:"timestamp"`

The date and time when the KMS key was created.

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

A unique identifier for the custom key store (docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html) that contains the KMS key. This field is present only when the KMS key is created in a custom key store.

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

Instead, use the KeySpec field.

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.

Deprecated: This field has been deprecated. Instead, use the KeySpec field.

DeletionDate *time.Time `type:"timestamp"`

The date and time after which KMS deletes this KMS key. This value is present only when the KMS key is scheduled for deletion, that is, when its KeyState is PendingDeletion.

When the primary key in a multi-Region key is scheduled for deletion but still has replica keys, its key state is PendingReplicaDeletion and the length of its waiting period is displayed in the PendingDeletionWindowInDays field.

Description *string `type:"string"`

The description of the KMS key.

Enabled *bool `type:"boolean"`

Specifies whether the KMS key is enabled. When KeyState is Enabled this value is true, otherwise it is false.

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

The encryption algorithms that the CMK supports. You cannot use the CMK with other encryption algorithms within AWS KMS.

This field appears only when the KeyUsage of the CMK is ENCRYPT_DECRYPT.

ExpirationModel *string `type:"string" enum:"ExpirationModelType"`

Specifies whether the KMS key's key material expires. This value is present only when Origin is EXTERNAL, otherwise this value is omitted.

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

The globally unique identifier for the KMS key.

KeyId is a required field

KeyManager *string `type:"string" enum:"KeyManagerType"`

The manager of the KMS key. KMS keys in your Amazon Web Services account are either customer managed or Amazon Web Services managed. For more information about the difference, see KMS keys (docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys) in the Key Management Service Developer Guide.

KeySpec *string `type:"string" enum:"KeySpec"`

Describes the type of key material in the KMS key.

KeyState *string `type:"string" enum:"KeyState"`

The current status of the KMS key.

For more information about how key state affects the use of a KMS key, see Key states of KMS keys (docs.aws.amazon.com/kms/latest/developerguide/key-state.html) in the Key Management Service Developer Guide.

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

The cryptographic operations (docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) for which you can use the KMS key.

Origin *string `type:"string" enum:"OriginType"`

The source of the key material for the KMS key. When this value is AWS_KMS, KMS created the key material. When this value is EXTERNAL, the key material was imported or the KMS key doesn't have any key material. When this value is AWS_CLOUDHSM, the key material was created in the CloudHSM cluster associated with a custom key store.

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

The signing algorithms that the KMS key supports. You cannot use the KMS key with other signing algorithms within KMS.

This field appears only when the KeyUsage of the KMS key is SIGN_VERIFY.

ValidTo *time.Time `type:"timestamp"`

The time at which the imported key material expires. When the key material expires, KMS deletes the key material and the KMS key becomes unusable. This value is present only for KMS keys whose Origin is EXTERNAL and whose ExpirationModel is KEY_MATERIAL_EXPIRES, otherwise this value is omitted.

_ struct{} `type:"structure"`

Method Details

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



14324
14325
14326
// File 'service/kms/api.go', line 14324

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

func (s *KeyMetadata) SetArn(v string) *KeyMetadata

SetArn sets the Arn field's value.



14335
14336
14337
14338
// File 'service/kms/api.go', line 14335

func (s *KeyMetadata) SetArn(v string) *KeyMetadata { s.Arn = &v return s }

func (s *KeyMetadata) SetAWSAccountId(v string) *KeyMetadata

SetAWSAccountId sets the AWSAccountId field's value.



14329
14330
14331
14332
// File 'service/kms/api.go', line 14329

func (s *KeyMetadata) SetAWSAccountId(v string) *KeyMetadata { s.AWSAccountId = &v return s }

func (s *KeyMetadata) SetCloudHsmClusterId(v string) *KeyMetadata

SetCloudHsmClusterId sets the CloudHsmClusterId field's value.



14341
14342
14343
14344
// File 'service/kms/api.go', line 14341

func (s *KeyMetadata) SetCloudHsmClusterId(v string) *KeyMetadata { s.CloudHsmClusterId = &v return s }

func (s *KeyMetadata) SetCreationDate(v time.Time) *KeyMetadata

SetCreationDate sets the CreationDate field's value.



14347
14348
14349
14350
// File 'service/kms/api.go', line 14347

func (s *KeyMetadata) SetCreationDate(v time.Time) *KeyMetadata { s.CreationDate = &v return s }

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

SetCustomerMasterKeySpec sets the CustomerMasterKeySpec field's value.



14359
14360
14361
14362
// File 'service/kms/api.go', line 14359

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

func (s *KeyMetadata) SetCustomKeyStoreId(v string) *KeyMetadata

SetCustomKeyStoreId sets the CustomKeyStoreId field's value.



14353
14354
14355
14356
// File 'service/kms/api.go', line 14353

func (s *KeyMetadata) SetCustomKeyStoreId(v string) *KeyMetadata { s.CustomKeyStoreId = &v return s }

func (s *KeyMetadata) SetDeletionDate(v time.Time) *KeyMetadata

SetDeletionDate sets the DeletionDate field's value.



14365
14366
14367
14368
// File 'service/kms/api.go', line 14365

func (s *KeyMetadata) SetDeletionDate(v time.Time) *KeyMetadata { s.DeletionDate = &v return s }

func (s *KeyMetadata) SetDescription(v string) *KeyMetadata

SetDescription sets the Description field's value.



14371
14372
14373
14374
// File 'service/kms/api.go', line 14371

func (s *KeyMetadata) SetDescription(v string) *KeyMetadata { s.Description = &v return s }

func (s *KeyMetadata) SetEnabled(v bool) *KeyMetadata

SetEnabled sets the Enabled field's value.



14377
14378
14379
14380
// File 'service/kms/api.go', line 14377

func (s *KeyMetadata) SetEnabled(v bool) *KeyMetadata { s.Enabled = &v return s }

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

SetEncryptionAlgorithms sets the EncryptionAlgorithms field's value.



14383
14384
14385
14386
// File 'service/kms/api.go', line 14383

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

func (s *KeyMetadata) SetExpirationModel(v string) *KeyMetadata

SetExpirationModel sets the ExpirationModel field's value.



14389
14390
14391
14392
// File 'service/kms/api.go', line 14389

func (s *KeyMetadata) SetExpirationModel(v string) *KeyMetadata { s.ExpirationModel = &v return s }

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

SetKeyId sets the KeyId field's value.



14395
14396
14397
14398
// File 'service/kms/api.go', line 14395

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

func (s *KeyMetadata) SetKeyManager(v string) *KeyMetadata

SetKeyManager sets the KeyManager field's value.



14401
14402
14403
14404
// File 'service/kms/api.go', line 14401

func (s *KeyMetadata) SetKeyManager(v string) *KeyMetadata { s.KeyManager = &v return s }

func (s *KeyMetadata) SetKeySpec(v string) *KeyMetadata

SetKeySpec sets the KeySpec field's value.



14407
14408
14409
14410
// File 'service/kms/api.go', line 14407

func (s *KeyMetadata) SetKeySpec(v string) *KeyMetadata { s.KeySpec = &v return s }

func (s *KeyMetadata) SetKeyState(v string) *KeyMetadata

SetKeyState sets the KeyState field's value.



14413
14414
14415
14416
// File 'service/kms/api.go', line 14413

func (s *KeyMetadata) SetKeyState(v string) *KeyMetadata { s.KeyState = &v return s }

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

SetKeyUsage sets the KeyUsage field's value.



14419
14420
14421
14422
// File 'service/kms/api.go', line 14419

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

func (s *KeyMetadata) SetOrigin(v string) *KeyMetadata

SetOrigin sets the Origin field's value.



14425
14426
14427
14428
// File 'service/kms/api.go', line 14425

func (s *KeyMetadata) SetOrigin(v string) *KeyMetadata { s.Origin = &v return s }

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

SetSigningAlgorithms sets the SigningAlgorithms field's value.



14431
14432
14433
14434
// File 'service/kms/api.go', line 14431

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

func (s *KeyMetadata) SetValidTo(v time.Time) *KeyMetadata

SetValidTo sets the ValidTo field's value.



14437
14438
14439
14440
// File 'service/kms/api.go', line 14437

func (s *KeyMetadata) SetValidTo(v time.Time) *KeyMetadata { s.ValidTo = &v return s }

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



14315
14316
14317
// File 'service/kms/api.go', line 14315

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