UNPKG

9.02 kBTypeScriptView Raw
1import {Request} from '../lib/request';
2import {Response} from '../lib/response';
3import {AWSError} from '../lib/error';
4import {Service} from '../lib/service';
5import {ServiceConfigurationOptions} from '../lib/service';
6import {ConfigBase as Config} from '../lib/config';
7interface Blob {}
8declare class Pricing extends Service {
9 /**
10 * Constructs a service object. This object has one method for each API operation.
11 */
12 constructor(options?: Pricing.Types.ClientConfiguration)
13 config: Config & Pricing.Types.ClientConfiguration;
14 /**
15 * 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.
16 */
17 describeServices(params: Pricing.Types.DescribeServicesRequest, callback?: (err: AWSError, data: Pricing.Types.DescribeServicesResponse) => void): Request<Pricing.Types.DescribeServicesResponse, AWSError>;
18 /**
19 * 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.
20 */
21 describeServices(callback?: (err: AWSError, data: Pricing.Types.DescribeServicesResponse) => void): Request<Pricing.Types.DescribeServicesResponse, AWSError>;
22 /**
23 * Returns a list of attribute values. Attibutes are similar to the details in a Price List API offer file. For a list of available attributes, see Offer File Definitions in the AWS Billing and Cost Management User Guide.
24 */
25 getAttributeValues(params: Pricing.Types.GetAttributeValuesRequest, callback?: (err: AWSError, data: Pricing.Types.GetAttributeValuesResponse) => void): Request<Pricing.Types.GetAttributeValuesResponse, AWSError>;
26 /**
27 * Returns a list of attribute values. Attibutes are similar to the details in a Price List API offer file. For a list of available attributes, see Offer File Definitions in the AWS Billing and Cost Management User Guide.
28 */
29 getAttributeValues(callback?: (err: AWSError, data: Pricing.Types.GetAttributeValuesResponse) => void): Request<Pricing.Types.GetAttributeValuesResponse, AWSError>;
30 /**
31 * Returns a list of all products that match the filter criteria.
32 */
33 getProducts(params: Pricing.Types.GetProductsRequest, callback?: (err: AWSError, data: Pricing.Types.GetProductsResponse) => void): Request<Pricing.Types.GetProductsResponse, AWSError>;
34 /**
35 * Returns a list of all products that match the filter criteria.
36 */
37 getProducts(callback?: (err: AWSError, data: Pricing.Types.GetProductsResponse) => void): Request<Pricing.Types.GetProductsResponse, AWSError>;
38}
39declare namespace Pricing {
40 export type AttributeNameList = String[];
41 export interface AttributeValue {
42 /**
43 * The specific value of an attributeName.
44 */
45 Value?: String;
46 }
47 export type AttributeValueList = AttributeValue[];
48 export type BoxedInteger = number;
49 export interface DescribeServicesRequest {
50 /**
51 * The code for the service whose information you want to retrieve, such as AmazonEC2. You can use the ServiceCode to filter the results in a GetProducts call. To retrieve a list of all services, leave this blank.
52 */
53 ServiceCode?: String;
54 /**
55 * The format version that you want the response to be in. Valid values are: aws_v1
56 */
57 FormatVersion?: String;
58 /**
59 * The pagination token that indicates the next set of results that you want to retrieve.
60 */
61 NextToken?: String;
62 /**
63 * The maximum number of results that you want returned in the response.
64 */
65 MaxResults?: BoxedInteger;
66 }
67 export interface DescribeServicesResponse {
68 /**
69 * The service metadata for the service or services in the response.
70 */
71 Services?: ServiceList;
72 /**
73 * The format version of the response. For example, aws_v1.
74 */
75 FormatVersion?: String;
76 /**
77 * The pagination token for the next set of retreivable results.
78 */
79 NextToken?: String;
80 }
81 export interface Filter {
82 /**
83 * The type of filter that you want to use. Valid values are: TERM_MATCH. TERM_MATCH returns only products that match both the given filter field and the given value.
84 */
85 Type: FilterType;
86 /**
87 * The product metadata field that you want to filter on. You can filter by just the service code to see all products for a specific service, filter by just the attribute name to see a specific attribute for multiple services, or use both a service code and an attribute name to retrieve only products that match both fields. Valid values include: ServiceCode, and all attribute names For example, you can filter by the AmazonEC2 service code and the volumeType attribute name to get the prices for only Amazon EC2 volumes.
88 */
89 Field: String;
90 /**
91 * The service code or attribute value that you want to filter by. If you are filtering by service code this is the actual service code, such as AmazonEC2. If you are filtering by attribute name, this is the attribute value that you want the returned products to match, such as a Provisioned IOPS volume.
92 */
93 Value: String;
94 }
95 export type FilterType = "TERM_MATCH"|string;
96 export type Filters = Filter[];
97 export interface GetAttributeValuesRequest {
98 /**
99 * The service code for the service whose attributes you want to retrieve. For example, if you want the retrieve an EC2 attribute, use AmazonEC2.
100 */
101 ServiceCode: String;
102 /**
103 * The name of the attribute that you want to retrieve the values for, such as volumeType.
104 */
105 AttributeName: String;
106 /**
107 * The pagination token that indicates the next set of results that you want to retrieve.
108 */
109 NextToken?: String;
110 /**
111 * The maximum number of results to return in response.
112 */
113 MaxResults?: BoxedInteger;
114 }
115 export interface GetAttributeValuesResponse {
116 /**
117 * The list of values for an attribute. For example, Throughput Optimized HDD and Provisioned IOPS are two available values for the AmazonEC2 volumeType.
118 */
119 AttributeValues?: AttributeValueList;
120 /**
121 * The pagination token that indicates the next set of results to retrieve.
122 */
123 NextToken?: String;
124 }
125 export interface GetProductsRequest {
126 /**
127 * The code for the service whose products you want to retrieve.
128 */
129 ServiceCode?: String;
130 /**
131 * The list of filters that limit the returned products. only products that match all filters are returned.
132 */
133 Filters?: Filters;
134 /**
135 * The format version that you want the response to be in. Valid values are: aws_v1
136 */
137 FormatVersion?: String;
138 /**
139 * The pagination token that indicates the next set of results that you want to retrieve.
140 */
141 NextToken?: String;
142 /**
143 * The maximum number of results to return in the response.
144 */
145 MaxResults?: BoxedInteger;
146 }
147 export interface GetProductsResponse {
148 /**
149 * The format version of the response. For example, aws_v1.
150 */
151 FormatVersion?: String;
152 /**
153 * The list of products that match your filters. The list contains both the product metadata and the price information.
154 */
155 PriceList?: PriceList;
156 /**
157 * The pagination token that indicates the next set of results to retrieve.
158 */
159 NextToken?: String;
160 }
161 export type PriceList = PriceListItemJSON[];
162 export type PriceListItemJSON = string;
163 export interface Service {
164 /**
165 * The code for the AWS service.
166 */
167 ServiceCode?: String;
168 /**
169 * The attributes that are available for this service.
170 */
171 AttributeNames?: AttributeNameList;
172 }
173 export type ServiceList = Service[];
174 export type String = string;
175 /**
176 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
177 */
178 export type apiVersion = "2017-10-15"|"latest"|string;
179 export interface ClientApiVersions {
180 /**
181 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
182 */
183 apiVersion?: apiVersion;
184 }
185 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
186 /**
187 * Contains interfaces for use with the Pricing client.
188 */
189 export import Types = Pricing;
190}
191export = Pricing;