aws-sdk-freetier 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +8 -0
- data/LICENSE.txt +202 -0
- data/VERSION +1 -0
- data/lib/aws-sdk-freetier/client.rb +509 -0
- data/lib/aws-sdk-freetier/client_api.rb +123 -0
- data/lib/aws-sdk-freetier/customizations.rb +0 -0
- data/lib/aws-sdk-freetier/endpoint_parameters.rb +54 -0
- data/lib/aws-sdk-freetier/endpoint_provider.rb +62 -0
- data/lib/aws-sdk-freetier/endpoints.rb +29 -0
- data/lib/aws-sdk-freetier/errors.rb +86 -0
- data/lib/aws-sdk-freetier/plugins/endpoints.rb +70 -0
- data/lib/aws-sdk-freetier/resource.rb +26 -0
- data/lib/aws-sdk-freetier/types.rb +268 -0
- data/lib/aws-sdk-freetier.rb +57 -0
- metadata +94 -0
@@ -0,0 +1,62 @@
|
|
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::FreeTier
|
11
|
+
class EndpointProvider
|
12
|
+
def resolve_endpoint(parameters)
|
13
|
+
region = parameters.region
|
14
|
+
use_fips = parameters.use_fips
|
15
|
+
endpoint = parameters.endpoint
|
16
|
+
if Aws::Endpoints::Matchers.set?(endpoint)
|
17
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
18
|
+
raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
|
19
|
+
end
|
20
|
+
return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
|
21
|
+
end
|
22
|
+
if Aws::Endpoints::Matchers.set?(region)
|
23
|
+
if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
|
24
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws")
|
25
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
26
|
+
if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true)
|
27
|
+
return Aws::Endpoints::Endpoint.new(url: "https://freetier-fips.#{region}.api.aws", headers: {}, properties: {})
|
28
|
+
end
|
29
|
+
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
30
|
+
end
|
31
|
+
return Aws::Endpoints::Endpoint.new(url: "https://freetier.us-east-1.api.aws", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"freetier", "signingRegion"=>"us-east-1"}]})
|
32
|
+
end
|
33
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
34
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
35
|
+
if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true)
|
36
|
+
return Aws::Endpoints::Endpoint.new(url: "https://freetier-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
37
|
+
end
|
38
|
+
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
39
|
+
end
|
40
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "aws-cn-global")
|
41
|
+
return Aws::Endpoints::Endpoint.new(url: "https://freetier.cn-northwest-1.api.amazonwebservices.com.cn", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"freetier", "signingRegion"=>"cn-northwest-1"}]})
|
42
|
+
end
|
43
|
+
return Aws::Endpoints::Endpoint.new(url: "https://freetier.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
44
|
+
end
|
45
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
46
|
+
if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true)
|
47
|
+
return Aws::Endpoints::Endpoint.new(url: "https://freetier-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
48
|
+
end
|
49
|
+
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
50
|
+
end
|
51
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "aws-cn-global")
|
52
|
+
return Aws::Endpoints::Endpoint.new(url: "https://freetier.cn-northwest-1.api.amazonwebservices.com.cn", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"freetier", "signingRegion"=>"cn-northwest-1"}]})
|
53
|
+
end
|
54
|
+
return Aws::Endpoints::Endpoint.new(url: "https://freetier.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
55
|
+
end
|
56
|
+
end
|
57
|
+
raise ArgumentError, "Invalid Configuration: Missing Region"
|
58
|
+
raise ArgumentError, 'No endpoint could be resolved'
|
59
|
+
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
|
11
|
+
module Aws::FreeTier
|
12
|
+
# @api private
|
13
|
+
module Endpoints
|
14
|
+
|
15
|
+
class GetFreeTierUsage
|
16
|
+
def self.build(context)
|
17
|
+
unless context.config.regional_endpoint
|
18
|
+
endpoint = context.config.endpoint.to_s
|
19
|
+
end
|
20
|
+
Aws::FreeTier::EndpointParameters.new(
|
21
|
+
region: context.config.region,
|
22
|
+
use_fips: context.config.use_fips_endpoint,
|
23
|
+
endpoint: endpoint,
|
24
|
+
)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,86 @@
|
|
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::FreeTier
|
11
|
+
|
12
|
+
# When FreeTier returns an error response, the Ruby SDK constructs and raises an error.
|
13
|
+
# These errors all extend Aws::FreeTier::Errors::ServiceError < {Aws::Errors::ServiceError}
|
14
|
+
#
|
15
|
+
# You can rescue all FreeTier errors using ServiceError:
|
16
|
+
#
|
17
|
+
# begin
|
18
|
+
# # do stuff
|
19
|
+
# rescue Aws::FreeTier::Errors::ServiceError
|
20
|
+
# # rescues all FreeTier API errors
|
21
|
+
# end
|
22
|
+
#
|
23
|
+
#
|
24
|
+
# ## Request Context
|
25
|
+
# ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
|
26
|
+
# information about the request that generated the error.
|
27
|
+
# See {Seahorse::Client::RequestContext} for more information.
|
28
|
+
#
|
29
|
+
# ## Error Classes
|
30
|
+
# * {InternalServerException}
|
31
|
+
# * {ThrottlingException}
|
32
|
+
# * {ValidationException}
|
33
|
+
#
|
34
|
+
# Additionally, error classes are dynamically generated for service errors based on the error code
|
35
|
+
# if they are not defined above.
|
36
|
+
module Errors
|
37
|
+
|
38
|
+
extend Aws::Errors::DynamicErrors
|
39
|
+
|
40
|
+
class InternalServerException < ServiceError
|
41
|
+
|
42
|
+
# @param [Seahorse::Client::RequestContext] context
|
43
|
+
# @param [String] message
|
44
|
+
# @param [Aws::FreeTier::Types::InternalServerException] data
|
45
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
46
|
+
super(context, message, data)
|
47
|
+
end
|
48
|
+
|
49
|
+
# @return [String]
|
50
|
+
def message
|
51
|
+
@message || @data[:message]
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
class ThrottlingException < ServiceError
|
56
|
+
|
57
|
+
# @param [Seahorse::Client::RequestContext] context
|
58
|
+
# @param [String] message
|
59
|
+
# @param [Aws::FreeTier::Types::ThrottlingException] data
|
60
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
61
|
+
super(context, message, data)
|
62
|
+
end
|
63
|
+
|
64
|
+
# @return [String]
|
65
|
+
def message
|
66
|
+
@message || @data[:message]
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
class ValidationException < ServiceError
|
71
|
+
|
72
|
+
# @param [Seahorse::Client::RequestContext] context
|
73
|
+
# @param [String] message
|
74
|
+
# @param [Aws::FreeTier::Types::ValidationException] data
|
75
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
76
|
+
super(context, message, data)
|
77
|
+
end
|
78
|
+
|
79
|
+
# @return [String]
|
80
|
+
def message
|
81
|
+
@message || @data[:message]
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
end
|
86
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
|
11
|
+
module Aws::FreeTier
|
12
|
+
module Plugins
|
13
|
+
class Endpoints < Seahorse::Client::Plugin
|
14
|
+
option(
|
15
|
+
:endpoint_provider,
|
16
|
+
doc_type: 'Aws::FreeTier::EndpointProvider',
|
17
|
+
docstring: 'The endpoint provider used to resolve endpoints. Any '\
|
18
|
+
'object that responds to `#resolve_endpoint(parameters)` '\
|
19
|
+
'where `parameters` is a Struct similar to '\
|
20
|
+
'`Aws::FreeTier::EndpointParameters`'
|
21
|
+
) do |cfg|
|
22
|
+
Aws::FreeTier::EndpointProvider.new
|
23
|
+
end
|
24
|
+
|
25
|
+
# @api private
|
26
|
+
class Handler < Seahorse::Client::Handler
|
27
|
+
def call(context)
|
28
|
+
# If endpoint was discovered, do not resolve or apply the endpoint.
|
29
|
+
unless context[:discovered_endpoint]
|
30
|
+
params = parameters_for_operation(context)
|
31
|
+
endpoint = context.config.endpoint_provider.resolve_endpoint(params)
|
32
|
+
|
33
|
+
context.http_request.endpoint = endpoint.url
|
34
|
+
apply_endpoint_headers(context, endpoint.headers)
|
35
|
+
end
|
36
|
+
|
37
|
+
context[:endpoint_params] = params
|
38
|
+
context[:auth_scheme] =
|
39
|
+
Aws::Endpoints.resolve_auth_scheme(context, endpoint)
|
40
|
+
|
41
|
+
@handler.call(context)
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def apply_endpoint_headers(context, headers)
|
47
|
+
headers.each do |key, values|
|
48
|
+
value = values
|
49
|
+
.compact
|
50
|
+
.map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
|
51
|
+
.join(',')
|
52
|
+
|
53
|
+
context.http_request.headers[key] = value
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def parameters_for_operation(context)
|
58
|
+
case context.operation_name
|
59
|
+
when :get_free_tier_usage
|
60
|
+
Aws::FreeTier::Endpoints::GetFreeTierUsage.build(context)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def add_handlers(handlers, _config)
|
66
|
+
handlers.add(Handler, step: :build, priority: 75)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -0,0 +1,26 @@
|
|
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::FreeTier
|
11
|
+
|
12
|
+
class Resource
|
13
|
+
|
14
|
+
# @param options ({})
|
15
|
+
# @option options [Client] :client
|
16
|
+
def initialize(options = {})
|
17
|
+
@client = options[:client] || Client.new(options)
|
18
|
+
end
|
19
|
+
|
20
|
+
# @return [Client]
|
21
|
+
def client
|
22
|
+
@client
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,268 @@
|
|
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::FreeTier
|
11
|
+
module Types
|
12
|
+
|
13
|
+
# Contains the specifications for the filters to use for your request.
|
14
|
+
#
|
15
|
+
# @!attribute [rw] key
|
16
|
+
# The name of the dimension that you want to filter on.
|
17
|
+
# @return [String]
|
18
|
+
#
|
19
|
+
# @!attribute [rw] match_options
|
20
|
+
# The match options that you can use to filter your results. You can
|
21
|
+
# specify only one of these values in the array.
|
22
|
+
# @return [Array<String>]
|
23
|
+
#
|
24
|
+
# @!attribute [rw] values
|
25
|
+
# The metadata values you can specify to filter upon, so that the
|
26
|
+
# results all match at least one of the specified values.
|
27
|
+
# @return [Array<String>]
|
28
|
+
#
|
29
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/freetier-2023-09-07/DimensionValues AWS API Documentation
|
30
|
+
#
|
31
|
+
class DimensionValues < Struct.new(
|
32
|
+
:key,
|
33
|
+
:match_options,
|
34
|
+
:values)
|
35
|
+
SENSITIVE = []
|
36
|
+
include Aws::Structure
|
37
|
+
end
|
38
|
+
|
39
|
+
# Use `Expression` to filter in the `GetFreeTierUsage` API operation.
|
40
|
+
#
|
41
|
+
# You can use the following patterns:
|
42
|
+
#
|
43
|
+
# * Simple dimension values (`Dimensions` root operator)
|
44
|
+
#
|
45
|
+
# * Complex expressions with logical operators (`AND`, `NOT`, and `OR`
|
46
|
+
# root operators).
|
47
|
+
#
|
48
|
+
# For *simple dimension values*, you can set the dimension name, values,
|
49
|
+
# and match type for the filters that you plan to use.
|
50
|
+
#
|
51
|
+
# **Example for simple dimension values**
|
52
|
+
#
|
53
|
+
# You can filter to match exactly for `REGION==us-east-1 OR
|
54
|
+
# REGION==us-west-1`.
|
55
|
+
#
|
56
|
+
# The corresponding `Expression` appears like the following: `\{
|
57
|
+
# "Dimensions": \{ "Key": "REGION", "Values": [ "us-east-1", "us-west-1"
|
58
|
+
# ], "MatchOptions": ["EQUALS"] \} \}`
|
59
|
+
#
|
60
|
+
# As shown in the previous example, lists of dimension values are
|
61
|
+
# combined with `OR` when you apply the filter.
|
62
|
+
#
|
63
|
+
# For *complex expressions with logical operators*, you can have nested
|
64
|
+
# expressions to use the logical operators and specify advanced
|
65
|
+
# filtering.
|
66
|
+
#
|
67
|
+
# **Example for complex expressions with logical operators**
|
68
|
+
#
|
69
|
+
# You can filter by `((REGION == us-east-1 OR REGION == us-west-1) OR
|
70
|
+
# (SERVICE CONTAINS AWSLambda)) AND (USAGE_TYPE !CONTAINS
|
71
|
+
# DataTransfer)`.
|
72
|
+
#
|
73
|
+
# The corresponding `Expression` appears like the following: `\{ "And":
|
74
|
+
# [ \{"Or": [ \{"Dimensions": \{ "Key": "REGION", "Values": [
|
75
|
+
# "us-east-1", "us-west-1" ], "MatchOptions": ["EQUALS"] \}\},
|
76
|
+
# \{"Dimensions": \{ "Key": "SERVICE", "Values": ["AWSLambda"],
|
77
|
+
# "MatchOptions": ["CONTAINS"] \} \} ]\}, \{"Not": \{"Dimensions": \{
|
78
|
+
# "Key": "USAGE_TYPE", "Values": ["DataTransfer"], "MatchOptions":
|
79
|
+
# ["CONTAINS"] \}\}\} ] \}`
|
80
|
+
#
|
81
|
+
# In the following **Contents**, you must specify exactly one of the
|
82
|
+
# following root operators.
|
83
|
+
#
|
84
|
+
# @!attribute [rw] and
|
85
|
+
# Return results that match all `Expressions` that you specified in
|
86
|
+
# the array.
|
87
|
+
# @return [Array<Types::Expression>]
|
88
|
+
#
|
89
|
+
# @!attribute [rw] dimensions
|
90
|
+
# The specific dimension, values, and match type to filter objects
|
91
|
+
# with.
|
92
|
+
# @return [Types::DimensionValues]
|
93
|
+
#
|
94
|
+
# @!attribute [rw] not
|
95
|
+
# Return results that don’t match the `Expression` that you specified.
|
96
|
+
# @return [Types::Expression]
|
97
|
+
#
|
98
|
+
# @!attribute [rw] or
|
99
|
+
# Return results that match any of the `Expressions` that you
|
100
|
+
# specified. in the array.
|
101
|
+
# @return [Array<Types::Expression>]
|
102
|
+
#
|
103
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/freetier-2023-09-07/Expression AWS API Documentation
|
104
|
+
#
|
105
|
+
class Expression < Struct.new(
|
106
|
+
:and,
|
107
|
+
:dimensions,
|
108
|
+
:not,
|
109
|
+
:or)
|
110
|
+
SENSITIVE = []
|
111
|
+
include Aws::Structure
|
112
|
+
end
|
113
|
+
|
114
|
+
# Consists of a Amazon Web Services Free Tier offer’s metadata and your
|
115
|
+
# data usage for the offer.
|
116
|
+
#
|
117
|
+
# @!attribute [rw] actual_usage_amount
|
118
|
+
# Describes the actual usage accrued month-to-day (MTD) that you've
|
119
|
+
# used so far.
|
120
|
+
# @return [Float]
|
121
|
+
#
|
122
|
+
# @!attribute [rw] description
|
123
|
+
# The description of the Free Tier offer.
|
124
|
+
# @return [String]
|
125
|
+
#
|
126
|
+
# @!attribute [rw] forecasted_usage_amount
|
127
|
+
# Describes the forecasted usage by the month that you're expected to
|
128
|
+
# use.
|
129
|
+
# @return [Float]
|
130
|
+
#
|
131
|
+
# @!attribute [rw] free_tier_type
|
132
|
+
# Describes the type of the Free Tier offer. For example, the offer
|
133
|
+
# can be `"12 Months Free"`, `"Always Free"`, and `"Free Trial"`.
|
134
|
+
# @return [String]
|
135
|
+
#
|
136
|
+
# @!attribute [rw] limit
|
137
|
+
# Describes the maximum usage allowed in Free Tier.
|
138
|
+
# @return [Float]
|
139
|
+
#
|
140
|
+
# @!attribute [rw] operation
|
141
|
+
# Describes `usageType` more granularly with the specific Amazon Web
|
142
|
+
# Service API operation. For example, this can be the `RunInstances`
|
143
|
+
# API operation for Amazon Elastic Compute Cloud.
|
144
|
+
# @return [String]
|
145
|
+
#
|
146
|
+
# @!attribute [rw] region
|
147
|
+
# Describes the Amazon Web Services Region for which this offer is
|
148
|
+
# applicable
|
149
|
+
# @return [String]
|
150
|
+
#
|
151
|
+
# @!attribute [rw] service
|
152
|
+
# The name of the Amazon Web Service providing the Free Tier offer.
|
153
|
+
# For example, this can be Amazon Elastic Compute Cloud.
|
154
|
+
# @return [String]
|
155
|
+
#
|
156
|
+
# @!attribute [rw] unit
|
157
|
+
# Describes the unit of the `usageType`, such as `Hrs`.
|
158
|
+
# @return [String]
|
159
|
+
#
|
160
|
+
# @!attribute [rw] usage_type
|
161
|
+
# Describes the usage details of the offer. For example, this might be
|
162
|
+
# `Global-BoxUsage:freetrial`.
|
163
|
+
# @return [String]
|
164
|
+
#
|
165
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/freetier-2023-09-07/FreeTierUsage AWS API Documentation
|
166
|
+
#
|
167
|
+
class FreeTierUsage < Struct.new(
|
168
|
+
:actual_usage_amount,
|
169
|
+
:description,
|
170
|
+
:forecasted_usage_amount,
|
171
|
+
:free_tier_type,
|
172
|
+
:limit,
|
173
|
+
:operation,
|
174
|
+
:region,
|
175
|
+
:service,
|
176
|
+
:unit,
|
177
|
+
:usage_type)
|
178
|
+
SENSITIVE = []
|
179
|
+
include Aws::Structure
|
180
|
+
end
|
181
|
+
|
182
|
+
# @!attribute [rw] filter
|
183
|
+
# An expression that specifies the conditions that you want each
|
184
|
+
# `FreeTierUsage` object to meet.
|
185
|
+
# @return [Types::Expression]
|
186
|
+
#
|
187
|
+
# @!attribute [rw] max_results
|
188
|
+
# The maximum number of results to return in the response.
|
189
|
+
# `MaxResults` means that there can be up to the specified number of
|
190
|
+
# values, but there might be fewer results based on your filters.
|
191
|
+
# @return [Integer]
|
192
|
+
#
|
193
|
+
# @!attribute [rw] next_token
|
194
|
+
# The pagination token that indicates the next set of results to
|
195
|
+
# retrieve.
|
196
|
+
# @return [String]
|
197
|
+
#
|
198
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/freetier-2023-09-07/GetFreeTierUsageRequest AWS API Documentation
|
199
|
+
#
|
200
|
+
class GetFreeTierUsageRequest < Struct.new(
|
201
|
+
:filter,
|
202
|
+
:max_results,
|
203
|
+
:next_token)
|
204
|
+
SENSITIVE = []
|
205
|
+
include Aws::Structure
|
206
|
+
end
|
207
|
+
|
208
|
+
# @!attribute [rw] free_tier_usages
|
209
|
+
# The list of Free Tier usage objects that meet your filter
|
210
|
+
# expression.
|
211
|
+
# @return [Array<Types::FreeTierUsage>]
|
212
|
+
#
|
213
|
+
# @!attribute [rw] next_token
|
214
|
+
# The pagination token that indicates the next set of results to
|
215
|
+
# retrieve.
|
216
|
+
# @return [String]
|
217
|
+
#
|
218
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/freetier-2023-09-07/GetFreeTierUsageResponse AWS API Documentation
|
219
|
+
#
|
220
|
+
class GetFreeTierUsageResponse < Struct.new(
|
221
|
+
:free_tier_usages,
|
222
|
+
:next_token)
|
223
|
+
SENSITIVE = []
|
224
|
+
include Aws::Structure
|
225
|
+
end
|
226
|
+
|
227
|
+
# An unexpected error occurred during the processing of your request.
|
228
|
+
#
|
229
|
+
# @!attribute [rw] message
|
230
|
+
# @return [String]
|
231
|
+
#
|
232
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/freetier-2023-09-07/InternalServerException AWS API Documentation
|
233
|
+
#
|
234
|
+
class InternalServerException < Struct.new(
|
235
|
+
:message)
|
236
|
+
SENSITIVE = []
|
237
|
+
include Aws::Structure
|
238
|
+
end
|
239
|
+
|
240
|
+
# The request was denied due to request throttling.
|
241
|
+
#
|
242
|
+
# @!attribute [rw] message
|
243
|
+
# @return [String]
|
244
|
+
#
|
245
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/freetier-2023-09-07/ThrottlingException AWS API Documentation
|
246
|
+
#
|
247
|
+
class ThrottlingException < Struct.new(
|
248
|
+
:message)
|
249
|
+
SENSITIVE = []
|
250
|
+
include Aws::Structure
|
251
|
+
end
|
252
|
+
|
253
|
+
# The input fails to satisfy the constraints specified by an Amazon Web
|
254
|
+
# Service.
|
255
|
+
#
|
256
|
+
# @!attribute [rw] message
|
257
|
+
# @return [String]
|
258
|
+
#
|
259
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/freetier-2023-09-07/ValidationException AWS API Documentation
|
260
|
+
#
|
261
|
+
class ValidationException < Struct.new(
|
262
|
+
:message)
|
263
|
+
SENSITIVE = []
|
264
|
+
include Aws::Structure
|
265
|
+
end
|
266
|
+
|
267
|
+
end
|
268
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
|
11
|
+
require 'aws-sdk-core'
|
12
|
+
require 'aws-sigv4'
|
13
|
+
|
14
|
+
require_relative 'aws-sdk-freetier/types'
|
15
|
+
require_relative 'aws-sdk-freetier/client_api'
|
16
|
+
require_relative 'aws-sdk-freetier/plugins/endpoints.rb'
|
17
|
+
require_relative 'aws-sdk-freetier/client'
|
18
|
+
require_relative 'aws-sdk-freetier/errors'
|
19
|
+
require_relative 'aws-sdk-freetier/resource'
|
20
|
+
require_relative 'aws-sdk-freetier/endpoint_parameters'
|
21
|
+
require_relative 'aws-sdk-freetier/endpoint_provider'
|
22
|
+
require_relative 'aws-sdk-freetier/endpoints'
|
23
|
+
require_relative 'aws-sdk-freetier/customizations'
|
24
|
+
|
25
|
+
# This module provides support for AWS Free Tier. This module is available in the
|
26
|
+
# `aws-sdk-freetier` gem.
|
27
|
+
#
|
28
|
+
# # Client
|
29
|
+
#
|
30
|
+
# The {Client} class provides one method for each API operation. Operation
|
31
|
+
# methods each accept a hash of request parameters and return a response
|
32
|
+
# structure.
|
33
|
+
#
|
34
|
+
# free_tier = Aws::FreeTier::Client.new
|
35
|
+
# resp = free_tier.get_free_tier_usage(params)
|
36
|
+
#
|
37
|
+
# See {Client} for more information.
|
38
|
+
#
|
39
|
+
# # Errors
|
40
|
+
#
|
41
|
+
# Errors returned from AWS Free Tier are defined in the
|
42
|
+
# {Errors} module and all extend {Errors::ServiceError}.
|
43
|
+
#
|
44
|
+
# begin
|
45
|
+
# # do stuff
|
46
|
+
# rescue Aws::FreeTier::Errors::ServiceError
|
47
|
+
# # rescues all AWS Free Tier API errors
|
48
|
+
# end
|
49
|
+
#
|
50
|
+
# See {Errors} for more information.
|
51
|
+
#
|
52
|
+
# @!group service
|
53
|
+
module Aws::FreeTier
|
54
|
+
|
55
|
+
GEM_VERSION = '1.0.0'
|
56
|
+
|
57
|
+
end
|
metadata
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: aws-sdk-freetier
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Amazon Web Services
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-11-27 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: aws-sdk-core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 3.188.0
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '3'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 3.188.0
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: aws-sigv4
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1.1'
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '1.1'
|
47
|
+
description: Official AWS Ruby gem for AWS Free Tier. This gem is part of the AWS
|
48
|
+
SDK for Ruby.
|
49
|
+
email:
|
50
|
+
- aws-dr-rubygems@amazon.com
|
51
|
+
executables: []
|
52
|
+
extensions: []
|
53
|
+
extra_rdoc_files: []
|
54
|
+
files:
|
55
|
+
- CHANGELOG.md
|
56
|
+
- LICENSE.txt
|
57
|
+
- VERSION
|
58
|
+
- lib/aws-sdk-freetier.rb
|
59
|
+
- lib/aws-sdk-freetier/client.rb
|
60
|
+
- lib/aws-sdk-freetier/client_api.rb
|
61
|
+
- lib/aws-sdk-freetier/customizations.rb
|
62
|
+
- lib/aws-sdk-freetier/endpoint_parameters.rb
|
63
|
+
- lib/aws-sdk-freetier/endpoint_provider.rb
|
64
|
+
- lib/aws-sdk-freetier/endpoints.rb
|
65
|
+
- lib/aws-sdk-freetier/errors.rb
|
66
|
+
- lib/aws-sdk-freetier/plugins/endpoints.rb
|
67
|
+
- lib/aws-sdk-freetier/resource.rb
|
68
|
+
- lib/aws-sdk-freetier/types.rb
|
69
|
+
homepage: https://github.com/aws/aws-sdk-ruby
|
70
|
+
licenses:
|
71
|
+
- Apache-2.0
|
72
|
+
metadata:
|
73
|
+
source_code_uri: https://github.com/aws/aws-sdk-ruby/tree/version-3/gems/aws-sdk-freetier
|
74
|
+
changelog_uri: https://github.com/aws/aws-sdk-ruby/tree/version-3/gems/aws-sdk-freetier/CHANGELOG.md
|
75
|
+
post_install_message:
|
76
|
+
rdoc_options: []
|
77
|
+
require_paths:
|
78
|
+
- lib
|
79
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '2.5'
|
84
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
requirements: []
|
90
|
+
rubygems_version: 3.1.6
|
91
|
+
signing_key:
|
92
|
+
specification_version: 4
|
93
|
+
summary: AWS SDK for Ruby - AWS Free Tier
|
94
|
+
test_files: []
|