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
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnBucket.RedirectRulePropertystatic final classAn implementation forCfnBucket.RedirectRuleProperty -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default StringThe host name to use in the redirect request.default StringThe HTTP redirect code to use on the response.default StringProtocol to use when redirecting requests.default StringThe object key prefix to use in the redirect request.default StringThe 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 withKeyPrefixEqualsset todocs/and in the Redirect setReplaceKeyPrefixWithto/documents. Not required if one of the siblings is present. Can be present only ifReplaceKeyWithis 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 ifReplaceKeyPrefixWithis 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
-