Class: Azure::Cosmosdb::Mgmt::V2021_01_15::Models::CorsPolicy
- Inherits:
-
Object
- Object
- Azure::Cosmosdb::Mgmt::V2021_01_15::Models::CorsPolicy
- Includes:
- MsRestAzure
- Defined in:
- lib/2021-01-15/generated/azure_mgmt_cosmosdb/models/cors_policy.rb
Overview
The CORS policy for the Cosmos DB database account.
Instance Attribute Summary collapse
-
#allowed_headers ⇒ String
on the CORS request.
-
#allowed_methods ⇒ String
domain may use for a CORS request.
-
#allowed_origins ⇒ String
request against the service via CORS.
-
#exposed_headers ⇒ String
to the CORS request and exposed by the browser to the request issuer.
-
#max_age_in_seconds ⇒ Integer
the preflight OPTIONS request.
Class Method Summary collapse
-
.mapper ⇒ Object
Mapper for CorsPolicy class as Ruby Hash.
Instance Attribute Details
#allowed_headers ⇒ String
on the CORS request.
25 26 27 |
# File 'lib/2021-01-15/generated/azure_mgmt_cosmosdb/models/cors_policy.rb', line 25 def allowed_headers @allowed_headers end |
#allowed_methods ⇒ String
domain may use for a CORS request.
21 22 23 |
# File 'lib/2021-01-15/generated/azure_mgmt_cosmosdb/models/cors_policy.rb', line 21 def allowed_methods @allowed_methods end |
#allowed_origins ⇒ String
request against the service via CORS.
17 18 19 |
# File 'lib/2021-01-15/generated/azure_mgmt_cosmosdb/models/cors_policy.rb', line 17 def allowed_origins @allowed_origins end |
#exposed_headers ⇒ String
to the CORS request and exposed by the browser to the request issuer.
29 30 31 |
# File 'lib/2021-01-15/generated/azure_mgmt_cosmosdb/models/cors_policy.rb', line 29 def exposed_headers @exposed_headers end |
#max_age_in_seconds ⇒ Integer
the preflight OPTIONS request.
33 34 35 |
# File 'lib/2021-01-15/generated/azure_mgmt_cosmosdb/models/cors_policy.rb', line 33 def max_age_in_seconds @max_age_in_seconds end |
Class Method Details
.mapper ⇒ Object
Mapper for CorsPolicy class as Ruby Hash. This will be used for serialization/deserialization.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/2021-01-15/generated/azure_mgmt_cosmosdb/models/cors_policy.rb', line 40 def self.mapper() { client_side_validation: true, required: false, serialized_name: 'CorsPolicy', type: { name: 'Composite', class_name: 'CorsPolicy', model_properties: { allowed_origins: { client_side_validation: true, required: true, serialized_name: 'allowedOrigins', type: { name: 'String' } }, allowed_methods: { client_side_validation: true, required: false, serialized_name: 'allowedMethods', type: { name: 'String' } }, allowed_headers: { client_side_validation: true, required: false, serialized_name: 'allowedHeaders', type: { name: 'String' } }, exposed_headers: { client_side_validation: true, required: false, serialized_name: 'exposedHeaders', type: { name: 'String' } }, max_age_in_seconds: { client_side_validation: true, required: false, serialized_name: 'maxAgeInSeconds', constraints: { InclusiveMaximum: 2147483647, InclusiveMinimum: 1 }, type: { name: 'Number' } } } } } end |