aws-sdk-groundstation 1.30.0 → 1.32.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7f28fef1ccf14310628814ae5baffbf87cae0db3c3e80625de93ada955f28632
4
- data.tar.gz: b852252cf13a8294976ffde486f776a6b82ada0dd71f74709d6880d055f84fad
3
+ metadata.gz: e5b4ff66e5a28b560467b9adee19d8f3a52acb5defcab833f555ad5394cd2cfa
4
+ data.tar.gz: b05059a21fd9770236adafa2df814c029050c9269c1befa07b6d898f5ac7b9f6
5
5
  SHA512:
6
- metadata.gz: 6559ec0e35ed7faba690bb2d66e2b62fc02aeb110bda03c7ec0ac750b564e874e242cd25c1b809e9f77c9c685412c87f250d62fc4114b379bc859b032a124146
7
- data.tar.gz: e8c93ee7c8928a08eac4d3ad6d8d970c067d3afe232d8f44be11065363c09bc305b7307737a92d6b8a0bb1bae11875349b3b991f453b6287dae120cee2bbd2af
6
+ metadata.gz: b7a103b39db4a017c9aeec8574b040a14ed091828d1cb0e24edae363f00cef19213f27b3023550517a1f17471068f100e885beca22327824b3ad524e431db95b
7
+ data.tar.gz: 1f1e24fad8e5dfc27db4324363412f5dd6216db840363d7021f75c60e1bf9d98a76951d099273a8549559f7700560d24197ef7f413bef1f6e5493c02cfdfa0f0
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.32.0 (2023-01-31)
5
+ ------------------
6
+
7
+ * Feature - DigIF Expansion changes to the Customer APIs.
8
+
9
+ 1.31.0 (2023-01-19)
10
+ ------------------
11
+
12
+ * Feature - Add configurable prepass and postpass times for DataflowEndpointGroup. Add Waiter to allow customers to wait for a contact that was reserved through ReserveContact
13
+
4
14
  1.30.0 (2023-01-18)
5
15
  ------------------
6
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.30.0
1
+ 1.32.0
@@ -513,6 +513,16 @@ module Aws::GroundStation
513
513
  # When a contact uses multiple `DataflowEndpointConfig` objects, each
514
514
  # `Config` must match a `DataflowEndpoint` in the same group.
515
515
  #
516
+ # @option params [Integer] :contact_post_pass_duration_seconds
517
+ # Amount of time, in seconds, after a contact ends for the contact to
518
+ # remain in a `POSTPASS` state. A CloudWatch event is emitted when the
519
+ # contact enters and exits the `POSTPASS` state.
520
+ #
521
+ # @option params [Integer] :contact_pre_pass_duration_seconds
522
+ # Amount of time, in seconds, prior to contact start for the contact to
523
+ # remain in a `PREPASS` state. A CloudWatch event is emitted when the
524
+ # contact enters and exits the `PREPASS` state.
525
+ #
516
526
  # @option params [required, Array<Types::EndpointDetails>] :endpoint_details
517
527
  # Endpoint details of each endpoint in the dataflow endpoint group.
518
528
  #
@@ -526,8 +536,32 @@ module Aws::GroundStation
526
536
  # @example Request syntax with placeholder values
527
537
  #
528
538
  # resp = client.create_dataflow_endpoint_group({
539
+ # contact_post_pass_duration_seconds: 1,
540
+ # contact_pre_pass_duration_seconds: 1,
529
541
  # endpoint_details: [ # required
530
542
  # {
543
+ # aws_ground_station_agent_endpoint: {
544
+ # agent_status: "SUCCESS", # accepts SUCCESS, FAILED, ACTIVE, INACTIVE
545
+ # audit_results: "HEALTHY", # accepts HEALTHY, UNHEALTHY
546
+ # egress_address: { # required
547
+ # mtu: 1,
548
+ # socket_address: { # required
549
+ # name: "String", # required
550
+ # port: 1, # required
551
+ # },
552
+ # },
553
+ # ingress_address: { # required
554
+ # mtu: 1,
555
+ # socket_address: { # required
556
+ # name: "IpV4Address", # required
557
+ # port_range: { # required
558
+ # maximum: 1, # required
559
+ # minimum: 1, # required
560
+ # },
561
+ # },
562
+ # },
563
+ # name: "SafeName", # required
564
+ # },
531
565
  # endpoint: {
