CorsRule Class

  • java.lang.Object
    • com.microsoft.azure.management.storage.CorsRule

public class CorsRule

Specifies a CORS rule for the Blob service.

Constructor Summary

Constructor Description
CorsRule()

Method Summary

Modifier and Type Method and Description
java.util.List<java.lang.String> allowedHeaders()

Get required if CorsRule element is present.

java.util.List<java.lang.String> allowedMethods()

Get required if CorsRule element is present.

java.util.List<java.lang.String> allowedOrigins()

Get required if CorsRule element is present.

java.util.List<java.lang.String> exposedHeaders()

Get required if CorsRule element is present.

int maxAgeInSeconds()

Get required if CorsRule element is present.

CorsRule withAllowedHeaders(List<String> allowedHeaders)

Set required if CorsRule element is present.

CorsRule withAllowedMethods(List<String> allowedMethods)

Set required if CorsRule element is present.

CorsRule withAllowedOrigins(List<String> allowedOrigins)

Set required if CorsRule element is present.

CorsRule withExposedHeaders(List<String> exposedHeaders)

Set required if CorsRule element is present.

CorsRule withMaxAgeInSeconds(int maxAgeInSeconds)

Set required if CorsRule element is present.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

CorsRule

public CorsRule()

Method Details

allowedHeaders

public List allowedHeaders()

Get required if CorsRule element is present. A list of headers allowed to be part of the cross-origin request.

Returns:

the allowedHeaders value

allowedMethods

public List allowedMethods()

Get required if CorsRule element is present. A list of HTTP methods that are allowed to be executed by the origin.

Returns:

the allowedMethods value

allowedOrigins

public List allowedOrigins()

Get required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or "*" to allow all domains.

Returns:

the allowedOrigins value

exposedHeaders

public List exposedHeaders()

Get required if CorsRule element is present. A list of response headers to expose to CORS clients.

Returns:

the exposedHeaders value

maxAgeInSeconds

public int maxAgeInSeconds()

Get required if CorsRule element is present. The number of seconds that the client/browser should cache a preflight response.

Returns:

the maxAgeInSeconds value

withAllowedHeaders

public CorsRule withAllowedHeaders(List allowedHeaders)

Set required if CorsRule element is present. A list of headers allowed to be part of the cross-origin request.

Parameters:

allowedHeaders - the allowedHeaders value to set

Returns:

the CorsRule object itself.

withAllowedMethods

public CorsRule withAllowedMethods(List allowedMethods)

Set required if CorsRule element is present. A list of HTTP methods that are allowed to be executed by the origin.

Parameters:

allowedMethods - the allowedMethods value to set

Returns:

the CorsRule object itself.

withAllowedOrigins

public CorsRule withAllowedOrigins(List allowedOrigins)

Set required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or "*" to allow all domains.

Parameters:

allowedOrigins - the allowedOrigins value to set

Returns:

the CorsRule object itself.

withExposedHeaders

public CorsRule withExposedHeaders(List exposedHeaders)

Set required if CorsRule element is present. A list of response headers to expose to CORS clients.

Parameters:

exposedHeaders - the exposedHeaders value to set

Returns:

the CorsRule object itself.

withMaxAgeInSeconds

public CorsRule withMaxAgeInSeconds(int maxAgeInSeconds)

Set required if CorsRule element is present. The number of seconds that the client/browser should cache a preflight response.

Parameters:

maxAgeInSeconds - the maxAgeInSeconds value to set

Returns:

the CorsRule object itself.

Applies to