Class Redirect
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<Redirect.Builder,Redirect>
Specifies how requests are redirected. In the event of an error, you can specify a different error code to return.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Redirect.Builderbuilder()final booleanfinal booleanequalsBySdkFields(Object obj) final <T> Optional<T>getValueForField(String fieldName, Class<T> clazz) final inthashCode()final StringhostName()The host name to use in the redirect request.final StringThe HTTP redirect code to use on the response.final Protocolprotocol()Protocol to use when redirecting requests.final StringProtocol to use when redirecting requests.final StringThe object key prefix to use in the redirect request.final StringThe specific object key to use in the redirect request.static Class<? extends Redirect.Builder>final StringtoString()Returns a string representation of this object.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
hostName
The host name to use in the redirect request.
- Returns:
- The host name to use in the redirect request.
-
httpRedirectCode
The HTTP redirect code to use on the response. Not required if one of the siblings is present.
- Returns:
- The HTTP redirect code to use on the response. Not required if one of the siblings is present.
-
protocol
Protocol to use when redirecting requests. The default is the protocol that is used in the original request.
If the service returns an enum value that is not available in the current SDK version,
protocolwill returnProtocol.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromprotocolAsString().- Returns:
- Protocol to use when redirecting requests. The default is the protocol that is used in the original request.
- See Also:
-
protocolAsString
Protocol to use when redirecting requests. The default is the protocol that is used in the original request.
If the service returns an enum value that is not available in the current SDK version,
protocolwill returnProtocol.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromprotocolAsString().- Returns:
- Protocol to use when redirecting requests. The default is the protocol that is used in the original request.
- See Also:
-
replaceKeyPrefixWith
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.
- Returns:
- 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.
-
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 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.
- Returns:
- 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.
-
toBuilder
- Specified by:
toBuilderin interfaceToCopyableBuilder<Redirect.Builder,Redirect>
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value. -
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-