AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

GrantConstraints

import "github.com/aws/aws-sdk-go/service/kms"

type GrantConstraints struct { EncryptionContextEquals map[string]*string `type:"map"` EncryptionContextSubset map[string]*string `type:"map"` }

A structure that you can use to allow certain operations in the grant only when the desired encryption context is present. For more information about encryption context, see Encryption Context (https://docs.aws.amazon.com/kms/latest/developerguide/encryption-context.html) in the AWS Key Management Service Developer Guide.

Grant constraints apply only to operations that accept encryption context as input. For example, the DescribeKey operation does not accept encryption context as input. A grant that allows the DescribeKey operation does so regardless of the grant constraints. In constrast, the Encrypt operation accepts encryption context as input. A grant that allows the Encrypt operation does so only when the encryption context of the Encrypt operation satisfies the grant constraints.

EncryptionContextEquals

Type: map[string]*string

A list of key-value pairs that must be present in the encryption context of certain subsequent operations that the grant allows. When certain subsequent operations allowed by the grant include encryption context that matches this list, the grant allows the operation. Otherwise, the grant does not allow the operation.

EncryptionContextSubset

Type: map[string]*string

A list of key-value pairs, all of which must be present in the encryption context of certain subsequent operations that the grant allows. When certain subsequent operations allowed by the grant include encryption context that matches this list or is a superset of this list, the grant allows the operation. Otherwise, the grant does not allow the operation.

Method

GoString

func (s GrantConstraints) GoString() string

GoString returns the string representation

SetEncryptionContextEquals

func (s *GrantConstraints) SetEncryptionContextEquals(v map[string]*string) *GrantConstraints

SetEncryptionContextEquals sets the EncryptionContextEquals field's value.

SetEncryptionContextSubset

func (s *GrantConstraints) SetEncryptionContextSubset(v map[string]*string) *GrantConstraints

SetEncryptionContextSubset sets the EncryptionContextSubset field's value.

String

func (s GrantConstraints) String() string

String returns the string representation

On this page: