Struct: s3.RoutingRule

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

Overview

Specifies the redirect behavior and when a redirect is applied. For more information about routing rules, see Configuring advanced conditional redirects (docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html#advanced-conditional-redirects) 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

Condition *Condition `type:"structure"`

A container for describing a condition that must be met for the specified redirect to apply. For example, 1. If request is for pages in the /docs folder, redirect to the /documents folder. 2. If request results in HTTP error 4xx, redirect request to another host where you might process the error.

Redirect *Redirect `type:"structure" required:"true"`

Container for redirect information. You can redirect requests to another host, to another page, or with another protocol. In the event of an error, you can specify a different error code to return.

Redirect is a required field

_ struct{} `type:"structure"`

Method Details

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



21779
21780
21781
// File 'service/s3/api.go', line 21779

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

func (s *RoutingRule) SetCondition(v *Condition) *RoutingRule

SetCondition sets the Condition field's value.



21797
21798
21799
21800
// File 'service/s3/api.go', line 21797

func (s *RoutingRule) SetCondition(v *Condition) *RoutingRule { s.Condition = v return s }

func (s *RoutingRule) SetRedirect(v *Redirect) *RoutingRule

SetRedirect sets the Redirect field's value.



21803
21804
21805
21806
// File 'service/s3/api.go', line 21803

func (s *RoutingRule) SetRedirect(v *Redirect) *RoutingRule { s.Redirect = v return s }

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



21770
21771
21772
// File 'service/s3/api.go', line 21770

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

func (s *RoutingRule) Validate() error

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



21784
21785
21786
21787
21788
21789
21790
21791
21792
21793
21794
// File 'service/s3/api.go', line 21784

func (s *RoutingRule) Validate() error { invalidParams := request.ErrInvalidParams{Context: "RoutingRule"} if s.Redirect == nil { invalidParams.Add(request.NewErrParamRequired("Redirect")) } if invalidParams.Len() > 0 { return invalidParams } return nil }