aws-sdk-cloudtrail 1.51.0 → 1.53.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-cloudtrail/client.rb +81 -23
- data/lib/aws-sdk-cloudtrail/client_api.rb +9 -0
- data/lib/aws-sdk-cloudtrail/endpoint_parameters.rb +69 -0
- data/lib/aws-sdk-cloudtrail/endpoint_provider.rb +120 -0
- data/lib/aws-sdk-cloudtrail/endpoints.rb +519 -0
- data/lib/aws-sdk-cloudtrail/plugins/endpoints.rb +140 -0
- data/lib/aws-sdk-cloudtrail/types.rb +88 -54
- data/lib/aws-sdk-cloudtrail.rb +5 -1
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dcc317a919c81e8b866f2758f10b89e15326810b869dcc7356de1d3570da32b8
|
4
|
+
data.tar.gz: 0a45e1cec8f918696364fa0b670b1d44935b7c3c814b56f173d712294fac0d42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 824b8ff8e53e01922f28c7bc0651fcf65b1733199bd499cf3bfe3394e39902f9d1f724c02e233b74c1542b9a296df6d89b7fe837d208d1dd16381f48efae88be
|
7
|
+
data.tar.gz: 047107d8079b4f8f6d6d623c6e71fa58a7331d26327f0055001018ef62ef1f3aed35be78180798f65b02a9555481066b2ee4e4470369ad51815c638b7778aa89
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.53.0 (2022-10-25)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
8
|
+
|
9
|
+
1.52.0 (2022-10-19)
|
10
|
+
------------------
|
11
|
+
|
12
|
+
* Feature - This release includes support for exporting CloudTrail Lake query results to an Amazon S3 bucket.
|
13
|
+
|
4
14
|
1.51.0 (2022-09-19)
|
5
15
|
------------------
|
6
16
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.53.0
|
@@ -30,7 +30,7 @@ require 'aws-sdk-core/plugins/http_checksum.rb'
|
|
30
30
|
require 'aws-sdk-core/plugins/checksum_algorithm.rb'
|
31
31
|
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
32
32
|
require 'aws-sdk-core/plugins/recursion_detection.rb'
|
33
|
-
require 'aws-sdk-core/plugins/
|
33
|
+
require 'aws-sdk-core/plugins/sign.rb'
|
34
34
|
require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
|
35
35
|
|
36
36
|
Aws::Plugins::GlobalConfiguration.add_identifier(:cloudtrail)
|
@@ -79,8 +79,9 @@ module Aws::CloudTrail
|
|
79
79
|
add_plugin(Aws::Plugins::ChecksumAlgorithm)
|
80
80
|
add_plugin(Aws::Plugins::DefaultsMode)
|
81
81
|
add_plugin(Aws::Plugins::RecursionDetection)
|
82
|
-
add_plugin(Aws::Plugins::
|
82
|
+
add_plugin(Aws::Plugins::Sign)
|
83
83
|
add_plugin(Aws::Plugins::Protocols::JsonRpc)
|
84
|
+
add_plugin(Aws::CloudTrail::Plugins::Endpoints)
|
84
85
|
|
85
86
|
# @overload initialize(options)
|
86
87
|
# @param [Hash] options
|
@@ -297,6 +298,19 @@ module Aws::CloudTrail
|
|
297
298
|
# ** Please note ** When response stubbing is enabled, no HTTP
|
298
299
|
# requests are made, and retries are disabled.
|
299
300
|
#
|
301
|
+
# @option options [Aws::TokenProvider] :token_provider
|
302
|
+
# A Bearer Token Provider. This can be an instance of any one of the
|
303
|
+
# following classes:
|
304
|
+
#
|
305
|
+
# * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
|
306
|
+
# tokens.
|
307
|
+
#
|
308
|
+
# * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
|
309
|
+
# access token generated from `aws login`.
|
310
|
+
#
|
311
|
+
# When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
|
312
|
+
# will be used to search for tokens configured for your profile in shared configuration files.
|
313
|
+
#
|
300
314
|
# @option options [Boolean] :use_dualstack_endpoint
|
301
315
|
# When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
|
302
316
|
# will be used if available.
|
@@ -310,6 +324,9 @@ module Aws::CloudTrail
|
|
310
324
|
# When `true`, request parameters are validated before
|
311
325
|
# sending the request.
|
312
326
|
#
|
327
|
+
# @option options [Aws::CloudTrail::EndpointProvider] :endpoint_provider
|
328
|
+
# The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::CloudTrail::EndpointParameters`
|
329
|
+
#
|
313
330
|
# @option options [URI::HTTP,String] :http_proxy A proxy to send
|
314
331
|
# requests through. Formatted like 'http://proxy.com:123'.
|
315
332
|
#
|
@@ -644,7 +661,7 @@ module Aws::CloudTrail
|
|
644
661
|
#
|
645
662
|
# @option params [String] :kms_key_id
|
646
663
|
# Specifies the KMS key ID to use to encrypt the logs delivered by
|
647
|
-
# CloudTrail. The value can be an alias name prefixed by
|
664
|
+
# CloudTrail. The value can be an alias name prefixed by `alias/`, a
|
648
665
|
# fully specified ARN to an alias, a fully specified ARN to a key, or a
|
649
666
|
# globally unique identifier.
|
650
667
|
#
|
@@ -654,13 +671,13 @@ module Aws::CloudTrail
|
|
654
671
|
#
|
655
672
|
# Examples:
|
656
673
|
#
|
657
|
-
# * alias/MyAliasName
|
674
|
+
# * `alias/MyAliasName`
|
658
675
|
#
|
659
|
-
# * arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
|
676
|
+
# * `arn:aws:kms:us-east-2:123456789012:alias/MyAliasName`
|
660
677
|
#
|
661
|
-
# * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
|
678
|
+
# * `arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012`
|
662
679
|
#
|
663
|
-
# * 12345678-1234-1234-1234-123456789012
|
680
|
+
# * `12345678-1234-1234-1234-123456789012`
|
664
681
|
#
|
665
682
|
#
|
666
683
|
#
|
@@ -820,6 +837,8 @@ module Aws::CloudTrail
|
|
820
837
|
# * {Types::DescribeQueryResponse#query_status #query_status} => String
|
821
838
|
# * {Types::DescribeQueryResponse#query_statistics #query_statistics} => Types::QueryStatisticsForDescribeQuery
|
822
839
|
# * {Types::DescribeQueryResponse#error_message #error_message} => String
|
840
|
+
# * {Types::DescribeQueryResponse#delivery_s3_uri #delivery_s3_uri} => String
|
841
|
+
# * {Types::DescribeQueryResponse#delivery_status #delivery_status} => String
|
823
842
|
#
|
824
843
|
# @example Request syntax with placeholder values
|
825
844
|
#
|
@@ -839,6 +858,8 @@ module Aws::CloudTrail
|
|
839
858
|
# resp.query_statistics.execution_time_in_millis #=> Integer
|
840
859
|
# resp.query_statistics.creation_time #=> Time
|
841
860
|
# resp.error_message #=> String
|
861
|
+
# resp.delivery_s3_uri #=> String
|
862
|
+
# resp.delivery_status #=> String, one of "SUCCESS", "FAILED", "FAILED_SIGNING_FILE", "PENDING", "RESOURCE_NOT_FOUND", "ACCESS_DENIED", "ACCESS_DENIED_SIGNING_FILE", "CANCELLED", "UNKNOWN"
|
842
863
|
#
|
843
864
|
# @see http://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeQuery AWS API Documentation
|
844
865
|
#
|
@@ -923,13 +944,18 @@ module Aws::CloudTrail
|
|
923
944
|
req.send_request(options)
|
924
945
|
end
|
925
946
|
|
926
|
-
# Returns
|
927
|
-
#
|
928
|
-
# events.
|
947
|
+
# Returns information about a specific channel. Amazon Web Services
|
948
|
+
# services create service-linked channels to get information about
|
949
|
+
# CloudTrail events on your behalf. For more information about
|
950
|
+
# service-linked channels, see [Viewing service-linked channels for
|
951
|
+
# CloudTrail by using the CLI.][1].
|
952
|
+
#
|
953
|
+
#
|
954
|
+
#
|
955
|
+
# [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/viewing-service-linked-channels.html
|
929
956
|
#
|
930
957
|
# @option params [required, String] :channel
|
931
|
-
# The
|
932
|
-
# channel.
|
958
|
+
# The ARN or `UUID` of a channel.
|
933
959
|
#
|
934
960
|
# @return [Types::GetChannelResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
935
961
|
#
|
@@ -1138,7 +1164,7 @@ module Aws::CloudTrail
|
|
1138
1164
|
req.send_request(options)
|
1139
1165
|
end
|
1140
1166
|
|
1141
|
-
# Returns information
|
1167
|
+
# Returns information about a specific import.
|
1142
1168
|
#
|
1143
1169
|
# @option params [required, String] :import_id
|
1144
1170
|
# The ID for the import.
|
@@ -1421,13 +1447,25 @@ module Aws::CloudTrail
|
|
1421
1447
|
req.send_request(options)
|
1422
1448
|
end
|
1423
1449
|
|
1424
|
-
#
|
1450
|
+
# Lists the channels in the current account, and their source names.
|
1451
|
+
# Amazon Web Services services create service-linked channels get
|
1452
|
+
# information about CloudTrail events on your behalf. For more
|
1453
|
+
# information about service-linked channels, see [Viewing service-linked
|
1454
|
+
# channels for CloudTrail by using the CLI][1].
|
1455
|
+
#
|
1456
|
+
#
|
1457
|
+
#
|
1458
|
+
# [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/viewing-service-linked-channels.html
|
1425
1459
|
#
|
1426
1460
|
# @option params [Integer] :max_results
|
1427
1461
|
# The maximum number of CloudTrail channels to display on a single page.
|
1428
1462
|
#
|
1429
1463
|
# @option params [String] :next_token
|
1430
|
-
#
|
1464
|
+
# The token to use to get the next page of results after a previous API
|
1465
|
+
# call. This token must be passed in with the same parameters that were
|
1466
|
+
# specified in the original call. For example, if the original call
|
1467
|
+
# specified an AttributeKey of 'Username' with a value of 'root',
|
1468
|
+
# the call with NextToken should include those same parameters.
|
1431
1469
|
#
|
1432
1470
|
# @return [Types::ListChannelsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1433
1471
|
#
|
@@ -1573,7 +1611,7 @@ module Aws::CloudTrail
|
|
1573
1611
|
# The maximum number of imports to display on a single page.
|
1574
1612
|
#
|
1575
1613
|
# @option params [String] :destination
|
1576
|
-
# The destination event data store.
|
1614
|
+
# The ARN of the destination event data store.
|
1577
1615
|
#
|
1578
1616
|
# @option params [String] :import_status
|
1579
1617
|
# The status of the import.
|
@@ -2264,22 +2302,30 @@ module Aws::CloudTrail
|
|
2264
2302
|
end
|
2265
2303
|
|
2266
2304
|
# Starts an import of logged trail events from a source S3 bucket to a
|
2267
|
-
# destination event data store.
|
2305
|
+
# destination event data store. By default, CloudTrail only imports
|
2306
|
+
# events contained in the S3 bucket's `CloudTrail` prefix and the
|
2307
|
+
# prefixes inside the `CloudTrail` prefix, and does not check prefixes
|
2308
|
+
# for other Amazon Web Services services. If you want to import
|
2309
|
+
# CloudTrail events contained in another prefix, you must include the
|
2310
|
+
# prefix in the `S3LocationUri`. For more considerations about importing
|
2311
|
+
# trail events, see [Considerations][1].
|
2268
2312
|
#
|
2269
2313
|
# When you start a new import, the `Destinations` and `ImportSource`
|
2270
2314
|
# parameters are required. Before starting a new import, disable any
|
2271
2315
|
# access control lists (ACLs) attached to the source S3 bucket. For more
|
2272
2316
|
# information about disabling ACLs, see [Controlling ownership of
|
2273
|
-
# objects and disabling ACLs for your bucket][
|
2317
|
+
# objects and disabling ACLs for your bucket][2].
|
2274
2318
|
#
|
2275
2319
|
# When you retry an import, the `ImportID` parameter is required.
|
2276
2320
|
#
|
2277
2321
|
#
|
2278
2322
|
#
|
2279
|
-
# [1]: https://docs.aws.amazon.com/
|
2323
|
+
# [1]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-copy-trail-to-lake.html#cloudtrail-trail-copy-considerations
|
2324
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
|
2280
2325
|
#
|
2281
2326
|
# @option params [Array<String>] :destinations
|
2282
|
-
# The destination event data store. Use this parameter for a
|
2327
|
+
# The ARN of the destination event data store. Use this parameter for a
|
2328
|
+
# new import.
|
2283
2329
|
#
|
2284
2330
|
# @option params [Types::ImportSource] :import_source
|
2285
2331
|
# The source S3 bucket for the import. Use this parameter for a new
|
@@ -2288,12 +2334,18 @@ module Aws::CloudTrail
|
|
2288
2334
|
# @option params [Time,DateTime,Date,Integer,String] :start_event_time
|
2289
2335
|
# Use with `EndEventTime` to bound a `StartImport` request, and limit
|
2290
2336
|
# imported trail events to only those events logged within a specified
|
2291
|
-
# time period.
|
2337
|
+
# time period. When you specify a time range, CloudTrail checks the
|
2338
|
+
# prefix and log file names to verify the names contain a date between
|
2339
|
+
# the specified `StartEventTime` and `EndEventTime` before attempting to
|
2340
|
+
# import events.
|
2292
2341
|
#
|
2293
2342
|
# @option params [Time,DateTime,Date,Integer,String] :end_event_time
|
2294
2343
|
# Use with `StartEventTime` to bound a `StartImport` request, and limit
|
2295
2344
|
# imported trail events to only those events logged within a specified
|
2296
|
-
# time period.
|
2345
|
+
# time period. When you specify a time range, CloudTrail checks the
|
2346
|
+
# prefix and log file names to verify the names contain a date between
|
2347
|
+
# the specified `StartEventTime` and `EndEventTime` before attempting to
|
2348
|
+
# import events.
|
2297
2349
|
#
|
2298
2350
|
# @option params [String] :import_id
|
2299
2351
|
# The ID of the import. Use this parameter when you are retrying an
|
@@ -2382,10 +2434,15 @@ module Aws::CloudTrail
|
|
2382
2434
|
|
2383
2435
|
# Starts a CloudTrail Lake query. The required `QueryStatement`
|
2384
2436
|
# parameter provides your SQL query, enclosed in single quotation marks.
|
2437
|
+
# Use the optional `DeliveryS3Uri` parameter to deliver the query
|
2438
|
+
# results to an S3 bucket.
|
2385
2439
|
#
|
2386
2440
|
# @option params [required, String] :query_statement
|
2387
2441
|
# The SQL code of your query.
|
2388
2442
|
#
|
2443
|
+
# @option params [String] :delivery_s3_uri
|
2444
|
+
# The URI for the S3 bucket where CloudTrail delivers the query results.
|
2445
|
+
#
|
2389
2446
|
# @return [Types::StartQueryResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
2390
2447
|
#
|
2391
2448
|
# * {Types::StartQueryResponse#query_id #query_id} => String
|
@@ -2394,6 +2451,7 @@ module Aws::CloudTrail
|
|
2394
2451
|
#
|
2395
2452
|
# resp = client.start_query({
|
2396
2453
|
# query_statement: "QueryStatement", # required
|
2454
|
+
# delivery_s3_uri: "DeliveryS3Uri",
|
2397
2455
|
# })
|
2398
2456
|
#
|
2399
2457
|
# @example Response structure
|
@@ -2804,7 +2862,7 @@ module Aws::CloudTrail
|
|
2804
2862
|
params: params,
|
2805
2863
|
config: config)
|
2806
2864
|
context[:gem_name] = 'aws-sdk-cloudtrail'
|
2807
|
-
context[:gem_version] = '1.
|
2865
|
+
context[:gem_version] = '1.53.0'
|
2808
2866
|
Seahorse::Client::Request.new(handlers, context)
|
2809
2867
|
end
|
2810
2868
|
|
@@ -47,6 +47,8 @@ module Aws::CloudTrail
|
|
47
47
|
DeleteEventDataStoreResponse = Shapes::StructureShape.new(name: 'DeleteEventDataStoreResponse')
|
48
48
|
DeleteTrailRequest = Shapes::StructureShape.new(name: 'DeleteTrailRequest')
|
49
49
|
DeleteTrailResponse = Shapes::StructureShape.new(name: 'DeleteTrailResponse')
|
50
|
+
DeliveryS3Uri = Shapes::StringShape.new(name: 'DeliveryS3Uri')
|
51
|
+
DeliveryStatus = Shapes::StringShape.new(name: 'DeliveryStatus')
|
50
52
|
DescribeQueryRequest = Shapes::StructureShape.new(name: 'DescribeQueryRequest')
|
51
53
|
DescribeQueryResponse = Shapes::StructureShape.new(name: 'DescribeQueryResponse')
|
52
54
|
DescribeTrailsRequest = Shapes::StructureShape.new(name: 'DescribeTrailsRequest')
|
@@ -377,6 +379,8 @@ module Aws::CloudTrail
|
|
377
379
|
DescribeQueryResponse.add_member(:query_status, Shapes::ShapeRef.new(shape: QueryStatus, location_name: "QueryStatus"))
|
378
380
|
DescribeQueryResponse.add_member(:query_statistics, Shapes::ShapeRef.new(shape: QueryStatisticsForDescribeQuery, location_name: "QueryStatistics"))
|
379
381
|
DescribeQueryResponse.add_member(:error_message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "ErrorMessage"))
|
382
|
+
DescribeQueryResponse.add_member(:delivery_s3_uri, Shapes::ShapeRef.new(shape: DeliveryS3Uri, location_name: "DeliveryS3Uri"))
|
383
|
+
DescribeQueryResponse.add_member(:delivery_status, Shapes::ShapeRef.new(shape: DeliveryStatus, location_name: "DeliveryStatus"))
|
380
384
|
DescribeQueryResponse.struct_class = Types::DescribeQueryResponse
|
381
385
|
|
382
386
|
DescribeTrailsRequest.add_member(:trail_name_list, Shapes::ShapeRef.new(shape: TrailNameList, location_name: "trailNameList"))
|
@@ -873,6 +877,7 @@ module Aws::CloudTrail
|
|
873
877
|
StartLoggingResponse.struct_class = Types::StartLoggingResponse
|
874
878
|
|
875
879
|
StartQueryRequest.add_member(:query_statement, Shapes::ShapeRef.new(shape: QueryStatement, required: true, location_name: "QueryStatement"))
|
880
|
+
StartQueryRequest.add_member(:delivery_s3_uri, Shapes::ShapeRef.new(shape: DeliveryS3Uri, location_name: "DeliveryS3Uri"))
|
876
881
|
StartQueryRequest.struct_class = Types::StartQueryRequest
|
877
882
|
|
878
883
|
StartQueryResponse.add_member(:query_id, Shapes::ShapeRef.new(shape: UUID, location_name: "QueryId"))
|
@@ -1562,6 +1567,10 @@ module Aws::CloudTrail
|
|
1562
1567
|
o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
|
1563
1568
|
o.errors << Shapes::ShapeRef.new(shape: InvalidQueryStatementException)
|
1564
1569
|
o.errors << Shapes::ShapeRef.new(shape: MaxConcurrentQueriesException)
|
1570
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidS3PrefixException)
|
1571
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidS3BucketNameException)
|
1572
|
+
o.errors << Shapes::ShapeRef.new(shape: InsufficientS3BucketPolicyException)
|
1573
|
+
o.errors << Shapes::ShapeRef.new(shape: S3BucketDoesNotExistException)
|
1565
1574
|
o.errors << Shapes::ShapeRef.new(shape: OperationNotPermittedException)
|
1566
1575
|
o.errors << Shapes::ShapeRef.new(shape: UnsupportedOperationException)
|
1567
1576
|
end)
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
module Aws::CloudTrail
|
11
|
+
# Endpoint parameters used to influence endpoints per request.
|
12
|
+
#
|
13
|
+
# @!attribute region
|
14
|
+
# The AWS region used to dispatch the request.
|
15
|
+
#
|
16
|
+
# @return [String]
|
17
|
+
#
|
18
|
+
# @!attribute use_dual_stack
|
19
|
+
# When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
|
20
|
+
#
|
21
|
+
# @return [Boolean]
|
22
|
+
#
|
23
|
+
# @!attribute use_fips
|
24
|
+
# When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
|
25
|
+
#
|
26
|
+
# @return [Boolean]
|
27
|
+
#
|
28
|
+
# @!attribute endpoint
|
29
|
+
# Override the endpoint used to send this request
|
30
|
+
#
|
31
|
+
# @return [String]
|
32
|
+
#
|
33
|
+
EndpointParameters = Struct.new(
|
34
|
+
:region,
|
35
|
+
:use_dual_stack,
|
36
|
+
:use_fips,
|
37
|
+
:endpoint,
|
38
|
+
) do
|
39
|
+
include Aws::Structure
|
40
|
+
|
41
|
+
# @api private
|
42
|
+
class << self
|
43
|
+
PARAM_MAP = {
|
44
|
+
'Region' => :region,
|
45
|
+
'UseDualStack' => :use_dual_stack,
|
46
|
+
'UseFIPS' => :use_fips,
|
47
|
+
'Endpoint' => :endpoint,
|
48
|
+
}.freeze
|
49
|
+
end
|
50
|
+
|
51
|
+
def initialize(options = {})
|
52
|
+
self[:region] = options[:region]
|
53
|
+
if self[:region].nil?
|
54
|
+
raise ArgumentError, "Missing required EndpointParameter: :region"
|
55
|
+
end
|
56
|
+
self[:use_dual_stack] = options[:use_dual_stack]
|
57
|
+
self[:use_dual_stack] = false if self[:use_dual_stack].nil?
|
58
|
+
if self[:use_dual_stack].nil?
|
59
|
+
raise ArgumentError, "Missing required EndpointParameter: :use_dual_stack"
|
60
|
+
end
|
61
|
+
self[:use_fips] = options[:use_fips]
|
62
|
+
self[:use_fips] = false if self[:use_fips].nil?
|
63
|
+
if self[:use_fips].nil?
|
64
|
+
raise ArgumentError, "Missing required EndpointParameter: :use_fips"
|
65
|
+
end
|
66
|
+
self[:endpoint] = options[:endpoint]
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,120 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
module Aws::CloudTrail
|
11
|
+
class EndpointProvider
|
12
|
+
def initialize(rule_set = nil)
|
13
|
+
@@rule_set ||= begin
|
14
|
+
endpoint_rules = Aws::Json.load(Base64.decode64(RULES))
|
15
|
+
Aws::Endpoints::RuleSet.new(
|
16
|
+
version: endpoint_rules['version'],
|
17
|
+
service_id: endpoint_rules['serviceId'],
|
18
|
+
parameters: endpoint_rules['parameters'],
|
19
|
+
rules: endpoint_rules['rules']
|
20
|
+
)
|
21
|
+
end
|
22
|
+
@provider = Aws::Endpoints::RulesProvider.new(rule_set || @@rule_set)
|
23
|
+
end
|
24
|
+
|
25
|
+
def resolve_endpoint(parameters)
|
26
|
+
@provider.resolve_endpoint(parameters)
|
27
|
+
end
|
28
|
+
|
29
|
+
# @api private
|
30
|
+
RULES = <<-JSON
|
31
|
+
eyJ2ZXJzaW9uIjoiMS4wIiwicGFyYW1ldGVycyI6eyJSZWdpb24iOnsiYnVp
|
32
|
+
bHRJbiI6IkFXUzo6UmVnaW9uIiwicmVxdWlyZWQiOnRydWUsImRvY3VtZW50
|
33
|
+
YXRpb24iOiJUaGUgQVdTIHJlZ2lvbiB1c2VkIHRvIGRpc3BhdGNoIHRoZSBy
|
34
|
+
ZXF1ZXN0LiIsInR5cGUiOiJTdHJpbmcifSwiVXNlRHVhbFN0YWNrIjp7ImJ1
|
35
|
+
aWx0SW4iOiJBV1M6OlVzZUR1YWxTdGFjayIsInJlcXVpcmVkIjp0cnVlLCJk
|
36
|
+
ZWZhdWx0IjpmYWxzZSwiZG9jdW1lbnRhdGlvbiI6IldoZW4gdHJ1ZSwgdXNl
|
37
|
+
IHRoZSBkdWFsLXN0YWNrIGVuZHBvaW50LiBJZiB0aGUgY29uZmlndXJlZCBl
|
38
|
+
bmRwb2ludCBkb2VzIG5vdCBzdXBwb3J0IGR1YWwtc3RhY2ssIGRpc3BhdGNo
|
39
|
+
aW5nIHRoZSByZXF1ZXN0IE1BWSByZXR1cm4gYW4gZXJyb3IuIiwidHlwZSI6
|
40
|
+
IkJvb2xlYW4ifSwiVXNlRklQUyI6eyJidWlsdEluIjoiQVdTOjpVc2VGSVBT
|
41
|
+
IiwicmVxdWlyZWQiOnRydWUsImRlZmF1bHQiOmZhbHNlLCJkb2N1bWVudGF0
|
42
|
+
aW9uIjoiV2hlbiB0cnVlLCBzZW5kIHRoaXMgcmVxdWVzdCB0byB0aGUgRklQ
|
43
|
+
Uy1jb21wbGlhbnQgcmVnaW9uYWwgZW5kcG9pbnQuIElmIHRoZSBjb25maWd1
|
44
|
+
cmVkIG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