532
566
  # address: {
533
567
  # name: "String", # required
@@ -682,6 +716,12 @@ module Aws::GroundStation
682
716
  # @option params [required, String] :name
683
717
  # Name of a mission profile.
684
718
  #
719
+ # @option params [Types::KmsKey] :streams_kms_key
720
+ # KMS key to use for encrypting streams.
721
+ #
722
+ # @option params [String] :streams_kms_role
723
+ # Role to use for encrypting streams with KMS key.
724
+ #
685
725
  # @option params [Hash<String,String>] :tags
686
726
  # Tags assigned to a mission profile.
687
727
  #
@@ -702,6 +742,11 @@ module Aws::GroundStation
702
742
  # ],
703
743
  # minimum_viable_contact_duration_seconds: 1, # required
704
744
  # name: "SafeName", # required
745
+ # streams_kms_key: {
746
+ # kms_alias_arn: "KeyAliasArn",
747
+ # kms_key_arn: "KeyArn",
748
+ # },
749
+ # streams_kms_role: "RoleArn",
705
750
  # tags: {
706
751
  # "String" => "String",
707
752
  # },
@@ -875,6 +920,16 @@ module Aws::GroundStation
875
920
  # resp.contact_status #=> String, one of "AVAILABLE", "AWS_CANCELLED", "AWS_FAILED", "CANCELLED", "CANCELLING", "COMPLETED", "FAILED", "FAILED_TO_SCHEDULE", "PASS", "POSTPASS", "PREPASS", "SCHEDULED", "SCHEDULING"
876
921
  # resp.dataflow_list #=> Array
877
922
  # resp.dataflow_list[0].destination.config_details.antenna_demod_decode_details.output_node #=> String
923
+ # resp.dataflow_list[0].destination.config_details.endpoint_details.aws_ground_station_agent_endpoint.agent_status #=> String, one of "SUCCESS", "FAILED", "ACTIVE", "INACTIVE"
924
+ # resp.dataflow_list[0].destination.config_details.endpoint_details.aws_ground_station_agent_endpoint.audit_results #=> String, one of "HEALTHY", "UNHEALTHY"
925
+ # resp.dataflow_list[0].destination.config_details.endpoint_details.aws_ground_station_agent_endpoint.egress_address.mtu #=> Integer
926
+ # resp.dataflow_list[0].destination.config_details.endpoint_details.aws_ground_station_agent_endpoint.egress_address.socket_address.name #=> String
927
+ # resp.dataflow_list[0].destination.config_details.endpoint_details.aws_ground_station_agent_endpoint.egress_address.socket_address.port #=> Integer
928
+ # resp.dataflow_list[0].destination.config_details.endpoint_details.aws_ground_station_agent_endpoint.ingress_address.mtu #=> Integer
929
+ # resp.dataflow_list[0].destination.config_details.endpoint_details.aws_ground_station_agent_endpoint.ingress_address.socket_address.name #=> String
930
+ # resp.dataflow_list[0].destination.config_details.endpoint_details.aws_ground_station_agent_endpoint.ingress_address.socket_address.port_range.maximum #=> Integer
931
+ # resp.dataflow_list[0].destination.config_details.endpoint_details.aws_ground_station_agent_endpoint.ingress_address.socket_address.port_range.minimum #=> Integer
932
+ # resp.dataflow_list[0].destination.config_details.endpoint_details.aws_ground_station_agent_endpoint.name #=> String
878
933
  # resp.dataflow_list[0].destination.config_details.endpoint_details.endpoint.address.name #=> String
879
934
  # resp.dataflow_list[0].destination.config_details.endpoint_details.endpoint.address.port #=> Integer
880
935
  # resp.dataflow_list[0].destination.config_details.endpoint_details.endpoint.mtu #=> Integer
@@ -892,6 +947,16 @@ module Aws::GroundStation
892
947
  # resp.dataflow_list[0].destination.dataflow_destination_region #=> String
