Struct: s3.WebsiteConfiguration

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

Overview

Specifies website configuration parameters for an Amazon S3 bucket.

Implemented Interfaces

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

Structure Field Summary collapse

Service Operations collapse

Structure Field Details

ErrorDocument *ErrorDocument `type:"structure"`

The name of the error document for the website.

IndexDocument *IndexDocument `type:"structure"`

The name of the index document for the website.

RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`

The redirect behavior for every request to this bucket’s website endpoint.

If you specify this property, you can’t specify any other property.

RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`

Rules that define when a redirect is applied and the redirect behavior.

_ struct{} `type:"structure"`

Method Details

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



23616
23617
23618
// File 'service/s3/api.go', line 23616

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

func (s *WebsiteConfiguration) SetErrorDocument(v *ErrorDocument) *WebsiteConfiguration

SetErrorDocument sets the ErrorDocument field’s value.



23656
23657
23658
23659
// File 'service/s3/api.go', line 23656

func (s *WebsiteConfiguration) SetErrorDocument(v *ErrorDocument) *WebsiteConfiguration { s.ErrorDocument = v return s }

func (s *WebsiteConfiguration) SetIndexDocument(v *IndexDocument) *WebsiteConfiguration

SetIndexDocument sets the IndexDocument field’s value.



23662
23663
23664
23665
// File 'service/s3/api.go', line 23662

func (s *WebsiteConfiguration) SetIndexDocument(v *IndexDocument) *WebsiteConfiguration { s.IndexDocument = v return s }

func (s *WebsiteConfiguration) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *WebsiteConfiguration

SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field’s value.



23668
23669
23670
23671
// File 'service/s3/api.go', line 23668

func (s *WebsiteConfiguration) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *WebsiteConfiguration { s.RedirectAllRequestsTo = v return s }

func (s *WebsiteConfiguration) SetRoutingRules(v []*RoutingRule) *WebsiteConfiguration

SetRoutingRules sets the RoutingRules field’s value.



23674
23675
23676
23677
// File 'service/s3/api.go', line 23674

func (s *WebsiteConfiguration) SetRoutingRules(v []*RoutingRule) *WebsiteConfiguration { s.RoutingRules = v return s }

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



23607
23608
23609
// File 'service/s3/api.go', line 23607

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

func (s *WebsiteConfiguration) Validate() error

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



23621
23622
23623
23624
23625
23626
23627
23628
23629
23630
23631
23632
23633
23634
23635
23636
23637
23638
23639
23640
23641
23642
23643
23644
23645
23646
23647
23648
23649
23650
23651
23652
23653
// File 'service/s3/api.go', line 23621

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