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.
451 452 453 |
# File 'lib/aws-sdk-pricing/client.rb', line 451 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.
873 874 875 |
# File 'lib/aws-sdk-pricing/client.rb', line 873 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.
876 877 878 |
# File 'lib/aws-sdk-pricing/client.rb', line 876 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.
846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 |
# File 'lib/aws-sdk-pricing/client.rb', line 846 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.70.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.
542 543 544 545 |
# File 'lib/aws-sdk-pricing/client.rb', line 542 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.
623 624 625 626 |
# File 'lib/aws-sdk-pricing/client.rb', line 623 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
678 679 680 681 |
# File 'lib/aws-sdk-pricing/client.rb', line 678 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.
739 740 741 742 |
# File 'lib/aws-sdk-pricing/client.rb', line 739 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.
837 838 839 840 |
# File 'lib/aws-sdk-pricing/client.rb', line 837 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.
866 867 868 |
# File 'lib/aws-sdk-pricing/client.rb', line 866 def waiter_names [] end |