893
948
  # resp.dataflow_list[0].error_message #=> String
894
949
  # resp.dataflow_list[0].source.config_details.antenna_demod_decode_details.output_node #=> String
950
+ # resp.dataflow_list[0].source.config_details.endpoint_details.aws_ground_station_agent_endpoint.agent_status #=> String, one of "SUCCESS", "FAILED", "ACTIVE", "INACTIVE"
951
+ # resp.dataflow_list[0].source.config_details.endpoint_details.aws_ground_station_agent_endpoint.audit_results #=> String, one of "HEALTHY", "UNHEALTHY"
952
+ # resp.dataflow_list[0].source.config_details.endpoint_details.aws_ground_station_agent_endpoint.egress_address.mtu #=> Integer
953
+ # resp.dataflow_list[0].source.config_details.endpoint_details.aws_ground_station_agent_endpoint.egress_address.socket_address.name #=> String
954
+ # resp.dataflow_list[0].source.config_details.endpoint_details.aws_ground_station_agent_endpoint.egress_address.socket_address.port #=> Integer
955
+ # resp.dataflow_list[0].source.config_details.endpoint_details.aws_ground_station_agent_endpoint.ingress_address.mtu #=> Integer
956
+ # resp.dataflow_list[0].source.config_details.endpoint_details.aws_ground_station_agent_endpoint.ingress_address.socket_address.name #=> String
957
+ # resp.dataflow_list[0].source.config_details.endpoint_details.aws_ground_station_agent_endpoint.ingress_address.socket_address.port_range.maximum #=> Integer
958
+ # resp.dataflow_list[0].source.config_details.endpoint_details.aws_ground_station_agent_endpoint.ingress_address.socket_address.port_range.minimum #=> Integer
959
+ # resp.dataflow_list[0].source.config_details.endpoint_details.aws_ground_station_agent_endpoint.name #=> String
895
960
  # resp.dataflow_list[0].source.config_details.endpoint_details.endpoint.address.name #=> String
896
961
  # resp.dataflow_list[0].source.config_details.endpoint_details.endpoint.address.port #=> Integer
897
962
  # resp.dataflow_list[0].source.config_details.endpoint_details.endpoint.mtu #=> Integer
@@ -921,6 +986,11 @@ module Aws::GroundStation
921
986
  # resp.tags #=> Hash
922
987
  # resp.tags["String"] #=> String
923
988
  #
989
+ #
990
+ # The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
991
+ #
992
+ # * contact_scheduled
993
+ #
924
994
  # @see http://docs.aws.amazon.com/goto/WebAPI/groundstation-2019-05-23/DescribeContact AWS API Documentation
925
995
  #
926
996
  # @overload describe_contact(params = {})
@@ -984,6 +1054,36 @@ module Aws::GroundStation
984
1054
  req.send_request(options)
985
1055
  end
986
1056
 
1057
+ # Gets the latest configuration information for a registered agent.
1058
+ #
1059
+ # @option params [required, String] :agent_id
1060
+ # UUID of agent to get configuration information for.
1061
+ #
1062
+ # @return [Types::GetAgentConfigurationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1063
+ #
1064
+ # * {Types::GetAgentConfigurationResponse#agent_id #agent_id} => String
1065
+ # * {Types::GetAgentConfigurationResponse#tasking_document #tasking_document} => String
1066
+ #
1067
+ # @example Request syntax with placeholder values
1068
+ #
1069
+ # resp = client.get_agent_configuration({
1070
+ # agent_id: "Uuid", # required
1071
+ # })
1072
+ #
1073
+ # @example Response structure
1074
+ #
1075
+ # resp.agent_id #=> String
1076
+ # resp.tasking_document #=> String
1077
+ #
1078
+ # @see http://docs.aws.amazon.com/goto/WebAPI/groundstation-2019-05-23/GetAgentConfiguration AWS API Documentation
1079
+ #
1080
+ # @overload get_agent_configuration(params = {})
1081
+ # @param [Hash] params ({})
1082
+ def get_agent_configuration(params = {}, options = {})
1083
+ req = build_request(:get_agent_configuration, params)
1084
+ req.send_request(options)
1085
+ end
1086
+
987
1087
  # Returns `Config` information.
