UNPKG

15 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 PI extends Service {
9 /**
10 * Constructs a service object. This object has one method for each API operation.
11 */
12 constructor(options?: PI.Types.ClientConfiguration)
13 config: Config & PI.Types.ClientConfiguration;
14 /**
15 * For a specific time period, retrieve the top N dimension keys for a metric.
16 */
17 describeDimensionKeys(params: PI.Types.DescribeDimensionKeysRequest, callback?: (err: AWSError, data: PI.Types.DescribeDimensionKeysResponse) => void): Request<PI.Types.DescribeDimensionKeysResponse, AWSError>;
18 /**
19 * For a specific time period, retrieve the top N dimension keys for a metric.
20 */
21 describeDimensionKeys(callback?: (err: AWSError, data: PI.Types.DescribeDimensionKeysResponse) => void): Request<PI.Types.DescribeDimensionKeysResponse, AWSError>;
22 /**
23 * Retrieve Performance Insights metrics for a set of data sources, over a time period. You can provide specific dimension groups and dimensions, and provide aggregation and filtering criteria for each group.
24 */
25 getResourceMetrics(params: PI.Types.GetResourceMetricsRequest, callback?: (err: AWSError, data: PI.Types.GetResourceMetricsResponse) => void): Request<PI.Types.GetResourceMetricsResponse, AWSError>;
26 /**
27 * Retrieve Performance Insights metrics for a set of data sources, over a time period. You can provide specific dimension groups and dimensions, and provide aggregation and filtering criteria for each group.
28 */
29 getResourceMetrics(callback?: (err: AWSError, data: PI.Types.GetResourceMetricsResponse) => void): Request<PI.Types.GetResourceMetricsResponse, AWSError>;
30}
31declare namespace PI {
32 export interface DataPoint {
33 /**
34 * The time, in epoch format, associated with a particular Value.
35 */
36 Timestamp: ISOTimestamp;
37 /**
38 * The actual value associated with a particular Timestamp.
39 */
40 Value: Double;
41 }
42 export type DataPointsList = DataPoint[];
43 export interface DescribeDimensionKeysRequest {
44 /**
45 * The AWS service for which Performance Insights will return metrics. The only valid value for ServiceType is: RDS
46 */
47 ServiceType: ServiceType;
48 /**
49 * An immutable, AWS Region-unique identifier for a data source. Performance Insights gathers metrics from this data source. To use an Amazon RDS instance as a data source, you specify its DbiResourceId value - for example: db-FAIHNTYBKTGAUSUZQYPDS2GW4A
50 */
51 Identifier: String;
52 /**
53 * The date and time specifying the beginning of the requested time series data. You can't specify a StartTime that's earlier than 7 days ago. The value specified is inclusive - data points equal to or greater than StartTime will be returned. The value for StartTime must be earlier than the value for EndTime.
54 */
55 StartTime: ISOTimestamp;
56 /**
57 * The date and time specifying the end of the requested time series data. The value specified is exclusive - data points less than (but not equal to) EndTime will be returned. The value for EndTime must be later than the value for StartTime.
58 */
59 EndTime: ISOTimestamp;
60 /**
61 * The name of a Performance Insights metric to be measured. Valid values for Metric are: db.load.avg - a scaled representation of the number of active sessions for the database engine. db.sampledload.avg - the raw number of active sessions for the database engine.
62 */
63 Metric: String;
64 /**
65 * The granularity, in seconds, of the data points returned from Performance Insights. A period can be as short as one second, or as long as one day (86400 seconds). Valid values are: 1 (one second) 60 (one minute) 300 (five minutes) 3600 (one hour) 86400 (twenty-four hours) If you don't specify PeriodInSeconds, then Performance Insights will choose a value for you, with a goal of returning roughly 100-200 data points in the response.
66 */
67 PeriodInSeconds?: Integer;
68 /**
69 * A specification for how to aggregate the data points from a query result. You must specify a valid dimension group. Performance Insights will return all of the dimensions within that group, unless you provide the names of specific dimensions within that group. You can also request that Performance Insights return a limited number of values for a dimension.
70 */
71 GroupBy: DimensionGroup;
72 /**
73 * For each dimension specified in GroupBy, specify a secondary dimension to further subdivide the partition keys in the response.
74 */
75 PartitionBy?: DimensionGroup;
76 /**
77 * One or more filters to apply in the request. Restrictions: Any number of filters by the same dimension, as specified in the GroupBy or Partition parameters. A single filter for any other dimension in this dimension group.
78 */
79 Filter?: MetricQueryFilterMap;
80 /**
81 * The maximum number of items to return in the response. If more items exist than the specified MaxRecords value, a pagination token is included in the response so that the remaining results can be retrieved.
82 */
83 MaxResults?: MaxResults;
84 /**
85 * An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the token, up to the value specified by MaxRecords.
86 */
87 NextToken?: String;
88 }
89 export interface DescribeDimensionKeysResponse {
90 /**
91 * The start time for the returned dimension keys, after alignment to a granular boundary (as specified by PeriodInSeconds). AlignedStartTime will be less than or equal to the value of the user-specified StartTime.
92 */
93 AlignedStartTime?: ISOTimestamp;
94 /**
95 * The end time for the returned dimension keys, after alignment to a granular boundary (as specified by PeriodInSeconds). AlignedEndTime will be greater than or equal to the value of the user-specified Endtime.
96 */
97 AlignedEndTime?: ISOTimestamp;
98 /**
99 * If PartitionBy was present in the request, PartitionKeys contains the breakdown of dimension keys by the specified partitions.
100 */
101 PartitionKeys?: ResponsePartitionKeyList;
102 /**
103 * The dimension keys that were requested.
104 */
105 Keys?: DimensionKeyDescriptionList;
106 /**
107 * An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the token, up to the value specified by MaxRecords.
108 */
109 NextToken?: String;
110 }
111 export interface DimensionGroup {
112 /**
113 * The name of the dimension group. Valid values are: db.user db.host db.sql db.sql_tokenized db.wait_event db.wait_event_type
114 */
115 Group: String;
116 /**
117 * A list of specific dimensions from a dimension group. If this parameter is not present, then it signifies that all of the dimensions in the group were requested, or are present in the response. Valid values for elements in the Dimensions array are: db.user.id db.user.name db.host.id db.host.name db.sql.id db.sql.db_id db.sql.statement db.sql.tokenized_id db.sql_tokenized.id db.sql_tokenized.db_id db.sql_tokenized.statement db.wait_event.name db.wait_event.type db.wait_event_type.name
118 */
119 Dimensions?: StringList;
120 /**
121 * The maximum number of items to fetch for this dimension group.
122 */
123 Limit?: Limit;
124 }
125 export interface DimensionKeyDescription {
126 /**
127 * A map of name-value pairs for the dimensions in the group.
128 */
129 Dimensions?: DimensionMap;
130 /**
131 * The aggregated metric value for the dimension(s), over the requested time range.
132 */
133 Total?: Double;
134 /**
135 * If PartitionBy was specified, PartitionKeys contains the dimensions that were.
136 */
137 Partitions?: MetricValuesList;
138 }
139 export type DimensionKeyDescriptionList = DimensionKeyDescription[];
140 export type DimensionMap = {[key: string]: String};
141 export type Double = number;
142 export interface GetResourceMetricsRequest {
143 /**
144 * The AWS service for which Performance Insights will return metrics. The only valid value for ServiceType is: RDS
145 */
146 ServiceType: ServiceType;
147 /**
148 * An immutable, AWS Region-unique identifier for a data source. Performance Insights gathers metrics from this data source. To use an Amazon RDS instance as a data source, you specify its DbiResourceId value - for example: db-FAIHNTYBKTGAUSUZQYPDS2GW4A
149 */
150 Identifier: String;
151 /**
152 * An array of one or more queries to perform. Each query must specify a Performance Insights metric, and can optionally specify aggregation and filtering criteria.
153 */
154 MetricQueries: MetricQueryList;
155 /**
156 * The date and time specifying the beginning of the requested time series data. You can't specify a StartTime that's earlier than 7 days ago. The value specified is inclusive - data points equal to or greater than StartTime will be returned. The value for StartTime must be earlier than the value for EndTime.
157 */
158 StartTime: ISOTimestamp;
159 /**
160 * The date and time specifiying the end of the requested time series data. The value specified is exclusive - data points less than (but not equal to) EndTime will be returned. The value for EndTime must be later than the value for StartTime.
161 */
162 EndTime: ISOTimestamp;
163 /**
164 * The granularity, in seconds, of the data points returned from Performance Insights. A period can be as short as one second, or as long as one day (86400 seconds). Valid values are: 1 (one second) 60 (one minute) 300 (five minutes) 3600 (one hour) 86400 (twenty-four hours) If you don't specify PeriodInSeconds, then Performance Insights will choose a value for you, with a goal of returning roughly 100-200 data points in the response.
165 */
166 PeriodInSeconds?: Integer;
167 /**
168 * The maximum number of items to return in the response. If more items exist than the specified MaxRecords value, a pagination token is included in the response so that the remaining results can be retrieved.
169 */
170 MaxResults?: MaxResults;
171 /**
172 * An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the token, up to the value specified by MaxRecords.
173 */
174 NextToken?: String;
175 }
176 export interface GetResourceMetricsResponse {
177 /**
178 * The start time for the returned metrics, after alignment to a granular boundary (as specified by PeriodInSeconds). AlignedStartTime will be less than or equal to the value of the user-specified StartTime.
179 */
180 AlignedStartTime?: ISOTimestamp;
181 /**
182 * The end time for the returned metrics, after alignment to a granular boundary (as specified by PeriodInSeconds). AlignedEndTime will be greater than or equal to the value of the user-specified Endtime.
183 */
184 AlignedEndTime?: ISOTimestamp;
185 /**
186 * An immutable, AWS Region-unique identifier for a data source. Performance Insights gathers metrics from this data source. To use an Amazon RDS instance as a data source, you specify its DbiResourceId value - for example: db-FAIHNTYBKTGAUSUZQYPDS2GW4A
187 */
188 Identifier?: String;
189 /**
190 * An array of metric results,, where each array element contains all of the data points for a particular dimension.
191 */
192 MetricList?: MetricKeyDataPointsList;
193 /**
194 * An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the token, up to the value specified by MaxRecords.
195 */
196 NextToken?: String;
197 }
198 export type ISOTimestamp = Date;
199 export type Integer = number;
200 export type Limit = number;
201 export type MaxResults = number;
202 export interface MetricKeyDataPoints {
203 /**
204 * The dimension(s) to which the data points apply.
205 */
206 Key?: ResponseResourceMetricKey;
207 /**
208 * An array of timestamp-value pairs, representing measurements over a period of time.
209 */
210 DataPoints?: DataPointsList;
211 }
212 export type MetricKeyDataPointsList = MetricKeyDataPoints[];
213 export interface MetricQuery {
214 /**
215 * The name of a Performance Insights metric to be measured. Valid values for Metric are: db.load.avg - a scaled representation of the number of active sessions for the database engine. db.sampledload.avg - the raw number of active sessions for the database engine.
216 */
217 Metric: String;
218 /**
219 * A specification for how to aggregate the data points from a query result. You must specify a valid dimension group. Performance Insights will return all of the dimensions within that group, unless you provide the names of specific dimensions within that group. You can also request that Performance Insights return a limited number of values for a dimension.
220 */
221 GroupBy?: DimensionGroup;
222 /**
223 * One or more filters to apply in the request. Restrictions: Any number of filters by the same dimension, as specified in the GroupBy parameter. A single filter for any other dimension in this dimension group.
224 */
225 Filter?: MetricQueryFilterMap;
226 }
227 export type MetricQueryFilterMap = {[key: string]: String};
228 export type MetricQueryList = MetricQuery[];
229 export type MetricValuesList = Double[];
230 export interface ResponsePartitionKey {
231 /**
232 * A dimension map that contains the dimension(s) for this partition.
233 */
234 Dimensions: DimensionMap;
235 }
236 export type ResponsePartitionKeyList = ResponsePartitionKey[];
237 export interface ResponseResourceMetricKey {
238 /**
239 * The name of a Performance Insights metric to be measured. Valid values for Metric are: db.load.avg - a scaled representation of the number of active sessions for the database engine. db.sampledload.avg - the raw number of active sessions for the database engine.
240 */
241 Metric: String;
242 /**
243 * The valid dimensions for the metric.
244 */
245 Dimensions?: DimensionMap;
246 }
247 export type ServiceType = "RDS"|string;
248 export type String = string;
249 export type StringList = String[];
250 /**
251 * 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.
252 */
253 export type apiVersion = "2018-02-27"|"latest"|string;
254 export interface ClientApiVersions {
255 /**
256 * 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.
257 */
258 apiVersion?: apiVersion;
259 }
260 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
261 /**
262 * Contains interfaces for use with the PI client.
263 */
264 export import Types = PI;
265}
266export = PI;