Struct: s3.CORSConfiguration

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

Overview

Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more information, see Enabling Cross-Origin Resource Sharing (docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the Amazon S3 User Guide.

Implemented Interfaces

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

Structure Field Summary collapse

Service Operations collapse

Structure Field Details

CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true" required:"true"`

A set of origins and methods (cross-origin access that you want to allow). You can add up to 100 rules to the configuration.

CORSRules is a required field

_ struct{} `type:"structure"`

Method Details

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



7721
7722
7723
// File 'service/s3/api.go', line 7721

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

func (s *CORSConfiguration) SetCORSRules(v []*CORSRule) *CORSConfiguration

SetCORSRules sets the CORSRules field's value.



7749
7750
7751
7752
// File 'service/s3/api.go', line 7749

func (s *CORSConfiguration) SetCORSRules(v []*CORSRule) *CORSConfiguration { s.CORSRules = v return s }

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



7712
7713
7714
// File 'service/s3/api.go', line 7712

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

func (s *CORSConfiguration) Validate() error

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



7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
// File 'service/s3/api.go', line 7726

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