Struct: kms.GenerateRandomInput

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

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

Generates the random byte string in the CloudHSM cluster that is associated with the specified CloudHSM key store. To find the ID of a custom key store, use the DescribeCustomKeyStores operation.

External key store IDs are not valid for this parameter. If you specify the ID of an external key store, GenerateRandom throws an UnsupportedOperationException.

NumberOfBytes *int64 `min:"1" type:"integer"`

The length of the random byte string. This parameter is required.

_ struct{} `type:"structure"`

Method Details

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



12225
12226
12227
// File 'service/kms/api.go', line 12225

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

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

SetCustomKeyStoreId sets the CustomKeyStoreId field's value.



12246
12247
12248
12249
// File 'service/kms/api.go', line 12246

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

func (s *GenerateRandomInput) SetNumberOfBytes(v int64) *GenerateRandomInput

SetNumberOfBytes sets the NumberOfBytes field's value.



12252
12253
12254
12255
// File 'service/kms/api.go', line 12252

func (s *GenerateRandomInput) SetNumberOfBytes(v int64) *GenerateRandomInput { s.NumberOfBytes = &v return s }

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



12216
12217
12218
// File 'service/kms/api.go', line 12216

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

func (s *GenerateRandomInput) Validate() error

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



12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
// File 'service/kms/api.go', line 12230

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