public final class CorsRule extends Object
| Constructor and Description |
|---|
CorsRule() |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
allowedHeaders()
Get the allowedHeaders property: Required if CorsRule element is present.
|
List<CorsRuleAllowedMethodsItem> |
allowedMethods()
Get the allowedMethods property: Required if CorsRule element is present.
|
List<String> |
allowedOrigins()
Get the allowedOrigins property: Required if CorsRule element is present.
|
List<String> |
exposedHeaders()
Get the exposedHeaders property: Required if CorsRule element is present.
|
int |
maxAgeInSeconds()
Get the maxAgeInSeconds property: Required if CorsRule element is present.
|
void |
validate()
Validates the instance.
|
CorsRule |
withAllowedHeaders(List<String> allowedHeaders)
Set the allowedHeaders property: Required if CorsRule element is present.
|
CorsRule |
withAllowedMethods(List<CorsRuleAllowedMethodsItem> allowedMethods)
Set the allowedMethods property: Required if CorsRule element is present.
|
CorsRule |
withAllowedOrigins(List<String> allowedOrigins)
Set the allowedOrigins property: Required if CorsRule element is present.
|
CorsRule |
withExposedHeaders(List<String> exposedHeaders)
Set the exposedHeaders property: Required if CorsRule element is present.
|
CorsRule |
withMaxAgeInSeconds(int maxAgeInSeconds)
Set the maxAgeInSeconds property: Required if CorsRule element is present.
|
public List<String> allowedOrigins()
public CorsRule withAllowedOrigins(List<String> allowedOrigins)
allowedOrigins - the allowedOrigins value to set.public List<CorsRuleAllowedMethodsItem> allowedMethods()
public CorsRule withAllowedMethods(List<CorsRuleAllowedMethodsItem> allowedMethods)
allowedMethods - the allowedMethods value to set.public int maxAgeInSeconds()
public CorsRule withMaxAgeInSeconds(int maxAgeInSeconds)
maxAgeInSeconds - the maxAgeInSeconds value to set.public List<String> exposedHeaders()
public CorsRule withExposedHeaders(List<String> exposedHeaders)
exposedHeaders - the exposedHeaders value to set.public List<String> allowedHeaders()
public CorsRule withAllowedHeaders(List<String> allowedHeaders)
allowedHeaders - the allowedHeaders value to set.public void validate()
IllegalArgumentException - thrown if the instance is not valid.Copyright © 2021 Microsoft Corporation. All rights reserved.