Class: AWSCDK::EventsTargets::AWSAPIInput
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EventsTargets::AWSAPIInput
- Defined in:
- events_targets/awsapi_input.rb
Overview
Rule target input for an AwsApi target.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#action ⇒ String
readonly
The service action to call.
-
#api_version ⇒ String?
readonly
deprecated
Deprecated.
the handler code was migrated to AWS SDK for JavaScript v3, which does not support this feature anymore
-
#catch_error_pattern ⇒ String?
readonly
The regex pattern to use to catch API errors.
-
#parameters ⇒ Object?
readonly
The parameters for the service action.
-
#service ⇒ String
readonly
The service to call.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(action:, service:, api_version: nil, catch_error_pattern: nil, parameters: nil) ⇒ AWSAPIInput
constructor
A new instance of AWSAPIInput.
- #to_jsii ⇒ Object
Constructor Details
#initialize(action:, service:, api_version: nil, catch_error_pattern: nil, parameters: nil) ⇒ AWSAPIInput
Returns a new instance of AWSAPIInput.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'events_targets/awsapi_input.rb', line 12 def initialize(action:, service:, api_version: nil, catch_error_pattern: nil, parameters: nil) @action = action Jsii::Type.check_type(@action, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "action") @service = service Jsii::Type.check_type(@service, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "service") @api_version = api_version Jsii::Type.check_type(@api_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "apiVersion") unless @api_version.nil? @catch_error_pattern = catch_error_pattern Jsii::Type.check_type(@catch_error_pattern, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "catchErrorPattern") unless @catch_error_pattern.nil? @parameters = parameters Jsii::Type.check_type(@parameters, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "parameters") unless @parameters.nil? end |
Instance Attribute Details
#action ⇒ String (readonly)
The service action to call.
29 30 31 |
# File 'events_targets/awsapi_input.rb', line 29 def action @action end |
#api_version ⇒ String? (readonly)
the handler code was migrated to AWS SDK for JavaScript v3, which does not support this feature anymore
API version to use for the service.
39 40 41 |
# File 'events_targets/awsapi_input.rb', line 39 def api_version @api_version end |
#catch_error_pattern ⇒ String? (readonly)
Default: - do not catch errors
The regex pattern to use to catch API errors.
The code property of the
Error object will be tested against this pattern. If there is a match an
error will not be thrown.
48 49 50 |
# File 'events_targets/awsapi_input.rb', line 48 def catch_error_pattern @catch_error_pattern end |
#parameters ⇒ Object? (readonly)
Default: - no parameters
The parameters for the service action.
54 55 56 |
# File 'events_targets/awsapi_input.rb', line 54 def parameters @parameters end |
#service ⇒ String (readonly)
The service to call.
34 35 36 |
# File 'events_targets/awsapi_input.rb', line 34 def service @service end |
Class Method Details
.jsii_properties ⇒ Object
56 57 58 59 60 61 62 63 64 |
# File 'events_targets/awsapi_input.rb', line 56 def self.jsii_properties { :action => "action", :service => "service", :api_version => "apiVersion", :catch_error_pattern => "catchErrorPattern", :parameters => "parameters", } end |
Instance Method Details
#to_jsii ⇒ Object
66 67 68 69 70 71 72 73 74 75 76 |
# File 'events_targets/awsapi_input.rb', line 66 def to_jsii result = {} result.merge!({ "action" => @action, "service" => @service, "apiVersion" => @api_version, "catchErrorPattern" => @catch_error_pattern, "parameters" => @parameters, }) result.compact end |