Struct: s3.Redirect

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

Overview

Specifies how requests are redirected. In the event of an error, you can specify a different error code to return.

Implemented Interfaces

s3crypto.Cipher, s3manager.ReadSeekerWriteTo, s3manager.WriterReadFrom

Structure Field Summary collapse

Service Operations collapse

Structure Field Details

HostName *string `type:"string"`

The host name to use in the redirect request.

HttpRedirectCode *string `type:"string"`

The HTTP redirect code to use on the response. Not required if one of the siblings is present.

Protocol *string `type:"string" enum:"Protocol"`

Protocol to use when redirecting requests. The default is the protocol that is used in the original request.

ReplaceKeyPrefixWith *string `type:"string"`

The object key prefix to use in the redirect request. For example, to redirect requests for all pages with prefix docs/ (objects in the docs/ folder) to documents/, you can set a condition block with KeyPrefixEquals set to docs/ and in the Redirect set ReplaceKeyPrefixWith to /documents. Not required if one of the siblings is present. Can be present only if ReplaceKeyWith is not provided.

Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints (docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).

ReplaceKeyWith *string `type:"string"`

The specific object key to use in the redirect request. For example, redirect request to error.html. Not required if one of the siblings is present. Can be present only if ReplaceKeyPrefixWith is not provided.

Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints (docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).

_ struct{} `type:"structure"`

Method Details

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



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

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

func (s *Redirect) SetHostName(v string) *Redirect

SetHostName sets the HostName field’s value.



21809
21810
21811
21812
// File 'service/s3/api.go', line 21809

func (s *Redirect) SetHostName(v string) *Redirect { s.HostName = &v return s }

func (s *Redirect) SetHttpRedirectCode(v string) *Redirect

SetHttpRedirectCode sets the HttpRedirectCode field’s value.



21815
21816
21817
21818
// File 'service/s3/api.go', line 21815

func (s *Redirect) SetHttpRedirectCode(v string) *Redirect { s.HttpRedirectCode = &v return s }

func (s *Redirect) SetProtocol(v string) *Redirect

SetProtocol sets the Protocol field’s value.



21821
21822
21823
21824
// File 'service/s3/api.go', line 21821

func (s *Redirect) SetProtocol(v string) *Redirect { s.Protocol = &v return s }

func (s *Redirect) SetReplaceKeyPrefixWith(v string) *Redirect

SetReplaceKeyPrefixWith sets the ReplaceKeyPrefixWith field’s value.



21827
21828
21829
21830
// File 'service/s3/api.go', line 21827

func (s *Redirect) SetReplaceKeyPrefixWith(v string) *Redirect { s.ReplaceKeyPrefixWith = &v return s }

func (s *Redirect) SetReplaceKeyWith(v string) *Redirect

SetReplaceKeyWith sets the ReplaceKeyWith field’s value.



21833
21834
21835
21836
// File 'service/s3/api.go', line 21833

func (s *Redirect) SetReplaceKeyWith(v string) *Redirect { s.ReplaceKeyWith = &v return s }

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



21795
21796
21797
// File 'service/s3/api.go', line 21795

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