988
1088
  #
989
1089
  # Only one `Config` response can be returned.
@@ -1061,6 +1161,8 @@ module Aws::GroundStation
1061
1161
  #
1062
1162
  # @return [Types::GetDataflowEndpointGroupResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1063
1163
  #
1164
+ # * {Types::GetDataflowEndpointGroupResponse#contact_post_pass_duration_seconds #contact_post_pass_duration_seconds} => Integer
1165
+ # * {Types::GetDataflowEndpointGroupResponse#contact_pre_pass_duration_seconds #contact_pre_pass_duration_seconds} => Integer
1064
1166
  # * {Types::GetDataflowEndpointGroupResponse#dataflow_endpoint_group_arn #dataflow_endpoint_group_arn} => String
1065
1167
  # * {Types::GetDataflowEndpointGroupResponse#dataflow_endpoint_group_id #dataflow_endpoint_group_id} => String
1066
1168
  # * {Types::GetDataflowEndpointGroupResponse#endpoints_details #endpoints_details} => Array&lt;Types::EndpointDetails&gt;
@@ -1074,9 +1176,21 @@ module Aws::GroundStation
1074
1176
  #
1075
1177
  # @example Response structure
1076
1178
  #
1179
+ # resp.contact_post_pass_duration_seconds #=> Integer
1180
+ # resp.contact_pre_pass_duration_seconds #=> Integer
1077
1181
  # resp.dataflow_endpoint_group_arn #=> String
1078
1182
  # resp.dataflow_endpoint_group_id #=> String
1079
1183
  # resp.endpoints_details #=> Array
1184
+ # resp.endpoints_details[0].aws_ground_station_agent_endpoint.agent_status #=> String, one of "SUCCESS", "FAILED", "ACTIVE", "INACTIVE"
1185
+ # resp.endpoints_details[0].aws_ground_station_agent_endpoint.audit_results #=> String, one of "HEALTHY", "UNHEALTHY"
1186
+ # resp.endpoints_details[0].aws_ground_station_agent_endpoint.egress_address.mtu #=> Integer
1187
+ # resp.endpoints_details[0].aws_ground_station_agent_endpoint.egress_address.socket_address.name #=> String
1188
+ # resp.endpoints_details[0].aws_ground_station_agent_endpoint.egress_address.socket_address.port #=> Integer
1189
+ # resp.endpoints_details[0].aws_ground_station_agent_endpoint.ingress_address.mtu #=> Integer
1190
+ # resp.endpoints_details[0].aws_ground_station_agent_endpoint.ingress_address.socket_address.name #=> String
1191
+ # resp.endpoints_details[0].aws_ground_station_agent_endpoint.ingress_address.socket_address.port_range.maximum #=> Integer
1192
+ # resp.endpoints_details[0].aws_ground_station_agent_endpoint.ingress_address.socket_address.port_range.minimum #=> Integer
1193
+ # resp.endpoints_details[0].aws_ground_station_agent_endpoint.name #=> String
1080
1194
  # resp.endpoints_details[0].endpoint.address.name #=> String
1081
1195
  # resp.endpoints_details[0].endpoint.address.port #=> Integer
1082
1196
  # resp.endpoints_details[0].endpoint.mtu #=> Integer
@@ -1154,6 +1268,8 @@ module Aws::GroundStation
1154
1268
  # * {Types::GetMissionProfileResponse#mission_profile_id #mission_profile_id} => String
1155
1269
  # * {Types::GetMissionProfileResponse#name #name} => String
1156
1270
  # * {Types::GetMissionProfileResponse#region #region} => String
1271
+ # * {Types::GetMissionProfileResponse#streams_kms_key #streams_kms_key} => Types::KmsKey
1272
+ # * {Types::GetMissionProfileResponse#streams_kms_role #streams_kms_role} => String
1157
1273
  # * {Types::GetMissionProfileResponse#tags #tags} => Hash&lt;String,String&gt;
