Class: AWSCDK::StepFunctionsTasks::CallAPIGatewayRestAPIEndpointOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
step_functions_tasks/call_api_gateway_rest_api_endpoint_options.rb

Overview

Base properties for calling an REST API Endpoint.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api:, stage_name:, region: nil) ⇒ CallAPIGatewayRestAPIEndpointOptions

Returns a new instance of CallAPIGatewayRestAPIEndpointOptions.

Parameters:

  • api (AWSCDK::APIGateway::IRestAPI)

    API to call.

  • stage_name (String)

    Name of the stage where the API is deployed to in API Gateway.

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

    Specify a custom Region where the API is deployed, e.g. 'us-east-1'.



10
11
12
13
14
15
16
17
# File 'step_functions_tasks/call_api_gateway_rest_api_endpoint_options.rb', line 10

def initialize(api:, stage_name:, region: nil)
  @api = api
  Jsii::Type.check_type(@api, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5JUmVzdEFwaSJ9")), "api")
  @stage_name = stage_name
  Jsii::Type.check_type(@stage_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stageName")
  @region = region
  Jsii::Type.check_type(@region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "region") unless @region.nil?
end

Instance Attribute Details

#apiAWSCDK::APIGateway::IRestAPI (readonly)

API to call.



22
23
24
# File 'step_functions_tasks/call_api_gateway_rest_api_endpoint_options.rb', line 22

def api
  @api
end

#regionString? (readonly)

Note:

Default: - Uses the Region of the stack containing the api.

Specify a custom Region where the API is deployed, e.g. 'us-east-1'.

Returns:

  • (String, nil)


31
32
33
# File 'step_functions_tasks/call_api_gateway_rest_api_endpoint_options.rb', line 31

def region
  @region
end

#stage_nameString (readonly)

Name of the stage where the API is deployed to in API Gateway.

Returns:

  • (String)


26
27
28
# File 'step_functions_tasks/call_api_gateway_rest_api_endpoint_options.rb', line 26

def stage_name
  @stage_name
end

Class Method Details

.jsii_propertiesObject



33
34
35
36
37
38
39
# File 'step_functions_tasks/call_api_gateway_rest_api_endpoint_options.rb', line 33

def self.jsii_properties
  {
    :api => "api",
    :stage_name => "stageName",
    :region => "region",
  }
end

Instance Method Details

#to_jsiiObject



41
42
43
44
45
46
47
48
49
# File 'step_functions_tasks/call_api_gateway_rest_api_endpoint_options.rb', line 41

def to_jsii
  result = {}
  result.merge!({
    "api" => @api,
    "stageName" => @stage_name,
    "region" => @region,
  })
  result.compact
end