Class CORSRule
java.lang.Object
com.amazonaws.services.s3.model.CORSRule
- All Implemented Interfaces:
Serializable
Container for rules of cross origin configuration.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of names of the all the allowed methods. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns allowed headers of this rule.Returns the allowed methods of this rule.Returns the allowed origins of this rule and returns a reference to this object for method chaining.Returns expose headers of this rule and returns a reference to this object for method chaining.getId()Returns the Id of this rule.intSets the ID of this rule and returns a reference to this object for method chaining.voidsetAllowedHeaders(String... allowedHeaders) Convenience array style method forsetAllowedHeaders(List)voidsetAllowedHeaders(List<String> allowedHeaders) Sets the allowed headers for the rule.voidsetAllowedMethods(CORSRule.AllowedMethods... allowedMethods) Convenience array style method forsetAllowedMethods(List)voidsetAllowedMethods(List<CORSRule.AllowedMethods> allowedMethods) Sets the allowed methods of the rule.voidsetAllowedOrigins(String... allowedOrigins) Convenience array style method forsetAllowedOrigins(List)voidsetAllowedOrigins(List<String> allowedOrigins) Sets the allowed origins of the rule.voidsetExposedHeaders(String... exposedHeaders) Convenience array style method forsetExposedHeaders(List)voidsetExposedHeaders(List<String> exposedHeaders) Sets the expose headers of the rule.voidSets the ID of this rule.voidsetMaxAgeSeconds(int maxAgeSeconds) Sets the max age in seconds of the rule.withAllowedHeaders(List<String> allowedHeaders) Sets the allowed headers of this rule and returns a reference to this object for method chaining.withAllowedMethods(List<CORSRule.AllowedMethods> allowedMethods) Sets the allowed methods of this rule and returns a reference to this object for method chaining.withAllowedOrigins(List<String> allowedOrigins) Sets the allowed origins of this rule and returns a reference to this object for method chaining.withExposedHeaders(List<String> exposedHeaders) Sets the exposeHeaders of this rule and returns a reference to this object for method chaining.Sets the ID of this rule and returns a reference to this object for method chaining.withMaxAgeSeconds(int maxAgeSeconds) Sets the max age in seconds of this rule and returns a reference to this object for method chaining.
-
Constructor Details
-
CORSRule
public CORSRule()
-
-
Method Details
-
setId
Sets the ID of this rule. Rules must be less than 255 alphanumeric characters, and must be unique for a bucket. If you do not assign an ID, one will be generated. -
getId
Returns the Id of this rule. -
withId
-
setAllowedMethods
Sets the allowed methods of the rule. -
setAllowedMethods
Convenience array style method forsetAllowedMethods(List) -
getAllowedMethods
Returns the allowed methods of this rule. -
withAllowedMethods
Sets the allowed methods of this rule and returns a reference to this object for method chaining.- See Also:
-
setAllowedOrigins
-
setAllowedOrigins
Convenience array style method forsetAllowedOrigins(List) -
getAllowedOrigins
-
withAllowedOrigins
-
setMaxAgeSeconds
public void setMaxAgeSeconds(int maxAgeSeconds) Sets the max age in seconds of the rule. -
getMaxAgeSeconds
public int getMaxAgeSeconds()Sets the ID of this rule and returns a reference to this object for method chaining.- See Also:
-
withMaxAgeSeconds
Sets the max age in seconds of this rule and returns a reference to this object for method chaining.- See Also:
-
setExposedHeaders
-
setExposedHeaders
Convenience array style method forsetExposedHeaders(List) -
getExposedHeaders
-
withExposedHeaders
-
setAllowedHeaders
-
setAllowedHeaders
Convenience array style method forsetAllowedHeaders(List) -
getAllowedHeaders
-
withAllowedHeaders
-