1158
1274
  # * {Types::GetMissionProfileResponse#tracking_config_arn #tracking_config_arn} => String
1159
1275
  #
@@ -1175,6 +1291,9 @@ module Aws::GroundStation
1175
1291
  # resp.mission_profile_id #=> String
1176
1292
  # resp.name #=> String
1177
1293
  # resp.region #=> String
1294
+ # resp.streams_kms_key.kms_alias_arn #=> String
1295
+ # resp.streams_kms_key.kms_key_arn #=> String
1296
+ # resp.streams_kms_role #=> String
1178
1297
  # resp.tags #=> Hash
1179
1298
  # resp.tags["String"] #=> String
1180
1299
  # resp.tracking_config_arn #=> String
@@ -1613,6 +1732,53 @@ module Aws::GroundStation
1613
1732
  req.send_request(options)
1614
1733
  end
1615
1734
 
1735
+ # Registers a new agent with AWS Groundstation.
1736
+ #
1737
+ # @option params [required, Types::AgentDetails] :agent_details
1738
+ # Detailed information about the agent being registered.
1739
+ #
1740
+ # @option params [required, Types::DiscoveryData] :discovery_data
1741
+ # Data for associating and agent with the capabilities it is managing.
1742
+ #
1743
+ # @return [Types::RegisterAgentResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1744
+ #
1745
+ # * {Types::RegisterAgentResponse#agent_id #agent_id} => String
1746
+ #
1747
+ # @example Request syntax with placeholder values
1748
+ #
1749
+ # resp = client.register_agent({
1750
+ # agent_details: { # required
1751
+ # agent_version: "VersionString", # required
1752
+ # component_versions: [ # required
1753
+ # {
1754
+ # component_type: "LAMINAR_FLOW", # required, accepts LAMINAR_FLOW, PRISM, DIGITIZER
1755
+ # versions: ["VersionString"], # required
1756
+ # },
1757
+ # ],
1758
+ # instance_id: "InstanceId", # required
1759
+ # instance_type: "InstanceType", # required
1760
+ # reserved_cpu_cores: [1], # required
1761
+ # },
1762
+ # discovery_data: { # required
1763
+ # capability_arns: ["CapabilityArn"], # required
1764
+ # private_ip_addresses: ["IpV4Address"], # required
1765
+ # public_ip_addresses: ["IpV4Address"], # required
1766
+ # },
1767
+ # })
1768
+ #
1769
+ # @example Response structure
1770
+ #
1771
+ # resp.agent_id #=> String
1772
+ #
1773
+ # @see http://docs.aws.amazon.com/goto/WebAPI/groundstation-2019-05-23/RegisterAgent AWS API Documentation
1774
+ #
1775
+ # @overload register_agent(params = {})
1776
+ # @param [Hash] params ({})
1777
+ def register_agent(params = {}, options = {})
1778
+ req = build_request(:register_agent, params)
1779
+ req.send_request(options)
1780
+ end
1781
+
1616
1782
  # Reserves a contact using specified parameters.
1617
1783
  #
1618
1784
  # @option params [required, Time,DateTime,Date,Integer,String] :end_time
@@ -1717,6 +1883,61 @@ module Aws::GroundStation
1717
1883
  req.send_request(options)
1718
1884
  end
1719
1885
 
