lib/aws-sdk-medialive/waiters.rb in aws-sdk-medialive-1.118.0 vs lib/aws-sdk-medialive/waiters.rb in aws-sdk-medialive-1.119.0
- old
+ new
@@ -65,23 +65,27 @@
# # Available Waiters
#
# The following table lists the valid waiter names, the operations they call,
# and the default `:delay` and `:max_attempts` values.
#
- # | waiter_name | params | :delay | :max_attempts |
- # | ----------------- | --------------------------- | -------- | ------------- |
- # | channel_created | {Client#describe_channel} | 3 | 5 |
- # | channel_deleted | {Client#describe_channel} | 5 | 84 |
- # | channel_running | {Client#describe_channel} | 5 | 120 |
- # | channel_stopped | {Client#describe_channel} | 5 | 60 |
- # | input_attached | {Client#describe_input} | 5 | 20 |
- # | input_deleted | {Client#describe_input} | 5 | 20 |
- # | input_detached | {Client#describe_input} | 5 | 84 |
- # | multiplex_created | {Client#describe_multiplex} | 3 | 5 |
- # | multiplex_deleted | {Client#describe_multiplex} | 5 | 20 |
- # | multiplex_running | {Client#describe_multiplex} | 5 | 120 |
- # | multiplex_stopped | {Client#describe_multiplex} | 5 | 28 |
+ # | waiter_name | params | :delay | :max_attempts |
+ # | --------------------------- | --------------------------- | -------- | ------------- |
+ # | channel_created | {Client#describe_channel} | 3 | 5 |
+ # | channel_deleted | {Client#describe_channel} | 5 | 84 |
+ # | channel_running | {Client#describe_channel} | 5 | 120 |
+ # | channel_stopped | {Client#describe_channel} | 5 | 60 |
+ # | input_attached | {Client#describe_input} | 5 | 20 |
+ # | input_deleted | {Client#describe_input} | 5 | 20 |
+ # | input_detached | {Client#describe_input} | 5 | 84 |
+ # | multiplex_created | {Client#describe_multiplex} | 3 | 5 |
+ # | multiplex_deleted | {Client#describe_multiplex} | 5 | 20 |
+ # | multiplex_running | {Client#describe_multiplex} | 5 | 120 |
+ # | multiplex_stopped | {Client#describe_multiplex} | 5 | 28 |
+ # | signal_map_created | {Client#get_signal_map} | 5 | 60 |
+ # | signal_map_monitor_deleted | {Client#get_signal_map} | 5 | 120 |
+ # | signal_map_monitor_deployed | {Client#get_signal_map} | 5 | 120 |
+ # | signal_map_updated | {Client#get_signal_map} | 5 | 60 |
#
module Waiters
# Wait until a channel has been created
class ChannelCreated
@@ -640,9 +644,237 @@
}.merge(options))
end
# @option (see Client#describe_multiplex)
# @return (see Client#describe_multiplex)
+ def wait(params = {})
+ @waiter.wait(client: @client, params: params)
+ end
+
+ # @api private
+ attr_reader :waiter
+
+ end
+
+ # Wait until a signal map has been created
+ class SignalMapCreated
+
+ # @param [Hash] options
+ # @option options [required, Client] :client
+ # @option options [Integer] :max_attempts (60)
+ # @option options [Integer] :delay (5)
+ # @option options [Proc] :before_attempt
+ # @option options [Proc] :before_wait
+ def initialize(options)
+ @client = options.fetch(:client)
+ @waiter = Aws::Waiters::Waiter.new({
+ max_attempts: 60,
+ delay: 5,
+ poller: Aws::Waiters::Poller.new(
+ operation_name: :get_signal_map,
+ acceptors: [
+ {
+ "matcher" => "path",
+ "argument" => "status",
+ "state" => "success",
+ "expected" => "CREATE_COMPLETE"
+ },
+ {
+ "matcher" => "path",
+ "argument" => "status",
+ "state" => "retry",
+ "expected" => "CREATE_IN_PROGRESS"
+ },
+ {
+ "matcher" => "path",
+ "argument" => "status",
+ "state" => "failure",
+ "expected" => "CREATE_FAILED"
+ }
+ ]
+ )
+ }.merge(options))
+ end
+
+ # @option (see Client#get_signal_map)
+ # @return (see Client#get_signal_map)
+ def wait(params = {})
+ @waiter.wait(client: @client, params: params)
+ end
+
+ # @api private
+ attr_reader :waiter
+
+ end
+
+ # Wait until a signal map's monitor has been deleted
+ class SignalMapMonitorDeleted
+
+ # @param [Hash] options
+ # @option options [required, Client] :client
+ # @option options [Integer] :max_attempts (120)
+ # @option options [Integer] :delay (5)
+ # @option options [Proc] :before_attempt
+ # @option options [Proc] :before_wait
+ def initialize(options)
+ @client = options.fetch(:client)
+ @waiter = Aws::Waiters::Waiter.new({
+ max_attempts: 120,
+ delay: 5,
+ poller: Aws::Waiters::Poller.new(
+ operation_name: :get_signal_map,
+ acceptors: [
+ {
+ "matcher" => "path",
+ "argument" => "monitor_deployment.status",
+ "state" => "success",
+ "expected" => "DELETE_COMPLETE"
+ },
+ {
+ "matcher" => "path",
+ "argument" => "monitor_deployment.status",
+ "state" => "retry",
+ "expected" => "DELETE_IN_PROGRESS"
+ },
+ {
+ "matcher" => "path",
+ "argument" => "monitor_deployment.status",
+ "state" => "failure",
+ "expected" => "DELETE_FAILED"
+ }
+ ]
+ )
+ }.merge(options))
+ end
+
+ # @option (see Client#get_signal_map)
+ # @return (see Client#get_signal_map)
+ def wait(params = {})
+ @waiter.wait(client: @client, params: params)
+ end
+
+ # @api private
+ attr_reader :waiter
+
+ end
+
+ # Wait until a signal map's monitor has been deployed
+ class SignalMapMonitorDeployed
+
+ # @param [Hash] options
+ # @option options [required, Client] :client
+ # @option options [Integer] :max_attempts (120)
+ # @option options [Integer] :delay (5)
+ # @option options [Proc] :before_attempt
+ # @option options [Proc] :before_wait
+ def initialize(options)
+ @client = options.fetch(:client)
+ @waiter = Aws::Waiters::Waiter.new({
+ max_attempts: 120,
+ delay: 5,
+ poller: Aws::Waiters::Poller.new(
+ operation_name: :get_signal_map,
+ acceptors: [
+ {
+ "matcher" => "path",
+ "argument" => "monitor_deployment.status",
+ "state" => "success",
+ "expected" => "DRY_RUN_DEPLOYMENT_COMPLETE"
+ },
+ {
+ "matcher" => "path",
+ "argument" => "monitor_deployment.status",
+ "state" => "success",
+ "expected" => "DEPLOYMENT_COMPLETE"
+ },
+ {
+ "matcher" => "path",
+ "argument" => "monitor_deployment.status",
+ "state" => "retry",
+ "expected" => "DRY_RUN_DEPLOYMENT_IN_PROGRESS"
+ },
+ {
+ "matcher" => "path",
+ "argument" => "monitor_deployment.status",
+ "state" => "retry",
+ "expected" => "DEPLOYMENT_IN_PROGRESS"
+ },
+ {
+ "matcher" => "path",
+ "argument" => "monitor_deployment.status",
+ "state" => "failure",
+ "expected" => "DRY_RUN_DEPLOYMENT_FAILED"
+ },
+ {
+ "matcher" => "path",
+ "argument" => "monitor_deployment.status",
+ "state" => "failure",
+ "expected" => "DEPLOYMENT_FAILED"
+ }
+ ]
+ )
+ }.merge(options))
+ end
+
+ # @option (see Client#get_signal_map)
+ # @return (see Client#get_signal_map)
+ def wait(params = {})
+ @waiter.wait(client: @client, params: params)
+ end
+
+ # @api private
+ attr_reader :waiter
+
+ end
+
+ # Wait until a signal map has been updated
+ class SignalMapUpdated
+
+ # @param [Hash] options
+ # @option options [required, Client] :client
+ # @option options [Integer] :max_attempts (60)
+ # @option options [Integer] :delay (5)
+ # @option options [Proc] :before_attempt
+ # @option options [Proc] :before_wait
+ def initialize(options)
+ @client = options.fetch(:client)
+ @waiter = Aws::Waiters::Waiter.new({
+ max_attempts: 60,
+ delay: 5,
+ poller: Aws::Waiters::Poller.new(
+ operation_name: :get_signal_map,
+ acceptors: [
+ {
+ "matcher" => "path",
+ "argument" => "status",
+ "state" => "success",
+ "expected" => "UPDATE_COMPLETE"
+ },
+ {
+ "matcher" => "path",
+ "argument" => "status",
+ "state" => "retry",
+ "expected" => "UPDATE_IN_PROGRESS"
+ },
+ {
+ "matcher" => "path",
+ "argument" => "status",
+ "state" => "failure",
+ "expected" => "UPDATE_FAILED"
+ },
+ {
+ "matcher" => "path",
+ "argument" => "status",
+ "state" => "failure",
+ "expected" => "UPDATE_REVERTED"
+ }
+ ]
+ )
+ }.merge(options))
+ end
+
+ # @option (see Client#get_signal_map)
+ # @return (see Client#get_signal_map)
def wait(params = {})
@waiter.wait(client: @client, params: params)
end
# @api private