|
| 1 | +import { CodeGuruProfilerClient } from "./CodeGuruProfilerClient"; |
| 2 | +import { |
| 3 | + ConfigureAgentCommand, |
| 4 | + ConfigureAgentCommandInput, |
| 5 | + ConfigureAgentCommandOutput |
| 6 | +} from "./commands/ConfigureAgentCommand"; |
| 7 | +import { |
| 8 | + CreateProfilingGroupCommand, |
| 9 | + CreateProfilingGroupCommandInput, |
| 10 | + CreateProfilingGroupCommandOutput |
| 11 | +} from "./commands/CreateProfilingGroupCommand"; |
| 12 | +import { |
| 13 | + DeleteProfilingGroupCommand, |
| 14 | + DeleteProfilingGroupCommandInput, |
| 15 | + DeleteProfilingGroupCommandOutput |
| 16 | +} from "./commands/DeleteProfilingGroupCommand"; |
| 17 | +import { |
| 18 | + DescribeProfilingGroupCommand, |
| 19 | + DescribeProfilingGroupCommandInput, |
| 20 | + DescribeProfilingGroupCommandOutput |
| 21 | +} from "./commands/DescribeProfilingGroupCommand"; |
| 22 | +import { |
| 23 | + GetProfileCommand, |
| 24 | + GetProfileCommandInput, |
| 25 | + GetProfileCommandOutput |
| 26 | +} from "./commands/GetProfileCommand"; |
| 27 | +import { |
| 28 | + ListProfileTimesCommand, |
| 29 | + ListProfileTimesCommandInput, |
| 30 | + ListProfileTimesCommandOutput |
| 31 | +} from "./commands/ListProfileTimesCommand"; |
| 32 | +import { |
| 33 | + ListProfilingGroupsCommand, |
| 34 | + ListProfilingGroupsCommandInput, |
| 35 | + ListProfilingGroupsCommandOutput |
| 36 | +} from "./commands/ListProfilingGroupsCommand"; |
| 37 | +import { |
| 38 | + PostAgentProfileCommand, |
| 39 | + PostAgentProfileCommandInput, |
| 40 | + PostAgentProfileCommandOutput |
| 41 | +} from "./commands/PostAgentProfileCommand"; |
| 42 | +import { |
| 43 | + UpdateProfilingGroupCommand, |
| 44 | + UpdateProfilingGroupCommandInput, |
| 45 | + UpdateProfilingGroupCommandOutput |
| 46 | +} from "./commands/UpdateProfilingGroupCommand"; |
| 47 | +import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types"; |
| 48 | + |
| 49 | +/** |
| 50 | + * <p>Example service documentation.</p> |
| 51 | + */ |
| 52 | +export class CodeGuruProfiler extends CodeGuruProfilerClient { |
| 53 | + /** |
| 54 | + * Provides the configuration to use for an agent of the profiling group. |
| 55 | + */ |
| 56 | + public configureAgent( |
| 57 | + args: ConfigureAgentCommandInput, |
| 58 | + options?: __HttpHandlerOptions |
| 59 | + ): Promise<ConfigureAgentCommandOutput>; |
| 60 | + public configureAgent( |
| 61 | + args: ConfigureAgentCommandInput, |
| 62 | + cb: (err: any, data?: ConfigureAgentCommandOutput) => void |
| 63 | + ): void; |
| 64 | + public configureAgent( |
| 65 | + args: ConfigureAgentCommandInput, |
| 66 | + options: __HttpHandlerOptions, |
| 67 | + cb: (err: any, data?: ConfigureAgentCommandOutput) => void |
| 68 | + ): void; |
| 69 | + public configureAgent( |
| 70 | + args: ConfigureAgentCommandInput, |
| 71 | + optionsOrCb?: |
| 72 | + | __HttpHandlerOptions |
| 73 | + | ((err: any, data?: ConfigureAgentCommandOutput) => void), |
| 74 | + cb?: (err: any, data?: ConfigureAgentCommandOutput) => void |
| 75 | + ): Promise<ConfigureAgentCommandOutput> | void { |
| 76 | + const command = new ConfigureAgentCommand(args); |
| 77 | + if (typeof optionsOrCb === "function") { |
| 78 | + this.send(command, optionsOrCb); |
| 79 | + } else if (typeof cb === "function") { |
| 80 | + if (typeof optionsOrCb !== "object") |
| 81 | + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); |
| 82 | + this.send(command, optionsOrCb || {}, cb); |
| 83 | + } else { |
| 84 | + return this.send(command, optionsOrCb); |
| 85 | + } |
| 86 | + } |
| 87 | + |
| 88 | + /** |
| 89 | + * Create a profiling group. |
| 90 | + */ |
| 91 | + public createProfilingGroup( |
| 92 | + args: CreateProfilingGroupCommandInput, |
| 93 | + options?: __HttpHandlerOptions |
| 94 | + ): Promise<CreateProfilingGroupCommandOutput>; |
| 95 | + public createProfilingGroup( |
| 96 | + args: CreateProfilingGroupCommandInput, |
| 97 | + cb: (err: any, data?: CreateProfilingGroupCommandOutput) => void |
| 98 | + ): void; |
| 99 | + public createProfilingGroup( |
| 100 | + args: CreateProfilingGroupCommandInput, |
| 101 | + options: __HttpHandlerOptions, |
| 102 | + cb: (err: any, data?: CreateProfilingGroupCommandOutput) => void |
| 103 | + ): void; |
| 104 | + public createProfilingGroup( |
| 105 | + args: CreateProfilingGroupCommandInput, |
| 106 | + optionsOrCb?: |
| 107 | + | __HttpHandlerOptions |
| 108 | + | ((err: any, data?: CreateProfilingGroupCommandOutput) => void), |
| 109 | + cb?: (err: any, data?: CreateProfilingGroupCommandOutput) => void |
| 110 | + ): Promise<CreateProfilingGroupCommandOutput> | void { |
| 111 | + const command = new CreateProfilingGroupCommand(args); |
| 112 | + if (typeof optionsOrCb === "function") { |
| 113 | + this.send(command, optionsOrCb); |
| 114 | + } else if (typeof cb === "function") { |
| 115 | + if (typeof optionsOrCb !== "object") |
| 116 | + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); |
| 117 | + this.send(command, optionsOrCb || {}, cb); |
| 118 | + } else { |
| 119 | + return this.send(command, optionsOrCb); |
| 120 | + } |
| 121 | + } |
| 122 | + |
| 123 | + /** |
| 124 | + * Delete a profiling group. |
| 125 | + */ |
| 126 | + public deleteProfilingGroup( |
| 127 | + args: DeleteProfilingGroupCommandInput, |
| 128 | + options?: __HttpHandlerOptions |
| 129 | + ): Promise<DeleteProfilingGroupCommandOutput>; |
| 130 | + public deleteProfilingGroup( |
| 131 | + args: DeleteProfilingGroupCommandInput, |
| 132 | + cb: (err: any, data?: DeleteProfilingGroupCommandOutput) => void |
| 133 | + ): void; |
| 134 | + public deleteProfilingGroup( |
| 135 | + args: DeleteProfilingGroupCommandInput, |
| 136 | + options: __HttpHandlerOptions, |
| 137 | + cb: (err: any, data?: DeleteProfilingGroupCommandOutput) => void |
| 138 | + ): void; |
| 139 | + public deleteProfilingGroup( |
| 140 | + args: DeleteProfilingGroupCommandInput, |
| 141 | + optionsOrCb?: |
| 142 | + | __HttpHandlerOptions |
| 143 | + | ((err: any, data?: DeleteProfilingGroupCommandOutput) => void), |
| 144 | + cb?: (err: any, data?: DeleteProfilingGroupCommandOutput) => void |
| 145 | + ): Promise<DeleteProfilingGroupCommandOutput> | void { |
| 146 | + const command = new DeleteProfilingGroupCommand(args); |
| 147 | + if (typeof optionsOrCb === "function") { |
| 148 | + this.send(command, optionsOrCb); |
| 149 | + } else if (typeof cb === "function") { |
| 150 | + if (typeof optionsOrCb !== "object") |
| 151 | + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); |
| 152 | + this.send(command, optionsOrCb || {}, cb); |
| 153 | + } else { |
| 154 | + return this.send(command, optionsOrCb); |
| 155 | + } |
| 156 | + } |
| 157 | + |
| 158 | + /** |
| 159 | + * Describe a profiling group. |
| 160 | + */ |
| 161 | + public describeProfilingGroup( |
| 162 | + args: DescribeProfilingGroupCommandInput, |
| 163 | + options?: __HttpHandlerOptions |
| 164 | + ): Promise<DescribeProfilingGroupCommandOutput>; |
| 165 | + public describeProfilingGroup( |
| 166 | + args: DescribeProfilingGroupCommandInput, |
| 167 | + cb: (err: any, data?: DescribeProfilingGroupCommandOutput) => void |
| 168 | + ): void; |
| 169 | + public describeProfilingGroup( |
| 170 | + args: DescribeProfilingGroupCommandInput, |
| 171 | + options: __HttpHandlerOptions, |
| 172 | + cb: (err: any, data?: DescribeProfilingGroupCommandOutput) => void |
| 173 | + ): void; |
| 174 | + public describeProfilingGroup( |
| 175 | + args: DescribeProfilingGroupCommandInput, |
| 176 | + optionsOrCb?: |
| 177 | + | __HttpHandlerOptions |
| 178 | + | ((err: any, data?: DescribeProfilingGroupCommandOutput) => void), |
| 179 | + cb?: (err: any, data?: DescribeProfilingGroupCommandOutput) => void |
| 180 | + ): Promise<DescribeProfilingGroupCommandOutput> | void { |
| 181 | + const command = new DescribeProfilingGroupCommand(args); |
| 182 | + if (typeof optionsOrCb === "function") { |
| 183 | + this.send(command, optionsOrCb); |
| 184 | + } else if (typeof cb === "function") { |
| 185 | + if (typeof optionsOrCb !== "object") |
| 186 | + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); |
| 187 | + this.send(command, optionsOrCb || {}, cb); |
| 188 | + } else { |
| 189 | + return this.send(command, optionsOrCb); |
| 190 | + } |
| 191 | + } |
| 192 | + |
| 193 | + /** |
| 194 | + * List profiling groups in the account. |
| 195 | + */ |
| 196 | + public listProfilingGroups( |
| 197 | + args: ListProfilingGroupsCommandInput, |
| 198 | + options?: __HttpHandlerOptions |
| 199 | + ): Promise<ListProfilingGroupsCommandOutput>; |
| 200 | + public listProfilingGroups( |
| 201 | + args: ListProfilingGroupsCommandInput, |
| 202 | + cb: (err: any, data?: ListProfilingGroupsCommandOutput) => void |
| 203 | + ): void; |
| 204 | + public listProfilingGroups( |
| 205 | + args: ListProfilingGroupsCommandInput, |
| 206 | + options: __HttpHandlerOptions, |
| 207 | + cb: (err: any, data?: ListProfilingGroupsCommandOutput) => void |
| 208 | + ): void; |
| 209 | + public listProfilingGroups( |
| 210 | + args: ListProfilingGroupsCommandInput, |
| 211 | + optionsOrCb?: |
| 212 | + | __HttpHandlerOptions |
| 213 | + | ((err: any, data?: ListProfilingGroupsCommandOutput) => void), |
| 214 | + cb?: (err: any, data?: ListProfilingGroupsCommandOutput) => void |
| 215 | + ): Promise<ListProfilingGroupsCommandOutput> | void { |
| 216 | + const command = new ListProfilingGroupsCommand(args); |
| 217 | + if (typeof optionsOrCb === "function") { |
| 218 | + this.send(command, optionsOrCb); |
| 219 | + } else if (typeof cb === "function") { |
| 220 | + if (typeof optionsOrCb !== "object") |
| 221 | + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); |
| 222 | + this.send(command, optionsOrCb || {}, cb); |
| 223 | + } else { |
| 224 | + return this.send(command, optionsOrCb); |
| 225 | + } |
| 226 | + } |
| 227 | + |
| 228 | + /** |
| 229 | + * Update a profiling group. |
| 230 | + */ |
| 231 | + public updateProfilingGroup( |
| 232 | + args: UpdateProfilingGroupCommandInput, |
| 233 | + options?: __HttpHandlerOptions |
| 234 | + ): Promise<UpdateProfilingGroupCommandOutput>; |
| 235 | + public updateProfilingGroup( |
| 236 | + args: UpdateProfilingGroupCommandInput, |
| 237 | + cb: (err: any, data?: UpdateProfilingGroupCommandOutput) => void |
| 238 | + ): void; |
| 239 | + public updateProfilingGroup( |
| 240 | + args: UpdateProfilingGroupCommandInput, |
| 241 | + options: __HttpHandlerOptions, |
| 242 | + cb: (err: any, data?: UpdateProfilingGroupCommandOutput) => void |
| 243 | + ): void; |
| 244 | + public updateProfilingGroup( |
| 245 | + args: UpdateProfilingGroupCommandInput, |
| 246 | + optionsOrCb?: |
| 247 | + | __HttpHandlerOptions |
| 248 | + | ((err: any, data?: UpdateProfilingGroupCommandOutput) => void), |
| 249 | + cb?: (err: any, data?: UpdateProfilingGroupCommandOutput) => void |
| 250 | + ): Promise<UpdateProfilingGroupCommandOutput> | void { |
| 251 | + const command = new UpdateProfilingGroupCommand(args); |
| 252 | + if (typeof optionsOrCb === "function") { |
| 253 | + this.send(command, optionsOrCb); |
| 254 | + } else if (typeof cb === "function") { |
| 255 | + if (typeof optionsOrCb !== "object") |
| 256 | + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); |
| 257 | + this.send(command, optionsOrCb || {}, cb); |
| 258 | + } else { |
| 259 | + return this.send(command, optionsOrCb); |
| 260 | + } |
| 261 | + } |
| 262 | + |
| 263 | + /** |
| 264 | + * Get the aggregated profile of a profiling group for the specified time range. |
| 265 | + * If the requested time range does not align with the available aggregated profiles, it will be expanded to attain alignment. |
| 266 | + * 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. |
| 267 | + * For instance, if the requested time range is from 00:00 to 00:20 and the available profiles are from 00:15 to 00:25, then the returned profile will be from 00:15 to 00:20. |
| 268 | + */ |
| 269 | + public getProfile( |
| 270 | + args: GetProfileCommandInput, |
| 271 | + options?: __HttpHandlerOptions |
| 272 | + ): Promise<GetProfileCommandOutput>; |
| 273 | + public getProfile( |
| 274 | + args: GetProfileCommandInput, |
| 275 | + cb: (err: any, data?: GetProfileCommandOutput) => void |
| 276 | + ): void; |
| 277 | + public getProfile( |
| 278 | + args: GetProfileCommandInput, |
| 279 | + options: __HttpHandlerOptions, |
| 280 | + cb: (err: any, data?: GetProfileCommandOutput) => void |
| 281 | + ): void; |
| 282 | + public getProfile( |
| 283 | + args: GetProfileCommandInput, |
| 284 | + optionsOrCb?: |
| 285 | + | __HttpHandlerOptions |
| 286 | + | ((err: any, data?: GetProfileCommandOutput) => void), |
| 287 | + cb?: (err: any, data?: GetProfileCommandOutput) => void |
| 288 | + ): Promise<GetProfileCommandOutput> | void { |
| 289 | + const command = new GetProfileCommand(args); |
| 290 | + if (typeof optionsOrCb === "function") { |
| 291 | + this.send(command, optionsOrCb); |
| 292 | + } else if (typeof cb === "function") { |
| 293 | + if (typeof optionsOrCb !== "object") |
| 294 | + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); |
| 295 | + this.send(command, optionsOrCb || {}, cb); |
| 296 | + } else { |
| 297 | + return this.send(command, optionsOrCb); |
| 298 | + } |
| 299 | + } |
| 300 | + |
| 301 | + /** |
| 302 | + * List the start times of the available aggregated profiles of a profiling group for an aggregation period within the specified time range. |
| 303 | + */ |
| 304 | + public listProfileTimes( |
| 305 | + args: ListProfileTimesCommandInput, |
| 306 | + options?: __HttpHandlerOptions |
| 307 | + ): Promise<ListProfileTimesCommandOutput>; |
| 308 | + public listProfileTimes( |
| 309 | + args: ListProfileTimesCommandInput, |
| 310 | + cb: (err: any, data?: ListProfileTimesCommandOutput) => void |
| 311 | + ): void; |
| 312 | + public listProfileTimes( |
| 313 | + args: ListProfileTimesCommandInput, |
| 314 | + options: __HttpHandlerOptions, |
| 315 | + cb: (err: any, data?: ListProfileTimesCommandOutput) => void |
| 316 | + ): void; |
| 317 | + public listProfileTimes( |
| 318 | + args: ListProfileTimesCommandInput, |
| 319 | + optionsOrCb?: |
| 320 | + | __HttpHandlerOptions |
| 321 | + | ((err: any, data?: ListProfileTimesCommandOutput) => void), |
| 322 | + cb?: (err: any, data?: ListProfileTimesCommandOutput) => void |
| 323 | + ): Promise<ListProfileTimesCommandOutput> | void { |
| 324 | + const command = new ListProfileTimesCommand(args); |
| 325 | + if (typeof optionsOrCb === "function") { |
| 326 | + this.send(command, optionsOrCb); |
| 327 | + } else if (typeof cb === "function") { |
| 328 | + if (typeof optionsOrCb !== "object") |
| 329 | + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); |
| 330 | + this.send(command, optionsOrCb || {}, cb); |
| 331 | + } else { |
| 332 | + return this.send(command, optionsOrCb); |
| 333 | + } |
| 334 | + } |
| 335 | + |
| 336 | + /** |
| 337 | + * Submit profile collected by an agent belonging to a profiling group for aggregation. |
| 338 | + */ |
| 339 | + public postAgentProfile( |
| 340 | + args: PostAgentProfileCommandInput, |
| 341 | + options?: __HttpHandlerOptions |
| 342 | + ): Promise<PostAgentProfileCommandOutput>; |
| 343 | + public postAgentProfile( |
| 344 | + args: PostAgentProfileCommandInput, |
| 345 | + cb: (err: any, data?: PostAgentProfileCommandOutput) => void |
| 346 | + ): void; |
| 347 | + public postAgentProfile( |
| 348 | + args: PostAgentProfileCommandInput, |
| 349 | + options: __HttpHandlerOptions, |
| 350 | + cb: (err: any, data?: PostAgentProfileCommandOutput) => void |
| 351 | + ): void; |
| 352 | + public postAgentProfile( |
| 353 | + args: PostAgentProfileCommandInput, |
| 354 | + optionsOrCb?: |
| 355 | + | __HttpHandlerOptions |
| 356 | + | ((err: any, data?: PostAgentProfileCommandOutput) => void), |
| 357 | + cb?: (err: any, data?: PostAgentProfileCommandOutput) => void |
| 358 | + ): Promise<PostAgentProfileCommandOutput> | void { |
| 359 | + const command = new PostAgentProfileCommand(args); |
| 360 | + if (typeof optionsOrCb === "function") { |
| 361 | + this.send(command, optionsOrCb); |
| 362 | + } else if (typeof cb === "function") { |
| 363 | + if (typeof optionsOrCb !== "object") |
| 364 | + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); |
| 365 | + this.send(command, optionsOrCb || {}, cb); |
| 366 | + } else { |
| 367 | + return this.send(command, optionsOrCb); |
| 368 | + } |
| 369 | + } |
| 370 | +} |
0 commit comments