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



21035
21036
21037
// File 'service/s3/api.go', line 21035

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

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

SetHostName sets the HostName field's value.



21040
21041
21042
21043
// File 'service/s3/api.go', line 21040

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.



21046
21047
21048
21049
// File 'service/s3/api.go', line 21046

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.



21052
21053
21054
21055
// File 'service/s3/api.go', line 21052

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.



21058
21059
21060
21061
// File 'service/s3/api.go', line 21058

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.



21064
21065
21066
21067
// File 'service/s3/api.go', line 21064

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



21026
21027
21028
// File 'service/s3/api.go', line 21026

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