Delen via


StorageCorsRule Constructor

Definition

Initializes a new instance of StorageCorsRule.

public StorageCorsRule (System.Collections.Generic.IEnumerable<string> allowedOrigins, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Storage.Models.CorsRuleAllowedMethod> allowedMethods, int maxAgeInSeconds, System.Collections.Generic.IEnumerable<string> exposedHeaders, System.Collections.Generic.IEnumerable<string> allowedHeaders);
new Azure.ResourceManager.Storage.Models.StorageCorsRule : seq<string> * seq<Azure.ResourceManager.Storage.Models.CorsRuleAllowedMethod> * int * seq<string> * seq<string> -> Azure.ResourceManager.Storage.Models.StorageCorsRule
Public Sub New (allowedOrigins As IEnumerable(Of String), allowedMethods As IEnumerable(Of CorsRuleAllowedMethod), maxAgeInSeconds As Integer, exposedHeaders As IEnumerable(Of String), allowedHeaders As IEnumerable(Of String))

Parameters

allowedOrigins
IEnumerable<String>

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

allowedMethods
IEnumerable<CorsRuleAllowedMethod>

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

maxAgeInSeconds
Int32

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

exposedHeaders
IEnumerable<String>

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

allowedHeaders
IEnumerable<String>

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

Exceptions

allowedOrigins, allowedMethods, exposedHeaders or allowedHeaders is null.

Applies to