UNPKG

17.1 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 CodeGuruProfiler extends Service {
9 /**
10 * Constructs a service object. This object has one method for each API operation.
11 */
12 constructor(options?: CodeGuruProfiler.Types.ClientConfiguration)
13 config: Config & CodeGuruProfiler.Types.ClientConfiguration;
14 /**
15 *
16 */
17 configureAgent(params: CodeGuruProfiler.Types.ConfigureAgentRequest, callback?: (err: AWSError, data: CodeGuruProfiler.Types.ConfigureAgentResponse) => void): Request<CodeGuruProfiler.Types.ConfigureAgentResponse, AWSError>;
18 /**
19 *
20 */
21 configureAgent(callback?: (err: AWSError, data: CodeGuruProfiler.Types.ConfigureAgentResponse) => void): Request<CodeGuruProfiler.Types.ConfigureAgentResponse, AWSError>;
22 /**
23 * Creates a profiling group.
24 */
25 createProfilingGroup(params: CodeGuruProfiler.Types.CreateProfilingGroupRequest, callback?: (err: AWSError, data: CodeGuruProfiler.Types.CreateProfilingGroupResponse) => void): Request<CodeGuruProfiler.Types.CreateProfilingGroupResponse, AWSError>;
26 /**
27 * Creates a profiling group.
28 */
29 createProfilingGroup(callback?: (err: AWSError, data: CodeGuruProfiler.Types.CreateProfilingGroupResponse) => void): Request<CodeGuruProfiler.Types.CreateProfilingGroupResponse, AWSError>;
30 /**
31 * Deletes a profiling group.
32 */
33 deleteProfilingGroup(params: CodeGuruProfiler.Types.DeleteProfilingGroupRequest, callback?: (err: AWSError, data: CodeGuruProfiler.Types.DeleteProfilingGroupResponse) => void): Request<CodeGuruProfiler.Types.DeleteProfilingGroupResponse, AWSError>;
34 /**
35 * Deletes a profiling group.
36 */
37 deleteProfilingGroup(callback?: (err: AWSError, data: CodeGuruProfiler.Types.DeleteProfilingGroupResponse) => void): Request<CodeGuruProfiler.Types.DeleteProfilingGroupResponse, AWSError>;
38 /**
39 * Describes a profiling group.
40 */
41 describeProfilingGroup(params: CodeGuruProfiler.Types.DescribeProfilingGroupRequest, callback?: (err: AWSError, data: CodeGuruProfiler.Types.DescribeProfilingGroupResponse) => void): Request<CodeGuruProfiler.Types.DescribeProfilingGroupResponse, AWSError>;
42 /**
43 * Describes a profiling group.
44 */
45 describeProfilingGroup(callback?: (err: AWSError, data: CodeGuruProfiler.Types.DescribeProfilingGroupResponse) => void): Request<CodeGuruProfiler.Types.DescribeProfilingGroupResponse, AWSError>;
46 /**
47 * Gets the aggregated profile of a profiling group for the specified time range. If the requested time range does not align with the available aggregated profiles, it is expanded to attain alignment. If aggregated profiles are available only for part of the period requested, the profile is returned from the earliest available to the latest within the requested time range. For example, if the requested time range is from 00:00 to 00:20 and the available profiles are from 00:15 to 00:25, the returned profile will be from 00:15 to 00:20. You must specify exactly two of the following parameters: startTime, period, and endTime.
48 */
49 getProfile(params: CodeGuruProfiler.Types.GetProfileRequest, callback?: (err: AWSError, data: CodeGuruProfiler.Types.GetProfileResponse) => void): Request<CodeGuruProfiler.Types.GetProfileResponse, AWSError>;
50 /**
51 * Gets the aggregated profile of a profiling group for the specified time range. If the requested time range does not align with the available aggregated profiles, it is expanded to attain alignment. If aggregated profiles are available only for part of the period requested, the profile is returned from the earliest available to the latest within the requested time range. For example, if the requested time range is from 00:00 to 00:20 and the available profiles are from 00:15 to 00:25, the returned profile will be from 00:15 to 00:20. You must specify exactly two of the following parameters: startTime, period, and endTime.
52 */
53 getProfile(callback?: (err: AWSError, data: CodeGuruProfiler.Types.GetProfileResponse) => void): Request<CodeGuruProfiler.Types.GetProfileResponse, AWSError>;
54 /**
55 * List the start times of the available aggregated profiles of a profiling group for an aggregation period within the specified time range.
56 */
57 listProfileTimes(params: CodeGuruProfiler.Types.ListProfileTimesRequest, callback?: (err: AWSError, data: CodeGuruProfiler.Types.ListProfileTimesResponse) => void): Request<CodeGuruProfiler.Types.ListProfileTimesResponse, AWSError>;
58 /**
59 * List the start times of the available aggregated profiles of a profiling group for an aggregation period within the specified time range.
60 */
61 listProfileTimes(callback?: (err: AWSError, data: CodeGuruProfiler.Types.ListProfileTimesResponse) => void): Request<CodeGuruProfiler.Types.ListProfileTimesResponse, AWSError>;
62 /**
63 * Lists profiling groups.
64 */
65 listProfilingGroups(params: CodeGuruProfiler.Types.ListProfilingGroupsRequest, callback?: (err: AWSError, data: CodeGuruProfiler.Types.ListProfilingGroupsResponse) => void): Request<CodeGuruProfiler.Types.ListProfilingGroupsResponse, AWSError>;
66 /**
67 * Lists profiling groups.
68 */
69 listProfilingGroups(callback?: (err: AWSError, data: CodeGuruProfiler.Types.ListProfilingGroupsResponse) => void): Request<CodeGuruProfiler.Types.ListProfilingGroupsResponse, AWSError>;
70 /**
71 *
72 */
73 postAgentProfile(params: CodeGuruProfiler.Types.PostAgentProfileRequest, callback?: (err: AWSError, data: CodeGuruProfiler.Types.PostAgentProfileResponse) => void): Request<CodeGuruProfiler.Types.PostAgentProfileResponse, AWSError>;
74 /**
75 *
76 */
77 postAgentProfile(callback?: (err: AWSError, data: CodeGuruProfiler.Types.PostAgentProfileResponse) => void): Request<CodeGuruProfiler.Types.PostAgentProfileResponse, AWSError>;
78 /**
79 * Updates a profiling group.
80 */
81 updateProfilingGroup(params: CodeGuruProfiler.Types.UpdateProfilingGroupRequest, callback?: (err: AWSError, data: CodeGuruProfiler.Types.UpdateProfilingGroupResponse) => void): Request<CodeGuruProfiler.Types.UpdateProfilingGroupResponse, AWSError>;
82 /**
83 * Updates a profiling group.
84 */
85 updateProfilingGroup(callback?: (err: AWSError, data: CodeGuruProfiler.Types.UpdateProfilingGroupResponse) => void): Request<CodeGuruProfiler.Types.UpdateProfilingGroupResponse, AWSError>;
86}
87declare namespace CodeGuruProfiler {
88 export interface AgentConfiguration {
89 /**
90 *
91 */
92 periodInSeconds: Integer;
93 /**
94 *
95 */
96 shouldProfile: Boolean;
97 }
98 export interface AgentOrchestrationConfig {
99 /**
100 *
101 */
102 profilingEnabled: Boolean;
103 }
104 export type AgentProfile = Buffer|Uint8Array|Blob|string;
105 export type AggregatedProfile = Buffer|Uint8Array|Blob|string;
106 export interface AggregatedProfileTime {
107 /**
108 * The time period.
109 */
110 period?: AggregationPeriod;
111 /**
112 * The start time.
113 */
114 start?: Timestamp;
115 }
116 export type AggregationPeriod = "P1D"|"PT1H"|"PT5M"|string;
117 export type Boolean = boolean;
118 export type ClientToken = string;
119 export interface ConfigureAgentRequest {
120 /**
121 *
122 */
123 fleetInstanceId?: FleetInstanceId;
124 /**
125 *
126 */
127 profilingGroupName: ProfilingGroupName;
128 }
129 export interface ConfigureAgentResponse {
130 /**
131 *
132 */
133 configuration: AgentConfiguration;
134 }
135 export interface CreateProfilingGroupRequest {
136 /**
137 * The agent orchestration configuration.
138 */
139 agentOrchestrationConfig?: AgentOrchestrationConfig;
140 /**
141 * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This parameter specifies a unique identifier for the new profiling group that helps ensure idempotency.
142 */
143 clientToken: ClientToken;
144 /**
145 * The name of the profiling group.
146 */
147 profilingGroupName: ProfilingGroupName;
148 }
149 export interface CreateProfilingGroupResponse {
150 /**
151 * Information about the new profiling group
152 */
153 profilingGroup: ProfilingGroupDescription;
154 }
155 export interface DeleteProfilingGroupRequest {
156 /**
157 * The profiling group name to delete.
158 */
159 profilingGroupName: ProfilingGroupName;
160 }
161 export interface DeleteProfilingGroupResponse {
162 }
163 export interface DescribeProfilingGroupRequest {
164 /**
165 * The profiling group name.
166 */
167 profilingGroupName: ProfilingGroupName;
168 }
169 export interface DescribeProfilingGroupResponse {
170 /**
171 * Information about a profiling group.
172 */
173 profilingGroup: ProfilingGroupDescription;
174 }
175 export type FleetInstanceId = string;
176 export interface GetProfileRequest {
177 /**
178 * The format of the profile to return. You can choose application/json or the default application/x-amzn-ion.
179 */
180 accept?: String;
181 /**
182 * You must specify exactly two of the following parameters: startTime, period, and endTime.
183 */
184 endTime?: Timestamp;
185 /**
186 * The maximum depth of the graph.
187 */
188 maxDepth?: MaxDepth;
189 /**
190 * The period of the profile to get. The time range must be in the past and not longer than one week. You must specify exactly two of the following parameters: startTime, period, and endTime.
191 */
192 period?: Period;
193 /**
194 * The name of the profiling group to get.
195 */
196 profilingGroupName: ProfilingGroupName;
197 /**
198 * The start time of the profile to get. You must specify exactly two of the following parameters: startTime, period, and endTime.
199 */
200 startTime?: Timestamp;
201 }
202 export interface GetProfileResponse {
203 /**
204 * The content encoding of the profile.
205 */
206 contentEncoding?: String;
207 /**
208 * The content type of the profile in the payload. It is either application/json or the default application/x-amzn-ion.
209 */
210 contentType: String;
211 /**
212 * Information about the profile.
213 */
214 profile: AggregatedProfile;
215 }
216 export type Integer = number;
217 export interface ListProfileTimesRequest {
218 /**
219 * The end time of the time range from which to list the profiles.
220 */
221 endTime: Timestamp;
222 /**
223 * The maximum number of profile time results returned by ListProfileTimes in paginated output. When this parameter is used, ListProfileTimes only returns maxResults results in a single page with a nextToken response element. The remaining results of the initial request can be seen by sending another ListProfileTimes request with the returned nextToken value.
224 */
225 maxResults?: MaxResults;
226 /**
227 * The nextToken value returned from a previous paginated ListProfileTimes request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
228 */
229 nextToken?: PaginationToken;
230 /**
231 * The order (ascending or descending by start time of the profile) to use when listing profiles. Defaults to TIMESTAMP_DESCENDING.
232 */
233 orderBy?: OrderBy;
234 /**
235 * The aggregation period.
236 */
237 period: AggregationPeriod;
238 /**
239 * The name of the profiling group.
240 */
241 profilingGroupName: ProfilingGroupName;
242 /**
243 * The start time of the time range from which to list the profiles.
244 */
245 startTime: Timestamp;
246 }
247 export interface ListProfileTimesResponse {
248 /**
249 * The nextToken value to include in a future ListProfileTimes request. When the results of a ListProfileTimes request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.
250 */
251 nextToken?: PaginationToken;
252 /**
253 * The list of start times of the available profiles for the aggregation period in the specified time range.
254 */
255 profileTimes: ProfileTimes;
256 }
257 export interface ListProfilingGroupsRequest {
258 /**
259 * A Boolean value indicating whether to include a description.
260 */
261 includeDescription?: Boolean;
262 /**
263 * The maximum number of profiling groups results returned by ListProfilingGroups in paginated output. When this parameter is used, ListProfilingGroups only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another ListProfilingGroups request with the returned nextToken value.
264 */
265 maxResults?: MaxResults;
266 /**
267 * The nextToken value returned from a previous paginated ListProfilingGroups request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
268 */
269 nextToken?: PaginationToken;
270 }
271 export interface ListProfilingGroupsResponse {
272 /**
273 * The nextToken value to include in a future ListProfilingGroups request. When the results of a ListProfilingGroups request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.
274 */
275 nextToken?: PaginationToken;
276 /**
277 * Information about profiling group names.
278 */
279 profilingGroupNames: ProfilingGroupNames;
280 /**
281 * Information about profiling groups.
282 */
283 profilingGroups?: ProfilingGroupDescriptions;
284 }
285 export type MaxDepth = number;
286 export type MaxResults = number;
287 export type OrderBy = "TimestampAscending"|"TimestampDescending"|string;
288 export type PaginationToken = string;
289 export type Period = string;
290 export interface PostAgentProfileRequest {
291 /**
292 *
293 */
294 agentProfile: AgentProfile;
295 /**
296 *
297 */
298 contentType: String;
299 /**
300 *
301 */
302 profileToken?: ClientToken;
303 /**
304 *
305 */
306 profilingGroupName: ProfilingGroupName;
307 }
308 export interface PostAgentProfileResponse {
309 }
310 export interface ProfileTime {
311 /**
312 * The start time of the profile.
313 */
314 start?: Timestamp;
315 }
316 export type ProfileTimes = ProfileTime[];
317 export type ProfilingGroupArn = string;
318 export interface ProfilingGroupDescription {
319 /**
320 *
321 */
322 agentOrchestrationConfig?: AgentOrchestrationConfig;
323 /**
324 * The Amazon Resource Name (ARN) identifying the profiling group.
325 */
326 arn?: ProfilingGroupArn;
327 /**
328 * The time, in milliseconds since the epoch, when the profiling group was created.
329 */
330 createdAt?: Timestamp;
331 /**
332 * The name of the profiling group.
333 */
334 name?: ProfilingGroupName;
335 /**
336 * The status of the profiling group.
337 */
338 profilingStatus?: ProfilingStatus;
339 /**
340 * The time, in milliseconds since the epoch, when the profiling group was last updated.
341 */
342 updatedAt?: Timestamp;
343 }
344 export type ProfilingGroupDescriptions = ProfilingGroupDescription[];
345 export type ProfilingGroupName = string;
346 export type ProfilingGroupNames = ProfilingGroupName[];
347 export interface ProfilingStatus {
348 /**
349 * The time, in milliseconds since the epoch, when the latest agent was orchestrated.
350 */
351 latestAgentOrchestratedAt?: Timestamp;
352 /**
353 * The time, in milliseconds since the epoch, when the latest agent was reported..
354 */
355 latestAgentProfileReportedAt?: Timestamp;
356 /**
357 * The latest aggregated profile
358 */
359 latestAggregatedProfile?: AggregatedProfileTime;
360 }
361 export type String = string;
362 export type Timestamp = Date;
363 export interface UpdateProfilingGroupRequest {
364 /**
365 *
366 */
367 agentOrchestrationConfig: AgentOrchestrationConfig;
368 /**
369 * The name of the profiling group to update.
370 */
371 profilingGroupName: ProfilingGroupName;
372 }
373 export interface UpdateProfilingGroupResponse {
374 /**
375 * Updated information about the profiling group.
376 */
377 profilingGroup: ProfilingGroupDescription;
378 }
379 /**
380 * 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.
381 */
382 export type apiVersion = "2019-07-18"|"latest"|string;
383 export interface ClientApiVersions {
384 /**
385 * 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.
386 */
387 apiVersion?: apiVersion;
388 }
389 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
390 /**
391 * Contains interfaces for use with the CodeGuruProfiler client.
392 */
393 export import Types = CodeGuruProfiler;
394}
395export = CodeGuruProfiler;