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



7872
7873
7874
// File 'service/s3/api.go', line 7872

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

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

SetCORSRules sets the CORSRules field’s value.



7900
7901
7902
7903
// File 'service/s3/api.go', line 7900

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



7863
7864
7865
// File 'service/s3/api.go', line 7863

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.



7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
// File 'service/s3/api.go', line 7877

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 }