Condividi tramite


StorageCorsRule Class

Definition

Specifies a CORS rule for the Blob service.

public class StorageCorsRule : System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.Storage.Models.StorageCorsRule>, System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.Storage.Models.StorageCorsRule>
public class StorageCorsRule
type StorageCorsRule = class
    interface IJsonModel<StorageCorsRule>
    interface IPersistableModel<StorageCorsRule>
type StorageCorsRule = class
Public Class StorageCorsRule
Implements IJsonModel(Of StorageCorsRule), IPersistableModel(Of StorageCorsRule)
Public Class StorageCorsRule
Inheritance
StorageCorsRule
Implements

Constructors

StorageCorsRule(IEnumerable<String>, IEnumerable<CorsRuleAllowedMethod>, Int32, IEnumerable<String>, IEnumerable<String>)

Initializes a new instance of StorageCorsRule.

Properties

AllowedHeaders

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

AllowedMethods

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

AllowedOrigins

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

ExposedHeaders

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

MaxAgeInSeconds

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

Explicit Interface Implementations

IJsonModel<StorageCorsRule>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<StorageCorsRule>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<StorageCorsRule>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<StorageCorsRule>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<StorageCorsRule>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to