Struct: s3.Redirect
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
-
HostName *string
The host name to use in the redirect request.
-
HttpRedirectCode *string
The HTTP redirect code to use on the response.
-
Protocol *string
Protocol to use when redirecting requests.
-
ReplaceKeyPrefixWith *string
The object key prefix to use in the redirect request.
-
ReplaceKeyWith *string
The specific object key to use in the redirect request.
- _ struct{}
Service Operations collapse
-
GoString() string
operation
GoString returns the string representation.
-
SetHostName(string) *Redirect
operation
SetHostName sets the HostName field’s value.
-
SetHttpRedirectCode(string) *Redirect
operation
SetHttpRedirectCode sets the HttpRedirectCode field’s value.
-
SetProtocol(string) *Redirect
operation
SetProtocol sets the Protocol field’s value.
-
SetReplaceKeyPrefixWith(string) *Redirect
operation
SetReplaceKeyPrefixWith sets the ReplaceKeyPrefixWith field’s value.
-
SetReplaceKeyWith(string) *Redirect
operation
SetReplaceKeyWith sets the ReplaceKeyWith field’s value.
-
String() string
operation
String returns the string representation.
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”.
21800 21801 21802 |
// File 'service/s3/api.go', line 21800
|
func (s *Redirect) SetHostName(v string) *Redirect
SetHostName sets the HostName field’s value.
21805 21806 21807 21808 |
// File 'service/s3/api.go', line 21805
|
func (s *Redirect) SetHttpRedirectCode(v string) *Redirect
SetHttpRedirectCode sets the HttpRedirectCode field’s value.
21811 21812 21813 21814 |
// File 'service/s3/api.go', line 21811
|
func (s *Redirect) SetProtocol(v string) *Redirect
SetProtocol sets the Protocol field’s value.
21817 21818 21819 21820 |
// File 'service/s3/api.go', line 21817
|
func (s *Redirect) SetReplaceKeyPrefixWith(v string) *Redirect
SetReplaceKeyPrefixWith sets the ReplaceKeyPrefixWith field’s value.
21823 21824 21825 21826 |
// File 'service/s3/api.go', line 21823
|
func (s *Redirect) SetReplaceKeyWith(v string) *Redirect
SetReplaceKeyWith sets the ReplaceKeyWith field’s value.
21829 21830 21831 21832 |
// File 'service/s3/api.go', line 21829
|
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”.
21791 21792 21793 |
// File 'service/s3/api.go', line 21791
|