Struct: kms.Tag

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

Overview

A key-value pair. A tag consists of a tag key and a tag value. Tag keys and tag values are both required, but tag values can be empty (null) strings.

Do not include confidential or sensitive information in this field. This field may be displayed in plaintext in CloudTrail logs and other output.

For information about the rules that apply to tag keys and tag values, see User-Defined Tag Restrictions (docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html) in the Amazon Web Services Billing and Cost Management User Guide.

Implemented Interfaces

s3crypto.Cipher, s3manager.ReadSeekerWriteTo, request.Validator, s3manager.WriterReadFrom

Structure Field Summary collapse

Service Operations collapse

Structure Field Details

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

The key of the tag.

TagKey is a required field

TagValue *string `type:"string" required:"true"`

The value of the tag.

TagValue is a required field

_ struct{} `type:"structure"`

Method Details

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



16522
16523
16524
// File 'service/kms/api.go', line 16522

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

func (s *Tag) SetTagKey(v string) *Tag

SetTagKey sets the TagKey field's value.



16546
16547
16548
16549
// File 'service/kms/api.go', line 16546

func (s *Tag) SetTagKey(v string) *Tag { s.TagKey = &v return s }

func (s *Tag) SetTagValue(v string) *Tag

SetTagValue sets the TagValue field's value.



16552
16553
16554
16555
// File 'service/kms/api.go', line 16552

func (s *Tag) SetTagValue(v string) *Tag { s.TagValue = &v return s }

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



16513
16514
16515
// File 'service/kms/api.go', line 16513

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

func (s *Tag) Validate() error

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



16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
// File 'service/kms/api.go', line 16527

func (s *Tag) Validate() error { invalidParams := request.ErrInvalidParams{Context: "Tag"} if s.TagKey == nil { invalidParams.Add(request.NewErrParamRequired("TagKey")) } if s.TagKey != nil && len(*s.TagKey) < 1 { invalidParams.Add(request.NewErrParamMinLen("TagKey", 1)) } if s.TagValue == nil { invalidParams.Add(request.NewErrParamRequired("TagValue")) } if invalidParams.Len() > 0 { return invalidParams } return nil }