Package com.amazonaws.services.s3.model
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 enum
Enumeration 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.int
Sets the ID of this rule and returns a reference to this object for method chaining.void
setAllowedHeaders
(String... allowedHeaders) Convenience array style method forsetAllowedHeaders(List)
void
setAllowedHeaders
(List<String> allowedHeaders) Sets the allowed headers for the rule.void
setAllowedMethods
(CORSRule.AllowedMethods... allowedMethods) Convenience array style method forsetAllowedMethods(List)
void
setAllowedMethods
(List<CORSRule.AllowedMethods> allowedMethods) Sets the allowed methods of the rule.void
setAllowedOrigins
(String... allowedOrigins) Convenience array style method forsetAllowedOrigins(List)
void
setAllowedOrigins
(List<String> allowedOrigins) Sets the allowed origins of the rule.void
setExposedHeaders
(String... exposedHeaders) Convenience array style method forsetExposedHeaders(List)
void
setExposedHeaders
(List<String> exposedHeaders) Sets the expose headers of the rule.void
Sets the ID of this rule.void
setMaxAgeSeconds
(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
Sets the ID of this rule and returns a reference to this object for method chaining.- See Also:
-
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
Sets the allowed origins of the rule. -
setAllowedOrigins
Convenience array style method forsetAllowedOrigins(List)
-
getAllowedOrigins
Returns the allowed origins of this rule and returns a reference to this object for method chaining. -
withAllowedOrigins
Sets the allowed origins of this rule and returns a reference to this object for method chaining.- See Also:
-
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
Sets the expose headers of the rule. -
setExposedHeaders
Convenience array style method forsetExposedHeaders(List)
-
getExposedHeaders
Returns expose headers of this rule and returns a reference to this object for method chaining. -
withExposedHeaders
Sets the exposeHeaders of this rule and returns a reference to this object for method chaining.- See Also:
-
setAllowedHeaders
Sets the allowed headers for the rule. -
setAllowedHeaders
Convenience array style method forsetAllowedHeaders(List)
-
getAllowedHeaders
Returns allowed headers of this rule. -
withAllowedHeaders
Sets the allowed headers of this rule and returns a reference to this object for method chaining.- See Also:
-