Struct: kms.ListKeyPoliciesInput

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"`

Gets the names of key policies for the specified KMS key.

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

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

Use this parameter to specify the maximum number of items to return. When this value is present, KMS does not return more than the specified number of items, but it might return fewer.

This value is optional. If you include a value, it must be between 1 and 1000, inclusive. If you do not include a value, it defaults to 100.

Only one policy can be attached to a key.

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

Use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of NextMarker from the truncated response you just received.

_ struct{} `type:"structure"`

Method Details

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



14933
14934
14935
// File 'service/kms/api.go', line 14933

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

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

SetKeyId sets the KeyId field's value.



14960
14961
14962
14963
// File 'service/kms/api.go', line 14960

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

func (s *ListKeyPoliciesInput) SetLimit(v int64) *ListKeyPoliciesInput

SetLimit sets the Limit field's value.



14966
14967
14968
14969
// File 'service/kms/api.go', line 14966

func (s *ListKeyPoliciesInput) SetLimit(v int64) *ListKeyPoliciesInput { s.Limit = &v return s }

func (s *ListKeyPoliciesInput) SetMarker(v string) *ListKeyPoliciesInput

SetMarker sets the Marker field's value.



14972
14973
14974
14975
// File 'service/kms/api.go', line 14972

func (s *ListKeyPoliciesInput) SetMarker(v string) *ListKeyPoliciesInput { s.Marker = &v return s }

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



14924
14925
14926
// File 'service/kms/api.go', line 14924

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

func (s *ListKeyPoliciesInput) Validate() error

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



14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
// File 'service/kms/api.go', line 14938

func (s *ListKeyPoliciesInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListKeyPoliciesInput"} 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.Limit != nil && *s.Limit < 1 { invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } if s.Marker != nil && len(*s.Marker) < 1 { invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil }