Class: AWSCDK::EventsTargets::AppSyncGraphQLAPIProps
- Inherits:
-
TargetBaseProps
- Object
- TargetBaseProps
- AWSCDK::EventsTargets::AppSyncGraphQLAPIProps
- Defined in:
- events_targets/app_sync_graph_qlapi_props.rb
Overview
Customize the AppSync GraphQL API target.
Instance Attribute Summary collapse
-
#dead_letter_queue ⇒ AWSCDK::SQS::IQueue?
readonly
The SQS queue to be used as deadLetterQueue.
-
#event_role ⇒ AWSCDK::IAM::IRole?
readonly
The role to assume before invoking the target (i.e., the pipeline) when the given rule is triggered.
-
#graph_ql_operation ⇒ String
readonly
The GraphQL operation;.
-
#max_event_age ⇒ AWSCDK::Duration?
readonly
The maximum age of a request that Lambda sends to a function for processing.
-
#retry_attempts ⇒ Numeric?
readonly
The maximum number of times to retry when the function returns an error.
-
#variables ⇒ AWSCDK::Events::RuleTargetInput?
readonly
The variables that are include in the GraphQL operation.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(dead_letter_queue: nil, max_event_age: nil, retry_attempts: nil, graph_ql_operation:, event_role: nil, variables: nil) ⇒ AppSyncGraphQLAPIProps
constructor
A new instance of AppSyncGraphQLAPIProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(dead_letter_queue: nil, max_event_age: nil, retry_attempts: nil, graph_ql_operation:, event_role: nil, variables: nil) ⇒ AppSyncGraphQLAPIProps
Returns a new instance of AppSyncGraphQLAPIProps.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'events_targets/app_sync_graph_qlapi_props.rb', line 13 def initialize(dead_letter_queue: nil, max_event_age: nil, retry_attempts: nil, graph_ql_operation:, event_role: nil, variables: nil) @dead_letter_queue = dead_letter_queue Jsii::Type.check_type(@dead_letter_queue, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3FzLklRdWV1ZSJ9")), "deadLetterQueue") unless @dead_letter_queue.nil? @max_event_age = max_event_age Jsii::Type.check_type(@max_event_age, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "maxEventAge") unless @max_event_age.nil? @retry_attempts = retry_attempts Jsii::Type.check_type(@retry_attempts, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "retryAttempts") unless @retry_attempts.nil? @graph_ql_operation = graph_ql_operation Jsii::Type.check_type(@graph_ql_operation, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "graphQLOperation") @event_role = event_role Jsii::Type.check_type(@event_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "eventRole") unless @event_role.nil? @variables = variables Jsii::Type.check_type(@variables, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLlJ1bGVUYXJnZXRJbnB1dCJ9")), "variables") unless @variables.nil? end |
Instance Attribute Details
#dead_letter_queue ⇒ AWSCDK::SQS::IQueue? (readonly)
Default: - no dead-letter queue
The SQS queue to be used as deadLetterQueue. Check out the considerations for using a dead-letter queue.
The events not successfully delivered are automatically retried for a specified period of time, depending on the retry policy of the target. If an event is not delivered before all retry attempts are exhausted, it will be sent to the dead letter queue.
36 37 38 |
# File 'events_targets/app_sync_graph_qlapi_props.rb', line 36 def dead_letter_queue @dead_letter_queue end |
#event_role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: - a new role with permissions to access mutations will be created
The role to assume before invoking the target (i.e., the pipeline) when the given rule is triggered.
64 65 66 |
# File 'events_targets/app_sync_graph_qlapi_props.rb', line 64 def event_role @event_role end |
#graph_ql_operation ⇒ String (readonly)
The GraphQL operation;
that is, the query, mutation, or subscription to be parsed and executed by the GraphQL service.
59 60 61 |
# File 'events_targets/app_sync_graph_qlapi_props.rb', line 59 def graph_ql_operation @graph_ql_operation end |
#max_event_age ⇒ AWSCDK::Duration? (readonly)
Default: Duration.hours(24)
The maximum age of a request that Lambda sends to a function for processing.
Minimum value of 60. Maximum value of 86400.
44 45 46 |
# File 'events_targets/app_sync_graph_qlapi_props.rb', line 44 def max_event_age @max_event_age end |
#retry_attempts ⇒ Numeric? (readonly)
Default: 185
The maximum number of times to retry when the function returns an error.
Minimum value of 0. Maximum value of 185.
52 53 54 |
# File 'events_targets/app_sync_graph_qlapi_props.rb', line 52 def retry_attempts @retry_attempts end |
#variables ⇒ AWSCDK::Events::RuleTargetInput? (readonly)
Default: - The entire event is used
The variables that are include in the GraphQL operation.
69 70 71 |
# File 'events_targets/app_sync_graph_qlapi_props.rb', line 69 def variables @variables end |
Class Method Details
.jsii_properties ⇒ Object
71 72 73 74 75 76 77 78 79 80 |
# File 'events_targets/app_sync_graph_qlapi_props.rb', line 71 def self.jsii_properties { :dead_letter_queue => "deadLetterQueue", :max_event_age => "maxEventAge", :retry_attempts => "retryAttempts", :graph_ql_operation => "graphQLOperation", :event_role => "eventRole", :variables => "variables", } end |
Instance Method Details
#to_jsii ⇒ Object
82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'events_targets/app_sync_graph_qlapi_props.rb', line 82 def to_jsii result = {} result.merge!(super) result.merge!({ "deadLetterQueue" => @dead_letter_queue, "maxEventAge" => @max_event_age, "retryAttempts" => @retry_attempts, "graphQLOperation" => @graph_ql_operation, "eventRole" => @event_role, "variables" => @variables, }) result.compact end |