Class: AWSCDK::APIGatewayv2Integrations::HttpSQSIntegrationProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
api_gatewayv2_integrations/http_sqs_integration_props.rb

Overview

Properties to initialize HttpSqsIntegration.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(queue:, parameter_mapping: nil, subtype: nil) ⇒ HttpSQSIntegrationProps

Returns a new instance of HttpSQSIntegrationProps.

Parameters:



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

def initialize(queue:, parameter_mapping: nil, subtype: nil)
  @queue = queue
  Jsii::Type.check_type(@queue, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3FzLklRdWV1ZSJ9")), "queue")
  @parameter_mapping = parameter_mapping
  Jsii::Type.check_type(@parameter_mapping, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLlBhcmFtZXRlck1hcHBpbmcifQ==")), "parameterMapping") unless @parameter_mapping.nil?
  @subtype = subtype
  Jsii::Type.check_type(@subtype, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLkh0dHBJbnRlZ3JhdGlvblN1YnR5cGUifQ==")), "subtype") unless @subtype.nil?
end

Instance Attribute Details

#parameter_mappingAWSCDK::APIGatewayv2::ParameterMapping? (readonly)

Note:

Default: - specify QueueUrl. Additionally, set MessageBody to $request.body.MessageBody for SQS_SEND_MESSAGE subtype and set ReceiptHandle to $request.body.ReceiptHandle for SQS_DELETE_MESSAGE subtype.

Specifies how to transform HTTP requests before sending them to the backend.



28
29
30
# File 'api_gatewayv2_integrations/http_sqs_integration_props.rb', line 28

def parameter_mapping
  @parameter_mapping
end

#queueAWSCDK::SQS::IQueue (readonly)

SQS queue that Integrates with API Gateway.

Returns:



22
23
24
# File 'api_gatewayv2_integrations/http_sqs_integration_props.rb', line 22

def queue
  @queue
end

#subtypeAWSCDK::APIGatewayv2::HttpIntegrationSubtype? (readonly)

Note:

Default: HttpIntegrationSubtype.SQS_SEND_MESSAGE

The subtype of the HTTP integration.

Only subtypes starting with SQS_ can be specified.



35
36
37
# File 'api_gatewayv2_integrations/http_sqs_integration_props.rb', line 35

def subtype
  @subtype
end

Class Method Details

.jsii_propertiesObject



37
38
39
40
41
42
43
# File 'api_gatewayv2_integrations/http_sqs_integration_props.rb', line 37

def self.jsii_properties
  {
    :queue => "queue",
    :parameter_mapping => "parameterMapping",
    :subtype => "subtype",
  }
end

Instance Method Details

#to_jsiiObject



45
46
47
48
49
50
51
52
53
# File 'api_gatewayv2_integrations/http_sqs_integration_props.rb', line 45

def to_jsii
  result = {}
  result.merge!({
    "queue" => @queue,
    "parameterMapping" => @parameter_mapping,
    "subtype" => @subtype,
  })
  result.compact
end