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.
441 442 443 |
# File 'lib/aws-sdk-pricing/client.rb', line 441 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.
810 811 812 |
# File 'lib/aws-sdk-pricing/client.rb', line 810 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.
813 814 815 |
# File 'lib/aws-sdk-pricing/client.rb', line 813 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.
783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 |
# File 'lib/aws-sdk-pricing/client.rb', line 783 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.63.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.
503 504 505 506 |
# File 'lib/aws-sdk-pricing/client.rb', line 503 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.
560 561 562 563 |
# File 'lib/aws-sdk-pricing/client.rb', line 560 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
615 616 617 618 |
# File 'lib/aws-sdk-pricing/client.rb', line 615 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.
676 677 678 679 |
# File 'lib/aws-sdk-pricing/client.rb', line 676 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.
774 775 776 777 |
# File 'lib/aws-sdk-pricing/client.rb', line 774 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.
803 804 805 |
# File 'lib/aws-sdk-pricing/client.rb', line 803 def waiter_names [] end |