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 interface
Redirect.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Redirect.Builder
builder()
boolean
equals(Object obj)
boolean
equalsBySdkFields(Object obj)
<T> Optional<T>
getValueForField(String fieldName, Class<T> clazz)
int
hashCode()
String
hostName()
The host name to use in the redirect request.String
httpRedirectCode()
The HTTP redirect code to use on the response.Protocol
protocol()
Protocol to use when redirecting requests.String
protocolAsString()
Protocol to use when redirecting requests.String
replaceKeyPrefixWith()
The object key prefix to use in the redirect request.String
replaceKeyWith()
The specific object key to use in the redirect request.List<SdkField<?>>
sdkFields()
static Class<? extends Redirect.Builder>
serializableBuilderClass()
Redirect.Builder
toBuilder()
String
toString()
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,
protocol
will 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,
protocol
will 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 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.
- 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 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.
-
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 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.
- 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 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.
-
toBuilder
public Redirect.Builder toBuilder()
- Specified by:
toBuilder
in 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:
equalsBySdkFields
in 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.
-
-