Class: AWSCDK::CloudFront::CfnResponseHeadersPolicy::AccessControlAllowMethodsProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_front/cfn_response_headers_policy.rb

Overview

A list of HTTP methods that CloudFront includes as values for the Access-Control-Allow-Methods HTTP response header.

For more information about the Access-Control-Allow-Methods HTTP response header, see Access-Control-Allow-Methods in the MDN Web Docs.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(items:) ⇒ AccessControlAllowMethodsProperty

Returns a new instance of AccessControlAllowMethodsProperty.

Parameters:

  • items (Array<String>)

    The list of HTTP methods. Valid values are:.



563
564
565
566
# File 'cloud_front/cfn_response_headers_policy.rb', line 563

def initialize(items:)
  @items = items
  Jsii::Type.check_type(@items, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "items")
end

Instance Attribute Details

#itemsArray<String> (readonly)

The list of HTTP methods. Valid values are:.

  • GET
  • DELETE
  • HEAD
  • OPTIONS
  • PATCH
  • POST
  • PUT
  • ALL

ALL is a special value that includes all of the listed HTTP methods.



583
584
585
# File 'cloud_front/cfn_response_headers_policy.rb', line 583

def items
  @items
end

Class Method Details

.jsii_propertiesObject



585
586
587
588
589
# File 'cloud_front/cfn_response_headers_policy.rb', line 585

def self.jsii_properties
  {
    :items => "items",
  }
end

Instance Method Details

#to_jsiiObject



591
592
593
594
595
596
597
# File 'cloud_front/cfn_response_headers_policy.rb', line 591

def to_jsii
  result = {}
  result.merge!({
    "items" => @items,
  })
  result.compact
end