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



17730
17731
17732
// File 'service/s3/api.go', line 17730

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

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

SetTargetBucket sets the TargetBucket field's value.



17761
17762
17763
17764
// File 'service/s3/api.go', line 17761

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.



17767
17768
17769
17770
// File 'service/s3/api.go', line 17767

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.



17773
17774
17775
17776
// File 'service/s3/api.go', line 17773

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



17721
17722
17723
// File 'service/s3/api.go', line 17721

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.



17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
// File 'service/s3/api.go', line 17735

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 }