aws-sdk-ecs 1.92.0 → 1.131.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -38,6 +38,7 @@ module Aws::ECS
38
38
  # * {InvalidParameterException}
39
39
  # * {LimitExceededException}
40
40
  # * {MissingVersionException}
41
+ # * {NamespaceNotFoundException}
41
42
  # * {NoUpdateAvailableException}
42
43
  # * {PlatformTaskDefinitionIncompatibilityException}
43
44
  # * {PlatformUnknownException}
@@ -173,6 +174,16 @@ module Aws::ECS
173
174
  end
174
175
  end
175
176
 
177
+ class NamespaceNotFoundException < ServiceError
178
+
179
+ # @param [Seahorse::Client::RequestContext] context
180
+ # @param [String] message
181
+ # @param [Aws::ECS::Types::NamespaceNotFoundException] data
182
+ def initialize(context, message, data = Aws::EmptyStructure.new)
183
+ super(context, message, data)
184
+ end
185
+ end
186
+
176
187
  class NoUpdateAvailableException < ServiceError
177
188
 
178
189
  # @param [Seahorse::Client::RequestContext] context
@@ -0,0 +1,180 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+
11
+ module Aws::ECS
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::ECS::EndpointProvider',
17
+ docstring: 'The endpoint provider used to resolve endpoints. Any '\
18
+ 'object that responds to `#resolve_endpoint(parameters)` '\
19
+ 'where `parameters` is a Struct similar to '\
20
+ '`Aws::ECS::EndpointParameters`'
21
+ ) do |cfg|
22
+ Aws::ECS::EndpointProvider.new
23
+ end
24
+
25
+ # @api private
26
+ class Handler < Seahorse::Client::Handler
27
+ def call(context)
28
+ # If endpoint was discovered, do not resolve or apply the endpoint.
29
+ unless context[:discovered_endpoint]
30
+ params = parameters_for_operation(context)
31
+ endpoint = context.config.endpoint_provider.resolve_endpoint(params)
32
+
33
+ context.http_request.endpoint = endpoint.url
34
+ apply_endpoint_headers(context, endpoint.headers)
35
+ end
36
+
37
+ context[:endpoint_params] = params
38
+ context[:auth_scheme] =
39
+ Aws::Endpoints.resolve_auth_scheme(context, endpoint)
40
+
41
+ @handler.call(context)
42
+ end
43
+
44
+ private
45
+
46
+ def apply_endpoint_headers(context, headers)
47
+ headers.each do |key, values|
48
+ value = values
49
+ .compact
50
+ .map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
51
+ .join(',')
52
+
53
+ context.http_request.headers[key] = value
54
+ end
55
+ end
56
+
57
+ def parameters_for_operation(context)
58
+ case context.operation_name
59
+ when :create_capacity_provider
60
+ Aws::ECS::Endpoints::CreateCapacityProvider.build(context)
61
+ when :create_cluster
62
+ Aws::ECS::Endpoints::CreateCluster.build(context)
63
+ when :create_service
64
+ Aws::ECS::Endpoints::CreateService.build(context)
65
+ when :create_task_set
66
+ Aws::ECS::Endpoints::CreateTaskSet.build(context)
67
+ when :delete_account_setting
68
+ Aws::ECS::Endpoints::DeleteAccountSetting.build(context)
69
+ when :delete_attributes
70
+ Aws::ECS::Endpoints::DeleteAttributes.build(context)
71
+ when :delete_capacity_provider
72
+ Aws::ECS::Endpoints::DeleteCapacityProvider.build(context)
73
+ when :delete_cluster
74
+ Aws::ECS::Endpoints::DeleteCluster.build(context)
75
+ when :delete_service
76
+ Aws::ECS::Endpoints::DeleteService.build(context)
77
+ when :delete_task_definitions
78
+ Aws::ECS::Endpoints::DeleteTaskDefinitions.build(context)
79
+ when :delete_task_set
80
+ Aws::ECS::Endpoints::DeleteTaskSet.build(context)
81
+ when :deregister_container_instance
82
+ Aws::ECS::Endpoints::DeregisterContainerInstance.build(context)
83
+ when :deregister_task_definition
84
+ Aws::ECS::Endpoints::DeregisterTaskDefinition.build(context)
85
+ when :describe_capacity_providers
86
+ Aws::ECS::Endpoints::DescribeCapacityProviders.build(context)
87
+ when :describe_clusters
88
+ Aws::ECS::Endpoints::DescribeClusters.build(context)
89
+ when :describe_container_instances
90
+ Aws::ECS::Endpoints::DescribeContainerInstances.build(context)
91
+ when :describe_services
92
+ Aws::ECS::Endpoints::DescribeServices.build(context)
93
+ when :describe_task_definition
94
+ Aws::ECS::Endpoints::DescribeTaskDefinition.build(context)
95
+ when :describe_task_sets
96
+ Aws::ECS::Endpoints::DescribeTaskSets.build(context)
97
+ when :describe_tasks
98
+ Aws::ECS::Endpoints::DescribeTasks.build(context)
99
+ when :discover_poll_endpoint
100
+ Aws::ECS::Endpoints::DiscoverPollEndpoint.build(context)
101
+ when :execute_command
102
+ Aws::ECS::Endpoints::ExecuteCommand.build(context)
103
+ when :get_task_protection
104
+ Aws::ECS::Endpoints::GetTaskProtection.build(context)
105
+ when :list_account_settings
106
+ Aws::ECS::Endpoints::ListAccountSettings.build(context)
107
+ when :list_attributes
108
+ Aws::ECS::Endpoints::ListAttributes.build(context)
109
+ when :list_clusters
110
+ Aws::ECS::Endpoints::ListClusters.build(context)
111
+ when :list_container_instances
112
+ Aws::ECS::Endpoints::ListContainerInstances.build(context)
113
+ when :list_services
114
+ Aws::ECS::Endpoints::ListServices.build(context)
115
+ when :list_services_by_namespace
116
+ Aws::ECS::Endpoints::ListServicesByNamespace.build(context)
117
+ when :list_tags_for_resource
118
+ Aws::ECS::Endpoints::ListTagsForResource.build(context)
119
+ when :list_task_definition_families
120
+ Aws::ECS::Endpoints::ListTaskDefinitionFamilies.build(context)
121
+ when :list_task_definitions
122
+ Aws::ECS::Endpoints::ListTaskDefinitions.build(context)
123
+ when :list_tasks
124
+ Aws::ECS::Endpoints::ListTasks.build(context)
125
+ when :put_account_setting
126
+ Aws::ECS::Endpoints::PutAccountSetting.build(context)
127
+ when :put_account_setting_default
128
+ Aws::ECS::Endpoints::PutAccountSettingDefault.build(context)
129
+ when :put_attributes
130
+ Aws::ECS::Endpoints::PutAttributes.build(context)
131
+ when :put_cluster_capacity_providers
132
+ Aws::ECS::Endpoints::PutClusterCapacityProviders.build(context)
133
+ when :register_container_instance
134
+ Aws::ECS::Endpoints::RegisterContainerInstance.build(context)
135
+ when :register_task_definition
136
+ Aws::ECS::Endpoints::RegisterTaskDefinition.build(context)
137
+ when :run_task
138
+ Aws::ECS::Endpoints::RunTask.build(context)
139
+ when :start_task
140
+ Aws::ECS::Endpoints::StartTask.build(context)
141
+ when :stop_task
142
+ Aws::ECS::Endpoints::StopTask.build(context)
143
+ when :submit_attachment_state_changes
144
+ Aws::ECS::Endpoints::SubmitAttachmentStateChanges.build(context)
145
+ when :submit_container_state_change
146
+ Aws::ECS::Endpoints::SubmitContainerStateChange.build(context)
147
+ when :submit_task_state_change
148
+ Aws::ECS::Endpoints::SubmitTaskStateChange.build(context)
149
+ when :tag_resource
150
+ Aws::ECS::Endpoints::TagResource.build(context)
151
+ when :untag_resource
152
+ Aws::ECS::Endpoints::UntagResource.build(context)
153
+ when :update_capacity_provider
154
+ Aws::ECS::Endpoints::UpdateCapacityProvider.build(context)
155
+ when :update_cluster
156
+ Aws::ECS::Endpoints::UpdateCluster.build(context)
157
+ when :update_cluster_settings
158
+ Aws::ECS::Endpoints::UpdateClusterSettings.build(context)
159
+ when :update_container_agent
160
+ Aws::ECS::Endpoints::UpdateContainerAgent.build(context)
161
+ when :update_container_instances_state
162
+ Aws::ECS::Endpoints::UpdateContainerInstancesState.build(context)
163
+ when :update_service
164
+ Aws::ECS::Endpoints::UpdateService.build(context)
165
+ when :update_service_primary_task_set
166
+ Aws::ECS::Endpoints::UpdateServicePrimaryTaskSet.build(context)
167
+ when :update_task_protection
168
+ Aws::ECS::Endpoints::UpdateTaskProtection.build(context)
169
+ when :update_task_set
170
+ Aws::ECS::Endpoints::UpdateTaskSet.build(context)
171
+ end
172
+ end
173
+ end
174
+
175
+ def add_handlers(handlers, _config)
176
+ handlers.add(Handler, step: :build, priority: 75)
177
+ end
178
+ end
179
+ end
180
+ end