public static interface CfnBucket.RedirectRuleProperty
In the event of an error, you can specify a different error code to return.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.s3.*; RedirectRuleProperty redirectRuleProperty = RedirectRuleProperty.builder() .hostName("hostName") .httpRedirectCode("httpRedirectCode") .protocol("protocol") .replaceKeyPrefixWith("replaceKeyPrefixWith") .replaceKeyWith("replaceKeyWith") .build();
Modifier and Type | Interface and Description |
---|---|
static class |
CfnBucket.RedirectRuleProperty.Builder
A builder for
CfnBucket.RedirectRuleProperty |
static class |
CfnBucket.RedirectRuleProperty.Jsii$Proxy
An implementation for
CfnBucket.RedirectRuleProperty |
Modifier and Type | Method and Description |
---|---|
static CfnBucket.RedirectRuleProperty.Builder |
builder() |
default java.lang.String |
getHostName()
The host name to use in the redirect request.
|
default java.lang.String |
getHttpRedirectCode()
The HTTP redirect code to use on the response.
|
default java.lang.String |
getProtocol()
Protocol to use when redirecting requests.
|
default java.lang.String |
getReplaceKeyPrefixWith()
The object key prefix to use in the redirect request.
|
default java.lang.String |
getReplaceKeyWith()
The specific object key to use in the redirect request.
|
default java.lang.String getHostName()
default java.lang.String getHttpRedirectCode()
Not required if one of the siblings is present.
default java.lang.String getProtocol()
The default is the protocol that is used in the original request.
default java.lang.String getReplaceKeyPrefixWith()
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 .
default java.lang.String getReplaceKeyWith()
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 .
static CfnBucket.RedirectRuleProperty.Builder builder()