1886
+ # Update the status of the agent.
1887
+ #
1888
+ # @option params [required, String] :agent_id
1889
+ # UUID of agent to update.
1890
+ #
1891
+ # @option params [required, Types::AggregateStatus] :aggregate_status
1892
+ # Aggregate status for agent.
1893
+ #
1894
+ # @option params [required, Array<Types::ComponentStatusData>] :component_statuses
1895
+ # List of component statuses for agent.
1896
+ #
1897
+ # @option params [required, String] :task_id
1898
+ # GUID of agent task.
1899
+ #
1900
+ # @return [Types::UpdateAgentStatusResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1901
+ #
1902
+ # * {Types::UpdateAgentStatusResponse#agent_id #agent_id} => String
1903
+ #
1904
+ # @example Request syntax with placeholder values
1905
+ #
1906
+ # resp = client.update_agent_status({
1907
+ # agent_id: "Uuid", # required
1908
+ # aggregate_status: { # required
1909
+ # signature_map: {
1910
+ # "String" => false,
1911
+ # },
1912
+ # status: "SUCCESS", # required, accepts SUCCESS, FAILED, ACTIVE, INACTIVE
1913
+ # },
1914
+ # component_statuses: [ # required
1915
+ # {
1916
+ # bytes_received: 1,
1917
+ # bytes_sent: 1,
1918
+ # capability_arn: "CapabilityArn", # required
1919
+ # component_type: "LAMINAR_FLOW", # required, accepts LAMINAR_FLOW, PRISM, DIGITIZER
1920
+ # dataflow_id: "Uuid", # required
1921
+ # packets_dropped: 1,
1922
+ # status: "SUCCESS", # required, accepts SUCCESS, FAILED, ACTIVE, INACTIVE
1923
+ # },
1924
+ # ],
1925
+ # task_id: "Uuid", # required
1926
+ # })
1927
+ #
1928
+ # @example Response structure
1929
+ #
1930
+ # resp.agent_id #=> String
1931
+ #
1932
+ # @see http://docs.aws.amazon.com/goto/WebAPI/groundstation-2019-05-23/UpdateAgentStatus AWS API Documentation
1933
+ #
1934
+ # @overload update_agent_status(params = {})
1935
+ # @param [Hash] params ({})
1936
+ def update_agent_status(params = {}, options = {})
1937
+ req = build_request(:update_agent_status, params)
1938
+ req.send_request(options)
1939
+ end
1940
+
1720
1941
  # Updates the `Config` used when scheduling contacts.
1721
1942
  #
1722
1943
  # Updating a `Config` will not update the execution parameters for
@@ -1903,6 +2124,12 @@ module Aws::GroundStation
1903
2124
  # @option params [String] :name
1904
2125
  # Name of a mission profile.
1905
2126
  #
2127
+ # @option params [Types::KmsKey] :streams_kms_key
2128
+ # KMS key to use for encrypting streams.
2129
+ #
2130
+ # @option params [String] :streams_kms_role
2131
+ # Role to use for encrypting streams with KMS key.
2132
+ #
1906
2133
  # @option params [String] :tracking_config_arn
1907
2134
  # ARN of a tracking `Config`.
1908
2135
  #
@@ -1921,6 +2148,11 @@ module Aws::GroundStation
1921
2148
  # minimum_viable_contact_duration_seconds: 1,
1922
2149
  # mission_profile_id: "Uuid", # required
1923
2150
  # name: "SafeName",
2151
+ # streams_kms_key: {
2152
+ # kms_alias_arn: "KeyAliasArn",
2153
+ # kms_key_arn: "KeyArn",
2154
+ # },
2155
+ # streams_kms_role: "RoleArn",
1924
2156
  # tracking_config_arn: "ConfigArn",
1925
2157
  # })
1926
2158
  #
@@ -1950,14 +2182,127 @@ module Aws::GroundStation
1950
2182
  params: params,
1951
2183
  config: config)
1952
2184
  context[:gem_name] = 'aws-sdk-groundstation'
1953
- context[:gem_version] = '1.30.0'
2185
+ context[:gem_version] = '1.32.0'
1954
2186
  Seahorse::Client::Request.new(handlers, context)
1955
2187
  end
1956
2188
 
