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.

LoggingConfig

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

type LoggingConfig struct { Bucket *string `type:"string" required:"true"` Enabled *bool `type:"boolean" required:"true"` IncludeCookies *bool `type:"boolean" required:"true"` Prefix *string `type:"string" required:"true"` }

A complex type that controls whether access logs are written for the distribution.

Bucket

Type: *string

The Amazon S3 bucket to store the access logs in, for example, myawslogbucket.s3.amazonaws.com.

Bucket is a required field

Enabled

Type: *bool

Specifies whether you want CloudFront to save access logs to an Amazon S3 bucket. If you don't want to enable logging when you create a distribution or if you want to disable logging for an existing distribution, specify false for Enabled, and specify empty Bucket and Prefix elements. If you specify false for Enabled but you specify values for Bucket, prefix, and IncludeCookies, the values are automatically deleted.

Enabled is a required field

IncludeCookies

Type: *bool

Specifies whether you want CloudFront to include cookies in access logs, specify true for IncludeCookies. If you choose to include cookies in logs, CloudFront logs all cookies regardless of how you configure the cache behaviors for this distribution. If you don't want to include cookies when you create a distribution or if you want to disable include cookies for an existing distribution, specify false for IncludeCookies.

IncludeCookies is a required field

Prefix

Type: *string

An optional string that you want CloudFront to prefix to the access log filenames for this distribution, for example, myprefix/. If you want to enable logging, but you don't want to specify a prefix, you still must include an empty Prefix element in the Logging element.

Prefix is a required field

Method

GoString

func (s LoggingConfig) GoString() string

GoString returns the string representation

SetBucket

func (s *LoggingConfig) SetBucket(v string) *LoggingConfig

SetBucket sets the Bucket field's value.

SetEnabled

func (s *LoggingConfig) SetEnabled(v bool) *LoggingConfig

SetEnabled sets the Enabled field's value.

SetIncludeCookies

func (s *LoggingConfig) SetIncludeCookies(v bool) *LoggingConfig

SetIncludeCookies sets the IncludeCookies field's value.

SetPrefix

func (s *LoggingConfig) SetPrefix(v string) *LoggingConfig

SetPrefix sets the Prefix field's value.

String

func (s LoggingConfig) String() string

String returns the string representation

Validate

func (s *LoggingConfig) Validate() error

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

On this page: