|
| 1 | +import { ApplicationCostProfilerClient } from "./ApplicationCostProfilerClient"; |
| 2 | +import { |
| 3 | + DeleteReportDefinitionCommand, |
| 4 | + DeleteReportDefinitionCommandInput, |
| 5 | + DeleteReportDefinitionCommandOutput, |
| 6 | +} from "./commands/DeleteReportDefinitionCommand"; |
| 7 | +import { |
| 8 | + GetReportDefinitionCommand, |
| 9 | + GetReportDefinitionCommandInput, |
| 10 | + GetReportDefinitionCommandOutput, |
| 11 | +} from "./commands/GetReportDefinitionCommand"; |
| 12 | +import { |
| 13 | + ImportApplicationUsageCommand, |
| 14 | + ImportApplicationUsageCommandInput, |
| 15 | + ImportApplicationUsageCommandOutput, |
| 16 | +} from "./commands/ImportApplicationUsageCommand"; |
| 17 | +import { |
| 18 | + ListReportDefinitionsCommand, |
| 19 | + ListReportDefinitionsCommandInput, |
| 20 | + ListReportDefinitionsCommandOutput, |
| 21 | +} from "./commands/ListReportDefinitionsCommand"; |
| 22 | +import { |
| 23 | + PutReportDefinitionCommand, |
| 24 | + PutReportDefinitionCommandInput, |
| 25 | + PutReportDefinitionCommandOutput, |
| 26 | +} from "./commands/PutReportDefinitionCommand"; |
| 27 | +import { |
| 28 | + UpdateReportDefinitionCommand, |
| 29 | + UpdateReportDefinitionCommandInput, |
| 30 | + UpdateReportDefinitionCommandOutput, |
| 31 | +} from "./commands/UpdateReportDefinitionCommand"; |
| 32 | +import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types"; |
| 33 | + |
| 34 | +/** |
| 35 | + * <p>This reference provides descriptions of the AWS Application Cost Profiler API.</p> |
| 36 | + * <p>The AWS Application Cost Profiler API provides programmatic access to view, create, update, and delete |
| 37 | + * application cost report definitions, as well as to import your usage data into the Application Cost Profiler |
| 38 | + * service.</p> |
| 39 | + * <p>For more information about using this service, see the <a href="https://docs.aws.amazon.com/application-cost-profiler/latest/userguide/introduction.html">AWS Application Cost |
| 40 | + * Profiler User Guide</a>.</p> |
| 41 | + */ |
| 42 | +export class ApplicationCostProfiler extends ApplicationCostProfilerClient { |
| 43 | + /** |
| 44 | + * <p>Deletes the specified report definition in AWS Application Cost Profiler. This stops the report from being |
| 45 | + * generated.</p> |
| 46 | + */ |
| 47 | + public deleteReportDefinition( |
| 48 | + args: DeleteReportDefinitionCommandInput, |
| 49 | + options?: __HttpHandlerOptions |
| 50 | + ): Promise<DeleteReportDefinitionCommandOutput>; |
| 51 | + public deleteReportDefinition( |
| 52 | + args: DeleteReportDefinitionCommandInput, |
| 53 | + cb: (err: any, data?: DeleteReportDefinitionCommandOutput) => void |
| 54 | + ): void; |
| 55 | + public deleteReportDefinition( |
| 56 | + args: DeleteReportDefinitionCommandInput, |
| 57 | + options: __HttpHandlerOptions, |
| 58 | + cb: (err: any, data?: DeleteReportDefinitionCommandOutput) => void |
| 59 | + ): void; |
| 60 | + public deleteReportDefinition( |
| 61 | + args: DeleteReportDefinitionCommandInput, |
| 62 | + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteReportDefinitionCommandOutput) => void), |
| 63 | + cb?: (err: any, data?: DeleteReportDefinitionCommandOutput) => void |
| 64 | + ): Promise<DeleteReportDefinitionCommandOutput> | void { |
| 65 | + const command = new DeleteReportDefinitionCommand(args); |
| 66 | + if (typeof optionsOrCb === "function") { |
| 67 | + this.send(command, optionsOrCb); |
| 68 | + } else if (typeof cb === "function") { |
| 69 | + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); |
| 70 | + this.send(command, optionsOrCb || {}, cb); |
| 71 | + } else { |
| 72 | + return this.send(command, optionsOrCb); |
| 73 | + } |
| 74 | + } |
| 75 | + |
| 76 | + /** |
| 77 | + * <p>Retrieves the definition of a report already configured in AWS Application Cost Profiler.</p> |
| 78 | + */ |
| 79 | + public getReportDefinition( |
| 80 | + args: GetReportDefinitionCommandInput, |
| 81 | + options?: __HttpHandlerOptions |
| 82 | + ): Promise<GetReportDefinitionCommandOutput>; |
| 83 | + public getReportDefinition( |
| 84 | + args: GetReportDefinitionCommandInput, |
| 85 | + cb: (err: any, data?: GetReportDefinitionCommandOutput) => void |
| 86 | + ): void; |
| 87 | + public getReportDefinition( |
| 88 | + args: GetReportDefinitionCommandInput, |
| 89 | + options: __HttpHandlerOptions, |
| 90 | + cb: (err: any, data?: GetReportDefinitionCommandOutput) => void |
| 91 | + ): void; |
| 92 | + public getReportDefinition( |
| 93 | + args: GetReportDefinitionCommandInput, |
| 94 | + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetReportDefinitionCommandOutput) => void), |
| 95 | + cb?: (err: any, data?: GetReportDefinitionCommandOutput) => void |
| 96 | + ): Promise<GetReportDefinitionCommandOutput> | void { |
| 97 | + const command = new GetReportDefinitionCommand(args); |
| 98 | + if (typeof optionsOrCb === "function") { |
| 99 | + this.send(command, optionsOrCb); |
| 100 | + } else if (typeof cb === "function") { |
| 101 | + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); |
| 102 | + this.send(command, optionsOrCb || {}, cb); |
| 103 | + } else { |
| 104 | + return this.send(command, optionsOrCb); |
| 105 | + } |
| 106 | + } |
| 107 | + |
| 108 | + /** |
| 109 | + * <p>Ingests application usage data from Amazon Simple Storage Service (Amazon S3).</p> |
| 110 | + * <p>The data must already exist in the S3 location. As part of the action, AWS Application Cost Profiler |
| 111 | + * copies the object from your S3 bucket to an S3 bucket owned by Amazon for processing |
| 112 | + * asynchronously.</p> |
| 113 | + */ |
| 114 | + public importApplicationUsage( |
| 115 | + args: ImportApplicationUsageCommandInput, |
| 116 | + options?: __HttpHandlerOptions |
| 117 | + ): Promise<ImportApplicationUsageCommandOutput>; |
| 118 | + public importApplicationUsage( |
| 119 | + args: ImportApplicationUsageCommandInput, |
| 120 | + cb: (err: any, data?: ImportApplicationUsageCommandOutput) => void |
| 121 | + ): void; |
| 122 | + public importApplicationUsage( |
| 123 | + args: ImportApplicationUsageCommandInput, |
| 124 | + options: __HttpHandlerOptions, |
| 125 | + cb: (err: any, data?: ImportApplicationUsageCommandOutput) => void |
| 126 | + ): void; |
| 127 | + public importApplicationUsage( |
| 128 | + args: ImportApplicationUsageCommandInput, |
| 129 | + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ImportApplicationUsageCommandOutput) => void), |
| 130 | + cb?: (err: any, data?: ImportApplicationUsageCommandOutput) => void |
| 131 | + ): Promise<ImportApplicationUsageCommandOutput> | void { |
| 132 | + const command = new ImportApplicationUsageCommand(args); |
| 133 | + if (typeof optionsOrCb === "function") { |
| 134 | + this.send(command, optionsOrCb); |
| 135 | + } else if (typeof cb === "function") { |
| 136 | + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); |
| 137 | + this.send(command, optionsOrCb || {}, cb); |
| 138 | + } else { |
| 139 | + return this.send(command, optionsOrCb); |
| 140 | + } |
| 141 | + } |
| 142 | + |
| 143 | + /** |
| 144 | + * <p>Retrieves a list of all reports and their configurations for your AWS account.</p> |
| 145 | + * <p>The maximum number of reports is one.</p> |
| 146 | + */ |
| 147 | + public listReportDefinitions( |
| 148 | + args: ListReportDefinitionsCommandInput, |
| 149 | + options?: __HttpHandlerOptions |
| 150 | + ): Promise<ListReportDefinitionsCommandOutput>; |
| 151 | + public listReportDefinitions( |
| 152 | + args: ListReportDefinitionsCommandInput, |
| 153 | + cb: (err: any, data?: ListReportDefinitionsCommandOutput) => void |
| 154 | + ): void; |
| 155 | + public listReportDefinitions( |
| 156 | + args: ListReportDefinitionsCommandInput, |
| 157 | + options: __HttpHandlerOptions, |
| 158 | + cb: (err: any, data?: ListReportDefinitionsCommandOutput) => void |
| 159 | + ): void; |
| 160 | + public listReportDefinitions( |
| 161 | + args: ListReportDefinitionsCommandInput, |
| 162 | + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListReportDefinitionsCommandOutput) => void), |
| 163 | + cb?: (err: any, data?: ListReportDefinitionsCommandOutput) => void |
| 164 | + ): Promise<ListReportDefinitionsCommandOutput> | void { |
| 165 | + const command = new ListReportDefinitionsCommand(args); |
| 166 | + if (typeof optionsOrCb === "function") { |
| 167 | + this.send(command, optionsOrCb); |
| 168 | + } else if (typeof cb === "function") { |
| 169 | + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); |
| 170 | + this.send(command, optionsOrCb || {}, cb); |
| 171 | + } else { |
| 172 | + return this.send(command, optionsOrCb); |
| 173 | + } |
| 174 | + } |
| 175 | + |
| 176 | + /** |
| 177 | + * <p>Creates the report definition for a report in Application Cost Profiler.</p> |
| 178 | + */ |
| 179 | + public putReportDefinition( |
| 180 | + args: PutReportDefinitionCommandInput, |
| 181 | + options?: __HttpHandlerOptions |
| 182 | + ): Promise<PutReportDefinitionCommandOutput>; |
| 183 | + public putReportDefinition( |
| 184 | + args: PutReportDefinitionCommandInput, |
| 185 | + cb: (err: any, data?: PutReportDefinitionCommandOutput) => void |
| 186 | + ): void; |
| 187 | + public putReportDefinition( |
| 188 | + args: PutReportDefinitionCommandInput, |
| 189 | + options: __HttpHandlerOptions, |
| 190 | + cb: (err: any, data?: PutReportDefinitionCommandOutput) => void |
| 191 | + ): void; |
| 192 | + public putReportDefinition( |
| 193 | + args: PutReportDefinitionCommandInput, |
| 194 | + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: PutReportDefinitionCommandOutput) => void), |
| 195 | + cb?: (err: any, data?: PutReportDefinitionCommandOutput) => void |
| 196 | + ): Promise<PutReportDefinitionCommandOutput> | void { |
| 197 | + const command = new PutReportDefinitionCommand(args); |
| 198 | + if (typeof optionsOrCb === "function") { |
| 199 | + this.send(command, optionsOrCb); |
| 200 | + } else if (typeof cb === "function") { |
| 201 | + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); |
| 202 | + this.send(command, optionsOrCb || {}, cb); |
| 203 | + } else { |
| 204 | + return this.send(command, optionsOrCb); |
| 205 | + } |
| 206 | + } |
| 207 | + |
| 208 | + /** |
| 209 | + * <p>Updates existing report in AWS Application Cost Profiler.</p> |
| 210 | + */ |
| 211 | + public updateReportDefinition( |
| 212 | + args: UpdateReportDefinitionCommandInput, |
| 213 | + options?: __HttpHandlerOptions |
| 214 | + ): Promise<UpdateReportDefinitionCommandOutput>; |
| 215 | + public updateReportDefinition( |
| 216 | + args: UpdateReportDefinitionCommandInput, |
| 217 | + cb: (err: any, data?: UpdateReportDefinitionCommandOutput) => void |
| 218 | + ): void; |
| 219 | + public updateReportDefinition( |
| 220 | + args: UpdateReportDefinitionCommandInput, |
| 221 | + options: __HttpHandlerOptions, |
| 222 | + cb: (err: any, data?: UpdateReportDefinitionCommandOutput) => void |
| 223 | + ): void; |
| 224 | + public updateReportDefinition( |
| 225 | + args: UpdateReportDefinitionCommandInput, |
| 226 | + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateReportDefinitionCommandOutput) => void), |
| 227 | + cb?: (err: any, data?: UpdateReportDefinitionCommandOutput) => void |
| 228 | + ): Promise<UpdateReportDefinitionCommandOutput> | void { |
| 229 | + const command = new UpdateReportDefinitionCommand(args); |
| 230 | + if (typeof optionsOrCb === "function") { |
| 231 | + this.send(command, optionsOrCb); |
| 232 | + } else if (typeof cb === "function") { |
| 233 | + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); |
| 234 | + this.send(command, optionsOrCb || {}, cb); |
| 235 | + } else { |
| 236 | + return this.send(command, optionsOrCb); |
| 237 | + } |
| 238 | + } |
| 239 | +} |
0 commit comments