aws-sdk-appstream 1.0.0.rc2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: cb9adc1a3529c7ddfd15c6773a2c05b8c097e1b8
4
+ data.tar.gz: 0897ca99e99c83bb5b4eddc0eafe8dbe71897916
5
+ SHA512:
6
+ metadata.gz: eb2dc4d7df113c7f126645be4a0fb2880e08c2139c28492b110cb3c52b6f4ffee9ee68f3390a7ce177329e529d3fca09398bb613b61f3a12d6a419c4193f257e
7
+ data.tar.gz: fed34d84f13107d9fc7517fba59fd9d17d8527f30e6d51c78fc4ee28d6b51425b7000cb606724e2cc790d8036bfcae914085b2a1b5c6e9523cb40f0d8061946c
@@ -0,0 +1,48 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
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-appstream/types'
12
+ require_relative 'aws-sdk-appstream/client_api'
13
+ require_relative 'aws-sdk-appstream/client'
14
+ require_relative 'aws-sdk-appstream/errors'
15
+ require_relative 'aws-sdk-appstream/waiters'
16
+ require_relative 'aws-sdk-appstream/resource'
17
+ require_relative 'aws-sdk-appstream/customizations'
18
+
19
+ # This module provides support for Amazon AppStream. This module is available in the
20
+ # `aws-sdk-appstream` 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 AppStream all
33
+ # extend {Errors::ServiceError}.
34
+ #
35
+ # begin
36
+ # # do stuff
37
+ # rescue Aws::AppStream::Errors::ServiceError
38
+ # # rescues all service API errors
39
+ # end
40
+ #
41
+ # See {Errors} for more information.
42
+ #
43
+ # @service
44
+ module Aws::AppStream
45
+
46
+ GEM_VERSION = '1.0.0.rc2'
47
+
48
+ end
@@ -0,0 +1,891 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
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/signature_v4.rb'
22
+ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
23
+
24
+ Aws::Plugins::GlobalConfiguration.add_identifier(:appstream)
25
+
26
+ module Aws
27
+ module AppStream
28
+ class Client < Seahorse::Client::Base
29
+
30
+ include Aws::ClientStubs
31
+
32
+ @identifier = :appstream
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::SignatureV4)
50
+ add_plugin(Aws::Plugins::Protocols::JsonRpc)
51
+
52
+ # @option options [required, Aws::CredentialProvider] :credentials
53
+ # Your AWS credentials. This can be an instance of any one of the
54
+ # following classes:
55
+ #
56
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
57
+ # credentials.
58
+ #
59
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
60
+ # from an EC2 IMDS on an EC2 instance.
61
+ #
62
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
63
+ # shared file, such as `~/.aws/config`.
64
+ #
65
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
66
+ #
67
+ # When `:credentials` are not configured directly, the following
68
+ # locations will be searched for credentials:
69
+ #
70
+ # * `Aws.config[:credentials]`
71
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
72
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
73
+ # * `~/.aws/credentials`
74
+ # * `~/.aws/config`
75
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
76
+ # very aggressive. Construct and pass an instance of
77
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
78
+ # timeouts.
79
+ # @option options [required, String] :region
80
+ # The AWS region to connect to. The configured `:region` is
81
+ # used to determine the service `:endpoint`. When not passed,
82
+ # a default `:region` is search for in the following locations:
83
+ #
84
+ # * `Aws.config[:region]`
85
+ # * `ENV['AWS_REGION']`
86
+ # * `ENV['AMAZON_REGION']`
87
+ # * `ENV['AWS_DEFAULT_REGION']`
88
+ # * `~/.aws/credentials`
89
+ # * `~/.aws/config`
90
+ # @option options [String] :access_key_id
91
+ # @option options [Boolean] :convert_params (true)
92
+ # When `true`, an attempt is made to coerce request parameters into
93
+ # the required types.
94
+ # @option options [String] :endpoint
95
+ # The client endpoint is normally constructed from the `:region`
96
+ # option. You should only configure an `:endpoint` when connecting
97
+ # to test endpoints. This should be avalid HTTP(S) URI.
98
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
99
+ # The log formatter.
100
+ # @option options [Symbol] :log_level (:info)
101
+ # The log level to send messages to the `:logger` at.
102
+ # @option options [Logger] :logger
103
+ # The Logger instance to send log messages to. If this option
104
+ # is not set, logging will be disabled.
105
+ # @option options [String] :profile ("default")
106
+ # Used when loading credentials from the shared credentials file
107
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
108
+ # @option options [Integer] :retry_limit (3)
109
+ # The maximum number of times to retry failed requests. Only
110
+ # ~ 500 level server errors and certain ~ 400 level client errors
111
+ # are retried. Generally, these are throttling errors, data
112
+ # checksum errors, networking errors, timeout errors and auth
113
+ # errors from expired credentials.
114
+ # @option options [String] :secret_access_key
115
+ # @option options [String] :session_token
116
+ # @option options [Boolean] :simple_json (false)
117
+ # Disables request parameter conversion, validation, and formatting.
118
+ # Also disable response data type conversions. This option is useful
119
+ # when you want to ensure the highest level of performance by
120
+ # avoiding overhead of walking request parameters and response data
121
+ # structures.
122
+ #
123
+ # When `:simple_json` is enabled, the request parameters hash must
124
+ # be formatted exactly as the DynamoDB API expects.
125
+ # @option options [Boolean] :stub_responses (false)
126
+ # Causes the client to return stubbed responses. By default
127
+ # fake responses are generated and returned. You can specify
128
+ # the response data to return or errors to raise by calling
129
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
130
+ #
131
+ # ** Please note ** When response stubbing is enabled, no HTTP
132
+ # requests are made, and retries are disabled.
133
+ # @option options [Boolean] :validate_params (true)
134
+ # When `true`, request parameters are validated before
135
+ # sending the request.
136
+ def initialize(*args)
137
+ super
138
+ end
139
+
140
+ # @!group API Operations
141
+
142
+ # Associate a fleet to a stack.
143
+ # @option params [required, String] :fleet_name
144
+ # The name of the fleet to associate.
145
+ # @option params [required, String] :stack_name
146
+ # The name of the stack to which the fleet is associated.
147
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
148
+ #
149
+ # @example Request syntax with placeholder values
150
+ # resp = client.associate_fleet({
151
+ # fleet_name: "String", # required
152
+ # stack_name: "String", # required
153
+ # })
154
+ # @overload associate_fleet(params = {})
155
+ # @param [Hash] params ({})
156
+ def associate_fleet(params = {}, options = {})
157
+ req = build_request(:associate_fleet, params)
158
+ req.send_request(options)
159
+ end
160
+
161
+ # Creates a new fleet.
162
+ # @option params [required, String] :name
163
+ # A unique identifier for the fleet.
164
+ # @option params [required, String] :image_name
165
+ # Unique name of the image used by the fleet.
166
+ # @option params [required, String] :instance_type
167
+ # The instance type of compute resources for the fleet. Fleet instances
168
+ # are launched from this instance type.
169
+ # @option params [required, Types::ComputeCapacity] :compute_capacity
170
+ # The parameters for the capacity allocated to the fleet.
171
+ # @option params [Types::VpcConfig] :vpc_config
172
+ # The VPC configuration for the fleet.
173
+ # @option params [Integer] :max_user_duration_in_seconds
174
+ # The maximum time up to which a streaming session can run.
175
+ # @option params [Integer] :disconnect_timeout_in_seconds
176
+ # The time after disconnection when a session is considered to have
177
+ # ended. If a user who got disconnected reconnects within this timeout
178
+ # interval, the user is connected back to his/her previous session.
179
+ # @option params [String] :description
180
+ # The description of the fleet.
181
+ # @option params [String] :display_name
182
+ # The display name of the fleet.
183
+ # @return [Types::CreateFleetResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
184
+ #
185
+ # * {Types::CreateFleetResult#fleet #Fleet} => Types::Fleet
186
+ #
187
+ # @example Request syntax with placeholder values
188
+ # resp = client.create_fleet({
189
+ # name: "Name", # required
190
+ # image_name: "String", # required
191
+ # instance_type: "String", # required
192
+ # compute_capacity: { # required
193
+ # desired_instances: 1, # required
194
+ # },
195
+ # vpc_config: {
196
+ # subnet_ids: ["String"], # required
197
+ # },
198
+ # max_user_duration_in_seconds: 1,
199
+ # disconnect_timeout_in_seconds: 1,
200
+ # description: "Description",
201
+ # display_name: "DisplayName",
202
+ # })
203
+ #
204
+ # @example Response structure
205
+ # resp.fleet.arn #=> String
206
+ # resp.fleet.name #=> String
207
+ # resp.fleet.display_name #=> String
208
+ # resp.fleet.description #=> String
209
+ # resp.fleet.image_name #=> String
210
+ # resp.fleet.instance_type #=> String
211
+ # resp.fleet.compute_capacity_status.desired #=> Integer
212
+ # resp.fleet.compute_capacity_status.running #=> Integer
213
+ # resp.fleet.compute_capacity_status.in_use #=> Integer
214
+ # resp.fleet.compute_capacity_status.available #=> Integer
215
+ # resp.fleet.max_user_duration_in_seconds #=> Integer
216
+ # resp.fleet.disconnect_timeout_in_seconds #=> Integer
217
+ # resp.fleet.state #=> String, one of "STARTING", "RUNNING", "STOPPING", "STOPPED"
218
+ # resp.fleet.vpc_config.subnet_ids #=> Array
219
+ # resp.fleet.vpc_config.subnet_ids[0] #=> String
220
+ # resp.fleet.created_time #=> Time
221
+ # resp.fleet.fleet_errors #=> Array
222
+ # resp.fleet.fleet_errors[0].error_code #=> String, one of "IAM_SERVICE_ROLE_MISSING_ENI_DESCRIBE_ACTION", "IAM_SERVICE_ROLE_MISSING_ENI_CREATE_ACTION", "IAM_SERVICE_ROLE_MISSING_ENI_DELETE_ACTION", "NETWORK_INTERFACE_LIMIT_EXCEEDED", "INTERNAL_SERVICE_ERROR", "IAM_SERVICE_ROLE_IS_MISSING", "SUBNET_HAS_INSUFFICIENT_IP_ADDRESSES", "IAM_SERVICE_ROLE_MISSING_DESCRIBE_SUBNET_ACTION", "SUBNET_NOT_FOUND", "IMAGE_NOT_FOUND", "INVALID_SUBNET_CONFIGURATION"
223
+ # resp.fleet.fleet_errors[0].error_message #=> String
224
+ # @overload create_fleet(params = {})
225
+ # @param [Hash] params ({})
226
+ def create_fleet(params = {}, options = {})
227
+ req = build_request(:create_fleet, params)
228
+ req.send_request(options)
229
+ end
230
+
231
+ # Create a new stack.
232
+ # @option params [required, String] :name
233
+ # The unique identifier for this stack.
234
+ # @option params [String] :description
235
+ # The description displayed to end users on the AppStream 2.0 portal.
236
+ # @option params [String] :display_name
237
+ # The name displayed to end users on the AppStream 2.0 portal.
238
+ # @return [Types::CreateStackResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
239
+ #
240
+ # * {Types::CreateStackResult#stack #Stack} => Types::Stack
241
+ #
242
+ # @example Request syntax with placeholder values
243
+ # resp = client.create_stack({
244
+ # name: "String", # required
245
+ # description: "Description",
246
+ # display_name: "DisplayName",
247
+ # })
248
+ #
249
+ # @example Response structure
250
+ # resp.stack.arn #=> String
251
+ # resp.stack.name #=> String
252
+ # resp.stack.description #=> String
253
+ # resp.stack.display_name #=> String
254
+ # resp.stack.created_time #=> Time
255
+ # @overload create_stack(params = {})
256
+ # @param [Hash] params ({})
257
+ def create_stack(params = {}, options = {})
258
+ req = build_request(:create_stack, params)
259
+ req.send_request(options)
260
+ end
261
+
262
+ # Creates a URL to start an AppStream 2.0 streaming session for a user.
263
+ # By default, the URL is valid only for 1 minute from the time that it
264
+ # is generated.
265
+ # @option params [required, String] :stack_name
266
+ # The stack for which the URL is generated.
267
+ # @option params [required, String] :fleet_name
268
+ # The fleet for which the URL is generated.
269
+ # @option params [required, String] :user_id
270
+ # A unique user ID for whom the URL is generated.
271
+ # @option params [String] :application_id
272
+ # The ID of the application that must be launched after the session
273
+ # starts.
274
+ # @option params [Integer] :validity
275
+ # The validity duration of the URL in seconds. After this duration, the
276
+ # URL returned by this operation becomes invalid.
277
+ # @option params [String] :session_context
278
+ # The sessionContext of the streaming URL.
279
+ # @return [Types::CreateStreamingURLResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
280
+ #
281
+ # * {Types::CreateStreamingURLResult#streaming_url #StreamingURL} => String
282
+ # * {Types::CreateStreamingURLResult#expires #Expires} => Time
283
+ #
284
+ # @example Request syntax with placeholder values
285
+ # resp = client.create_streaming_url({
286
+ # stack_name: "String", # required
287
+ # fleet_name: "String", # required
288
+ # user_id: "UserId", # required
289
+ # application_id: "String",
290
+ # validity: 1,
291
+ # session_context: "String",
292
+ # })
293
+ #
294
+ # @example Response structure
295
+ # resp.streaming_url #=> String
296
+ # resp.expires #=> Time
297
+ # @overload create_streaming_url(params = {})
298
+ # @param [Hash] params ({})
299
+ def create_streaming_url(params = {}, options = {})
300
+ req = build_request(:create_streaming_url, params)
301
+ req.send_request(options)
302
+ end
303
+
304
+ # Deletes a fleet.
305
+ # @option params [required, String] :name
306
+ # The name of the fleet to be deleted.
307
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
308
+ #
309
+ # @example Request syntax with placeholder values
310
+ # resp = client.delete_fleet({
311
+ # name: "String", # required
312
+ # })
313
+ # @overload delete_fleet(params = {})
314
+ # @param [Hash] params ({})
315
+ def delete_fleet(params = {}, options = {})
316
+ req = build_request(:delete_fleet, params)
317
+ req.send_request(options)
318
+ end
319
+
320
+ # Deletes the stack. After this operation completes, the environment can
321
+ # no longer be activated, and any reservations made for the stack are
322
+ # released.
323
+ # @option params [required, String] :name
324
+ # The name of the stack to delete.
325
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
326
+ #
327
+ # @example Request syntax with placeholder values
328
+ # resp = client.delete_stack({
329
+ # name: "String", # required
330
+ # })
331
+ # @overload delete_stack(params = {})
332
+ # @param [Hash] params ({})
333
+ def delete_stack(params = {}, options = {})
334
+ req = build_request(:delete_stack, params)
335
+ req.send_request(options)
336
+ end
337
+
338
+ # If fleet names are provided, this operation describes the specified
339
+ # fleets; otherwise, all the fleets in the account are described.
340
+ # @option params [Array<String>] :names
341
+ # The fleet names to describe. Use null to describe all the fleets for
342
+ # the AWS account.
343
+ # @option params [String] :next_token
344
+ # The pagination token to use to retrieve the next page of results for
345
+ # this operation. If this value is null, it retrieves the first page.
346
+ # @return [Types::DescribeFleetsResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
347
+ #
348
+ # * {Types::DescribeFleetsResult#fleets #Fleets} => Array&lt;Types::Fleet&gt;
349
+ # * {Types::DescribeFleetsResult#next_token #NextToken} => String
350
+ #
351
+ # @example Request syntax with placeholder values
352
+ # resp = client.describe_fleets({
353
+ # names: ["String"],
354
+ # next_token: "String",
355
+ # })
356
+ #
357
+ # @example Response structure
358
+ # resp.fleets #=> Array
359
+ # resp.fleets[0].arn #=> String
360
+ # resp.fleets[0].name #=> String
361
+ # resp.fleets[0].display_name #=> String
362
+ # resp.fleets[0].description #=> String
363
+ # resp.fleets[0].image_name #=> String
364
+ # resp.fleets[0].instance_type #=> String
365
+ # resp.fleets[0].compute_capacity_status.desired #=> Integer
366
+ # resp.fleets[0].compute_capacity_status.running #=> Integer
367
+ # resp.fleets[0].compute_capacity_status.in_use #=> Integer
368
+ # resp.fleets[0].compute_capacity_status.available #=> Integer
369
+ # resp.fleets[0].max_user_duration_in_seconds #=> Integer
370
+ # resp.fleets[0].disconnect_timeout_in_seconds #=> Integer
371
+ # resp.fleets[0].state #=> String, one of "STARTING", "RUNNING", "STOPPING", "STOPPED"
372
+ # resp.fleets[0].vpc_config.subnet_ids #=> Array
373
+ # resp.fleets[0].vpc_config.subnet_ids[0] #=> String
374
+ # resp.fleets[0].created_time #=> Time
375
+ # resp.fleets[0].fleet_errors #=> Array
376
+ # resp.fleets[0].fleet_errors[0].error_code #=> String, one of "IAM_SERVICE_ROLE_MISSING_ENI_DESCRIBE_ACTION", "IAM_SERVICE_ROLE_MISSING_ENI_CREATE_ACTION", "IAM_SERVICE_ROLE_MISSING_ENI_DELETE_ACTION", "NETWORK_INTERFACE_LIMIT_EXCEEDED", "INTERNAL_SERVICE_ERROR", "IAM_SERVICE_ROLE_IS_MISSING", "SUBNET_HAS_INSUFFICIENT_IP_ADDRESSES", "IAM_SERVICE_ROLE_MISSING_DESCRIBE_SUBNET_ACTION", "SUBNET_NOT_FOUND", "IMAGE_NOT_FOUND", "INVALID_SUBNET_CONFIGURATION"
377
+ # resp.fleets[0].fleet_errors[0].error_message #=> String
378
+ # resp.next_token #=> String
379
+ # @overload describe_fleets(params = {})
380
+ # @param [Hash] params ({})
381
+ def describe_fleets(params = {}, options = {})
382
+ req = build_request(:describe_fleets, params)
383
+ req.send_request(options)
384
+ end
385
+
386
+ # Describes the images. If a list of names is not provided, all images
387
+ # in your account are returned. This operation does not return a
388
+ # paginated result.
389
+ # @option params [Array<String>] :names
390
+ # A specific list of images to describe.
391
+ # @return [Types::DescribeImagesResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
392
+ #
393
+ # * {Types::DescribeImagesResult#images #Images} => Array&lt;Types::Image&gt;
394
+ #
395
+ # @example Request syntax with placeholder values
396
+ # resp = client.describe_images({
397
+ # names: ["String"],
398
+ # })
399
+ #
400
+ # @example Response structure
401
+ # resp.images #=> Array
402
+ # resp.images[0].name #=> String
403
+ # resp.images[0].arn #=> String
404
+ # resp.images[0].base_image_arn #=> String
405
+ # resp.images[0].display_name #=> String
406
+ # resp.images[0].state #=> String, one of "PENDING", "AVAILABLE", "FAILED", "DELETING"
407
+ # resp.images[0].visibility #=> String, one of "PUBLIC", "PRIVATE"
408
+ # resp.images[0].platform #=> String, one of "WINDOWS"
409
+ # resp.images[0].description #=> String
410
+ # resp.images[0].state_change_reason.code #=> String, one of "INTERNAL_ERROR", "IMAGE_BUILDER_NOT_AVAILABLE"
411
+ # resp.images[0].state_change_reason.message #=> String
412
+ # resp.images[0].applications #=> Array
413
+ # resp.images[0].applications[0].name #=> String
414
+ # resp.images[0].applications[0].display_name #=> String
415
+ # resp.images[0].applications[0].icon_url #=> String
416
+ # resp.images[0].applications[0].launch_path #=> String
417
+ # resp.images[0].applications[0].launch_parameters #=> String
418
+ # resp.images[0].applications[0].enabled #=> Boolean
419
+ # resp.images[0].applications[0].metadata #=> Hash
420
+ # resp.images[0].applications[0].metadata["String"] #=> String
421
+ # resp.images[0].created_time #=> Time
422
+ # @overload describe_images(params = {})
423
+ # @param [Hash] params ({})
424
+ def describe_images(params = {}, options = {})
425
+ req = build_request(:describe_images, params)
426
+ req.send_request(options)
427
+ end
428
+
429
+ # Describes the streaming sessions for a stack and a fleet. If a user ID
430
+ # is provided, this operation returns streaming sessions for only that
431
+ # user. Pass this value for the `nextToken` parameter in a subsequent
432
+ # call to this operation to retrieve the next set of items.
433
+ # @option params [required, String] :stack_name
434
+ # The name of the stack for which to list sessions.
435
+ # @option params [required, String] :fleet_name
436
+ # The name of the fleet for which to list sessions.
437
+ # @option params [String] :user_id
438
+ # The user for whom to list sessions. Use null to describe all the
439
+ # sessions for the stack and fleet.
440
+ # @option params [String] :next_token
441
+ # The pagination token to use to retrieve the next page of results for
442
+ # this operation. If this value is null, it retrieves the first page.
443
+ # @option params [Integer] :limit
444
+ # The size of each page of results. The default value is 20 and the
445
+ # maximum supported value is 50.
446
+ # @return [Types::DescribeSessionsResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
447
+ #
448
+ # * {Types::DescribeSessionsResult#sessions #Sessions} => Array&lt;Types::Session&gt;
449
+ # * {Types::DescribeSessionsResult#next_token #NextToken} => String
450
+ #
451
+ # @example Request syntax with placeholder values
452
+ # resp = client.describe_sessions({
453
+ # stack_name: "String", # required
454
+ # fleet_name: "String", # required
455
+ # user_id: "UserId",
456
+ # next_token: "String",
457
+ # limit: 1,
458
+ # })
459
+ #
460
+ # @example Response structure
461
+ # resp.sessions #=> Array
462
+ # resp.sessions[0].id #=> String
463
+ # resp.sessions[0].user_id #=> String
464
+ # resp.sessions[0].stack_name #=> String
465
+ # resp.sessions[0].fleet_name #=> String
466
+ # resp.sessions[0].state #=> String, one of "ACTIVE", "PENDING", "EXPIRED"
467
+ # resp.next_token #=> String
468
+ # @overload describe_sessions(params = {})
469
+ # @param [Hash] params ({})
470
+ def describe_sessions(params = {}, options = {})
471
+ req = build_request(:describe_sessions, params)
472
+ req.send_request(options)
473
+ end
474
+
475
+ # If stack names are not provided, this operation describes the
476
+ # specified stacks; otherwise, all stacks in the account are described.
477
+ # Pass the `nextToken` value in a subsequent call to this operation to
478
+ # retrieve the next set of items.
479
+ # @option params [Array<String>] :names
480
+ # The stack names to describe. Use null to describe all the stacks for
481
+ # the AWS account.
482
+ # @option params [String] :next_token
483
+ # The pagination token to use to retrieve the next page of results for
484
+ # this operation. If this value is null, it retrieves the first page.
485
+ # @return [Types::DescribeStacksResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
486
+ #
487
+ # * {Types::DescribeStacksResult#stacks #Stacks} => Array&lt;Types::Stack&gt;
488
+ # * {Types::DescribeStacksResult#next_token #NextToken} => String
489
+ #
490
+ # @example Request syntax with placeholder values
491
+ # resp = client.describe_stacks({
492
+ # names: ["String"],
493
+ # next_token: "String",
494
+ # })
495
+ #
496
+ # @example Response structure
497
+ # resp.stacks #=> Array
498
+ # resp.stacks[0].arn #=> String
499
+ # resp.stacks[0].name #=> String
500
+ # resp.stacks[0].description #=> String
501
+ # resp.stacks[0].display_name #=> String
502
+ # resp.stacks[0].created_time #=> Time
503
+ # resp.next_token #=> String
504
+ # @overload describe_stacks(params = {})
505
+ # @param [Hash] params ({})
506
+ def describe_stacks(params = {}, options = {})
507
+ req = build_request(:describe_stacks, params)
508
+ req.send_request(options)
509
+ end
510
+
511
+ # Disassociates a fleet from a stack.
512
+ # @option params [required, String] :fleet_name
513
+ # The name of the fleet to disassociate.
514
+ # @option params [required, String] :stack_name
515
+ # The name of the stack with which the fleet is associated.
516
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
517
+ #
518
+ # @example Request syntax with placeholder values
519
+ # resp = client.disassociate_fleet({
520
+ # fleet_name: "String", # required
521
+ # stack_name: "String", # required
522
+ # })
523
+ # @overload disassociate_fleet(params = {})
524
+ # @param [Hash] params ({})
525
+ def disassociate_fleet(params = {}, options = {})
526
+ req = build_request(:disassociate_fleet, params)
527
+ req.send_request(options)
528
+ end
529
+
530
+ # This operation immediately stops a streaming session.
531
+ # @option params [required, String] :session_id
532
+ # The unique identifier of the streaming session to be stopped.
533
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
534
+ #
535
+ # @example Request syntax with placeholder values
536
+ # resp = client.expire_session({
537
+ # session_id: "String", # required
538
+ # })
539
+ # @overload expire_session(params = {})
540
+ # @param [Hash] params ({})
541
+ def expire_session(params = {}, options = {})
542
+ req = build_request(:expire_session, params)
543
+ req.send_request(options)
544
+ end
545
+
546
+ # Lists all fleets associated with the stack.
547
+ # @option params [required, String] :stack_name
548
+ # The name of the stack whose associated fleets are listed.
549
+ # @option params [String] :next_token
550
+ # The pagination token to use to retrieve the next page of results for
551
+ # this operation. If this value is null, it retrieves the first page.
552
+ # @return [Types::ListAssociatedFleetsResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
553
+ #
554
+ # * {Types::ListAssociatedFleetsResult#names #Names} => Array&lt;String&gt;
555
+ # * {Types::ListAssociatedFleetsResult#next_token #NextToken} => String
556
+ #
557
+ # @example Request syntax with placeholder values
558
+ # resp = client.list_associated_fleets({
559
+ # stack_name: "String", # required
560
+ # next_token: "String",
561
+ # })
562
+ #
563
+ # @example Response structure
564
+ # resp.names #=> Array
565
+ # resp.names[0] #=> String
566
+ # resp.next_token #=> String
567
+ # @overload list_associated_fleets(params = {})
568
+ # @param [Hash] params ({})
569
+ def list_associated_fleets(params = {}, options = {})
570
+ req = build_request(:list_associated_fleets, params)
571
+ req.send_request(options)
572
+ end
573
+
574
+ # Lists all stacks to which the specified fleet is associated.
575
+ # @option params [required, String] :fleet_name
576
+ # The name of the fleet whose associated stacks are listed.
577
+ # @option params [String] :next_token
578
+ # The pagination token to use to retrieve the next page of results for
579
+ # this operation. If this value is null, it retrieves the first page.
580
+ # @return [Types::ListAssociatedStacksResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
581
+ #
582
+ # * {Types::ListAssociatedStacksResult#names #Names} => Array&lt;String&gt;
583
+ # * {Types::ListAssociatedStacksResult#next_token #NextToken} => String
584
+ #
585
+ # @example Request syntax with placeholder values
586
+ # resp = client.list_associated_stacks({
587
+ # fleet_name: "String", # required
588
+ # next_token: "String",
589
+ # })
590
+ #
591
+ # @example Response structure
592
+ # resp.names #=> Array
593
+ # resp.names[0] #=> String
594
+ # resp.next_token #=> String
595
+ # @overload list_associated_stacks(params = {})
596
+ # @param [Hash] params ({})
597
+ def list_associated_stacks(params = {}, options = {})
598
+ req = build_request(:list_associated_stacks, params)
599
+ req.send_request(options)
600
+ end
601
+
602
+ # Starts a fleet.
603
+ # @option params [required, String] :name
604
+ # The name of the fleet to start.
605
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
606
+ #
607
+ # @example Request syntax with placeholder values
608
+ # resp = client.start_fleet({
609
+ # name: "String", # required
610
+ # })
611
+ # @overload start_fleet(params = {})
612
+ # @param [Hash] params ({})
613
+ def start_fleet(params = {}, options = {})
614
+ req = build_request(:start_fleet, params)
615
+ req.send_request(options)
616
+ end
617
+
618
+ # Stops a fleet.
619
+ # @option params [required, String] :name
620
+ # The name of the fleet to stop.
621
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
622
+ #
623
+ # @example Request syntax with placeholder values
624
+ # resp = client.stop_fleet({
625
+ # name: "String", # required
626
+ # })
627
+ # @overload stop_fleet(params = {})
628
+ # @param [Hash] params ({})
629
+ def stop_fleet(params = {}, options = {})
630
+ req = build_request(:stop_fleet, params)
631
+ req.send_request(options)
632
+ end
633
+
634
+ # Updates an existing fleet. All the attributes except the fleet name
635
+ # can be updated in the **STOPPED** state. Only **ComputeCapacity** and
636
+ # **ImageName** can be updated in any other state.
637
+ # @option params [String] :image_name
638
+ # The image name from which a fleet is created.
639
+ # @option params [required, String] :name
640
+ # The name of the fleet.
641
+ # @option params [String] :instance_type
642
+ # The instance type of compute resources for the fleet. Fleet instances
643
+ # are launched from this instance type.
644
+ # @option params [Types::ComputeCapacity] :compute_capacity
645
+ # The parameters for the capacity allocated to the fleet.
646
+ # @option params [Types::VpcConfig] :vpc_config
647
+ # The VPC configuration for the fleet.
648
+ # @option params [Integer] :max_user_duration_in_seconds
649
+ # The maximum time during which a streaming session can run.
650
+ # @option params [Integer] :disconnect_timeout_in_seconds
651
+ # The time after disconnection when a session is considered to have
652
+ # ended. When the user reconnects after a disconnection, the user is
653
+ # connected to the same instance within this time interval.
654
+ # @option params [Boolean] :delete_vpc_config
655
+ # Delete the VPC association for the specified fleet.
656
+ # @option params [String] :description
657
+ # The description displayed to end users on the AppStream 2.0 portal.
658
+ # @option params [String] :display_name
659
+ # The name displayed to end users on the AppStream 2.0 portal.
660
+ # @return [Types::UpdateFleetResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
661
+ #
662
+ # * {Types::UpdateFleetResult#fleet #Fleet} => Types::Fleet
663
+ #
664
+ # @example Request syntax with placeholder values
665
+ # resp = client.update_fleet({
666
+ # image_name: "String",
667
+ # name: "String", # required
668
+ # instance_type: "String",
669
+ # compute_capacity: {
670
+ # desired_instances: 1, # required
671
+ # },
672
+ # vpc_config: {
673
+ # subnet_ids: ["String"], # required
674
+ # },
675
+ # max_user_duration_in_seconds: 1,
676
+ # disconnect_timeout_in_seconds: 1,
677
+ # delete_vpc_config: false,
678
+ # description: "Description",
679
+ # display_name: "DisplayName",
680
+ # })
681
+ #
682
+ # @example Response structure
683
+ # resp.fleet.arn #=> String
684
+ # resp.fleet.name #=> String
685
+ # resp.fleet.display_name #=> String
686
+ # resp.fleet.description #=> String
687
+ # resp.fleet.image_name #=> String
688
+ # resp.fleet.instance_type #=> String
689
+ # resp.fleet.compute_capacity_status.desired #=> Integer
690
+ # resp.fleet.compute_capacity_status.running #=> Integer
691
+ # resp.fleet.compute_capacity_status.in_use #=> Integer
692
+ # resp.fleet.compute_capacity_status.available #=> Integer
693
+ # resp.fleet.max_user_duration_in_seconds #=> Integer
694
+ # resp.fleet.disconnect_timeout_in_seconds #=> Integer
695
+ # resp.fleet.state #=> String, one of "STARTING", "RUNNING", "STOPPING", "STOPPED"
696
+ # resp.fleet.vpc_config.subnet_ids #=> Array
697
+ # resp.fleet.vpc_config.subnet_ids[0] #=> String
698
+ # resp.fleet.created_time #=> Time
699
+ # resp.fleet.fleet_errors #=> Array
700
+ # resp.fleet.fleet_errors[0].error_code #=> String, one of "IAM_SERVICE_ROLE_MISSING_ENI_DESCRIBE_ACTION", "IAM_SERVICE_ROLE_MISSING_ENI_CREATE_ACTION", "IAM_SERVICE_ROLE_MISSING_ENI_DELETE_ACTION", "NETWORK_INTERFACE_LIMIT_EXCEEDED", "INTERNAL_SERVICE_ERROR", "IAM_SERVICE_ROLE_IS_MISSING", "SUBNET_HAS_INSUFFICIENT_IP_ADDRESSES", "IAM_SERVICE_ROLE_MISSING_DESCRIBE_SUBNET_ACTION", "SUBNET_NOT_FOUND", "IMAGE_NOT_FOUND", "INVALID_SUBNET_CONFIGURATION"
701
+ # resp.fleet.fleet_errors[0].error_message #=> String
702
+ # @overload update_fleet(params = {})
703
+ # @param [Hash] params ({})
704
+ def update_fleet(params = {}, options = {})
705
+ req = build_request(:update_fleet, params)
706
+ req.send_request(options)
707
+ end
708
+
709
+ # Updates the specified fields in the stack with the specified name.
710
+ # @option params [String] :display_name
711
+ # The name displayed to end users on the AppStream 2.0 portal.
712
+ # @option params [String] :description
713
+ # The description displayed to end users on the AppStream 2.0 portal.
714
+ # @option params [required, String] :name
715
+ # The name of the stack to update.
716
+ # @return [Types::UpdateStackResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
717
+ #
718
+ # * {Types::UpdateStackResult#stack #Stack} => Types::Stack
719
+ #
720
+ # @example Request syntax with placeholder values
721
+ # resp = client.update_stack({
722
+ # display_name: "DisplayName",
723
+ # description: "Description",
724
+ # name: "String", # required
725
+ # })
726
+ #
727
+ # @example Response structure
728
+ # resp.stack.arn #=> String
729
+ # resp.stack.name #=> String
730
+ # resp.stack.description #=> String
731
+ # resp.stack.display_name #=> String
732
+ # resp.stack.created_time #=> Time
733
+ # @overload update_stack(params = {})
734
+ # @param [Hash] params ({})
735
+ def update_stack(params = {}, options = {})
736
+ req = build_request(:update_stack, params)
737
+ req.send_request(options)
738
+ end
739
+
740
+ # @!endgroup
741
+
742
+ # @param params ({})
743
+ # @api private
744
+ def build_request(operation_name, params = {})
745
+ handlers = @handlers.for(operation_name)
746
+ context = Seahorse::Client::RequestContext.new(
747
+ operation_name: operation_name,
748
+ operation: config.api.operation(operation_name),
749
+ client: self,
750
+ params: params,
751
+ config: config)
752
+ context[:gem_name] = 'aws-sdk-appstream'
753
+ context[:gem_version] = '1.0.0.rc2'
754
+ Seahorse::Client::Request.new(handlers, context)
755
+ end
756
+
757
+ # Polls an API operation until a resource enters a desired state.
758
+ #
759
+ # ## Basic Usage
760
+ #
761
+ # A waiter will call an API operation until:
762
+ #
763
+ # * It is successful
764
+ # * It enters a terminal state
765
+ # * It makes the maximum number of attempts
766
+ #
767
+ # In between attempts, the waiter will sleep.
768
+ #
769
+ # # polls in a loop, sleeping between attempts
770
+ # client.waiter_until(waiter_name, params)
771
+ #
772
+ # ## Configuration
773
+ #
774
+ # You can configure the maximum number of polling attempts, and the
775
+ # delay (in seconds) between each polling attempt. You can pass
776
+ # configuration as the final arguments hash.
777
+ #
778
+ # # poll for ~25 seconds
779
+ # client.wait_until(waiter_name, params, {
780
+ # max_attempts: 5,
781
+ # delay: 5,
782
+ # })
783
+ #
784
+ # ## Callbacks
785
+ #
786
+ # You can be notified before each polling attempt and before each
787
+ # delay. If you throw `:success` or `:failure` from these callbacks,
788
+ # it will terminate the waiter.
789
+ #
790
+ # started_at = Time.now
791
+ # client.wait_until(waiter_name, params, {
792
+ #
793
+ # # disable max attempts
794
+ # max_attempts: nil,
795
+ #
796
+ # # poll for 1 hour, instead of a number of attempts
797
+ # before_wait: -> (attempts, response) do
798
+ # throw :failure if Time.now - started_at > 3600
799
+ # end
800
+ # })
801
+ #
802
+ # ## Handling Errors
803
+ #
804
+ # When a waiter is unsuccessful, it will raise an error.
805
+ # All of the failure errors extend from
806
+ # {Aws::Waiters::Errors::WaiterFailed}.
807
+ #
808
+ # begin
809
+ # client.wait_until(...)
810
+ # rescue Aws::Waiters::Errors::WaiterFailed
811
+ # # resource did not enter the desired state in time
812
+ # end
813
+ #
814
+ # ## Valid Waiters
815
+ #
816
+ # The following table lists the valid waiter names, the operations they call,
817
+ # and the default `:delay` and `:max_attempts` values.
818
+ #
819
+ # | waiter_name | params | :delay | :max_attempts |
820
+ # | ------------- | ------------------ | -------- | ------------- |
821
+ # | fleet_started | {#describe_fleets} | 30 | 40 |
822
+ # | fleet_stopped | {#describe_fleets} | 30 | 40 |
823
+ #
824
+ # @raise [Errors::FailureStateError] Raised when the waiter terminates
825
+ # because the waiter has entered a state that it will not transition
826
+ # out of, preventing success.
827
+ #
828
+ # @raise [Errors::TooManyAttemptsError] Raised when the configured
829
+ # maximum number of attempts have been made, and the waiter is not
830
+ # yet successful.
831
+ #
832
+ # @raise [Errors::UnexpectedError] Raised when an error is encounted
833
+ # while polling for a resource that is not expected.
834
+ #
835
+ # @raise [Errors::NoSuchWaiterError] Raised when you request to wait
836
+ # for an unknown state.
837
+ #
838
+ # @return [Boolean] Returns `true` if the waiter was successful.
839
+ # @param [Symbol] waiter_name
840
+ # @param [Hash] params ({})
841
+ # @param [Hash] options ({})
842
+ # @option options [Integer] :max_attempts
843
+ # @option options [Integer] :delay
844
+ # @option options [Proc] :before_attempt
845
+ # @option options [Proc] :before_wait
846
+ def wait_until(waiter_name, params = {}, options = {})
847
+ w = waiter(waiter_name, options)
848
+ yield(w.waiter) if block_given? # deprecated
849
+ w.wait(params)
850
+ end
851
+
852
+ # @api private
853
+ # @deprecated
854
+ def waiter_names
855
+ waiters.keys
856
+ end
857
+
858
+ private
859
+
860
+ # @param [Symbol] waiter_name
861
+ # @param [Hash] options ({})
862
+ def waiter(waiter_name, options = {})
863
+ waiter_class = waiters[waiter_name]
864
+ if waiter_class
865
+ waiter_class.new(options.merge(client: self))
866
+ else
867
+ raise Aws::Waiters::Errors::NoSuchWaiterError.new(waiter_name, waiters.keys)
868
+ end
869
+ end
870
+
871
+ def waiters
872
+ {
873
+ fleet_started: Waiters::FleetStarted,
874
+ fleet_stopped: Waiters::FleetStopped
875
+ }
876
+ end
877
+
878
+ class << self
879
+
880
+ # @api private
881
+ attr_reader :identifier
882
+
883
+ # @api private
884
+ def errors_module
885
+ Errors
886
+ end
887
+
888
+ end
889
+ end
890
+ end
891
+ end