public static final class CfnBucket.RedirectRuleProperty.Builder
extends java.lang.Object
CfnBucket.RedirectRuleProperty
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
CfnBucket.RedirectRuleProperty |
build()
Builds the configured instance.
|
CfnBucket.RedirectRuleProperty.Builder |
hostName(java.lang.String hostName)
Sets the value of
CfnBucket.RedirectRuleProperty.getHostName() |
CfnBucket.RedirectRuleProperty.Builder |
httpRedirectCode(java.lang.String httpRedirectCode)
Sets the value of
CfnBucket.RedirectRuleProperty.getHttpRedirectCode() |
CfnBucket.RedirectRuleProperty.Builder |
protocol(java.lang.String protocol)
Sets the value of
CfnBucket.RedirectRuleProperty.getProtocol() |
CfnBucket.RedirectRuleProperty.Builder |
replaceKeyPrefixWith(java.lang.String replaceKeyPrefixWith)
Sets the value of
CfnBucket.RedirectRuleProperty.getReplaceKeyPrefixWith() |
CfnBucket.RedirectRuleProperty.Builder |
replaceKeyWith(java.lang.String replaceKeyWith)
Sets the value of
CfnBucket.RedirectRuleProperty.getReplaceKeyWith() |
public CfnBucket.RedirectRuleProperty.Builder hostName(java.lang.String hostName)
CfnBucket.RedirectRuleProperty.getHostName()
hostName
- The host name to use in the redirect request.this
public CfnBucket.RedirectRuleProperty.Builder httpRedirectCode(java.lang.String httpRedirectCode)
CfnBucket.RedirectRuleProperty.getHttpRedirectCode()
httpRedirectCode
- The HTTP redirect code to use on the response.
Not required if one of the siblings is present.this
public CfnBucket.RedirectRuleProperty.Builder protocol(java.lang.String protocol)
CfnBucket.RedirectRuleProperty.getProtocol()
protocol
- Protocol to use when redirecting requests.
The default is the protocol that is used in the original request.this
public CfnBucket.RedirectRuleProperty.Builder replaceKeyPrefixWith(java.lang.String replaceKeyPrefixWith)
CfnBucket.RedirectRuleProperty.getReplaceKeyPrefixWith()
replaceKeyPrefixWith
- 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 .
this
public CfnBucket.RedirectRuleProperty.Builder replaceKeyWith(java.lang.String replaceKeyWith)
CfnBucket.RedirectRuleProperty.getReplaceKeyWith()
replaceKeyWith
- 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 .
this
public CfnBucket.RedirectRuleProperty build()
CfnBucket.RedirectRuleProperty
java.lang.NullPointerException
- if any required attribute was not provided