Interface CfnBucket.RedirectRuleProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnBucket.RedirectRuleProperty.Jsii$Proxy
- Enclosing class:
CfnBucket
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();
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forCfnBucket.RedirectRuleProperty
static final class
An implementation forCfnBucket.RedirectRuleProperty
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default String
The host name to use in the redirect request.default String
The HTTP redirect code to use on the response.default String
Protocol to use when redirecting requests.default String
The object key prefix to use in the redirect request.default String
The specific object key to use in the redirect request.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getHostName
The host name to use in the redirect request.- See Also:
-
getHttpRedirectCode
The HTTP redirect code to use on the response.Not required if one of the siblings is present.
- See Also:
-
getProtocol
Protocol to use when redirecting requests.The default is the protocol that is used in the original request.
- See Also:
-
getReplaceKeyPrefixWith
The object key prefix to use in the redirect request.For example, to redirect requests for all pages with prefix
docs/
(objects in thedocs/
folder) todocuments/
, you can set a condition block withKeyPrefixEquals
set todocs/
and in the Redirect setReplaceKeyPrefixWith
to/documents
. Not required if one of the siblings is present. Can be present only ifReplaceKeyWith
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 .
- See Also:
-
getReplaceKeyWith
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 ifReplaceKeyPrefixWith
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 .
- See Also:
-
builder
-