Struct: kms.ListGrantsInput

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

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

Returns only the grant with the specified grant ID. The grant ID uniquely identifies the grant.

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

Returns only grants where the specified principal is the grantee principal for the grant.

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

Returns only grants for the specified KMS key. This parameter is required.

Specify the key ID or key ARN of the KMS key. To specify a KMS key in a different Amazon Web Services account, you must use the key ARN.

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 100, inclusive. If you do not include a value, it defaults to 50.

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 ListGrantsInput) 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”.



14770
14771
14772
// File 'service/kms/api.go', line 14770

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

func (s *ListGrantsInput) SetGranteePrincipal(v string) *ListGrantsInput

SetGranteePrincipal sets the GranteePrincipal field's value.



14809
14810
14811
14812
// File 'service/kms/api.go', line 14809

func (s *ListGrantsInput) SetGranteePrincipal(v string) *ListGrantsInput { s.GranteePrincipal = &v return s }

func (s *ListGrantsInput) SetGrantId(v string) *ListGrantsInput

SetGrantId sets the GrantId field's value.



14803
14804
14805
14806
// File 'service/kms/api.go', line 14803

func (s *ListGrantsInput) SetGrantId(v string) *ListGrantsInput { s.GrantId = &v return s }

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

SetKeyId sets the KeyId field's value.



14815
14816
14817
14818
// File 'service/kms/api.go', line 14815

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

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

SetLimit sets the Limit field's value.



14821
14822
14823
14824
// File 'service/kms/api.go', line 14821

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

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

SetMarker sets the Marker field's value.



14827
14828
14829
14830
// File 'service/kms/api.go', line 14827

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

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



14761
14762
14763
// File 'service/kms/api.go', line 14761

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

func (s *ListGrantsInput) Validate() error

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



14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
// File 'service/kms/api.go', line 14775

func (s *ListGrantsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListGrantsInput"} if s.GrantId != nil && len(*s.GrantId) < 1 { invalidParams.Add(request.NewErrParamMinLen("GrantId", 1)) } if s.GranteePrincipal != nil && len(*s.GranteePrincipal) < 1 { invalidParams.Add(request.NewErrParamMinLen("GranteePrincipal", 1)) } 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 }