Class: AWSCDK::APIGateway::S3APIDefinition
- Inherits:
-
APIDefinition
- Object
- APIDefinition
- AWSCDK::APIGateway::S3APIDefinition
- Defined in:
- api_gateway/s3_api_definition.rb
Overview
OpenAPI specification from an S3 archive.
Class Method Summary collapse
Instance Method Summary collapse
-
#bind(_scope) ⇒ AWSCDK::APIGateway::APIDefinitionConfig
Called when the specification is initialized to allow this object to bind to the stack, add resources and have fun.
-
#bind_after_create(_scope, _rest_api) ⇒ void
Called after the CFN RestApi resource has been created to allow the Api Definition to bind to it.
-
#initialize(bucket, key, object_version = nil) ⇒ S3APIDefinition
constructor
A new instance of S3APIDefinition.
Constructor Details
#initialize(bucket, key, object_version = nil) ⇒ S3APIDefinition
Returns a new instance of S3APIDefinition.
11 12 13 14 15 16 |
# File 'api_gateway/s3_api_definition.rb', line 11 def initialize(bucket, key, object_version = nil) Jsii::Type.check_type(bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19zMy5JQnVja2V0UmVmIn0=")), "bucket") Jsii::Type.check_type(key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key") Jsii::Type.check_type(object_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "objectVersion") unless object_version.nil? Jsii::Object.instance_method(:initialize).bind(self).call(bucket, key, object_version) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
18 19 20 21 22 23 |
# File 'api_gateway/s3_api_definition.rb', line 18 def self.jsii_overridable_methods { :bind => { kind: :method, name: "bind", is_optional: false }, :bind_after_create => { kind: :method, name: "bindAfterCreate", is_optional: false }, } end |
Instance Method Details
#bind(_scope) ⇒ AWSCDK::APIGateway::APIDefinitionConfig
Called when the specification is initialized to allow this object to bind to the stack, add resources and have fun.
29 30 31 32 |
# File 'api_gateway/s3_api_definition.rb', line 29 def bind(_scope) Jsii::Type.check_type(_scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "_scope") jsii_call_method("bind", [_scope]) end |
#bind_after_create(_scope, _rest_api) ⇒ void
This method returns an undefined value.
Called after the CFN RestApi resource has been created to allow the Api Definition to bind to it.
Specifically it's required to allow assets to add metadata for tooling like SAM CLI to be able to find their origins.
42 43 44 45 46 |
# File 'api_gateway/s3_api_definition.rb', line 42 def bind_after_create(_scope, _rest_api) Jsii::Type.check_type(_scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "_scope") Jsii::Type.check_type(_rest_api, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19hcGlnYXRld2F5LklSZXN0QXBpUmVmIn0=")), "_restApi") jsii_call_method("bindAfterCreate", [_scope, _rest_api]) end |