Class: Aws::ApiGatewayV2::Types::Cors

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-apigatewayv2/lib/aws-sdk-apigatewayv2/types.rb

Overview

Note:

When making an API call, you may pass Cors data as a hash:

{
  allow_credentials: false,
  allow_headers: ["__string"],
  allow_methods: ["StringWithLengthBetween1And64"],
  allow_origins: ["__string"],
  expose_headers: ["__string"],
  max_age: 1,
}

Represents a CORS configuration. Supported only for HTTP APIs. See Configuring CORS for more information.

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#allow_credentialsBoolean

Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.

Returns:

  • (Boolean)


442
443
444
445
446
447
448
449
450
451
# File 'gems/aws-sdk-apigatewayv2/lib/aws-sdk-apigatewayv2/types.rb', line 442

class Cors < Struct.new(
  :allow_credentials,
  :allow_headers,
  :allow_methods,
  :allow_origins,
  :expose_headers,
  :max_age)
  SENSITIVE = []
  include Aws::Structure
end

#allow_headersArray<String>

Represents a collection of allowed headers. Supported only for HTTP APIs.

Returns:

  • (Array<String>)


442
443
444
445
446
447
448
449
450
451
# File 'gems/aws-sdk-apigatewayv2/lib/aws-sdk-apigatewayv2/types.rb', line 442

class Cors < Struct.new(
  :allow_credentials,
  :allow_headers,
  :allow_methods,
  :allow_origins,
  :expose_headers,
  :max_age)
  SENSITIVE = []
  include Aws::Structure
end

#allow_methodsArray<String>

Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.

Returns:

  • (Array<String>)


442
443
444
445
446
447
448
449
450
451
# File 'gems/aws-sdk-apigatewayv2/lib/aws-sdk-apigatewayv2/types.rb', line 442

class Cors < Struct.new(
  :allow_credentials,
  :allow_headers,
  :allow_methods,
  :allow_origins,
  :expose_headers,
  :max_age)
  SENSITIVE = []
  include Aws::Structure
end

#allow_originsArray<String>

Represents a collection of allowed origins. Supported only for HTTP APIs.

Returns:

  • (Array<String>)


442
443
444
445
446
447
448
449
450
451
# File 'gems/aws-sdk-apigatewayv2/lib/aws-sdk-apigatewayv2/types.rb', line 442

class Cors < Struct.new(
  :allow_credentials,
  :allow_headers,
  :allow_methods,
  :allow_origins,
  :expose_headers,
  :max_age)
  SENSITIVE = []
  include Aws::Structure
end

#expose_headersArray<String>

Represents a collection of exposed headers. Supported only for HTTP APIs.

Returns:

  • (Array<String>)


442
443
444
445
446
447
448
449
450
451
# File 'gems/aws-sdk-apigatewayv2/lib/aws-sdk-apigatewayv2/types.rb', line 442

class Cors < Struct.new(
  :allow_credentials,
  :allow_headers,
  :allow_methods,
  :allow_origins,
  :expose_headers,
  :max_age)
  SENSITIVE = []
  include Aws::Structure
end

#max_ageInteger

The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.

Returns:

  • (Integer)


442
443
444
445
446
447
448
449
450
451
# File 'gems/aws-sdk-apigatewayv2/lib/aws-sdk-apigatewayv2/types.rb', line 442

class Cors < Struct.new(
  :allow_credentials,
  :allow_headers,
  :allow_methods,
  :allow_origins,
  :expose_headers,
  :max_age)
  SENSITIVE = []
  include Aws::Structure
end