Class Redirect
- java.lang.Object
-
- software.amazon.awssdk.services.s3.model.Redirect
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<Redirect.Builder,Redirect>
@Generated("software.amazon.awssdk:codegen") public final class Redirect extends Object implements SdkPojo, Serializable, 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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceRedirect.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Redirect.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()StringhostName()The host name to use in the redirect request.StringhttpRedirectCode()The HTTP redirect code to use on the response.Protocolprotocol()Protocol to use when redirecting requests.StringprotocolAsString()Protocol to use when redirecting requests.StringreplaceKeyPrefixWith()The object key prefix to use in the redirect request.StringreplaceKeyWith()The specific object key to use in the redirect request.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends Redirect.Builder>serializableBuilderClass()Redirect.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
hostName
public final String hostName()
The host name to use in the redirect request.
- Returns:
- The host name to use in the redirect request.
-
httpRedirectCode
public final String 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
public final Protocol 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:
Protocol
-
protocolAsString
public final String 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:
Protocol
-
replaceKeyPrefixWith
public final String 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
public final String 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
public Redirect.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<Redirect.Builder,Redirect>
-
builder
public static Redirect.Builder builder()
-
serializableBuilderClass
public static Class<? extends Redirect.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String 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.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-