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



22544
22545
22546
// File 'service/s3/api.go', line 22544

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

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

SetCondition sets the Condition field’s value.



22562
22563
22564
22565
// File 'service/s3/api.go', line 22562

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.



22568
22569
22570
22571
// File 'service/s3/api.go', line 22568

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



22535
22536
22537
// File 'service/s3/api.go', line 22535

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.



22549
22550
22551
22552
22553
22554
22555
22556
22557
22558
22559
// File 'service/s3/api.go', line 22549

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 }