Class Condition
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<Condition.Builder,Condition>
A container for describing a condition that must be met for the specified redirect to apply. For example, 1. If
request is for pages in the /docs folder, redirect to the /documents folder. 2. If request
results in HTTP error 4xx, redirect request to another host where you might process the error.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Condition.Builderbuilder()final booleanfinal booleanequalsBySdkFields(Object obj) final <T> Optional<T>getValueForField(String fieldName, Class<T> clazz) final inthashCode()final StringThe HTTP error code when the redirect is applied.final StringThe object key name prefix when the redirect is applied.static Class<? extends Condition.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
-
httpErrorCodeReturnedEquals
The HTTP error code when the redirect is applied. In the event of an error, if the error code equals this value, then the specified redirect is applied. Required when parent element
Conditionis specified and siblingKeyPrefixEqualsis not specified. If both are specified, then both must be true for the redirect to be applied.- Returns:
- The HTTP error code when the redirect is applied. In the event of an error, if the error code equals this
value, then the specified redirect is applied. Required when parent element
Conditionis specified and siblingKeyPrefixEqualsis not specified. If both are specified, then both must be true for the redirect to be applied.
-
keyPrefixEquals
The object key name prefix when the redirect is applied. For example, to redirect requests for
ExamplePage.html, the key prefix will beExamplePage.html. To redirect request for all pages with the prefixdocs/, the key prefix will be/docs, which identifies all objects in thedocs/folder. Required when the parent elementConditionis specified and siblingHttpErrorCodeReturnedEqualsis not specified. If both conditions are specified, both must be true for the redirect to be applied.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 name prefix when the redirect is applied. For example, to redirect requests for
ExamplePage.html, the key prefix will beExamplePage.html. To redirect request for all pages with the prefixdocs/, the key prefix will be/docs, which identifies all objects in thedocs/folder. Required when the parent elementConditionis specified and siblingHttpErrorCodeReturnedEqualsis not specified. If both conditions are specified, both must be true for the redirect to be applied.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<Condition.Builder,Condition>
-
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
-