Class: Aws::Pricing::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::Pricing::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-pricing/client.rb
Overview
An API client for Pricing. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::Pricing::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#describe_services(params = {}) ⇒ Types::DescribeServicesResponse
Returns the metadata for one service or a list of the metadata for all services.
-
#get_attribute_values(params = {}) ⇒ Types::GetAttributeValuesResponse
Returns a list of attribute values.
-
#get_price_list_file_url(params = {}) ⇒ Types::GetPriceListFileUrlResponse
<i> <b>This feature is in preview release and is subject to change.
-
#get_products(params = {}) ⇒ Types::GetProductsResponse
Returns a list of all products that match the filter criteria.
-
#list_price_lists(params = {}) ⇒ Types::ListPriceListsResponse
<i> <b>This feature is in preview release and is subject to change.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
480 481 482 |
# File 'lib/aws-sdk-pricing/client.rb', line 480 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
902 903 904 |
# File 'lib/aws-sdk-pricing/client.rb', line 902 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
905 906 907 |
# File 'lib/aws-sdk-pricing/client.rb', line 905 def errors_module Errors end |
Instance Method Details
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 |
# File 'lib/aws-sdk-pricing/client.rb', line 875 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::Pricing') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-pricing' context[:gem_version] = '1.83.0' Seahorse::Client::Request.new(handlers, context) end |
#describe_services(params = {}) ⇒ Types::DescribeServicesResponse
Returns the metadata for one service or a list of the metadata for all services. Use this without a service code to get the service codes for all services. Use it with a service code, such as ‘AmazonEC2`, to get information specific to that service, such as the attribute names available for that service. For example, some of the attribute names available for EC2 are `volumeType`, `maxIopsVolume`, `operation`, `locationType`, and `instanceCapacity10xlarge`.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
571 572 573 574 |
# File 'lib/aws-sdk-pricing/client.rb', line 571 def describe_services(params = {}, = {}) req = build_request(:describe_services, params) req.send_request() end |
#get_attribute_values(params = {}) ⇒ Types::GetAttributeValuesResponse
Returns a list of attribute values. Attributes are similar to the details in a Price List API offer file. For a list of available attributes, see [Offer File Definitions] in the [Billing and Cost Management User Guide].
[1]: docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/reading-an-offer.html#pps-defs [2]: docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-what-is.html
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
652 653 654 655 |
# File 'lib/aws-sdk-pricing/client.rb', line 652 def get_attribute_values(params = {}, = {}) req = build_request(:get_attribute_values, params) req.send_request() end |
#get_price_list_file_url(params = {}) ⇒ Types::GetPriceListFileUrlResponse
This feature is in preview release and is subject to change. Your use of Amazon Web Services Price List API is subject to the Beta Service Participation terms of the <a href=“https://aws.amazon.com/service-terms/”>Amazon Web Services Service Terms</a> (Section 1.10).
This returns the URL that you can retrieve your Price List file from. This URL is based on the ‘PriceListArn` and `FileFormat` that you retrieve from the [ListPriceLists] response.
[1]: docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_ListPriceLists.html
707 708 709 710 |
# File 'lib/aws-sdk-pricing/client.rb', line 707 def get_price_list_file_url(params = {}, = {}) req = build_request(:get_price_list_file_url, params) req.send_request() end |
#get_products(params = {}) ⇒ Types::GetProductsResponse
Returns a list of all products that match the filter criteria.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
768 769 770 771 |
# File 'lib/aws-sdk-pricing/client.rb', line 768 def get_products(params = {}, = {}) req = build_request(:get_products, params) req.send_request() end |
#list_price_lists(params = {}) ⇒ Types::ListPriceListsResponse
This feature is in preview release and is subject to change. Your use of Amazon Web Services Price List API is subject to the Beta Service Participation terms of the <a href=“https://aws.amazon.com/service-terms/”>Amazon Web Services Service Terms</a> (Section 1.10).
This returns a list of Price List references that the requester if authorized to view, given a ‘ServiceCode`, `CurrencyCode`, and an `EffectiveDate`. Use without a `RegionCode` filter to list Price List references from all available Amazon Web Services Regions. Use with a `RegionCode` filter to get the Price List reference that’s specific to a specific Amazon Web Services Region. You can use the ‘PriceListArn` from the response to get your preferred Price List files through the [GetPriceListFileUrl] API.
[1]: docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_GetPriceListFileUrl.html
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
866 867 868 869 |
# File 'lib/aws-sdk-pricing/client.rb', line 866 def list_price_lists(params = {}, = {}) req = build_request(:list_price_lists, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
895 896 897 |
# File 'lib/aws-sdk-pricing/client.rb', line 895 def waiter_names [] end |