|
| 1 | +// smithy-typescript generated code |
| 2 | +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; |
| 3 | +import { getSerdePlugin } from "@smithy/middleware-serde"; |
| 4 | +import { Command as $Command } from "@smithy/smithy-client"; |
| 5 | +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; |
| 6 | + |
| 7 | +import { BillingClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BillingClient"; |
| 8 | +import { commonParams } from "../endpoint/EndpointParameters"; |
| 9 | +import { AssociateSourceViewsRequest, AssociateSourceViewsResponse } from "../models/models_0"; |
| 10 | +import { de_AssociateSourceViewsCommand, se_AssociateSourceViewsCommand } from "../protocols/Aws_json1_0"; |
| 11 | + |
| 12 | +/** |
| 13 | + * @public |
| 14 | + */ |
| 15 | +export type { __MetadataBearer }; |
| 16 | +export { $Command }; |
| 17 | +/** |
| 18 | + * @public |
| 19 | + * |
| 20 | + * The input for {@link AssociateSourceViewsCommand}. |
| 21 | + */ |
| 22 | +export interface AssociateSourceViewsCommandInput extends AssociateSourceViewsRequest {} |
| 23 | +/** |
| 24 | + * @public |
| 25 | + * |
| 26 | + * The output of {@link AssociateSourceViewsCommand}. |
| 27 | + */ |
| 28 | +export interface AssociateSourceViewsCommandOutput extends AssociateSourceViewsResponse, __MetadataBearer {} |
| 29 | + |
| 30 | +/** |
| 31 | + * <p> Associates one or more source billing views with an existing billing view. This allows creating aggregate billing views that combine data from multiple sources. </p> |
| 32 | + * @example |
| 33 | + * Use a bare-bones client and the command you need to make an API call. |
| 34 | + * ```javascript |
| 35 | + * import { BillingClient, AssociateSourceViewsCommand } from "@aws-sdk/client-billing"; // ES Modules import |
| 36 | + * // const { BillingClient, AssociateSourceViewsCommand } = require("@aws-sdk/client-billing"); // CommonJS import |
| 37 | + * // import type { BillingClientConfig } from "@aws-sdk/client-billing"; |
| 38 | + * const config = {}; // type is BillingClientConfig |
| 39 | + * const client = new BillingClient(config); |
| 40 | + * const input = { // AssociateSourceViewsRequest |
| 41 | + * arn: "STRING_VALUE", // required |
| 42 | + * sourceViews: [ // BillingViewSourceViewsList // required |
| 43 | + * "STRING_VALUE", |
| 44 | + * ], |
| 45 | + * }; |
| 46 | + * const command = new AssociateSourceViewsCommand(input); |
| 47 | + * const response = await client.send(command); |
| 48 | + * // { // AssociateSourceViewsResponse |
| 49 | + * // arn: "STRING_VALUE", // required |
| 50 | + * // }; |
| 51 | + * |
| 52 | + * ``` |
| 53 | + * |
| 54 | + * @param AssociateSourceViewsCommandInput - {@link AssociateSourceViewsCommandInput} |
| 55 | + * @returns {@link AssociateSourceViewsCommandOutput} |
| 56 | + * @see {@link AssociateSourceViewsCommandInput} for command's `input` shape. |
| 57 | + * @see {@link AssociateSourceViewsCommandOutput} for command's `response` shape. |
| 58 | + * @see {@link BillingClientResolvedConfig | config} for BillingClient's `config` shape. |
| 59 | + * |
| 60 | + * @throws {@link AccessDeniedException} (client fault) |
| 61 | + * <p>You don't have sufficient access to perform this action.</p> |
| 62 | + * |
| 63 | + * @throws {@link BillingViewHealthStatusException} (client fault) |
| 64 | + * <p> Exception thrown when a billing view's health status prevents an operation from being performed. This may occur if the billing view is in a state other than <code>HEALTHY</code>.</p> |
| 65 | + * |
| 66 | + * @throws {@link ConflictException} (client fault) |
| 67 | + * <p> The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request. </p> |
| 68 | + * |
| 69 | + * @throws {@link InternalServerException} (server fault) |
| 70 | + * <p>The request processing failed because of an unknown error, exception, or failure. </p> |
| 71 | + * |
| 72 | + * @throws {@link ResourceNotFoundException} (client fault) |
| 73 | + * <p> The specified ARN in the request doesn't exist. </p> |
| 74 | + * |
| 75 | + * @throws {@link ServiceQuotaExceededException} (client fault) |
| 76 | + * <p> You've reached the limit of resources you can create, or exceeded the size of an individual resource. </p> |
| 77 | + * |
| 78 | + * @throws {@link ThrottlingException} (client fault) |
| 79 | + * <p>The request was denied due to request throttling. </p> |
| 80 | + * |
| 81 | + * @throws {@link ValidationException} (client fault) |
| 82 | + * <p>The input fails to satisfy the constraints specified by an Amazon Web Services service. </p> |
| 83 | + * |
| 84 | + * @throws {@link BillingServiceException} |
| 85 | + * <p>Base exception class for all service exceptions from Billing service.</p> |
| 86 | + * |
| 87 | + * |
| 88 | + * @example Invoke AssociateSourceViews |
| 89 | + * ```javascript |
| 90 | + * // |
| 91 | + * const input = { |
| 92 | + * arn: "arn:aws:billing::123456789012:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899", |
| 93 | + * sourceViews: [ |
| 94 | + * "arn:aws:billing::123456789012:billingview/primary", |
| 95 | + * "arn:aws:billing::123456789012:billingview/custom-d3f9c7e4-8b2f-4a6e-9d3b-2f7c8a1e5f6d" |
| 96 | + * ] |
| 97 | + * }; |
| 98 | + * const command = new AssociateSourceViewsCommand(input); |
| 99 | + * const response = await client.send(command); |
| 100 | + * /* response is |
| 101 | + * { |
| 102 | + * arn: "arn:aws:billing::123456789012:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899" |
| 103 | + * } |
| 104 | + * *\/ |
| 105 | + * ``` |
| 106 | + * |
| 107 | + * @public |
| 108 | + */ |
| 109 | +export class AssociateSourceViewsCommand extends $Command |
| 110 | + .classBuilder< |
| 111 | + AssociateSourceViewsCommandInput, |
| 112 | + AssociateSourceViewsCommandOutput, |
| 113 | + BillingClientResolvedConfig, |
| 114 | + ServiceInputTypes, |
| 115 | + ServiceOutputTypes |
| 116 | + >() |
| 117 | + .ep(commonParams) |
| 118 | + .m(function (this: any, Command: any, cs: any, config: BillingClientResolvedConfig, o: any) { |
| 119 | + return [ |
| 120 | + getSerdePlugin(config, this.serialize, this.deserialize), |
| 121 | + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), |
| 122 | + ]; |
| 123 | + }) |
| 124 | + .s("AWSBilling", "AssociateSourceViews", {}) |
| 125 | + .n("BillingClient", "AssociateSourceViewsCommand") |
| 126 | + .f(void 0, void 0) |
| 127 | + .ser(se_AssociateSourceViewsCommand) |
| 128 | + .de(de_AssociateSourceViewsCommand) |
| 129 | + .build() { |
| 130 | + /** @internal type navigation helper, not in runtime. */ |
| 131 | + protected declare static __types: { |
| 132 | + api: { |
| 133 | + input: AssociateSourceViewsRequest; |
| 134 | + output: AssociateSourceViewsResponse; |
| 135 | + }; |
| 136 | + sdk: { |
| 137 | + input: AssociateSourceViewsCommandInput; |
| 138 | + output: AssociateSourceViewsCommandOutput; |
| 139 | + }; |
| 140 | + }; |
| 141 | +} |
0 commit comments