AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

A rule for a CORS policy. You can add up to 100 rules to a CORS policy. If more than one rule applies, the service uses the first applicable rule listed.

Inheritance Hierarchy

System.Object
  Amazon.MediaStore.Model.CorsRule

Namespace: Amazon.MediaStore.Model
Assembly: AWSSDK.MediaStore.dll
Version: 3.x.y.z

Syntax

C#
public class CorsRule

The CorsRule type exposes the following members

Constructors

NameDescription
Public Method CorsRule()

Properties

NameTypeDescription
Public Property AllowedHeaders System.Collections.Generic.List<System.String>

Gets and sets the property AllowedHeaders.

Specifies which headers are allowed in a preflight OPTIONS request through the Access-Control-Request-Headers header. Each header name that is specified in Access-Control-Request-Headers must have a corresponding entry in the rule. Only the headers that were requested are sent back.

This element can contain only one wildcard character (*).

Public Property AllowedMethods System.Collections.Generic.List<System.String>

Gets and sets the property AllowedMethods.

Identifies an HTTP method that the origin that is specified in the rule is allowed to execute.

Each CORS rule must contain at least one AllowedMethod and one AllowedOrigin element.

Public Property AllowedOrigins System.Collections.Generic.List<System.String>

Gets and sets the property AllowedOrigins.

One or more response headers that you want users to be able to access from their applications (for example, from a JavaScript XMLHttpRequest object).

Each CORS rule must have at least one AllowedOrigin element. The string value can include only one wildcard character (*), for example, http://*.example.com. Additionally, you can specify only one wildcard character to allow cross-origin access for all origins.

Public Property ExposeHeaders System.Collections.Generic.List<System.String>

Gets and sets the property ExposeHeaders.

One or more headers in the response that you want users to be able to access from their applications (for example, from a JavaScript XMLHttpRequest object).

This element is optional for each rule.

Public Property MaxAgeSeconds System.Int32

Gets and sets the property MaxAgeSeconds.

The time in seconds that your browser caches the preflight response for the specified resource.

A CORS rule can have only one MaxAgeSeconds element.

Version Information

.NET Standard:
Supported in: 1.3

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms