Class: AWSCDK::APIGateway::CfnRestAPI::S3LocationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
api_gateway/cfn_rest_api.rb

Overview

S3Location is a property of the AWS::ApiGateway::RestApi resource that specifies the Amazon S3 location of a OpenAPI (formerly Swagger) file that defines a set of RESTful APIs in JSON or YAML.

On January 1, 2016, the Swagger Specification was donated to the OpenAPI initiative , becoming the foundation of the OpenAPI Specification.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bucket: nil, e_tag: nil, key: nil, version: nil) ⇒ S3LocationProperty

Returns a new instance of S3LocationProperty.

Parameters:

  • bucket (String, nil) (defaults to: nil)

    The name of the S3 bucket where the OpenAPI file is stored.

  • e_tag (String, nil) (defaults to: nil)

    The Amazon S3 ETag (a file checksum) of the OpenAPI file.

  • key (String, nil) (defaults to: nil)

    The file name of the OpenAPI file (Amazon S3 object name).

  • version (String, nil) (defaults to: nil)

    For versioning-enabled buckets, a specific version of the OpenAPI file.



818
819
820
821
822
823
824
825
826
827
# File 'api_gateway/cfn_rest_api.rb', line 818

def initialize(bucket: nil, e_tag: nil, key: nil, version: nil)
  @bucket = bucket
  Jsii::Type.check_type(@bucket, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bucket") unless @bucket.nil?
  @e_tag = e_tag
  Jsii::Type.check_type(@e_tag, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "eTag") unless @e_tag.nil?
  @key = key
  Jsii::Type.check_type(@key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key") unless @key.nil?
  @version = version
  Jsii::Type.check_type(@version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "version") unless @version.nil?
end

Instance Attribute Details

#bucketString? (readonly)

The name of the S3 bucket where the OpenAPI file is stored.



833
834
835
# File 'api_gateway/cfn_rest_api.rb', line 833

def bucket
  @bucket
end

#e_tagString? (readonly)

The Amazon S3 ETag (a file checksum) of the OpenAPI file.

If you don't specify a value, API Gateway skips ETag validation of your OpenAPI file.



840
841
842
# File 'api_gateway/cfn_rest_api.rb', line 840

def e_tag
  @e_tag
end

#keyString? (readonly)

The file name of the OpenAPI file (Amazon S3 object name).



845
846
847
# File 'api_gateway/cfn_rest_api.rb', line 845

def key
  @key
end

#versionString? (readonly)

For versioning-enabled buckets, a specific version of the OpenAPI file.



850
851
852
# File 'api_gateway/cfn_rest_api.rb', line 850

def version
  @version
end

Class Method Details

.jsii_propertiesObject



852
853
854
855
856
857
858
859
# File 'api_gateway/cfn_rest_api.rb', line 852

def self.jsii_properties
  {
    :bucket => "bucket",
    :e_tag => "eTag",
    :key => "key",
    :version => "version",
  }
end

Instance Method Details

#to_jsiiObject



861
862
863
864
865
866
867
868
869
870
# File 'api_gateway/cfn_rest_api.rb', line 861

def to_jsii
  result = {}
  result.merge!({
    "bucket" => @bucket,
    "eTag" => @e_tag,
    "key" => @key,
    "version" => @version,
  })
  result.compact
end