Struct: s3.LoggingEnabled

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

Overview

Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys for a bucket. For more information, see PUT Bucket logging (docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html) in the Amazon Simple Storage Service API Reference.

Implemented Interfaces

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

Structure Field Summary collapse

Service Operations collapse

Structure Field Details

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

Specifies the bucket where you want Amazon S3 to store server access logs. You can have your logs delivered to any bucket that you own, including the same bucket that is being logged. You can also configure multiple buckets to deliver their logs to the same target bucket. In this case, you should choose a different TargetPrefix for each source bucket so that the delivered log files can be distinguished by key.

TargetBucket is a required field

TargetGrants []*TargetGrant `locationNameList:"Grant" type:"list"`

Container for granting information.

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

A prefix for all log object keys. If you store log files from multiple Amazon S3 buckets in a single bucket, you can use a prefix to distinguish which log files came from which bucket.

TargetPrefix is a required field

_ struct{} `type:"structure"`

Method Details

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



17900
17901
17902
// File 'service/s3/api.go', line 17900

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

func (s *LoggingEnabled) SetTargetBucket(v string) *LoggingEnabled

SetTargetBucket sets the TargetBucket field's value.



17931
17932
17933
17934
// File 'service/s3/api.go', line 17931

func (s *LoggingEnabled) SetTargetBucket(v string) *LoggingEnabled { s.TargetBucket = &v return s }

func (s *LoggingEnabled) SetTargetGrants(v []*TargetGrant) *LoggingEnabled

SetTargetGrants sets the TargetGrants field's value.



17937
17938
17939
17940
// File 'service/s3/api.go', line 17937

func (s *LoggingEnabled) SetTargetGrants(v []*TargetGrant) *LoggingEnabled { s.TargetGrants = v return s }

func (s *LoggingEnabled) SetTargetPrefix(v string) *LoggingEnabled

SetTargetPrefix sets the TargetPrefix field's value.



17943
17944
17945
17946
// File 'service/s3/api.go', line 17943

func (s *LoggingEnabled) SetTargetPrefix(v string) *LoggingEnabled { s.TargetPrefix = &v return s }

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



17891
17892
17893
// File 'service/s3/api.go', line 17891

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

func (s *LoggingEnabled) Validate() error

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



17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
17926
17927
17928
// File 'service/s3/api.go', line 17905

func (s *LoggingEnabled) Validate() error { invalidParams := request.ErrInvalidParams{Context: "LoggingEnabled"} if s.TargetBucket == nil { invalidParams.Add(request.NewErrParamRequired("TargetBucket")) } if s.TargetPrefix == nil { invalidParams.Add(request.NewErrParamRequired("TargetPrefix")) } if s.TargetGrants != nil { for i, v := range s.TargetGrants { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetGrants", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil }