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



22016
22017
22018
// File 'service/s3/api.go', line 22016

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

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

SetCondition sets the Condition field's value.



22034
22035
22036
22037
// File 'service/s3/api.go', line 22034

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.



22040
22041
22042
22043
// File 'service/s3/api.go', line 22040

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



22007
22008
22009
// File 'service/s3/api.go', line 22007

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.



22021
22022
22023
22024
22025
22026
22027
22028
22029
22030
22031
// File 'service/s3/api.go', line 22021

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 }