aws-sdk-sagemaker 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8f0564c7675ae297473f59bd72e0f9bb2978e984
4
+ data.tar.gz: 14448b9c8a2ec9fd66186ac8e26732eac7935bb7
5
+ SHA512:
6
+ metadata.gz: ad400d24531bf38d4f23293535811377bf9fd7f6e1ec7b1dcb94161fa2ad6ba6b00d92af99448ee1c4090a3be8d58cb288811610cb92e48f0faf76b060ee29a1
7
+ data.tar.gz: 16485545a89acf71adb536ff1aba4e00f635ef657619b6fbbaaebbf79ac82817d490a5dd8249bbd66823bba8afc966d0cb624013d7551bd46bcbf8f1eabfdd4c
@@ -0,0 +1,48 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'aws-sdk-core'
9
+ require 'aws-sigv4'
10
+
11
+ require_relative 'aws-sdk-sagemaker/types'
12
+ require_relative 'aws-sdk-sagemaker/client_api'
13
+ require_relative 'aws-sdk-sagemaker/client'
14
+ require_relative 'aws-sdk-sagemaker/errors'
15
+ require_relative 'aws-sdk-sagemaker/waiters'
16
+ require_relative 'aws-sdk-sagemaker/resource'
17
+ require_relative 'aws-sdk-sagemaker/customizations'
18
+
19
+ # This module provides support for Amazon SageMaker Service. This module is available in the
20
+ # `aws-sdk-sagemaker` gem.
21
+ #
22
+ # # Client
23
+ #
24
+ # The {Client} class provides one method for each API operation. Operation
25
+ # methods each accept a hash of request parameters and return a response
26
+ # structure.
27
+ #
28
+ # See {Client} for more information.
29
+ #
30
+ # # Errors
31
+ #
32
+ # Errors returned from Amazon SageMaker Service all
33
+ # extend {Errors::ServiceError}.
34
+ #
35
+ # begin
36
+ # # do stuff
37
+ # rescue Aws::SageMaker::Errors::ServiceError
38
+ # # rescues all service API errors
39
+ # end
40
+ #
41
+ # See {Errors} for more information.
42
+ #
43
+ # @service
44
+ module Aws::SageMaker
45
+
46
+ GEM_VERSION = '1.0.0'
47
+
48
+ end
@@ -0,0 +1,2030 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'seahorse/client/plugins/content_length.rb'
9
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
10
+ require 'aws-sdk-core/plugins/logging.rb'
11
+ require 'aws-sdk-core/plugins/param_converter.rb'
12
+ require 'aws-sdk-core/plugins/param_validator.rb'
13
+ require 'aws-sdk-core/plugins/user_agent.rb'
14
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
15
+ require 'aws-sdk-core/plugins/retry_errors.rb'
16
+ require 'aws-sdk-core/plugins/global_configuration.rb'
17
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
18
+ require 'aws-sdk-core/plugins/response_paging.rb'
19
+ require 'aws-sdk-core/plugins/stub_responses.rb'
20
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
21
+ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
22
+ require 'aws-sdk-core/plugins/signature_v4.rb'
23
+ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
24
+
25
+ Aws::Plugins::GlobalConfiguration.add_identifier(:sagemaker)
26
+
27
+ module Aws::SageMaker
28
+ class Client < Seahorse::Client::Base
29
+
30
+ include Aws::ClientStubs
31
+
32
+ @identifier = :sagemaker
33
+
34
+ set_api(ClientApi::API)
35
+
36
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
37
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
38
+ add_plugin(Aws::Plugins::Logging)
39
+ add_plugin(Aws::Plugins::ParamConverter)
40
+ add_plugin(Aws::Plugins::ParamValidator)
41
+ add_plugin(Aws::Plugins::UserAgent)
42
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
43
+ add_plugin(Aws::Plugins::RetryErrors)
44
+ add_plugin(Aws::Plugins::GlobalConfiguration)
45
+ add_plugin(Aws::Plugins::RegionalEndpoint)
46
+ add_plugin(Aws::Plugins::ResponsePaging)
47
+ add_plugin(Aws::Plugins::StubResponses)
48
+ add_plugin(Aws::Plugins::IdempotencyToken)
49
+ add_plugin(Aws::Plugins::JsonvalueConverter)
50
+ add_plugin(Aws::Plugins::SignatureV4)
51
+ add_plugin(Aws::Plugins::Protocols::JsonRpc)
52
+
53
+ # @option options [required, Aws::CredentialProvider] :credentials
54
+ # Your AWS credentials. This can be an instance of any one of the
55
+ # following classes:
56
+ #
57
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
58
+ # credentials.
59
+ #
60
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
61
+ # from an EC2 IMDS on an EC2 instance.
62
+ #
63
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
64
+ # shared file, such as `~/.aws/config`.
65
+ #
66
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
67
+ #
68
+ # When `:credentials` are not configured directly, the following
69
+ # locations will be searched for credentials:
70
+ #
71
+ # * `Aws.config[:credentials]`
72
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
73
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
74
+ # * `~/.aws/credentials`
75
+ # * `~/.aws/config`
76
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
77
+ # very aggressive. Construct and pass an instance of
78
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
79
+ # timeouts.
80
+ #
81
+ # @option options [required, String] :region
82
+ # The AWS region to connect to. The configured `:region` is
83
+ # used to determine the service `:endpoint`. When not passed,
84
+ # a default `:region` is search for in the following locations:
85
+ #
86
+ # * `Aws.config[:region]`
87
+ # * `ENV['AWS_REGION']`
88
+ # * `ENV['AMAZON_REGION']`
89
+ # * `ENV['AWS_DEFAULT_REGION']`
90
+ # * `~/.aws/credentials`
91
+ # * `~/.aws/config`
92
+ #
93
+ # @option options [String] :access_key_id
94
+ #
95
+ # @option options [Boolean] :convert_params (true)
96
+ # When `true`, an attempt is made to coerce request parameters into
97
+ # the required types.
98
+ #
99
+ # @option options [String] :endpoint
100
+ # The client endpoint is normally constructed from the `:region`
101
+ # option. You should only configure an `:endpoint` when connecting
102
+ # to test endpoints. This should be avalid HTTP(S) URI.
103
+ #
104
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
105
+ # The log formatter.
106
+ #
107
+ # @option options [Symbol] :log_level (:info)
108
+ # The log level to send messages to the `:logger` at.
109
+ #
110
+ # @option options [Logger] :logger
111
+ # The Logger instance to send log messages to. If this option
112
+ # is not set, logging will be disabled.
113
+ #
114
+ # @option options [String] :profile ("default")
115
+ # Used when loading credentials from the shared credentials file
116
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
117
+ #
118
+ # @option options [Integer] :retry_limit (3)
119
+ # The maximum number of times to retry failed requests. Only
120
+ # ~ 500 level server errors and certain ~ 400 level client errors
121
+ # are retried. Generally, these are throttling errors, data
122
+ # checksum errors, networking errors, timeout errors and auth
123
+ # errors from expired credentials.
124
+ #
125
+ # @option options [String] :secret_access_key
126
+ #
127
+ # @option options [String] :session_token
128
+ #
129
+ # @option options [Boolean] :simple_json (false)
130
+ # Disables request parameter conversion, validation, and formatting.
131
+ # Also disable response data type conversions. This option is useful
132
+ # when you want to ensure the highest level of performance by
133
+ # avoiding overhead of walking request parameters and response data
134
+ # structures.
135
+ #
136
+ # When `:simple_json` is enabled, the request parameters hash must
137
+ # be formatted exactly as the DynamoDB API expects.
138
+ #
139
+ # @option options [Boolean] :stub_responses (false)
140
+ # Causes the client to return stubbed responses. By default
141
+ # fake responses are generated and returned. You can specify
142
+ # the response data to return or errors to raise by calling
143
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
144
+ #
145
+ # ** Please note ** When response stubbing is enabled, no HTTP
146
+ # requests are made, and retries are disabled.
147
+ #
148
+ # @option options [Boolean] :validate_params (true)
149
+ # When `true`, request parameters are validated before
150
+ # sending the request.
151
+ #
152
+ def initialize(*args)
153
+ super
154
+ end
155
+
156
+ # @!group API Operations
157
+
158
+ # Adds or overwrites one or more tags for the specified Amazon SageMaker
159
+ # resource. You can add tags to notebook instances, training jobs,
160
+ # models, endpoint configurations, and endpoints.
161
+ #
162
+ # Each tag consists of a key and an optional value. Tag keys must be
163
+ # unique per resource. For more information about tags, see [Using Cost
164
+ # Allocation Tags][1] in the *AWS Billing and Cost Management User
165
+ # Guide*.
166
+ #
167
+ #
168
+ #
169
+ # [1]: http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-what
170
+ #
171
+ # @option params [required, String] :resource_arn
172
+ # The Amazon Resource Name (ARN) of the resource that you want to tag.
173
+ #
174
+ # @option params [required, Array<Types::Tag>] :tags
175
+ # An array of `Tag` objects. Each tag is a key-value pair. Only the
176
+ # `key` parameter is required. If you don't specify a value, Amazon
177
+ # SageMaker sets the value to an empty string.
178
+ #
179
+ # @return [Types::AddTagsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
180
+ #
181
+ # * {Types::AddTagsOutput#tags #tags} => Array&lt;Types::Tag&gt;
182
+ #
183
+ # @example Request syntax with placeholder values
184
+ #
185
+ # resp = client.add_tags({
186
+ # resource_arn: "ResourceArn", # required
187
+ # tags: [ # required
188
+ # {
189
+ # key: "TagKey", # required
190
+ # value: "TagValue", # required
191
+ # },
192
+ # ],
193
+ # })
194
+ #
195
+ # @example Response structure
196
+ #
197
+ # resp.tags #=> Array
198
+ # resp.tags[0].key #=> String
199
+ # resp.tags[0].value #=> String
200
+ #
201
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/AddTags AWS API Documentation
202
+ #
203
+ # @overload add_tags(params = {})
204
+ # @param [Hash] params ({})
205
+ def add_tags(params = {}, options = {})
206
+ req = build_request(:add_tags, params)
207
+ req.send_request(options)
208
+ end
209
+
210
+ # Creates an endpoint using the endpoint configuration specified in the
211
+ # request. Amazon SageMaker uses the endpoint to provision resources and
212
+ # deploy models. You create the endpoint configuration with the
213
+ # [CreateEndpointConfig][1] API.
214
+ #
215
+ # <note markdown="1"> Use this API only for hosting models using Amazon SageMaker hosting
216
+ # services.
217
+ #
218
+ # </note>
219
+ #
220
+ # The endpoint name must be unique within an AWS Region in your AWS
221
+ # account.
222
+ #
223
+ # When it receives the request, Amazon SageMaker creates the endpoint,
224
+ # launches the resources (ML compute instances), and deploys the
225
+ # model(s) on them.
226
+ #
227
+ # When Amazon SageMaker receives the request, it sets the endpoint
228
+ # status to `Creating`. After it creates the endpoint, it sets the
229
+ # status to `InService`. Amazon SageMaker can then process incoming
230
+ # requests for inferences. To check the status of an endpoint, use the
231
+ # [DescribeEndpoint][2] API.
232
+ #
233
+ # For an example, see [Exercise 1: Using the K-Means Algorithm Provided
234
+ # by Amazon SageMaker][3].
235
+ #
236
+ #
237
+ #
238
+ # [1]: http://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpointConfig.html
239
+ # [2]: http://docs.aws.amazon.com/sagemaker/latest/dg/API_DescribeEndpoint.html
240
+ # [3]: http://docs.aws.amazon.com/sagemaker/latest/dg/ex1.html
241
+ #
242
+ # @option params [required, String] :endpoint_name
243
+ # The name of the endpoint. The name must be unique within an AWS Region
244
+ # in your AWS account.
245
+ #
246
+ # @option params [required, String] :endpoint_config_name
247
+ # The name of an endpoint configuration. For more information, see
248
+ # [CreateEndpointConfig][1].
249
+ #
250
+ #
251
+ #
252
+ # [1]: http://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpointConfig.html
253
+ #
254
+ # @option params [Array<Types::Tag>] :tags
255
+ # An array of key-value pairs. For more information, see [Using Cost
256
+ # Allocation Tags][1]in the *AWS Billing and Cost Management User
257
+ # Guide*.
258
+ #
259
+ #
260
+ #
261
+ # [1]: http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-what
262
+ #
263
+ # @return [Types::CreateEndpointOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
264
+ #
265
+ # * {Types::CreateEndpointOutput#endpoint_arn #endpoint_arn} => String
266
+ #
267
+ # @example Request syntax with placeholder values
268
+ #
269
+ # resp = client.create_endpoint({
270
+ # endpoint_name: "EndpointName", # required
271
+ # endpoint_config_name: "EndpointConfigName", # required
272
+ # tags: [
273
+ # {
274
+ # key: "TagKey", # required
275
+ # value: "TagValue", # required
276
+ # },
277
+ # ],
278
+ # })
279
+ #
280
+ # @example Response structure
281
+ #
282
+ # resp.endpoint_arn #=> String
283
+ #
284
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateEndpoint AWS API Documentation
285
+ #
286
+ # @overload create_endpoint(params = {})
287
+ # @param [Hash] params ({})
288
+ def create_endpoint(params = {}, options = {})
289
+ req = build_request(:create_endpoint, params)
290
+ req.send_request(options)
291
+ end
292
+
293
+ # Creates an endpoint configuration that Amazon SageMaker hosting
294
+ # services uses to deploy models. In the configuration, you identify one
295
+ # or more models, created using the `CreateModel` API, to deploy and the
296
+ # resources that you want Amazon SageMaker to provision. Then you call
297
+ # the [CreateEndpoint][1] API.
298
+ #
299
+ # <note markdown="1"> Use this API only if you want to use Amazon SageMaker hosting services
300
+ # to deploy models into production.
301
+ #
302
+ # </note>
303
+ #
304
+ # In the request, you define one or more `ProductionVariant`s, each of
305
+ # which identifies a model. Each `ProductionVariant` parameter also
306
+ # describes the resources that you want Amazon SageMaker to provision.
307
+ # This includes the number and type of ML compute instances to deploy.
308
+ #
309
+ # If you are hosting multiple models, you also assign a `VariantWeight`
310
+ # to specify how much traffic you want to allocate to each model. For
311
+ # example, suppose that you want to host two models, A and B, and you
312
+ # assign traffic weight 2 for model A and 1 for model B. Amazon
313
+ # SageMaker distributes two-thirds of the traffic to Model A, and
314
+ # one-third to model B.
315
+ #
316
+ #
317
+ #
318
+ # [1]: http://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpoint.html
319
+ #
320
+ # @option params [required, String] :endpoint_config_name
321
+ # The name of the endpoint configuration. You specify this name in a
322
+ # [CreateEndpoint][1] request.
323
+ #
324
+ #
325
+ #
326
+ # [1]: http://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpoint.html
327
+ #
328
+ # @option params [required, Array<Types::ProductionVariant>] :production_variants
329
+ # An array of `ProductionVariant` objects, one for each model that you
330
+ # want to host at this endpoint.
331
+ #
332
+ # @option params [Array<Types::Tag>] :tags
333
+ # An array of key-value pairs. For more information, see [Using Cost
334
+ # Allocation Tags][1] in the *AWS Billing and Cost Management User
335
+ # Guide*.
336
+ #
337
+ #
338
+ #
339
+ # [1]: http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-what
340
+ #
341
+ # @return [Types::CreateEndpointConfigOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
342
+ #
343
+ # * {Types::CreateEndpointConfigOutput#endpoint_config_arn #endpoint_config_arn} => String
344
+ #
345
+ # @example Request syntax with placeholder values
346
+ #
347
+ # resp = client.create_endpoint_config({
348
+ # endpoint_config_name: "EndpointConfigName", # required
349
+ # production_variants: [ # required
350
+ # {
351
+ # variant_name: "VariantName", # required
352
+ # model_name: "ModelName", # required
353
+ # initial_instance_count: 1, # required
354
+ # instance_type: "ml.c4.2xlarge", # required, accepts ml.c4.2xlarge, ml.c4.8xlarge, ml.c4.xlarge, ml.c5.2xlarge, ml.c5.9xlarge, ml.c5.xlarge, ml.m4.xlarge, ml.p2.xlarge, ml.p3.2xlarge, ml.t2.medium
355
+ # initial_variant_weight: 1.0,
356
+ # },
357
+ # ],
358
+ # tags: [
359
+ # {
360
+ # key: "TagKey", # required
361
+ # value: "TagValue", # required
362
+ # },
363
+ # ],
364
+ # })
365
+ #
366
+ # @example Response structure
367
+ #
368
+ # resp.endpoint_config_arn #=> String
369
+ #
370
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateEndpointConfig AWS API Documentation
371
+ #
372
+ # @overload create_endpoint_config(params = {})
373
+ # @param [Hash] params ({})
374
+ def create_endpoint_config(params = {}, options = {})
375
+ req = build_request(:create_endpoint_config, params)
376
+ req.send_request(options)
377
+ end
378
+
379
+ # Creates a model in Amazon SageMaker. In the request, you name the
380
+ # model and describe one or more containers. For each container, you
381
+ # specify the docker image containing inference code, artifacts (from
382
+ # prior training), and custom environment map that the inference code
383
+ # uses when you deploy the model into production.
384
+ #
385
+ # Use this API to create a model only if you want to use Amazon
386
+ # SageMaker hosting services. To host your model, you create an endpoint
387
+ # configuration with the `CreateEndpointConfig` API, and then create an
388
+ # endpoint with the `CreateEndpoint` API.
389
+ #
390
+ # Amazon SageMaker then deploys all of the containers that you defined
391
+ # for the model in the hosting environment.
392
+ #
393
+ # In the `CreateModel` request, you must define at least one container
394
+ # with the `PrimaryContainer` parameter. You can optionally specify
395
+ # additional containers with the `SupplementalContainers` parameter.
396
+ #
397
+ # In the request, you also provide an IAM role that Amazon SageMaker can
398
+ # assume to access model artifacts and docker image for deployment on ML
399
+ # compute hosting instances. In addition, you also use the IAM role to
400
+ # manage permissions the inference code needs. For example, if the
401
+ # inference code access any other AWS resources, you grant necessary
402
+ # permissions via this role.
403
+ #
404
+ # @option params [required, String] :model_name
405
+ # The name of the new model.
406
+ #
407
+ # @option params [required, Types::ContainerDefinition] :primary_container
408
+ # The location of the primary docker image containing inference code,
409
+ # associated artifacts, and custom environment map that the inference
410
+ # code uses when the model is deployed into production.
411
+ #
412
+ # @option params [Array<Types::ContainerDefinition>] :supplemental_containers
413
+ # The additional optional containers to deploy.
414
+ #
415
+ # @option params [String] :execution_role_arn
416
+ # The Amazon Resource Name (ARN) of the IAM role that Amazon SageMaker
417
+ # can assume to access model artifacts and docker image for deployment
418
+ # on ML compute instances. Deploying on ML compute instances is part of
419
+ # model hosting. For more information, see [Amazon SageMaker Roles][1].
420
+ #
421
+ #
422
+ #
423
+ # [1]: http://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html
424
+ #
425
+ # @option params [Array<Types::Tag>] :tags
426
+ # An array of key-value pairs. For more information, see [Using Cost
427
+ # Allocation Tags][1] in the *AWS Billing and Cost Management User
428
+ # Guide*.
429
+ #
430
+ #
431
+ #
432
+ # [1]: http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-what
433
+ #
434
+ # @return [Types::CreateModelOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
435
+ #
436
+ # * {Types::CreateModelOutput#model_arn #model_arn} => String
437
+ #
438
+ # @example Request syntax with placeholder values
439
+ #
440
+ # resp = client.create_model({
441
+ # model_name: "ModelName", # required
442
+ # primary_container: { # required
443
+ # container_hostname: "ContainerHostname",
444
+ # image: "Image", # required
445
+ # model_data_url: "Url",
446
+ # environment: {
447
+ # "EnvironmentKey" => "EnvironmentValue",
448
+ # },
449
+ # },
450
+ # supplemental_containers: [
451
+ # {
452
+ # container_hostname: "ContainerHostname",
453
+ # image: "Image", # required
454
+ # model_data_url: "Url",
455
+ # environment: {
456
+ # "EnvironmentKey" => "EnvironmentValue",
457
+ # },
458
+ # },
459
+ # ],
460
+ # execution_role_arn: "RoleArn",
461
+ # tags: [
462
+ # {
463
+ # key: "TagKey", # required
464
+ # value: "TagValue", # required
465
+ # },
466
+ # ],
467
+ # })
468
+ #
469
+ # @example Response structure
470
+ #
471
+ # resp.model_arn #=> String
472
+ #
473
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateModel AWS API Documentation
474
+ #
475
+ # @overload create_model(params = {})
476
+ # @param [Hash] params ({})
477
+ def create_model(params = {}, options = {})
478
+ req = build_request(:create_model, params)
479
+ req.send_request(options)
480
+ end
481
+
482
+ # Creates an Amazon SageMaker notebook instance. A notebook instance is
483
+ # an ML compute instance running on a Jupyter notebook.
484
+ #
485
+ # In a `CreateNotebookInstance` request, you specify the type of ML
486
+ # compute instance that you want to run. Amazon SageMaker launches the
487
+ # instance, installs common libraries that you can use to explore
488
+ # datasets for model training, and attaches an ML storage volume to the
489
+ # notebook instance.
490
+ #
491
+ # Amazon SageMaker also provides a set of example notebooks. Each
492
+ # notebook demonstrates how to use Amazon SageMaker with a specific an
493
+ # algorithm or with a machine learning framework.
494
+ #
495
+ # After receiving the request, Amazon SageMaker does the following:
496
+ #
497
+ # 1. Creates a network interface in the Amazon SageMaker VPC.
498
+ #
499
+ # 2. (Option) If you specified `SubnetId`, creates a network interface
500
+ # in your own VPC, which is inferred from the subnet ID that you
501
+ # provide in the input. When creating this network interface, Amazon
502
+ # SageMaker attaches the security group that you specified in the
503
+ # request to the network interface that it creates in your VPC.
504
+ #
505
+ # 3. Launches an EC2 instance of the type specified in the request in
506
+ # the Amazon SageMaker VPC. If you specified `SubnetId` of your VPC,
507
+ # Amazon SageMaker specifies both network interfaces when launching
508
+ # this instance. This enables inbound traffic from your own VPC to
509
+ # the notebook instance, assuming that the security groups allow it.
510
+ #
511
+ # After creating the notebook instance, Amazon SageMaker returns its
512
+ # Amazon Resource Name (ARN).
513
+ #
514
+ # After Amazon SageMaker creates the notebook instance, you can connect
515
+ # to the Jupyter server and work in Jupyter notebooks. For example, you
516
+ # can write code to explore a dataset that you can use for model
517
+ # training, train a model, host models by creating Amazon SageMaker
518
+ # endpoints, and validate hosted models.
519
+ #
520
+ # For more information, see [How It Works][1].
521
+ #
522
+ #
523
+ #
524
+ # [1]: http://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works.html
525
+ #
526
+ # @option params [required, String] :notebook_instance_name
527
+ # The name of the new notebook instance.
528
+ #
529
+ # @option params [required, String] :instance_type
530
+ # The type of ML compute instance to launch for the notebook instance.
531
+ #
532
+ # @option params [String] :subnet_id
533
+ # The ID of the subnet in a VPC to which you would like to have a
534
+ # connectivity from your ML compute instance.
535
+ #
536
+ # @option params [Array<String>] :security_group_ids
537
+ # The VPC security group IDs, in the form sg-xxxxxxxx. The security
538
+ # groups must be for the same VPC as specified in the subnet.
539
+ #
540
+ # @option params [required, String] :role_arn
541
+ # When you send any requests to AWS resources from the notebook
542
+ # instance, Amazon SageMaker assumes this role to perform tasks on your
543
+ # behalf. You must grant this role necessary permissions so Amazon
544
+ # SageMaker can perform these tasks. The policy must allow the Amazon
545
+ # SageMaker service principal (sagemaker.amazonaws.com) permissions to
546
+ # assume this role. For more information, see [Amazon SageMaker
547
+ # Roles][1].
548
+ #
549
+ #
550
+ #
551
+ # [1]: http://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html
552
+ #
553
+ # @option params [String] :kms_key_id
554
+ # If you provide a AWS KMS key ID, Amazon SageMaker uses it to encrypt
555
+ # data at rest on the ML storage volume that is attached to your
556
+ # notebook instance.
557
+ #
558
+ # @option params [Array<Types::Tag>] :tags
559
+ # A list of tags to associate with the notebook instance. You can add
560
+ # tags later by using the `CreateTags` API.
561
+ #
562
+ # @return [Types::CreateNotebookInstanceOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
563
+ #
564
+ # * {Types::CreateNotebookInstanceOutput#notebook_instance_arn #notebook_instance_arn} => String
565
+ #
566
+ # @example Request syntax with placeholder values
567
+ #
568
+ # resp = client.create_notebook_instance({
569
+ # notebook_instance_name: "NotebookInstanceName", # required
570
+ # instance_type: "ml.t2.medium", # required, accepts ml.t2.medium, ml.m4.xlarge, ml.p2.xlarge
571
+ # subnet_id: "SubnetId",
572
+ # security_group_ids: ["SecurityGroupId"],
573
+ # role_arn: "RoleArn", # required
574
+ # kms_key_id: "KmsKeyId",
575
+ # tags: [
576
+ # {
577
+ # key: "TagKey", # required
578
+ # value: "TagValue", # required
579
+ # },
580
+ # ],
581
+ # })
582
+ #
583
+ # @example Response structure
584
+ #
585
+ # resp.notebook_instance_arn #=> String
586
+ #
587
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateNotebookInstance AWS API Documentation
588
+ #
589
+ # @overload create_notebook_instance(params = {})
590
+ # @param [Hash] params ({})
591
+ def create_notebook_instance(params = {}, options = {})
592
+ req = build_request(:create_notebook_instance, params)
593
+ req.send_request(options)
594
+ end
595
+
596
+ # Returns a URL that you can use to connect to the Juypter server from a
597
+ # notebook instance. In the Amazon SageMaker console, when you choose
598
+ # `Open` next to a notebook instance, Amazon SageMaker opens a new tab
599
+ # showing the Jupyter server home page from the notebook instance. The
600
+ # console uses this API to get the URL and show the page.
601
+ #
602
+ # @option params [required, String] :notebook_instance_name
603
+ # The name of the notebook instance.
604
+ #
605
+ # @option params [Integer] :session_expiration_duration_in_seconds
606
+ # The duration of the session, in seconds. The default is 12 hours.
607
+ #
608
+ # @return [Types::CreatePresignedNotebookInstanceUrlOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
609
+ #
610
+ # * {Types::CreatePresignedNotebookInstanceUrlOutput#authorized_url #authorized_url} => String
611
+ #
612
+ # @example Request syntax with placeholder values
613
+ #
614
+ # resp = client.create_presigned_notebook_instance_url({
615
+ # notebook_instance_name: "NotebookInstanceName", # required
616
+ # session_expiration_duration_in_seconds: 1,
617
+ # })
618
+ #
619
+ # @example Response structure
620
+ #
621
+ # resp.authorized_url #=> String
622
+ #
623
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreatePresignedNotebookInstanceUrl AWS API Documentation
624
+ #
625
+ # @overload create_presigned_notebook_instance_url(params = {})
626
+ # @param [Hash] params ({})
627
+ def create_presigned_notebook_instance_url(params = {}, options = {})
628
+ req = build_request(:create_presigned_notebook_instance_url, params)
629
+ req.send_request(options)
630
+ end
631
+
632
+ # Starts a model training job. After training completes, Amazon
633
+ # SageMaker saves the resulting model artifacts to an Amazon S3 location
634
+ # that you specify.
635
+ #
636
+ # If you choose to host your model using Amazon SageMaker hosting
637
+ # services, you can use the resulting model artifacts as part of the
638
+ # model. You can also use the artifacts in a deep learning service other
639
+ # than Amazon SageMaker, provided that you know how to use them for
640
+ # inferences.
641
+ #
642
+ # In the request body, you provide the following:
643
+ #
644
+ # * `AlgorithmSpecification` - Identifies the training algorithm to use.
645
+ #
646
+ # * `HyperParameters` - Specify these algorithm-specific parameters to
647
+ # influence the quality of the final model. For a list of
648
+ # hyperparameters for each training algorithm provided by Amazon
649
+ # SageMaker, see [Algorithms][1].
650
+ #
651
+ # * `InputDataConfig` - Describes the training dataset and the Amazon S3
652
+ # location where it is stored.
653
+ #
654
+ # * `OutputDataConfig` - Identifies the Amazon S3 location where you
655
+ # want Amazon SageMaker to save the results of model training.
656
+ #
657
+ #
658
+ #
659
+ # * `ResourceConfig` - Identifies the resources, ML compute instances,
660
+ # and ML storage volumes to deploy for model training. In distributed
661
+ # training, you specify more than one instance.
662
+ #
663
+ # * `RoleARN` - The Amazon Resource Number (ARN) that Amazon SageMaker
664
+ # assumes to perform tasks on your behalf during model training. You
665
+ # must grant this role the necessary permissions so that Amazon
666
+ # SageMaker can successfully complete model training.
667
+ #
668
+ # * `StoppingCondition` - Sets a duration for training. Use this
669
+ # parameter to cap model training costs.
670
+ #
671
+ # For more information about Amazon SageMaker, see [How It Works][2].
672
+ #
673
+ #
674
+ #
675
+ # [1]: http://docs.aws.amazon.com/sagemaker/latest/dg/algos.html
676
+ # [2]: http://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works.html
677
+ #
678
+ # @option params [required, String] :training_job_name
679
+ # The name of the training job. The name must be unique within an AWS
680
+ # Region in an AWS account. It appears in the Amazon SageMaker console.
681
+ #
682
+ # @option params [Hash<String,String>] :hyper_parameters
683
+ # Algorithm-specific parameters. You set hyperparameters before you
684
+ # start the learning process. Hyperparameters influence the quality of
685
+ # the model. For a list of hyperparameters for each training algorithm
686
+ # provided by Amazon SageMaker, see [Algorithms][1].
687
+ #
688
+ # You can specify a maximum of 100 hyperparameters. Each hyperparameter
689
+ # is a key-value pair. Each key and value is limited to 256 characters,
690
+ # as specified by the `Length Constraint`.
691
+ #
692
+ #
693
+ #
694
+ # [1]: http://docs.aws.amazon.com/sagemaker/latest/dg/algos.html
695
+ #
696
+ # @option params [required, Types::AlgorithmSpecification] :algorithm_specification
697
+ # The registry path of the Docker image that contains the training
698
+ # algorithm and algorithm-specific metadata, including the input mode.
699
+ # For more information about algorithms provided by Amazon SageMaker,
700
+ # see [Algorithms][1]. For information about providing your own
701
+ # algorithms, see [Bring Your Own Algorithms ][2].
702
+ #
703
+ #
704
+ #
705
+ # [1]: http://docs.aws.amazon.com/sagemaker/latest/dg/algos.html
706
+ # [2]: http://docs.aws.amazon.com/sagemaker/latest/dg/adv-topics-own-algo.html
707
+ #
708
+ # @option params [required, String] :role_arn
709
+ # The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker
710
+ # can assume to perform tasks on your behalf.
711
+ #
712
+ # During model training, Amazon SageMaker needs your permission to read
713
+ # input data from an S3 bucket, download a Docker image that contains
714
+ # training code, write model artifacts to an S3 bucket, write logs to
715
+ # Amazon CloudWatch Logs, and publish metrics to Amazon CloudWatch. You
716
+ # grant permissions for all of these tasks to an IAM role. For more
717
+ # information, see [Amazon SageMaker Roles][1].
718
+ #
719
+ #
720
+ #
721
+ # [1]: http://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html
722
+ #
723
+ # @option params [required, Array<Types::Channel>] :input_data_config
724
+ # An array of `Channel` objects. Each channel is a named input source.
725
+ # `InputDataConfig` describes the input data and its location.
726
+ #
727
+ # Algorithms can accept input data from one or more channels. For
728
+ # example, an algorithm might have two channels of input data,
729
+ # `training_data` and `validation_data`. The configuration for each
730
+ # channel provides the S3 location where the input data is stored. It
731
+ # also provides information about the stored data: the MIME type,
732
+ # compression method, and whether the data is wrapped in RecordIO
733
+ # format.
734
+ #
735
+ # Depending on the input mode that the algorithm supports, Amazon
736
+ # SageMaker either copies input data files from an S3 bucket to a local
737
+ # directory in the Docker container, or makes it available as input
738
+ # streams.
739
+ #
740
+ # @option params [required, Types::OutputDataConfig] :output_data_config
741
+ # Specifies the path to the S3 bucket where you want to store model
742
+ # artifacts. Amazon SageMaker creates subfolders for the artifacts.
743
+ #
744
+ # @option params [required, Types::ResourceConfig] :resource_config
745
+ # The resources, including the ML compute instances and ML storage
746
+ # volumes, to use for model training.
747
+ #
748
+ # ML storage volumes store model artifacts and incremental states.
749
+ # Training algorithms might also use ML storage volumes for scratch
750
+ # space. If you want Amazon SageMaker to use the ML storage volume to
751
+ # store the training data, choose `File` as the `TrainingInputMode` in
752
+ # the algorithm specification. For distributed training algorithms,
753
+ # specify an instance count greater than 1.
754
+ #
755
+ # @option params [required, Types::StoppingCondition] :stopping_condition
756
+ # Sets a duration for training. Use this parameter to cap model training
757
+ # costs. To stop a job, Amazon SageMaker sends the algorithm the
758
+ # `SIGTERM` signal, which delays job termination for 120 seconds.
759
+ # Algorithms might use this 120-second window to save the model
760
+ # artifacts.
761
+ #
762
+ # When Amazon SageMaker terminates a job because the stopping condition
763
+ # has been met, training algorithms provided by Amazon SageMaker save
764
+ # the intermediate results of the job. This intermediate data is a valid
765
+ # model artifact. You can use it to create a model using the
766
+ # `CreateModel` API.
767
+ #
768
+ # @option params [Array<Types::Tag>] :tags
769
+ # An array of key-value pairs. For more information, see [Using Cost
770
+ # Allocation Tags][1] in the *AWS Billing and Cost Management User
771
+ # Guide*.
772
+ #
773
+ #
774
+ #
775
+ # [1]: http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-what
776
+ #
777
+ # @return [Types::CreateTrainingJobResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
778
+ #
779
+ # * {Types::CreateTrainingJobResponse#training_job_arn #training_job_arn} => String
780
+ #
781
+ # @example Request syntax with placeholder values
782
+ #
783
+ # resp = client.create_training_job({
784
+ # training_job_name: "TrainingJobName", # required
785
+ # hyper_parameters: {
786
+ # "ParameterKey" => "ParameterValue",
787
+ # },
788
+ # algorithm_specification: { # required
789
+ # training_image: "AlgorithmImage", # required
790
+ # training_input_mode: "Pipe", # required, accepts Pipe, File
791
+ # },
792
+ # role_arn: "RoleArn", # required
793
+ # input_data_config: [ # required
794
+ # {
795
+ # channel_name: "ChannelName", # required
796
+ # data_source: { # required
797
+ # s3_data_source: { # required
798
+ # s3_data_type: "ManifestFile", # required, accepts ManifestFile, S3Prefix
799
+ # s3_uri: "S3Uri", # required
800
+ # s3_data_distribution_type: "FullyReplicated", # accepts FullyReplicated, ShardedByS3Key
801
+ # },
802
+ # },
803
+ # content_type: "ContentType",
804
+ # compression_type: "None", # accepts None, Gzip
805
+ # record_wrapper_type: "None", # accepts None, RecordIO
806
+ # },
807
+ # ],
808
+ # output_data_config: { # required
809
+ # kms_key_id: "KmsKeyId",
810
+ # s3_output_path: "S3Uri", # required
811
+ # },
812
+ # resource_config: { # required
813
+ # instance_type: "ml.m4.xlarge", # required, accepts ml.m4.xlarge, ml.m4.4xlarge, ml.m4.10xlarge, ml.c4.xlarge, ml.c4.2xlarge, ml.c4.8xlarge, ml.p2.xlarge, ml.p2.8xlarge, ml.p2.16xlarge, ml.p3.2xlarge, ml.p3.8xlarge, ml.p3.16xlarge, ml.c5.xlarge, ml.c5.2xlarge, ml.c5.4xlarge, ml.c5.9xlarge, ml.c5.18xlarge
814
+ # instance_count: 1, # required
815
+ # volume_size_in_gb: 1, # required
816
+ # },
817
+ # stopping_condition: { # required
818
+ # max_runtime_in_seconds: 1,
819
+ # },
820
+ # tags: [
821
+ # {
822
+ # key: "TagKey", # required
823
+ # value: "TagValue", # required
824
+ # },
825
+ # ],
826
+ # })
827
+ #
828
+ # @example Response structure
829
+ #
830
+ # resp.training_job_arn #=> String
831
+ #
832
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateTrainingJob AWS API Documentation
833
+ #
834
+ # @overload create_training_job(params = {})
835
+ # @param [Hash] params ({})
836
+ def create_training_job(params = {}, options = {})
837
+ req = build_request(:create_training_job, params)
838
+ req.send_request(options)
839
+ end
840
+
841
+ # Deletes an endpoint. Amazon SageMaker frees up all of the resources
842
+ # that were deployed when the endpoint was created.
843
+ #
844
+ # @option params [required, String] :endpoint_name
845
+ # The name of the endpoint that you want to delete.
846
+ #
847
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
848
+ #
849
+ # @example Request syntax with placeholder values
850
+ #
851
+ # resp = client.delete_endpoint({
852
+ # endpoint_name: "EndpointName", # required
853
+ # })
854
+ #
855
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteEndpoint AWS API Documentation
856
+ #
857
+ # @overload delete_endpoint(params = {})
858
+ # @param [Hash] params ({})
859
+ def delete_endpoint(params = {}, options = {})
860
+ req = build_request(:delete_endpoint, params)
861
+ req.send_request(options)
862
+ end
863
+
864
+ # Deletes an endpoint configuration. The `DeleteEndpoingConfig` API
865
+ # deletes only the specified configuration. It does not delete endpoints
866
+ # created using the configuration.
867
+ #
868
+ # @option params [required, String] :endpoint_config_name
869
+ # The name of the endpoint configuration that you want to delete.
870
+ #
871
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
872
+ #
873
+ # @example Request syntax with placeholder values
874
+ #
875
+ # resp = client.delete_endpoint_config({
876
+ # endpoint_config_name: "EndpointConfigName", # required
877
+ # })
878
+ #
879
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteEndpointConfig AWS API Documentation
880
+ #
881
+ # @overload delete_endpoint_config(params = {})
882
+ # @param [Hash] params ({})
883
+ def delete_endpoint_config(params = {}, options = {})
884
+ req = build_request(:delete_endpoint_config, params)
885
+ req.send_request(options)
886
+ end
887
+
888
+ # Deletes a model. The `DeleteModel` API deletes only the model entry
889
+ # that was created in Amazon SageMaker when you called the
890
+ # [CreateModel][1] API. It does not delete model artifacts, inference
891
+ # code, or the IAM role that you specified when creating the model.
892
+ #
893
+ #
894
+ #
895
+ # [1]: http://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateModel.html
896
+ #
897
+ # @option params [required, String] :model_name
898
+ # The name of the model to delete.
899
+ #
900
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
901
+ #
902
+ # @example Request syntax with placeholder values
903
+ #
904
+ # resp = client.delete_model({
905
+ # model_name: "ModelName", # required
906
+ # })
907
+ #
908
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteModel AWS API Documentation
909
+ #
910
+ # @overload delete_model(params = {})
911
+ # @param [Hash] params ({})
912
+ def delete_model(params = {}, options = {})
913
+ req = build_request(:delete_model, params)
914
+ req.send_request(options)
915
+ end
916
+
917
+ # Deletes an Amazon SageMaker notebook instance. Before you can delete a
918
+ # notebook instance, you must call the `StopNotebookInstance` API.
919
+ #
920
+ # When you delete a notebook instance, you lose all of your data. Amazon
921
+ # SageMaker removes the ML compute instance, and deletes the ML storage
922
+ # volume and the network interface associated with the notebook
923
+ # instance.
924
+ #
925
+ # @option params [required, String] :notebook_instance_name
926
+ # The name of the Amazon SageMaker notebook instance to delete.
927
+ #
928
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
929
+ #
930
+ # @example Request syntax with placeholder values
931
+ #
932
+ # resp = client.delete_notebook_instance({
933
+ # notebook_instance_name: "NotebookInstanceName", # required
934
+ # })
935
+ #
936
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteNotebookInstance AWS API Documentation
937
+ #
938
+ # @overload delete_notebook_instance(params = {})
939
+ # @param [Hash] params ({})
940
+ def delete_notebook_instance(params = {}, options = {})
941
+ req = build_request(:delete_notebook_instance, params)
942
+ req.send_request(options)
943
+ end
944
+
945
+ # Deletes the specified tags from an Amazon SageMaker resource.
946
+ #
947
+ # To list a resource's tags, use the `ListTags` API.
948
+ #
949
+ # @option params [required, String] :resource_arn
950
+ # The Amazon Resource Name (ARN) of the resource whose tags you want to
951
+ # delete.
952
+ #
953
+ # @option params [required, Array<String>] :tag_keys
954
+ # An array or one or more tag keys to delete.
955
+ #
956
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
957
+ #
958
+ # @example Request syntax with placeholder values
959
+ #
960
+ # resp = client.delete_tags({
961
+ # resource_arn: "ResourceArn", # required
962
+ # tag_keys: ["TagKey"], # required
963
+ # })
964
+ #
965
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteTags AWS API Documentation
966
+ #
967
+ # @overload delete_tags(params = {})
968
+ # @param [Hash] params ({})
969
+ def delete_tags(params = {}, options = {})
970
+ req = build_request(:delete_tags, params)
971
+ req.send_request(options)
972
+ end
973
+
974
+ # Returns the description of an endpoint.
975
+ #
976
+ # @option params [required, String] :endpoint_name
977
+ # The name of the endpoint.
978
+ #
979
+ # @return [Types::DescribeEndpointOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
980
+ #
981
+ # * {Types::DescribeEndpointOutput#endpoint_name #endpoint_name} => String
982
+ # * {Types::DescribeEndpointOutput#endpoint_arn #endpoint_arn} => String
983
+ # * {Types::DescribeEndpointOutput#endpoint_config_name #endpoint_config_name} => String
984
+ # * {Types::DescribeEndpointOutput#production_variants #production_variants} => Array&lt;Types::ProductionVariantSummary&gt;
985
+ # * {Types::DescribeEndpointOutput#endpoint_status #endpoint_status} => String
986
+ # * {Types::DescribeEndpointOutput#failure_reason #failure_reason} => String
987
+ # * {Types::DescribeEndpointOutput#creation_time #creation_time} => Time
988
+ # * {Types::DescribeEndpointOutput#last_modified_time #last_modified_time} => Time
989
+ #
990
+ # @example Request syntax with placeholder values
991
+ #
992
+ # resp = client.describe_endpoint({
993
+ # endpoint_name: "EndpointName", # required
994
+ # })
995
+ #
996
+ # @example Response structure
997
+ #
998
+ # resp.endpoint_name #=> String
999
+ # resp.endpoint_arn #=> String
1000
+ # resp.endpoint_config_name #=> String
1001
+ # resp.production_variants #=> Array
1002
+ # resp.production_variants[0].variant_name #=> String
1003
+ # resp.production_variants[0].current_weight #=> Float
1004
+ # resp.production_variants[0].desired_weight #=> Float
1005
+ # resp.production_variants[0].current_instance_count #=> Integer
1006
+ # resp.production_variants[0].desired_instance_count #=> Integer
1007
+ # resp.endpoint_status #=> String, one of "OutOfService", "Creating", "Updating", "RollingBack", "InService", "Deleting", "Failed"
1008
+ # resp.failure_reason #=> String
1009
+ # resp.creation_time #=> Time
1010
+ # resp.last_modified_time #=> Time
1011
+ #
1012
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeEndpoint AWS API Documentation
1013
+ #
1014
+ # @overload describe_endpoint(params = {})
1015
+ # @param [Hash] params ({})
1016
+ def describe_endpoint(params = {}, options = {})
1017
+ req = build_request(:describe_endpoint, params)
1018
+ req.send_request(options)
1019
+ end
1020
+
1021
+ # Returns the description of an endpoint configuration created using the
1022
+ # `CreateEndpointConfig` API.
1023
+ #
1024
+ # @option params [required, String] :endpoint_config_name
1025
+ # The name of the endpoint configuration.
1026
+ #
1027
+ # @return [Types::DescribeEndpointConfigOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1028
+ #
1029
+ # * {Types::DescribeEndpointConfigOutput#endpoint_config_name #endpoint_config_name} => String
1030
+ # * {Types::DescribeEndpointConfigOutput#endpoint_config_arn #endpoint_config_arn} => String
1031
+ # * {Types::DescribeEndpointConfigOutput#production_variants #production_variants} => Array&lt;Types::ProductionVariant&gt;
1032
+ # * {Types::DescribeEndpointConfigOutput#creation_time #creation_time} => Time
1033
+ #
1034
+ # @example Request syntax with placeholder values
1035
+ #
1036
+ # resp = client.describe_endpoint_config({
1037
+ # endpoint_config_name: "EndpointConfigName", # required
1038
+ # })
1039
+ #
1040
+ # @example Response structure
1041
+ #
1042
+ # resp.endpoint_config_name #=> String
1043
+ # resp.endpoint_config_arn #=> String
1044
+ # resp.production_variants #=> Array
1045
+ # resp.production_variants[0].variant_name #=> String
1046
+ # resp.production_variants[0].model_name #=> String
1047
+ # resp.production_variants[0].initial_instance_count #=> Integer
1048
+ # resp.production_variants[0].instance_type #=> String, one of "ml.c4.2xlarge", "ml.c4.8xlarge", "ml.c4.xlarge", "ml.c5.2xlarge", "ml.c5.9xlarge", "ml.c5.xlarge", "ml.m4.xlarge", "ml.p2.xlarge", "ml.p3.2xlarge", "ml.t2.medium"
1049
+ # resp.production_variants[0].initial_variant_weight #=> Float
1050
+ # resp.creation_time #=> Time
1051
+ #
1052
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeEndpointConfig AWS API Documentation
1053
+ #
1054
+ # @overload describe_endpoint_config(params = {})
1055
+ # @param [Hash] params ({})
1056
+ def describe_endpoint_config(params = {}, options = {})
1057
+ req = build_request(:describe_endpoint_config, params)
1058
+ req.send_request(options)
1059
+ end
1060
+
1061
+ # Describes a model that you created using the `CreateModel` API.
1062
+ #
1063
+ # @option params [required, String] :model_name
1064
+ # The name of the model.
1065
+ #
1066
+ # @return [Types::DescribeModelOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1067
+ #
1068
+ # * {Types::DescribeModelOutput#model_name #model_name} => String
1069
+ # * {Types::DescribeModelOutput#primary_container #primary_container} => Types::ContainerDefinition
1070
+ # * {Types::DescribeModelOutput#supplemental_containers #supplemental_containers} => Array&lt;Types::ContainerDefinition&gt;
1071
+ # * {Types::DescribeModelOutput#execution_role_arn #execution_role_arn} => String
1072
+ # * {Types::DescribeModelOutput#creation_time #creation_time} => Time
1073
+ # * {Types::DescribeModelOutput#model_arn #model_arn} => String
1074
+ #
1075
+ # @example Request syntax with placeholder values
1076
+ #
1077
+ # resp = client.describe_model({
1078
+ # model_name: "ModelName", # required
1079
+ # })
1080
+ #
1081
+ # @example Response structure
1082
+ #
1083
+ # resp.model_name #=> String
1084
+ # resp.primary_container.container_hostname #=> String
1085
+ # resp.primary_container.image #=> String
1086
+ # resp.primary_container.model_data_url #=> String
1087
+ # resp.primary_container.environment #=> Hash
1088
+ # resp.primary_container.environment["EnvironmentKey"] #=> String
1089
+ # resp.supplemental_containers #=> Array
1090
+ # resp.supplemental_containers[0].container_hostname #=> String
1091
+ # resp.supplemental_containers[0].image #=> String
1092
+ # resp.supplemental_containers[0].model_data_url #=> String
1093
+ # resp.supplemental_containers[0].environment #=> Hash
1094
+ # resp.supplemental_containers[0].environment["EnvironmentKey"] #=> String
1095
+ # resp.execution_role_arn #=> String
1096
+ # resp.creation_time #=> Time
1097
+ # resp.model_arn #=> String
1098
+ #
1099
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeModel AWS API Documentation
1100
+ #
1101
+ # @overload describe_model(params = {})
1102
+ # @param [Hash] params ({})
1103
+ def describe_model(params = {}, options = {})
1104
+ req = build_request(:describe_model, params)
1105
+ req.send_request(options)
1106
+ end
1107
+
1108
+ # Returns information about a notebook instance.
1109
+ #
1110
+ # @option params [required, String] :notebook_instance_name
1111
+ # The name of the notebook instance that you want information about.
1112
+ #
1113
+ # @return [Types::DescribeNotebookInstanceOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1114
+ #
1115
+ # * {Types::DescribeNotebookInstanceOutput#notebook_instance_arn #notebook_instance_arn} => String
1116
+ # * {Types::DescribeNotebookInstanceOutput#notebook_instance_name #notebook_instance_name} => String
1117
+ # * {Types::DescribeNotebookInstanceOutput#notebook_instance_status #notebook_instance_status} => String
1118
+ # * {Types::DescribeNotebookInstanceOutput#failure_reason #failure_reason} => String
1119
+ # * {Types::DescribeNotebookInstanceOutput#url #url} => String
1120
+ # * {Types::DescribeNotebookInstanceOutput#instance_type #instance_type} => String
1121
+ # * {Types::DescribeNotebookInstanceOutput#subnet_id #subnet_id} => String
1122
+ # * {Types::DescribeNotebookInstanceOutput#security_groups #security_groups} => Array&lt;String&gt;
1123
+ # * {Types::DescribeNotebookInstanceOutput#role_arn #role_arn} => String
1124
+ # * {Types::DescribeNotebookInstanceOutput#kms_key_id #kms_key_id} => String
1125
+ # * {Types::DescribeNotebookInstanceOutput#network_interface_id #network_interface_id} => String
1126
+ # * {Types::DescribeNotebookInstanceOutput#last_modified_time #last_modified_time} => Time
1127
+ # * {Types::DescribeNotebookInstanceOutput#creation_time #creation_time} => Time
1128
+ #
1129
+ # @example Request syntax with placeholder values
1130
+ #
1131
+ # resp = client.describe_notebook_instance({
1132
+ # notebook_instance_name: "NotebookInstanceName", # required
1133
+ # })
1134
+ #
1135
+ # @example Response structure
1136
+ #
1137
+ # resp.notebook_instance_arn #=> String
1138
+ # resp.notebook_instance_name #=> String
1139
+ # resp.notebook_instance_status #=> String, one of "Pending", "InService", "Stopping", "Stopped", "Failed", "Deleting"
1140
+ # resp.failure_reason #=> String
1141
+ # resp.url #=> String
1142
+ # resp.instance_type #=> String, one of "ml.t2.medium", "ml.m4.xlarge", "ml.p2.xlarge"
1143
+ # resp.subnet_id #=> String
1144
+ # resp.security_groups #=> Array
1145
+ # resp.security_groups[0] #=> String
1146
+ # resp.role_arn #=> String
1147
+ # resp.kms_key_id #=> String
1148
+ # resp.network_interface_id #=> String
1149
+ # resp.last_modified_time #=> Time
1150
+ # resp.creation_time #=> Time
1151
+ #
1152
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeNotebookInstance AWS API Documentation
1153
+ #
1154
+ # @overload describe_notebook_instance(params = {})
1155
+ # @param [Hash] params ({})
1156
+ def describe_notebook_instance(params = {}, options = {})
1157
+ req = build_request(:describe_notebook_instance, params)
1158
+ req.send_request(options)
1159
+ end
1160
+
1161
+ # Returns information about a training job.
1162
+ #
1163
+ # @option params [required, String] :training_job_name
1164
+ # The name of the training job.
1165
+ #
1166
+ # @return [Types::DescribeTrainingJobResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1167
+ #
1168
+ # * {Types::DescribeTrainingJobResponse#training_job_name #training_job_name} => String
1169
+ # * {Types::DescribeTrainingJobResponse#training_job_arn #training_job_arn} => String
1170
+ # * {Types::DescribeTrainingJobResponse#model_artifacts #model_artifacts} => Types::ModelArtifacts
1171
+ # * {Types::DescribeTrainingJobResponse#training_job_status #training_job_status} => String
1172
+ # * {Types::DescribeTrainingJobResponse#secondary_status #secondary_status} => String
1173
+ # * {Types::DescribeTrainingJobResponse#failure_reason #failure_reason} => String
1174
+ # * {Types::DescribeTrainingJobResponse#hyper_parameters #hyper_parameters} => Hash&lt;String,String&gt;
1175
+ # * {Types::DescribeTrainingJobResponse#algorithm_specification #algorithm_specification} => Types::AlgorithmSpecification
1176
+ # * {Types::DescribeTrainingJobResponse#role_arn #role_arn} => String
1177
+ # * {Types::DescribeTrainingJobResponse#input_data_config #input_data_config} => Array&lt;Types::Channel&gt;
1178
+ # * {Types::DescribeTrainingJobResponse#output_data_config #output_data_config} => Types::OutputDataConfig
1179
+ # * {Types::DescribeTrainingJobResponse#resource_config #resource_config} => Types::ResourceConfig
1180
+ # * {Types::DescribeTrainingJobResponse#stopping_condition #stopping_condition} => Types::StoppingCondition
1181
+ # * {Types::DescribeTrainingJobResponse#creation_time #creation_time} => Time
1182
+ # * {Types::DescribeTrainingJobResponse#training_start_time #training_start_time} => Time
1183
+ # * {Types::DescribeTrainingJobResponse#training_end_time #training_end_time} => Time
1184
+ # * {Types::DescribeTrainingJobResponse#last_modified_time #last_modified_time} => Time
1185
+ #
1186
+ # @example Request syntax with placeholder values
1187
+ #
1188
+ # resp = client.describe_training_job({
1189
+ # training_job_name: "TrainingJobName", # required
1190
+ # })
1191
+ #
1192
+ # @example Response structure
1193
+ #
1194
+ # resp.training_job_name #=> String
1195
+ # resp.training_job_arn #=> String
1196
+ # resp.model_artifacts.s3_model_artifacts #=> String
1197
+ # resp.training_job_status #=> String, one of "InProgress", "Completed", "Failed", "Stopping", "Stopped"
1198
+ # resp.secondary_status #=> String, one of "Starting", "Downloading", "Training", "Uploading", "Stopping", "Stopped", "MaxRuntimeExceeded", "Completed", "Failed"
1199
+ # resp.failure_reason #=> String
1200
+ # resp.hyper_parameters #=> Hash
1201
+ # resp.hyper_parameters["ParameterKey"] #=> String
1202
+ # resp.algorithm_specification.training_image #=> String
1203
+ # resp.algorithm_specification.training_input_mode #=> String, one of "Pipe", "File"
1204
+ # resp.role_arn #=> String
1205
+ # resp.input_data_config #=> Array
1206
+ # resp.input_data_config[0].channel_name #=> String
1207
+ # resp.input_data_config[0].data_source.s3_data_source.s3_data_type #=> String, one of "ManifestFile", "S3Prefix"
1208
+ # resp.input_data_config[0].data_source.s3_data_source.s3_uri #=> String
1209
+ # resp.input_data_config[0].data_source.s3_data_source.s3_data_distribution_type #=> String, one of "FullyReplicated", "ShardedByS3Key"
1210
+ # resp.input_data_config[0].content_type #=> String
1211
+ # resp.input_data_config[0].compression_type #=> String, one of "None", "Gzip"
1212
+ # resp.input_data_config[0].record_wrapper_type #=> String, one of "None", "RecordIO"
1213
+ # resp.output_data_config.kms_key_id #=> String
1214
+ # resp.output_data_config.s3_output_path #=> String
1215
+ # resp.resource_config.instance_type #=> String, one of "ml.m4.xlarge", "ml.m4.4xlarge", "ml.m4.10xlarge", "ml.c4.xlarge", "ml.c4.2xlarge", "ml.c4.8xlarge", "ml.p2.xlarge", "ml.p2.8xlarge", "ml.p2.16xlarge", "ml.p3.2xlarge", "ml.p3.8xlarge", "ml.p3.16xlarge", "ml.c5.xlarge", "ml.c5.2xlarge", "ml.c5.4xlarge", "ml.c5.9xlarge", "ml.c5.18xlarge"
1216
+ # resp.resource_config.instance_count #=> Integer
1217
+ # resp.resource_config.volume_size_in_gb #=> Integer
1218
+ # resp.stopping_condition.max_runtime_in_seconds #=> Integer
1219
+ # resp.creation_time #=> Time
1220
+ # resp.training_start_time #=> Time
1221
+ # resp.training_end_time #=> Time
1222
+ # resp.last_modified_time #=> Time
1223
+ #
1224
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeTrainingJob AWS API Documentation
1225
+ #
1226
+ # @overload describe_training_job(params = {})
1227
+ # @param [Hash] params ({})
1228
+ def describe_training_job(params = {}, options = {})
1229
+ req = build_request(:describe_training_job, params)
1230
+ req.send_request(options)
1231
+ end
1232
+
1233
+ # Lists endpoint configurations.
1234
+ #
1235
+ # @option params [String] :sort_by
1236
+ # The field to sort results by. The default is `CreationTime`.
1237
+ #
1238
+ # @option params [String] :sort_order
1239
+ # The sort order for results. The default is `Ascending`.
1240
+ #
1241
+ # @option params [String] :next_token
1242
+ # If the result of the previous `ListEndpointConfig` request was
1243
+ # truncated, the response includes a `NextToken`. To retrieve the next
1244
+ # set of endpoint configurations, use the token in the next request.
1245
+ #
1246
+ # @option params [Integer] :max_results
1247
+ # The maximum number of training jobs to return in the response.
1248
+ #
1249
+ # @option params [String] :name_contains
1250
+ # A string in the endpoint configuration name. This filter returns only
1251
+ # endpoint configurations whose name contains the specified string.
1252
+ #
1253
+ # @option params [Time,DateTime,Date,Integer,String] :creation_time_before
1254
+ # A filter that returns only endpoint configurations created before the
1255
+ # specified time (timestamp).
1256
+ #
1257
+ # @option params [Time,DateTime,Date,Integer,String] :creation_time_after
1258
+ # A filter that returns only endpoint configurations created after the
1259
+ # specified time (timestamp).
1260
+ #
1261
+ # @return [Types::ListEndpointConfigsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1262
+ #
1263
+ # * {Types::ListEndpointConfigsOutput#endpoint_configs #endpoint_configs} => Array&lt;Types::EndpointConfigSummary&gt;
1264
+ # * {Types::ListEndpointConfigsOutput#next_token #next_token} => String
1265
+ #
1266
+ # @example Request syntax with placeholder values
1267
+ #
1268
+ # resp = client.list_endpoint_configs({
1269
+ # sort_by: "Name", # accepts Name, CreationTime
1270
+ # sort_order: "Ascending", # accepts Ascending, Descending
1271
+ # next_token: "PaginationToken",
1272
+ # max_results: 1,
1273
+ # name_contains: "EndpointConfigNameContains",
1274
+ # creation_time_before: Time.now,
1275
+ # creation_time_after: Time.now,
1276
+ # })
1277
+ #
1278
+ # @example Response structure
1279
+ #
1280
+ # resp.endpoint_configs #=> Array
1281
+ # resp.endpoint_configs[0].endpoint_config_name #=> String
1282
+ # resp.endpoint_configs[0].endpoint_config_arn #=> String
1283
+ # resp.endpoint_configs[0].creation_time #=> Time
1284
+ # resp.next_token #=> String
1285
+ #
1286
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListEndpointConfigs AWS API Documentation
1287
+ #
1288
+ # @overload list_endpoint_configs(params = {})
1289
+ # @param [Hash] params ({})
1290
+ def list_endpoint_configs(params = {}, options = {})
1291
+ req = build_request(:list_endpoint_configs, params)
1292
+ req.send_request(options)
1293
+ end
1294
+
1295
+ # Lists endpoints.
1296
+ #
1297
+ # @option params [String] :sort_by
1298
+ # Sorts the list of results. The default is `CreationTime`.
1299
+ #
1300
+ # @option params [String] :sort_order
1301
+ # The sort order for results. The default is `Ascending`.
1302
+ #
1303
+ # @option params [String] :next_token
1304
+ # If the result of a `ListEndpoints` request was truncated, the response
1305
+ # includes a `NextToken`. To retrieve the next set of endpoints, use the
1306
+ # token in the next request.
1307
+ #
1308
+ # @option params [Integer] :max_results
1309
+ # The maximum number of endpoints to return in the response.
1310
+ #
1311
+ # @option params [String] :name_contains
1312
+ # A string in endpoint names. This filter returns only endpoints whose
1313
+ # name contains the specified string.
1314
+ #
1315
+ # @option params [Time,DateTime,Date,Integer,String] :creation_time_before
1316
+ # A filter that returns only endpoints that were created before the
1317
+ # specified time (timestamp).
1318
+ #
1319
+ # @option params [Time,DateTime,Date,Integer,String] :creation_time_after
1320
+ # A filter that returns only endpoints that were created after the
1321
+ # specified time (timestamp).
1322
+ #
1323
+ # @option params [Time,DateTime,Date,Integer,String] :last_modified_time_before
1324
+ # A filter that returns only endpoints that were modified before the
1325
+ # specified timestamp.
1326
+ #
1327
+ # @option params [Time,DateTime,Date,Integer,String] :last_modified_time_after
1328
+ # A filter that returns only endpoints that were modified after the
1329
+ # specified timestamp.
1330
+ #
1331
+ # @option params [String] :status_equals
1332
+ # A filter that returns only endpoints with the specified status.
1333
+ #
1334
+ # @return [Types::ListEndpointsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1335
+ #
1336
+ # * {Types::ListEndpointsOutput#endpoints #endpoints} => Array&lt;Types::EndpointSummary&gt;
1337
+ # * {Types::ListEndpointsOutput#next_token #next_token} => String
1338
+ #
1339
+ # @example Request syntax with placeholder values
1340
+ #
1341
+ # resp = client.list_endpoints({
1342
+ # sort_by: "Name", # accepts Name, CreationTime, Status
1343
+ # sort_order: "Ascending", # accepts Ascending, Descending
1344
+ # next_token: "PaginationToken",
1345
+ # max_results: 1,
1346
+ # name_contains: "EndpointNameContains",
1347
+ # creation_time_before: Time.now,
1348
+ # creation_time_after: Time.now,
1349
+ # last_modified_time_before: Time.now,
1350
+ # last_modified_time_after: Time.now,
1351
+ # status_equals: "OutOfService", # accepts OutOfService, Creating, Updating, RollingBack, InService, Deleting, Failed
1352
+ # })
1353
+ #
1354
+ # @example Response structure
1355
+ #
1356
+ # resp.endpoints #=> Array
1357
+ # resp.endpoints[0].endpoint_name #=> String
1358
+ # resp.endpoints[0].endpoint_arn #=> String
1359
+ # resp.endpoints[0].creation_time #=> Time
1360
+ # resp.endpoints[0].last_modified_time #=> Time
1361
+ # resp.endpoints[0].endpoint_status #=> String, one of "OutOfService", "Creating", "Updating", "RollingBack", "InService", "Deleting", "Failed"
1362
+ # resp.next_token #=> String
1363
+ #
1364
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListEndpoints AWS API Documentation
1365
+ #
1366
+ # @overload list_endpoints(params = {})
1367
+ # @param [Hash] params ({})
1368
+ def list_endpoints(params = {}, options = {})
1369
+ req = build_request(:list_endpoints, params)
1370
+ req.send_request(options)
1371
+ end
1372
+
1373
+ # Lists models created with the [CreateModel][1] API.
1374
+ #
1375
+ #
1376
+ #
1377
+ # [1]: http://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateModel.html
1378
+ #
1379
+ # @option params [String] :sort_by
1380
+ # Sorts the list of results. The default is `CreationTime`.
1381
+ #
1382
+ # @option params [String] :sort_order
1383
+ # The sort order for results. The default is `Ascending`.
1384
+ #
1385
+ # @option params [String] :next_token
1386
+ # If the response to a previous `ListModels` request was truncated, the
1387
+ # response includes a `NextToken`. To retrieve the next set of models,
1388
+ # use the token in the next request.
1389
+ #
1390
+ # @option params [Integer] :max_results
1391
+ # The maximum number of models to return in the response.
1392
+ #
1393
+ # @option params [String] :name_contains
1394
+ # A string in the training job name. This filter returns only models in
1395
+ # the training job whose name contains the specified string.
1396
+ #
1397
+ # @option params [Time,DateTime,Date,Integer,String] :creation_time_before
1398
+ # A filter that returns only models created before the specified time
1399
+ # (timestamp).
1400
+ #
1401
+ # @option params [Time,DateTime,Date,Integer,String] :creation_time_after
1402
+ # A filter that returns only models created after the specified time
1403
+ # (timestamp).
1404
+ #
1405
+ # @return [Types::ListModelsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1406
+ #
1407
+ # * {Types::ListModelsOutput#models #models} => Array&lt;Types::ModelSummary&gt;
1408
+ # * {Types::ListModelsOutput#next_token #next_token} => String
1409
+ #
1410
+ # @example Request syntax with placeholder values
1411
+ #
1412
+ # resp = client.list_models({
1413
+ # sort_by: "Name", # accepts Name, CreationTime
1414
+ # sort_order: "Ascending", # accepts Ascending, Descending
1415
+ # next_token: "PaginationToken",
1416
+ # max_results: 1,
1417
+ # name_contains: "ModelNameContains",
1418
+ # creation_time_before: Time.now,
1419
+ # creation_time_after: Time.now,
1420
+ # })
1421
+ #
1422
+ # @example Response structure
1423
+ #
1424
+ # resp.models #=> Array
1425
+ # resp.models[0].model_name #=> String
1426
+ # resp.models[0].model_arn #=> String
1427
+ # resp.models[0].creation_time #=> Time
1428
+ # resp.next_token #=> String
1429
+ #
1430
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListModels AWS API Documentation
1431
+ #
1432
+ # @overload list_models(params = {})
1433
+ # @param [Hash] params ({})
1434
+ def list_models(params = {}, options = {})
1435
+ req = build_request(:list_models, params)
1436
+ req.send_request(options)
1437
+ end
1438
+
1439
+ # Returns a list of the Amazon SageMaker notebook instances in the
1440
+ # requester's account in an AWS Region.
1441
+ #
1442
+ # @option params [String] :next_token
1443
+ # If the previous call to the `ListNotebookInstances` is truncated, the
1444
+ # response includes a `NextToken`. You can use this token in your
1445
+ # subsequent `ListNotebookInstances` request to fetch the next set of
1446
+ # notebook instances.
1447
+ #
1448
+ # <note markdown="1"> You might specify a filter or a sort order in your request. When
1449
+ # response is truncated, you must use the same values for the filer and
1450
+ # sort order in the next request.
1451
+ #
1452
+ # </note>
1453
+ #
1454
+ # @option params [Integer] :max_results
1455
+ # The maximum number of notebook instances to return.
1456
+ #
1457
+ # @option params [String] :sort_by
1458
+ # The field to sort results by. The default is `Name`.
1459
+ #
1460
+ # @option params [String] :sort_order
1461
+ # The sort order for results.
1462
+ #
1463
+ # @option params [String] :name_contains
1464
+ # A string in the notebook instances' name. This filter returns only
1465
+ # notebook instances whose name contains the specified string.
1466
+ #
1467
+ # @option params [Time,DateTime,Date,Integer,String] :creation_time_before
1468
+ # A filter that returns only notebook instances that were created before
1469
+ # the specified time (timestamp).
1470
+ #
1471
+ # @option params [Time,DateTime,Date,Integer,String] :creation_time_after
1472
+ # A filter that returns only notebook instances that were created after
1473
+ # the specified time (timestamp).
1474
+ #
1475
+ # @option params [Time,DateTime,Date,Integer,String] :last_modified_time_before
1476
+ # A filter that returns only notebook instances that were modified
1477
+ # before the specified time (timestamp).
1478
+ #
1479
+ # @option params [Time,DateTime,Date,Integer,String] :last_modified_time_after
1480
+ # A filter that returns only notebook instances that were modified after
1481
+ # the specified time (timestamp).
1482
+ #
1483
+ # @option params [String] :status_equals
1484
+ # A filter that returns only notebook instances with the specified
1485
+ # status.
1486
+ #
1487
+ # @return [Types::ListNotebookInstancesOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1488
+ #
1489
+ # * {Types::ListNotebookInstancesOutput#next_token #next_token} => String
1490
+ # * {Types::ListNotebookInstancesOutput#notebook_instances #notebook_instances} => Array&lt;Types::NotebookInstanceSummary&gt;
1491
+ #
1492
+ # @example Request syntax with placeholder values
1493
+ #
1494
+ # resp = client.list_notebook_instances({
1495
+ # next_token: "NextToken",
1496
+ # max_results: 1,
1497
+ # sort_by: "Name", # accepts Name, CreationTime, Status
1498
+ # sort_order: "Ascending", # accepts Ascending, Descending
1499
+ # name_contains: "NotebookInstanceNameContains",
1500
+ # creation_time_before: Time.now,
1501
+ # creation_time_after: Time.now,
1502
+ # last_modified_time_before: Time.now,
1503
+ # last_modified_time_after: Time.now,
1504
+ # status_equals: "Pending", # accepts Pending, InService, Stopping, Stopped, Failed, Deleting
1505
+ # })
1506
+ #
1507
+ # @example Response structure
1508
+ #
1509
+ # resp.next_token #=> String
1510
+ # resp.notebook_instances #=> Array
1511
+ # resp.notebook_instances[0].notebook_instance_name #=> String
1512
+ # resp.notebook_instances[0].notebook_instance_arn #=> String
1513
+ # resp.notebook_instances[0].notebook_instance_status #=> String, one of "Pending", "InService", "Stopping", "Stopped", "Failed", "Deleting"
1514
+ # resp.notebook_instances[0].url #=> String
1515
+ # resp.notebook_instances[0].instance_type #=> String, one of "ml.t2.medium", "ml.m4.xlarge", "ml.p2.xlarge"
1516
+ # resp.notebook_instances[0].creation_time #=> Time
1517
+ # resp.notebook_instances[0].last_modified_time #=> Time
1518
+ #
1519
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListNotebookInstances AWS API Documentation
1520
+ #
1521
+ # @overload list_notebook_instances(params = {})
1522
+ # @param [Hash] params ({})
1523
+ def list_notebook_instances(params = {}, options = {})
1524
+ req = build_request(:list_notebook_instances, params)
1525
+ req.send_request(options)
1526
+ end
1527
+
1528
+ # Returns the tags for the specified Amazon SageMaker resource.
1529
+ #
1530
+ # @option params [required, String] :resource_arn
1531
+ # The Amazon Resource Name (ARN) of the resource whose tags you want to
1532
+ # retrieve.
1533
+ #
1534
+ # @option params [String] :next_token
1535
+ # If the response to the previous `ListTags` request is truncated,
1536
+ # Amazon SageMaker returns this token. To retrieve the next set of tags,
1537
+ # use it in the subsequent request.
1538
+ #
1539
+ # @option params [Integer] :max_results
1540
+ # Maximum number of tags to return.
1541
+ #
1542
+ # @return [Types::ListTagsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1543
+ #
1544
+ # * {Types::ListTagsOutput#tags #tags} => Array&lt;Types::Tag&gt;
1545
+ # * {Types::ListTagsOutput#next_token #next_token} => String
1546
+ #
1547
+ # @example Request syntax with placeholder values
1548
+ #
1549
+ # resp = client.list_tags({
1550
+ # resource_arn: "ResourceArn", # required
1551
+ # next_token: "NextToken",
1552
+ # max_results: 1,
1553
+ # })
1554
+ #
1555
+ # @example Response structure
1556
+ #
1557
+ # resp.tags #=> Array
1558
+ # resp.tags[0].key #=> String
1559
+ # resp.tags[0].value #=> String
1560
+ # resp.next_token #=> String
1561
+ #
1562
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTags AWS API Documentation
1563
+ #
1564
+ # @overload list_tags(params = {})
1565
+ # @param [Hash] params ({})
1566
+ def list_tags(params = {}, options = {})
1567
+ req = build_request(:list_tags, params)
1568
+ req.send_request(options)
1569
+ end
1570
+
1571
+ # Lists training jobs.
1572
+ #
1573
+ # @option params [String] :next_token
1574
+ # If the result of the previous `ListTrainingJobs` request was
1575
+ # truncated, the response includes a `NextToken`. To retrieve the next
1576
+ # set of training jobs, use the token in the next request.
1577
+ #
1578
+ # @option params [Integer] :max_results
1579
+ # The maximum number of training jobs to return in the response.
1580
+ #
1581
+ # @option params [Time,DateTime,Date,Integer,String] :creation_time_after
1582
+ # A filter that only training jobs created after the specified time
1583
+ # (timestamp).
1584
+ #
1585
+ # @option params [Time,DateTime,Date,Integer,String] :creation_time_before
1586
+ # A filter that returns only training jobs created before the specified
1587
+ # time (timestamp).
1588
+ #
1589
+ # @option params [Time,DateTime,Date,Integer,String] :last_modified_time_after
1590
+ # A filter that returns only training jobs modified after the specified
1591
+ # time (timestamp).
1592
+ #
1593
+ # @option params [Time,DateTime,Date,Integer,String] :last_modified_time_before
1594
+ # A filter that returns only training jobs modified before the specified
1595
+ # time (timestamp).
1596
+ #
1597
+ # @option params [String] :name_contains
1598
+ # A string in the training job name. This filter returns only models
1599
+ # whose name contains the specified string.
1600
+ #
1601
+ # @option params [String] :status_equals
1602
+ # A filter that retrieves only training jobs with a specific status.
1603
+ #
1604
+ # @option params [String] :sort_by
1605
+ # The field to sort results by. The default is `CreationTime`.
1606
+ #
1607
+ # @option params [String] :sort_order
1608
+ # The sort order for results. The default is `Ascending`.
1609
+ #
1610
+ # @return [Types::ListTrainingJobsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1611
+ #
1612
+ # * {Types::ListTrainingJobsResponse#training_job_summaries #training_job_summaries} => Array&lt;Types::TrainingJobSummary&gt;
1613
+ # * {Types::ListTrainingJobsResponse#next_token #next_token} => String
1614
+ #
1615
+ # @example Request syntax with placeholder values
1616
+ #
1617
+ # resp = client.list_training_jobs({
1618
+ # next_token: "NextToken",
1619
+ # max_results: 1,
1620
+ # creation_time_after: Time.now,
1621
+ # creation_time_before: Time.now,
1622
+ # last_modified_time_after: Time.now,
1623
+ # last_modified_time_before: Time.now,
1624
+ # name_contains: "NameContains",
1625
+ # status_equals: "InProgress", # accepts InProgress, Completed, Failed, Stopping, Stopped
1626
+ # sort_by: "Name", # accepts Name, CreationTime, Status
1627
+ # sort_order: "Ascending", # accepts Ascending, Descending
1628
+ # })
1629
+ #
1630
+ # @example Response structure
1631
+ #
1632
+ # resp.training_job_summaries #=> Array
1633
+ # resp.training_job_summaries[0].training_job_name #=> String
1634
+ # resp.training_job_summaries[0].training_job_arn #=> String
1635
+ # resp.training_job_summaries[0].creation_time #=> Time
1636
+ # resp.training_job_summaries[0].training_end_time #=> Time
1637
+ # resp.training_job_summaries[0].last_modified_time #=> Time
1638
+ # resp.training_job_summaries[0].training_job_status #=> String, one of "InProgress", "Completed", "Failed", "Stopping", "Stopped"
1639
+ # resp.next_token #=> String
1640
+ #
1641
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTrainingJobs AWS API Documentation
1642
+ #
1643
+ # @overload list_training_jobs(params = {})
1644
+ # @param [Hash] params ({})
1645
+ def list_training_jobs(params = {}, options = {})
1646
+ req = build_request(:list_training_jobs, params)
1647
+ req.send_request(options)
1648
+ end
1649
+
1650
+ # Launches an ML compute instance with the latest version of the
1651
+ # libraries and attaches your ML storage volume. After configuring the
1652
+ # notebook instance, Amazon SageMaker sets the notebook instance status
1653
+ # to `InService`. A notebook instance's status must be `InService` (is
1654
+ # this same as "Running" in the console?) before you can connect to
1655
+ # your Jupyter notebook.
1656
+ #
1657
+ # @option params [required, String] :notebook_instance_name
1658
+ # The name of the notebook instance to start.
1659
+ #
1660
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1661
+ #
1662
+ # @example Request syntax with placeholder values
1663
+ #
1664
+ # resp = client.start_notebook_instance({
1665
+ # notebook_instance_name: "NotebookInstanceName", # required
1666
+ # })
1667
+ #
1668
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StartNotebookInstance AWS API Documentation
1669
+ #
1670
+ # @overload start_notebook_instance(params = {})
1671
+ # @param [Hash] params ({})
1672
+ def start_notebook_instance(params = {}, options = {})
1673
+ req = build_request(:start_notebook_instance, params)
1674
+ req.send_request(options)
1675
+ end
1676
+
1677
+ # Terminates the ML compute instance. Before terminating the instance,
1678
+ # Amazon SageMaker disconnects the ML storage volume from it. Amazon
1679
+ # SageMaker preserves the ML storage volume.
1680
+ #
1681
+ # To access data on the ML storage volume for a notebook instance that
1682
+ # has been terminated, call the `StartNotebookInstance` API.
1683
+ # `StartNotebookInstance` launches another ML compute instance,
1684
+ # configures it, and attaches the preserved ML storage volume so you can
1685
+ # continue your work.
1686
+ #
1687
+ # @option params [required, String] :notebook_instance_name
1688
+ # The name of the notebook instance to terminate.
1689
+ #
1690
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1691
+ #
1692
+ # @example Request syntax with placeholder values
1693
+ #
1694
+ # resp = client.stop_notebook_instance({
1695
+ # notebook_instance_name: "NotebookInstanceName", # required
1696
+ # })
1697
+ #
1698
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopNotebookInstance AWS API Documentation
1699
+ #
1700
+ # @overload stop_notebook_instance(params = {})
1701
+ # @param [Hash] params ({})
1702
+ def stop_notebook_instance(params = {}, options = {})
1703
+ req = build_request(:stop_notebook_instance, params)
1704
+ req.send_request(options)
1705
+ end
1706
+
1707
+ # Stops a training job. To stop a job, Amazon SageMaker sends the
1708
+ # algorithm the `SIGTERM` signal, which delays job termination for 120
1709
+ # seconds. Algorithms might use this 120-second window to save the model
1710
+ # artifacts, so the results of the training is not lost.
1711
+ #
1712
+ # Training algorithms provided by Amazon SageMaker save the intermediate
1713
+ # results of a model training job. This intermediate data is a valid
1714
+ # model artifact. You can use the model artifacts that are saved when
1715
+ # Amazon SageMaker stops a training job to create a model.
1716
+ #
1717
+ # When it receives a `StopTrainingJob` request, Amazon SageMaker changes
1718
+ # the status of the job to `Stopping`. After Amazon SageMaker stops the
1719
+ # job, it sets the status to `Stopped`.
1720
+ #
1721
+ # @option params [required, String] :training_job_name
1722
+ # The name of the training job to stop.
1723
+ #
1724
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1725
+ #
1726
+ # @example Request syntax with placeholder values
1727
+ #
1728
+ # resp = client.stop_training_job({
1729
+ # training_job_name: "TrainingJobName", # required
1730
+ # })
1731
+ #
1732
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopTrainingJob AWS API Documentation
1733
+ #
1734
+ # @overload stop_training_job(params = {})
1735
+ # @param [Hash] params ({})
1736
+ def stop_training_job(params = {}, options = {})
1737
+ req = build_request(:stop_training_job, params)
1738
+ req.send_request(options)
1739
+ end
1740
+
1741
+ # Deploys the new `EndpointConfig` specified in the request, switches to
1742
+ # using newly created endpoint, and then deletes resources provisioned
1743
+ # for the endpoint using the previous `EndpointConfig` (there is no
1744
+ # availability loss).
1745
+ #
1746
+ # When Amazon SageMaker receives the request, it sets the endpoint
1747
+ # status to `Updating`. After updating the endpoint, it sets the status
1748
+ # to `InService`. To check the status of an endpoint, use the
1749
+ # [DescribeEndpoint][1] API.
1750
+ #
1751
+ #
1752
+ #
1753
+ # [1]: http://docs.aws.amazon.com/sagemaker/latest/dg/API_DescribeEndpoint.html
1754
+ #
1755
+ # @option params [required, String] :endpoint_name
1756
+ # The name of the endpoint whose configuration you want to update.
1757
+ #
1758
+ # @option params [required, String] :endpoint_config_name
1759
+ # The name of the new endpoint configuration.
1760
+ #
1761
+ # @return [Types::UpdateEndpointOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1762
+ #
1763
+ # * {Types::UpdateEndpointOutput#endpoint_arn #endpoint_arn} => String
1764
+ #
1765
+ # @example Request syntax with placeholder values
1766
+ #
1767
+ # resp = client.update_endpoint({
1768
+ # endpoint_name: "EndpointName", # required
1769
+ # endpoint_config_name: "EndpointConfigName", # required
1770
+ # })
1771
+ #
1772
+ # @example Response structure
1773
+ #
1774
+ # resp.endpoint_arn #=> String
1775
+ #
1776
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateEndpoint AWS API Documentation
1777
+ #
1778
+ # @overload update_endpoint(params = {})
1779
+ # @param [Hash] params ({})
1780
+ def update_endpoint(params = {}, options = {})
1781
+ req = build_request(:update_endpoint, params)
1782
+ req.send_request(options)
1783
+ end
1784
+
1785
+ # Updates variant weight, capacity, or both of one or more variants
1786
+ # associated with an endpoint. This operation updates weight, capacity,
1787
+ # or both for the previously provisioned endpoint. When it receives the
1788
+ # request, Amazon SageMaker sets the endpoint status to `Updating`.
1789
+ # After updating the endpoint, it sets the status to `InService`. To
1790
+ # check the status of an endpoint, use the [DescribeEndpoint][1] API.
1791
+ #
1792
+ #
1793
+ #
1794
+ # [1]: http://docs.aws.amazon.com/sagemaker/latest/dg/API_DescribeEndpoint.html
1795
+ #
1796
+ # @option params [required, String] :endpoint_name
1797
+ # The name of an existing Amazon SageMaker endpoint.
1798
+ #
1799
+ # @option params [required, Array<Types::DesiredWeightAndCapacity>] :desired_weights_and_capacities
1800
+ # An object that provides new capacity and weight values for a variant.
1801
+ #
1802
+ # @return [Types::UpdateEndpointWeightsAndCapacitiesOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1803
+ #
1804
+ # * {Types::UpdateEndpointWeightsAndCapacitiesOutput#endpoint_arn #endpoint_arn} => String
1805
+ #
1806
+ # @example Request syntax with placeholder values
1807
+ #
1808
+ # resp = client.update_endpoint_weights_and_capacities({
1809
+ # endpoint_name: "EndpointName", # required
1810
+ # desired_weights_and_capacities: [ # required
1811
+ # {
1812
+ # variant_name: "VariantName", # required
1813
+ # desired_weight: 1.0,
1814
+ # desired_instance_count: 1,
1815
+ # },
1816
+ # ],
1817
+ # })
1818
+ #
1819
+ # @example Response structure
1820
+ #
1821
+ # resp.endpoint_arn #=> String
1822
+ #
1823
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateEndpointWeightsAndCapacities AWS API Documentation
1824
+ #
1825
+ # @overload update_endpoint_weights_and_capacities(params = {})
1826
+ # @param [Hash] params ({})
1827
+ def update_endpoint_weights_and_capacities(params = {}, options = {})
1828
+ req = build_request(:update_endpoint_weights_and_capacities, params)
1829
+ req.send_request(options)
1830
+ end
1831
+
1832
+ # Updates a notebook instance. NotebookInstance updates include
1833
+ # upgrading or downgrading the ML compute instance used for your
1834
+ # notebook instance to accommodate changes in your workload
1835
+ # requirements. You can also update the VPC security groups.
1836
+ #
1837
+ # @option params [required, String] :notebook_instance_name
1838
+ # The name of the notebook instance to update.
1839
+ #
1840
+ # @option params [String] :instance_type
1841
+ # The Amazon ML compute instance type.
1842
+ #
1843
+ # @option params [String] :role_arn
1844
+ # Amazon Resource Name (ARN) of the IAM role to associate with the
1845
+ # instance.
1846
+ #
1847
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1848
+ #
1849
+ # @example Request syntax with placeholder values
1850
+ #
1851
+ # resp = client.update_notebook_instance({
1852
+ # notebook_instance_name: "NotebookInstanceName", # required
1853
+ # instance_type: "ml.t2.medium", # accepts ml.t2.medium, ml.m4.xlarge, ml.p2.xlarge
1854
+ # role_arn: "RoleArn",
1855
+ # })
1856
+ #
1857
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateNotebookInstance AWS API Documentation
1858
+ #
1859
+ # @overload update_notebook_instance(params = {})
1860
+ # @param [Hash] params ({})
1861
+ def update_notebook_instance(params = {}, options = {})
1862
+ req = build_request(:update_notebook_instance, params)
1863
+ req.send_request(options)
1864
+ end
1865
+
1866
+ # @!endgroup
1867
+
1868
+ # @param params ({})
1869
+ # @api private
1870
+ def build_request(operation_name, params = {})
1871
+ handlers = @handlers.for(operation_name)
1872
+ context = Seahorse::Client::RequestContext.new(
1873
+ operation_name: operation_name,
1874
+ operation: config.api.operation(operation_name),
1875
+ client: self,
1876
+ params: params,
1877
+ config: config)
1878
+ context[:gem_name] = 'aws-sdk-sagemaker'
1879
+ context[:gem_version] = '1.0.0'
1880
+ Seahorse::Client::Request.new(handlers, context)
1881
+ end
1882
+
1883
+ # Polls an API operation until a resource enters a desired state.
1884
+ #
1885
+ # ## Basic Usage
1886
+ #
1887
+ # A waiter will call an API operation until:
1888
+ #
1889
+ # * It is successful
1890
+ # * It enters a terminal state
1891
+ # * It makes the maximum number of attempts
1892
+ #
1893
+ # In between attempts, the waiter will sleep.
1894
+ #
1895
+ # # polls in a loop, sleeping between attempts
1896
+ # client.waiter_until(waiter_name, params)
1897
+ #
1898
+ # ## Configuration
1899
+ #
1900
+ # You can configure the maximum number of polling attempts, and the
1901
+ # delay (in seconds) between each polling attempt. You can pass
1902
+ # configuration as the final arguments hash.
1903
+ #
1904
+ # # poll for ~25 seconds
1905
+ # client.wait_until(waiter_name, params, {
1906
+ # max_attempts: 5,
1907
+ # delay: 5,
1908
+ # })
1909
+ #
1910
+ # ## Callbacks
1911
+ #
1912
+ # You can be notified before each polling attempt and before each
1913
+ # delay. If you throw `:success` or `:failure` from these callbacks,
1914
+ # it will terminate the waiter.
1915
+ #
1916
+ # started_at = Time.now
1917
+ # client.wait_until(waiter_name, params, {
1918
+ #
1919
+ # # disable max attempts
1920
+ # max_attempts: nil,
1921
+ #
1922
+ # # poll for 1 hour, instead of a number of attempts
1923
+ # before_wait: -> (attempts, response) do
1924
+ # throw :failure if Time.now - started_at > 3600
1925
+ # end
1926
+ # })
1927
+ #
1928
+ # ## Handling Errors
1929
+ #
1930
+ # When a waiter is unsuccessful, it will raise an error.
1931
+ # All of the failure errors extend from
1932
+ # {Aws::Waiters::Errors::WaiterFailed}.
1933
+ #
1934
+ # begin
1935
+ # client.wait_until(...)
1936
+ # rescue Aws::Waiters::Errors::WaiterFailed
1937
+ # # resource did not enter the desired state in time
1938
+ # end
1939
+ #
1940
+ # ## Valid Waiters
1941
+ #
1942
+ # The following table lists the valid waiter names, the operations they call,
1943
+ # and the default `:delay` and `:max_attempts` values.
1944
+ #
1945
+ # | waiter_name | params | :delay | :max_attempts |
1946
+ # | ------------------------- | ----------------------------- | -------- | ------------- |
1947
+ # | endpoint_created | {#describe_endpoint} | 120 | 120 |
1948
+ # | endpoint_deleted | {#describe_endpoint} | 120 | 120 |
1949
+ # | endpoint_updated | {#describe_endpoint} | 120 | 120 |
1950
+ # | notebook_instance_deleted | {#describe_notebook_instance} | 120 | 120 |
1951
+ # | notebook_instance_running | {#describe_notebook_instance} | 120 | 120 |
1952
+ # | notebook_instance_stopped | {#describe_notebook_instance} | 120 | 120 |
1953
+ # | training_job_created | {#describe_training_job} | 120 | 120 |
1954
+ # | training_job_deleted | {#describe_training_job} | 120 | 120 |
1955
+ # | training_job_stopped | {#describe_training_job} | 120 | 120 |
1956
+ #
1957
+ # @raise [Errors::FailureStateError] Raised when the waiter terminates
1958
+ # because the waiter has entered a state that it will not transition
1959
+ # out of, preventing success.
1960
+ #
1961
+ # @raise [Errors::TooManyAttemptsError] Raised when the configured
1962
+ # maximum number of attempts have been made, and the waiter is not
1963
+ # yet successful.
1964
+ #
1965
+ # @raise [Errors::UnexpectedError] Raised when an error is encounted
1966
+ # while polling for a resource that is not expected.
1967
+ #
1968
+ # @raise [Errors::NoSuchWaiterError] Raised when you request to wait
1969
+ # for an unknown state.
1970
+ #
1971
+ # @return [Boolean] Returns `true` if the waiter was successful.
1972
+ # @param [Symbol] waiter_name
1973
+ # @param [Hash] params ({})
1974
+ # @param [Hash] options ({})
1975
+ # @option options [Integer] :max_attempts
1976
+ # @option options [Integer] :delay
1977
+ # @option options [Proc] :before_attempt
1978
+ # @option options [Proc] :before_wait
1979
+ def wait_until(waiter_name, params = {}, options = {})
1980
+ w = waiter(waiter_name, options)
1981
+ yield(w.waiter) if block_given? # deprecated
1982
+ w.wait(params)
1983
+ end
1984
+
1985
+ # @api private
1986
+ # @deprecated
1987
+ def waiter_names
1988
+ waiters.keys
1989
+ end
1990
+
1991
+ private
1992
+
1993
+ # @param [Symbol] waiter_name
1994
+ # @param [Hash] options ({})
1995
+ def waiter(waiter_name, options = {})
1996
+ waiter_class = waiters[waiter_name]
1997
+ if waiter_class
1998
+ waiter_class.new(options.merge(client: self))
1999
+ else
2000
+ raise Aws::Waiters::Errors::NoSuchWaiterError.new(waiter_name, waiters.keys)
2001
+ end
2002
+ end
2003
+
2004
+ def waiters
2005
+ {
2006
+ endpoint_created: Waiters::Endpoint_Created,
2007
+ endpoint_deleted: Waiters::Endpoint_Deleted,
2008
+ endpoint_updated: Waiters::Endpoint_Updated,
2009
+ notebook_instance_deleted: Waiters::NotebookInstance_Deleted,
2010
+ notebook_instance_running: Waiters::NotebookInstance_Running,
2011
+ notebook_instance_stopped: Waiters::NotebookInstance_Stopped,
2012
+ training_job_created: Waiters::TrainingJob_Created,
2013
+ training_job_deleted: Waiters::TrainingJob_Deleted,
2014
+ training_job_stopped: Waiters::TrainingJob_Stopped
2015
+ }
2016
+ end
2017
+
2018
+ class << self
2019
+
2020
+ # @api private
2021
+ attr_reader :identifier
2022
+
2023
+ # @api private
2024
+ def errors_module
2025
+ Errors
2026
+ end
2027
+
2028
+ end
2029
+ end
2030
+ end