Class: AWSCDK::EventsTargets::AWSAPIProps
- Inherits:
-
AWSAPIInput
- Object
- AWSAPIInput
- AWSCDK::EventsTargets::AWSAPIProps
- Defined in:
- events_targets/awsapi_props.rb
Overview
Properties for an AwsApi target.
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.
-
#policy_statement ⇒ AWSCDK::IAM::PolicyStatement?
readonly
The IAM policy statement to allow the API call.
-
#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, policy_statement: nil) ⇒ AWSAPIProps
constructor
A new instance of AWSAPIProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(action:, service:, api_version: nil, catch_error_pattern: nil, parameters: nil, policy_statement: nil) ⇒ AWSAPIProps
Returns a new instance of AWSAPIProps.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'events_targets/awsapi_props.rb', line 13 def initialize(action:, service:, api_version: nil, catch_error_pattern: nil, parameters: nil, policy_statement: 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? @policy_statement = policy_statement Jsii::Type.check_type(@policy_statement, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLlBvbGljeVN0YXRlbWVudCJ9")), "policyStatement") unless @policy_statement.nil? end |
Instance Attribute Details
#action ⇒ String (readonly)
The service action to call.
32 33 34 |
# File 'events_targets/awsapi_props.rb', line 32 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.
42 43 44 |
# File 'events_targets/awsapi_props.rb', line 42 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.
51 52 53 |
# File 'events_targets/awsapi_props.rb', line 51 def catch_error_pattern @catch_error_pattern end |
#parameters ⇒ Object? (readonly)
Default: - no parameters
The parameters for the service action.
57 58 59 |
# File 'events_targets/awsapi_props.rb', line 57 def parameters @parameters end |
#policy_statement ⇒ AWSCDK::IAM::PolicyStatement? (readonly)
Default: - extract the permission from the API call
The IAM policy statement to allow the API call.
Use only if resource restriction is needed.
65 66 67 |
# File 'events_targets/awsapi_props.rb', line 65 def policy_statement @policy_statement end |
#service ⇒ String (readonly)
The service to call.
37 38 39 |
# File 'events_targets/awsapi_props.rb', line 37 def service @service end |
Class Method Details
.jsii_properties ⇒ Object
67 68 69 70 71 72 73 74 75 76 |
# File 'events_targets/awsapi_props.rb', line 67 def self.jsii_properties { :action => "action", :service => "service", :api_version => "apiVersion", :catch_error_pattern => "catchErrorPattern", :parameters => "parameters", :policy_statement => "policyStatement", } end |
Instance Method Details
#to_jsii ⇒ Object
78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'events_targets/awsapi_props.rb', line 78 def to_jsii result = {} result.merge!(super) result.merge!({ "action" => @action, "service" => @service, "apiVersion" => @api_version, "catchErrorPattern" => @catch_error_pattern, "parameters" => @parameters, "policyStatement" => @policy_statement, }) result.compact end |