2189
+ # Polls an API operation until a resource enters a desired state.
2190
+ #
2191
+ # ## Basic Usage
2192
+ #
2193
+ # A waiter will call an API operation until:
2194
+ #
2195
+ # * It is successful
2196
+ # * It enters a terminal state
2197
+ # * It makes the maximum number of attempts
2198
+ #
2199
+ # In between attempts, the waiter will sleep.
2200
+ #
2201
+ # # polls in a loop, sleeping between attempts
2202
+ # client.wait_until(waiter_name, params)
2203
+ #
2204
+ # ## Configuration
2205
+ #
2206
+ # You can configure the maximum number of polling attempts, and the
2207
+ # delay (in seconds) between each polling attempt. You can pass
2208
+ # configuration as the final arguments hash.
2209
+ #
2210
+ # # poll for ~25 seconds
2211
+ # client.wait_until(waiter_name, params, {
2212
+ # max_attempts: 5,
2213
+ # delay: 5,
2214
+ # })
2215
+ #
2216
+ # ## Callbacks
2217
+ #
2218
+ # You can be notified before each polling attempt and before each
2219
+ # delay. If you throw `:success` or `:failure` from these callbacks,
2220
+ # it will terminate the waiter.
2221
+ #
2222
+ # started_at = Time.now
2223
+ # client.wait_until(waiter_name, params, {
2224
+ #
2225
+ # # disable max attempts
2226
+ # max_attempts: nil,
2227
+ #
2228
+ # # poll for 1 hour, instead of a number of attempts
2229
+ # before_wait: -> (attempts, response) do
2230
+ # throw :failure if Time.now - started_at > 3600
2231
+ # end
2232
+ # })
2233
+ #
2234
+ # ## Handling Errors
2235
+ #
2236
+ # When a waiter is unsuccessful, it will raise an error.
2237
+ # All of the failure errors extend from
2238
+ # {Aws::Waiters::Errors::WaiterFailed}.
2239
+ #
2240
+ # begin
2241
+ # client.wait_until(...)
2242
+ # rescue Aws::Waiters::Errors::WaiterFailed
2243
+ # # resource did not enter the desired state in time
2244
+ # end
2245
+ #
2246
+ # ## Valid Waiters
2247
+ #
2248
+ # The following table lists the valid waiter names, the operations they call,
2249
+ # and the default `:delay` and `:max_attempts` values.
2250
+ #
2251
+ # | waiter_name | params | :delay | :max_attempts |
2252
+ # | ----------------- | ------------------------- | -------- | ------------- |
2253
+ # | contact_scheduled | {Client#describe_contact} | 5 | 180 |
2254
+ #
2255
+ # @raise [Errors::FailureStateError] Raised when the waiter terminates
2256
+ # because the waiter has entered a state that it will not transition
2257
+ # out of, preventing success.
2258
+ #
2259
+ # @raise [Errors::TooManyAttemptsError] Raised when the configured
2260
+ # maximum number of attempts have been made, and the waiter is not
2261
+ # yet successful.
2262
+ #
2263
+ # @raise [Errors::UnexpectedError] Raised when an error is encounted
2264
+ # while polling for a resource that is not expected.
2265
+ #
2266
+ # @raise [Errors::NoSuchWaiterError] Raised when you request to wait
2267
+ # for an unknown state.
2268
+ #
2269
+ # @return [Boolean] Returns `true` if the waiter was successful.
2270
+ # @param [Symbol] waiter_name
2271
+ # @param [Hash] params ({})
2272
+ # @param [Hash] options ({})
2273
+ # @option options [Integer] :max_attempts
2274
+ # @option options [Integer] :delay
2275
+ # @option options [Proc] :before_attempt
2276
+ # @option options [Proc] :before_wait
2277
+ def wait_until(waiter_name, params = {}, options = {})
2278
+ w = waiter(waiter_name, options)
2279
+ yield(w.waiter) if block_given? # deprecated
2280
+ w.wait(params)
2281
+ end
2282
+
1957
2283
  # @api private
1958
2284
  # @deprecated
1959
2285
  def waiter_names
1960
- []
2286
+ waiters.keys
2287
+ end
2288
+
2289
+ private
2290
+
2291
+ # @param [Symbol] waiter_name
2292
+ # @param [Hash] options ({})
2293
+ def waiter(waiter_name, options = {})
2294
+ waiter_class = waiters[waiter_name]
2295
+ if waiter_class
2296
+ waiter_class.new(options.merge(client: self))
2297
+ else
2298
+ raise Aws::Waiters::Errors::NoSuchWaiterError.new(waiter_name, waiters.keys)
2299
+ end
2300
+ end
2301
+
2302
+ def waiters
2303
+ {
2304
+ contact_scheduled: Waiters::ContactScheduled
2305
+ }
1961
2306
  end
1962
2307
 
1963
2308
  class << self