pricing.d.ts 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. import {Request} from '../lib/request';
  2. import {Response} from '../lib/response';
  3. import {AWSError} from '../lib/error';
  4. import {Service} from '../lib/service';
  5. import {ServiceConfigurationOptions} from '../lib/service';
  6. import {ConfigBase as Config} from '../lib/config-base';
  7. interface Blob {}
  8. declare 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. 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.
  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. 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.
  28. */
  29. getAttributeValues(callback?: (err: AWSError, data: Pricing.Types.GetAttributeValuesResponse) => void): Request<Pricing.Types.GetAttributeValuesResponse, AWSError>;
  30. /**
  31. * 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 Amazon Web Services Service Terms (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.
  32. */
  33. getPriceListFileUrl(params: Pricing.Types.GetPriceListFileUrlRequest, callback?: (err: AWSError, data: Pricing.Types.GetPriceListFileUrlResponse) => void): Request<Pricing.Types.GetPriceListFileUrlResponse, AWSError>;
  34. /**
  35. * 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 Amazon Web Services Service Terms (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.
  36. */
  37. getPriceListFileUrl(callback?: (err: AWSError, data: Pricing.Types.GetPriceListFileUrlResponse) => void): Request<Pricing.Types.GetPriceListFileUrlResponse, AWSError>;
  38. /**
  39. * Returns a list of all products that match the filter criteria.
  40. */
  41. getProducts(params: Pricing.Types.GetProductsRequest, callback?: (err: AWSError, data: Pricing.Types.GetProductsResponse) => void): Request<Pricing.Types.GetProductsResponse, AWSError>;
  42. /**
  43. * Returns a list of all products that match the filter criteria.
  44. */
  45. getProducts(callback?: (err: AWSError, data: Pricing.Types.GetProductsResponse) => void): Request<Pricing.Types.GetProductsResponse, AWSError>;
  46. /**
  47. * 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 Amazon Web Services Service Terms (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.
  48. */
  49. listPriceLists(params: Pricing.Types.ListPriceListsRequest, callback?: (err: AWSError, data: Pricing.Types.ListPriceListsResponse) => void): Request<Pricing.Types.ListPriceListsResponse, AWSError>;
  50. /**
  51. * 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 Amazon Web Services Service Terms (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.
  52. */
  53. listPriceLists(callback?: (err: AWSError, data: Pricing.Types.ListPriceListsResponse) => void): Request<Pricing.Types.ListPriceListsResponse, AWSError>;
  54. }
  55. declare namespace Pricing {
  56. export type AttributeNameList = String[];
  57. export interface AttributeValue {
  58. /**
  59. * The specific value of an attributeName.
  60. */
  61. Value?: String;
  62. }
  63. export type AttributeValueList = AttributeValue[];
  64. export type BoxedInteger = number;
  65. export type CurrencyCode = string;
  66. export interface DescribeServicesRequest {
  67. /**
  68. * 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.
  69. */
  70. ServiceCode?: String;
  71. /**
  72. * The format version that you want the response to be in. Valid values are: aws_v1
  73. */
  74. FormatVersion?: String;
  75. /**
  76. * The pagination token that indicates the next set of results that you want to retrieve.
  77. */
  78. NextToken?: String;
  79. /**
  80. * The maximum number of results that you want returned in the response.
  81. */
  82. MaxResults?: BoxedInteger;
  83. }
  84. export interface DescribeServicesResponse {
  85. /**
  86. * The service metadata for the service or services in the response.
  87. */
  88. Services?: ServiceList;
  89. /**
  90. * The format version of the response. For example, aws_v1.
  91. */
  92. FormatVersion?: String;
  93. /**
  94. * The pagination token for the next set of retrievable results.
  95. */
  96. NextToken?: String;
  97. }
  98. export type EffectiveDate = Date;
  99. export type FileFormat = string;
  100. export type FileFormats = FileFormat[];
  101. export interface Filter {
  102. /**
  103. * 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.
  104. */
  105. Type: FilterType;
  106. /**
  107. * 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.
  108. */
  109. Field: String;
  110. /**
  111. * The service code or attribute value that you want to filter by. If you're filtering by service code this is the actual service code, such as AmazonEC2. If you're filtering by attribute name, this is the attribute value that you want the returned products to match, such as a Provisioned IOPS volume.
  112. */
  113. Value: String;
  114. }
  115. export type FilterType = "TERM_MATCH"|string;
  116. export type Filters = Filter[];
  117. export interface GetAttributeValuesRequest {
  118. /**
  119. * The service code for the service whose attributes you want to retrieve. For example, if you want the retrieve an EC2 attribute, use AmazonEC2.
  120. */
  121. ServiceCode: String;
  122. /**
  123. * The name of the attribute that you want to retrieve the values for, such as volumeType.
  124. */
  125. AttributeName: String;
  126. /**
  127. * The pagination token that indicates the next set of results that you want to retrieve.
  128. */
  129. NextToken?: String;
  130. /**
  131. * The maximum number of results to return in response.
  132. */
  133. MaxResults?: BoxedInteger;
  134. }
  135. export interface GetAttributeValuesResponse {
  136. /**
  137. * The list of values for an attribute. For example, Throughput Optimized HDD and Provisioned IOPS are two available values for the AmazonEC2 volumeType.
  138. */
  139. AttributeValues?: AttributeValueList;
  140. /**
  141. * The pagination token that indicates the next set of results to retrieve.
  142. */
  143. NextToken?: String;
  144. }
  145. export interface GetPriceListFileUrlRequest {
  146. /**
  147. * The unique identifier that maps to where your Price List files are located. PriceListArn can be obtained from the ListPriceLists response.
  148. */
  149. PriceListArn: PriceListArn;
  150. /**
  151. * The format that you want to retrieve your Price List files in. The FileFormat can be obtained from the ListPriceLists response.
  152. */
  153. FileFormat: FileFormat;
  154. }
  155. export interface GetPriceListFileUrlResponse {
  156. /**
  157. * The URL to download your Price List file from.
  158. */
  159. Url?: String;
  160. }
  161. export interface GetProductsRequest {
  162. /**
  163. * The code for the service whose products you want to retrieve.
  164. */
  165. ServiceCode: String;
  166. /**
  167. * The list of filters that limit the returned products. only products that match all filters are returned.
  168. */
  169. Filters?: Filters;
  170. /**
  171. * The format version that you want the response to be in. Valid values are: aws_v1
  172. */
  173. FormatVersion?: String;
  174. /**
  175. * The pagination token that indicates the next set of results that you want to retrieve.
  176. */
  177. NextToken?: String;
  178. /**
  179. * The maximum number of results to return in the response.
  180. */
  181. MaxResults?: BoxedInteger;
  182. }
  183. export interface GetProductsResponse {
  184. /**
  185. * The format version of the response. For example, aws_v1.
  186. */
  187. FormatVersion?: String;
  188. /**
  189. * The list of products that match your filters. The list contains both the product metadata and the price information.
  190. */
  191. PriceList?: PriceListJsonItems;
  192. /**
  193. * The pagination token that indicates the next set of results to retrieve.
  194. */
  195. NextToken?: String;
  196. }
  197. export interface ListPriceListsRequest {
  198. /**
  199. * The service code or the Savings Plan service code for the attributes that you want to retrieve. For example, to get the list of applicable Amazon EC2 price lists, use AmazonEC2. For a full list of service codes containing On-Demand and Reserved Instance (RI) pricing, use the DescribeServices API. To retrieve the Reserved Instance and Compute Savings Plan price lists, use ComputeSavingsPlans. To retrieve Machine Learning Savings Plans price lists, use MachineLearningSavingsPlans.
  200. */
  201. ServiceCode: ServiceCode;
  202. /**
  203. * The date that the Price List file prices are effective from.
  204. */
  205. EffectiveDate: EffectiveDate;
  206. /**
  207. * This is used to filter the Price List by Amazon Web Services Region. For example, to get the price list only for the US East (N. Virginia) Region, use us-east-1. If nothing is specified, you retrieve price lists for all applicable Regions. The available RegionCode list can be retrieved from GetAttributeValues API.
  208. */
  209. RegionCode?: RegionCode;
  210. /**
  211. * The three alphabetical character ISO-4217 currency code that the Price List files are denominated in.
  212. */
  213. CurrencyCode: CurrencyCode;
  214. /**
  215. * The pagination token that indicates the next set of results that you want to retrieve.
  216. */
  217. NextToken?: String;
  218. /**
  219. * The maximum number of results to return in the response.
  220. */
  221. MaxResults?: MaxResults;
  222. }
  223. export interface ListPriceListsResponse {
  224. /**
  225. * The type of price list references that match your request.
  226. */
  227. PriceLists?: PriceLists;
  228. /**
  229. * The pagination token that indicates the next set of results to retrieve.
  230. */
  231. NextToken?: String;
  232. }
  233. export type MaxResults = number;
  234. export interface PriceList {
  235. /**
  236. * The unique identifier that maps to where your Price List files are located. PriceListArn can be obtained from the ListPriceList response.
  237. */
  238. PriceListArn?: PriceListArn;
  239. /**
  240. * This is used to filter the Price List by Amazon Web Services Region. For example, to get the price list only for the US East (N. Virginia) Region, use us-east-1. If nothing is specified, you retrieve price lists for all applicable Regions. The available RegionCode list can be retrieved from GetAttributeValues API.
  241. */
  242. RegionCode?: RegionCode;
  243. /**
  244. * The three alphabetical character ISO-4217 currency code the Price List files are denominated in.
  245. */
  246. CurrencyCode?: CurrencyCode;
  247. /**
  248. * The format you want to retrieve your Price List files. The FileFormat can be obtained from the ListPriceList response.
  249. */
  250. FileFormats?: FileFormats;
  251. }
  252. export type PriceListArn = string;
  253. export type PriceListJsonItems = SynthesizedJsonPriceListJsonItem[];
  254. export type PriceLists = PriceList[];
  255. export type RegionCode = string;
  256. export interface Service {
  257. /**
  258. * The code for the Amazon Web Services service.
  259. */
  260. ServiceCode: String;
  261. /**
  262. * The attributes that are available for this service.
  263. */
  264. AttributeNames?: AttributeNameList;
  265. }
  266. export type ServiceCode = string;
  267. export type ServiceList = Service[];
  268. export type String = string;
  269. export type SynthesizedJsonPriceListJsonItem = string;
  270. /**
  271. * 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.
  272. */
  273. export type apiVersion = "2017-10-15"|"latest"|string;
  274. export interface ClientApiVersions {
  275. /**
  276. * 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.
  277. */
  278. apiVersion?: apiVersion;
  279. }
  280. export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
  281. /**
  282. * Contains interfaces for use with the Pricing client.
  283. */
  284. export import Types = Pricing;
  285. }
  286. export = Pricing;