+ * Creates a billing view with the specified billing view attributes. + *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BillingClient, CreateBillingViewCommand } from "@aws-sdk/client-billing"; // ES Modules import + * // const { BillingClient, CreateBillingViewCommand } = require("@aws-sdk/client-billing"); // CommonJS import + * const client = new BillingClient(config); + * const input = { // CreateBillingViewRequest + * name: "STRING_VALUE", // required + * description: "STRING_VALUE", + * sourceViews: [ // BillingViewSourceViewsList // required + * "STRING_VALUE", + * ], + * dataFilterExpression: { // Expression + * dimensions: { // DimensionValues + * key: "LINKED_ACCOUNT", // required + * values: [ // Values // required + * "STRING_VALUE", + * ], + * }, + * tags: { // TagValues + * key: "STRING_VALUE", // required + * values: [ // required + * "STRING_VALUE", + * ], + * }, + * }, + * clientToken: "STRING_VALUE", + * resourceTags: [ // ResourceTagList + * { // ResourceTag + * key: "STRING_VALUE", // required + * value: "STRING_VALUE", + * }, + * ], + * }; + * const command = new CreateBillingViewCommand(input); + * const response = await client.send(command); + * // { // CreateBillingViewResponse + * // arn: "STRING_VALUE", // required + * // createdAt: new Date("TIMESTAMP"), + * // }; + * + * ``` + * + * @param CreateBillingViewCommandInput - {@link CreateBillingViewCommandInput} + * @returns {@link CreateBillingViewCommandOutput} + * @see {@link CreateBillingViewCommandInput} for command's `input` shape. + * @see {@link CreateBillingViewCommandOutput} for command's `response` shape. + * @see {@link BillingClientResolvedConfig | config} for BillingClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *You don't have sufficient access to perform this action.
+ * + * @throws {@link ConflictException} (client fault) + *+ * 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. + *
+ * + * @throws {@link InternalServerException} (server fault) + *The request processing failed because of an unknown error, exception, or failure. + *
+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *+ * You've reached the limit of resources you can create, or exceeded the size of an individual resource. + *
+ * + * @throws {@link ThrottlingException} (client fault) + *The request was denied due to request throttling. + *
+ * + * @throws {@link ValidationException} (client fault) + *The input fails to satisfy the constraints specified by an Amazon Web Services service. + *
+ * + * @throws {@link BillingServiceException} + *Base exception class for all service exceptions from Billing service.
+ * + * @public + */ +export class CreateBillingViewCommand extends $Command + .classBuilder< + CreateBillingViewCommandInput, + CreateBillingViewCommandOutput, + BillingClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: BillingClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSBilling", "CreateBillingView", {}) + .n("BillingClient", "CreateBillingViewCommand") + .f(CreateBillingViewRequestFilterSensitiveLog, void 0) + .ser(se_CreateBillingViewCommand) + .de(de_CreateBillingViewCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: CreateBillingViewRequest; + output: CreateBillingViewResponse; + }; + sdk: { + input: CreateBillingViewCommandInput; + output: CreateBillingViewCommandOutput; + }; + }; +} diff --git a/clients/client-billing/src/commands/DeleteBillingViewCommand.ts b/clients/client-billing/src/commands/DeleteBillingViewCommand.ts new file mode 100644 index 0000000000000..634561d1c9660 --- /dev/null +++ b/clients/client-billing/src/commands/DeleteBillingViewCommand.ts @@ -0,0 +1,112 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { BillingClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BillingClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { DeleteBillingViewRequest, DeleteBillingViewResponse } from "../models/models_0"; +import { de_DeleteBillingViewCommand, se_DeleteBillingViewCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link DeleteBillingViewCommand}. + */ +export interface DeleteBillingViewCommandInput extends DeleteBillingViewRequest {} +/** + * @public + * + * The output of {@link DeleteBillingViewCommand}. + */ +export interface DeleteBillingViewCommandOutput extends DeleteBillingViewResponse, __MetadataBearer {} + +/** + *Deletes the specified billing view.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BillingClient, DeleteBillingViewCommand } from "@aws-sdk/client-billing"; // ES Modules import + * // const { BillingClient, DeleteBillingViewCommand } = require("@aws-sdk/client-billing"); // CommonJS import + * const client = new BillingClient(config); + * const input = { // DeleteBillingViewRequest + * arn: "STRING_VALUE", // required + * }; + * const command = new DeleteBillingViewCommand(input); + * const response = await client.send(command); + * // { // DeleteBillingViewResponse + * // arn: "STRING_VALUE", // required + * // }; + * + * ``` + * + * @param DeleteBillingViewCommandInput - {@link DeleteBillingViewCommandInput} + * @returns {@link DeleteBillingViewCommandOutput} + * @see {@link DeleteBillingViewCommandInput} for command's `input` shape. + * @see {@link DeleteBillingViewCommandOutput} for command's `response` shape. + * @see {@link BillingClientResolvedConfig | config} for BillingClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *You don't have sufficient access to perform this action.
+ * + * @throws {@link ConflictException} (client fault) + *+ * 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. + *
+ * + * @throws {@link InternalServerException} (server fault) + *The request processing failed because of an unknown error, exception, or failure. + *
+ * + * @throws {@link ThrottlingException} (client fault) + *The request was denied due to request throttling. + *
+ * + * @throws {@link ValidationException} (client fault) + *The input fails to satisfy the constraints specified by an Amazon Web Services service. + *
+ * + * @throws {@link BillingServiceException} + *Base exception class for all service exceptions from Billing service.
+ * + * @public + */ +export class DeleteBillingViewCommand extends $Command + .classBuilder< + DeleteBillingViewCommandInput, + DeleteBillingViewCommandOutput, + BillingClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: BillingClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSBilling", "DeleteBillingView", {}) + .n("BillingClient", "DeleteBillingViewCommand") + .f(void 0, void 0) + .ser(se_DeleteBillingViewCommand) + .de(de_DeleteBillingViewCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: DeleteBillingViewRequest; + output: DeleteBillingViewResponse; + }; + sdk: { + input: DeleteBillingViewCommandInput; + output: DeleteBillingViewCommandOutput; + }; + }; +} diff --git a/clients/client-billing/src/commands/GetBillingViewCommand.ts b/clients/client-billing/src/commands/GetBillingViewCommand.ts new file mode 100644 index 0000000000000..ae5564216156f --- /dev/null +++ b/clients/client-billing/src/commands/GetBillingViewCommand.ts @@ -0,0 +1,139 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { BillingClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BillingClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { + GetBillingViewRequest, + GetBillingViewResponse, + GetBillingViewResponseFilterSensitiveLog, +} from "../models/models_0"; +import { de_GetBillingViewCommand, se_GetBillingViewCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetBillingViewCommand}. + */ +export interface GetBillingViewCommandInput extends GetBillingViewRequest {} +/** + * @public + * + * The output of {@link GetBillingViewCommand}. + */ +export interface GetBillingViewCommandOutput extends GetBillingViewResponse, __MetadataBearer {} + +/** + *Returns the metadata associated to the specified billing view ARN. + *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BillingClient, GetBillingViewCommand } from "@aws-sdk/client-billing"; // ES Modules import + * // const { BillingClient, GetBillingViewCommand } = require("@aws-sdk/client-billing"); // CommonJS import + * const client = new BillingClient(config); + * const input = { // GetBillingViewRequest + * arn: "STRING_VALUE", // required + * }; + * const command = new GetBillingViewCommand(input); + * const response = await client.send(command); + * // { // GetBillingViewResponse + * // billingView: { // BillingViewElement + * // arn: "STRING_VALUE", + * // name: "STRING_VALUE", + * // description: "STRING_VALUE", + * // billingViewType: "PRIMARY" || "BILLING_GROUP" || "CUSTOM", + * // ownerAccountId: "STRING_VALUE", + * // dataFilterExpression: { // Expression + * // dimensions: { // DimensionValues + * // key: "LINKED_ACCOUNT", // required + * // values: [ // Values // required + * // "STRING_VALUE", + * // ], + * // }, + * // tags: { // TagValues + * // key: "STRING_VALUE", // required + * // values: [ // required + * // "STRING_VALUE", + * // ], + * // }, + * // }, + * // createdAt: new Date("TIMESTAMP"), + * // updatedAt: new Date("TIMESTAMP"), + * // }, + * // }; + * + * ``` + * + * @param GetBillingViewCommandInput - {@link GetBillingViewCommandInput} + * @returns {@link GetBillingViewCommandOutput} + * @see {@link GetBillingViewCommandInput} for command's `input` shape. + * @see {@link GetBillingViewCommandOutput} for command's `response` shape. + * @see {@link BillingClientResolvedConfig | config} for BillingClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *You don't have sufficient access to perform this action.
+ * + * @throws {@link InternalServerException} (server fault) + *The request processing failed because of an unknown error, exception, or failure. + *
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *+ * The specified ARN in the request doesn't exist. + *
+ * + * @throws {@link ThrottlingException} (client fault) + *The request was denied due to request throttling. + *
+ * + * @throws {@link ValidationException} (client fault) + *The input fails to satisfy the constraints specified by an Amazon Web Services service. + *
+ * + * @throws {@link BillingServiceException} + *Base exception class for all service exceptions from Billing service.
+ * + * @public + */ +export class GetBillingViewCommand extends $Command + .classBuilder< + GetBillingViewCommandInput, + GetBillingViewCommandOutput, + BillingClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: BillingClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSBilling", "GetBillingView", {}) + .n("BillingClient", "GetBillingViewCommand") + .f(void 0, GetBillingViewResponseFilterSensitiveLog) + .ser(se_GetBillingViewCommand) + .de(de_GetBillingViewCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: GetBillingViewRequest; + output: GetBillingViewResponse; + }; + sdk: { + input: GetBillingViewCommandInput; + output: GetBillingViewCommandOutput; + }; + }; +} diff --git a/clients/client-billing/src/commands/GetResourcePolicyCommand.ts b/clients/client-billing/src/commands/GetResourcePolicyCommand.ts new file mode 100644 index 0000000000000..87134c039e39d --- /dev/null +++ b/clients/client-billing/src/commands/GetResourcePolicyCommand.ts @@ -0,0 +1,114 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { BillingClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BillingClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { GetResourcePolicyRequest, GetResourcePolicyResponse } from "../models/models_0"; +import { de_GetResourcePolicyCommand, se_GetResourcePolicyCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetResourcePolicyCommand}. + */ +export interface GetResourcePolicyCommandInput extends GetResourcePolicyRequest {} +/** + * @public + * + * The output of {@link GetResourcePolicyCommand}. + */ +export interface GetResourcePolicyCommandOutput extends GetResourcePolicyResponse, __MetadataBearer {} + +/** + *Returns the resource-based policy document attached to the resource in JSON
format.
+ *
You don't have sufficient access to perform this action.
+ * + * @throws {@link InternalServerException} (server fault) + *The request processing failed because of an unknown error, exception, or failure. + *
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *+ * The specified ARN in the request doesn't exist. + *
+ * + * @throws {@link ThrottlingException} (client fault) + *The request was denied due to request throttling. + *
+ * + * @throws {@link ValidationException} (client fault) + *The input fails to satisfy the constraints specified by an Amazon Web Services service. + *
+ * + * @throws {@link BillingServiceException} + *Base exception class for all service exceptions from Billing service.
+ * + * @public + */ +export class GetResourcePolicyCommand extends $Command + .classBuilder< + GetResourcePolicyCommandInput, + GetResourcePolicyCommandOutput, + BillingClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: BillingClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSBilling", "GetResourcePolicy", {}) + .n("BillingClient", "GetResourcePolicyCommand") + .f(void 0, void 0) + .ser(se_GetResourcePolicyCommand) + .de(de_GetResourcePolicyCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: GetResourcePolicyRequest; + output: GetResourcePolicyResponse; + }; + sdk: { + input: GetResourcePolicyCommandInput; + output: GetResourcePolicyCommandOutput; + }; + }; +} diff --git a/clients/client-billing/src/commands/ListBillingViewsCommand.ts b/clients/client-billing/src/commands/ListBillingViewsCommand.ts index b3a3858ec1089..2d4e8d690bc5c 100644 --- a/clients/client-billing/src/commands/ListBillingViewsCommand.ts +++ b/clients/client-billing/src/commands/ListBillingViewsCommand.ts @@ -46,6 +46,13 @@ export interface ListBillingViewsCommandOutput extends ListBillingViewsResponse, * activeAfterInclusive: new Date("TIMESTAMP"), // required * activeBeforeInclusive: new Date("TIMESTAMP"), // required * }, + * arns: [ // BillingViewArnList + * "STRING_VALUE", + * ], + * billingViewTypes: [ // BillingViewTypeList + * "PRIMARY" || "BILLING_GROUP" || "CUSTOM", + * ], + * ownerAccountId: "STRING_VALUE", * maxResults: Number("int"), * nextToken: "STRING_VALUE", * }; @@ -56,8 +63,9 @@ export interface ListBillingViewsCommandOutput extends ListBillingViewsResponse, * // { // BillingViewListElement * // arn: "STRING_VALUE", * // name: "STRING_VALUE", + * // description: "STRING_VALUE", * // ownerAccountId: "STRING_VALUE", - * // billingViewType: "PRIMARY" || "BILLING_GROUP", + * // billingViewType: "PRIMARY" || "BILLING_GROUP" || "CUSTOM", * // }, * // ], * // nextToken: "STRING_VALUE", diff --git a/clients/client-billing/src/commands/ListSourceViewsForBillingViewCommand.ts b/clients/client-billing/src/commands/ListSourceViewsForBillingViewCommand.ts new file mode 100644 index 0000000000000..fd4522cd516c0 --- /dev/null +++ b/clients/client-billing/src/commands/ListSourceViewsForBillingViewCommand.ts @@ -0,0 +1,123 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { BillingClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BillingClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { ListSourceViewsForBillingViewRequest, ListSourceViewsForBillingViewResponse } from "../models/models_0"; +import { + de_ListSourceViewsForBillingViewCommand, + se_ListSourceViewsForBillingViewCommand, +} from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link ListSourceViewsForBillingViewCommand}. + */ +export interface ListSourceViewsForBillingViewCommandInput extends ListSourceViewsForBillingViewRequest {} +/** + * @public + * + * The output of {@link ListSourceViewsForBillingViewCommand}. + */ +export interface ListSourceViewsForBillingViewCommandOutput + extends ListSourceViewsForBillingViewResponse, + __MetadataBearer {} + +/** + *Lists the source views (managed Amazon Web Services billing views) associated with the billing view. + *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BillingClient, ListSourceViewsForBillingViewCommand } from "@aws-sdk/client-billing"; // ES Modules import + * // const { BillingClient, ListSourceViewsForBillingViewCommand } = require("@aws-sdk/client-billing"); // CommonJS import + * const client = new BillingClient(config); + * const input = { // ListSourceViewsForBillingViewRequest + * arn: "STRING_VALUE", // required + * maxResults: Number("int"), + * nextToken: "STRING_VALUE", + * }; + * const command = new ListSourceViewsForBillingViewCommand(input); + * const response = await client.send(command); + * // { // ListSourceViewsForBillingViewResponse + * // sourceViews: [ // BillingViewSourceViewsList // required + * // "STRING_VALUE", + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListSourceViewsForBillingViewCommandInput - {@link ListSourceViewsForBillingViewCommandInput} + * @returns {@link ListSourceViewsForBillingViewCommandOutput} + * @see {@link ListSourceViewsForBillingViewCommandInput} for command's `input` shape. + * @see {@link ListSourceViewsForBillingViewCommandOutput} for command's `response` shape. + * @see {@link BillingClientResolvedConfig | config} for BillingClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *You don't have sufficient access to perform this action.
+ * + * @throws {@link InternalServerException} (server fault) + *The request processing failed because of an unknown error, exception, or failure. + *
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *+ * The specified ARN in the request doesn't exist. + *
+ * + * @throws {@link ThrottlingException} (client fault) + *The request was denied due to request throttling. + *
+ * + * @throws {@link ValidationException} (client fault) + *The input fails to satisfy the constraints specified by an Amazon Web Services service. + *
+ * + * @throws {@link BillingServiceException} + *Base exception class for all service exceptions from Billing service.
+ * + * @public + */ +export class ListSourceViewsForBillingViewCommand extends $Command + .classBuilder< + ListSourceViewsForBillingViewCommandInput, + ListSourceViewsForBillingViewCommandOutput, + BillingClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: BillingClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSBilling", "ListSourceViewsForBillingView", {}) + .n("BillingClient", "ListSourceViewsForBillingViewCommand") + .f(void 0, void 0) + .ser(se_ListSourceViewsForBillingViewCommand) + .de(de_ListSourceViewsForBillingViewCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: ListSourceViewsForBillingViewRequest; + output: ListSourceViewsForBillingViewResponse; + }; + sdk: { + input: ListSourceViewsForBillingViewCommandInput; + output: ListSourceViewsForBillingViewCommandOutput; + }; + }; +} diff --git a/clients/client-billing/src/commands/ListTagsForResourceCommand.ts b/clients/client-billing/src/commands/ListTagsForResourceCommand.ts new file mode 100644 index 0000000000000..df0ba6b54b0b6 --- /dev/null +++ b/clients/client-billing/src/commands/ListTagsForResourceCommand.ts @@ -0,0 +1,118 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { BillingClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BillingClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { ListTagsForResourceRequest, ListTagsForResourceResponse } from "../models/models_0"; +import { de_ListTagsForResourceCommand, se_ListTagsForResourceCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link ListTagsForResourceCommand}. + */ +export interface ListTagsForResourceCommandInput extends ListTagsForResourceRequest {} +/** + * @public + * + * The output of {@link ListTagsForResourceCommand}. + */ +export interface ListTagsForResourceCommandOutput extends ListTagsForResourceResponse, __MetadataBearer {} + +/** + *Lists tags associated with the billing view resource. + *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BillingClient, ListTagsForResourceCommand } from "@aws-sdk/client-billing"; // ES Modules import + * // const { BillingClient, ListTagsForResourceCommand } = require("@aws-sdk/client-billing"); // CommonJS import + * const client = new BillingClient(config); + * const input = { // ListTagsForResourceRequest + * resourceArn: "STRING_VALUE", // required + * }; + * const command = new ListTagsForResourceCommand(input); + * const response = await client.send(command); + * // { // ListTagsForResourceResponse + * // resourceTags: [ // ResourceTagList + * // { // ResourceTag + * // key: "STRING_VALUE", // required + * // value: "STRING_VALUE", + * // }, + * // ], + * // }; + * + * ``` + * + * @param ListTagsForResourceCommandInput - {@link ListTagsForResourceCommandInput} + * @returns {@link ListTagsForResourceCommandOutput} + * @see {@link ListTagsForResourceCommandInput} for command's `input` shape. + * @see {@link ListTagsForResourceCommandOutput} for command's `response` shape. + * @see {@link BillingClientResolvedConfig | config} for BillingClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *You don't have sufficient access to perform this action.
+ * + * @throws {@link InternalServerException} (server fault) + *The request processing failed because of an unknown error, exception, or failure. + *
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *+ * The specified ARN in the request doesn't exist. + *
+ * + * @throws {@link ThrottlingException} (client fault) + *The request was denied due to request throttling. + *
+ * + * @throws {@link ValidationException} (client fault) + *The input fails to satisfy the constraints specified by an Amazon Web Services service. + *
+ * + * @throws {@link BillingServiceException} + *Base exception class for all service exceptions from Billing service.
+ * + * @public + */ +export class ListTagsForResourceCommand extends $Command + .classBuilder< + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, + BillingClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: BillingClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSBilling", "ListTagsForResource", {}) + .n("BillingClient", "ListTagsForResourceCommand") + .f(void 0, void 0) + .ser(se_ListTagsForResourceCommand) + .de(de_ListTagsForResourceCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: ListTagsForResourceRequest; + output: ListTagsForResourceResponse; + }; + sdk: { + input: ListTagsForResourceCommandInput; + output: ListTagsForResourceCommandOutput; + }; + }; +} diff --git a/clients/client-billing/src/commands/TagResourceCommand.ts b/clients/client-billing/src/commands/TagResourceCommand.ts new file mode 100644 index 0000000000000..9be190e19a8c4 --- /dev/null +++ b/clients/client-billing/src/commands/TagResourceCommand.ts @@ -0,0 +1,118 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { BillingClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BillingClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { TagResourceRequest, TagResourceResponse } from "../models/models_0"; +import { de_TagResourceCommand, se_TagResourceCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link TagResourceCommand}. + */ +export interface TagResourceCommandInput extends TagResourceRequest {} +/** + * @public + * + * The output of {@link TagResourceCommand}. + */ +export interface TagResourceCommandOutput extends TagResourceResponse, __MetadataBearer {} + +/** + *+ * An API operation for adding one or more tags (key-value pairs) to a resource. + *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BillingClient, TagResourceCommand } from "@aws-sdk/client-billing"; // ES Modules import + * // const { BillingClient, TagResourceCommand } = require("@aws-sdk/client-billing"); // CommonJS import + * const client = new BillingClient(config); + * const input = { // TagResourceRequest + * resourceArn: "STRING_VALUE", // required + * resourceTags: [ // ResourceTagList // required + * { // ResourceTag + * key: "STRING_VALUE", // required + * value: "STRING_VALUE", + * }, + * ], + * }; + * const command = new TagResourceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param TagResourceCommandInput - {@link TagResourceCommandInput} + * @returns {@link TagResourceCommandOutput} + * @see {@link TagResourceCommandInput} for command's `input` shape. + * @see {@link TagResourceCommandOutput} for command's `response` shape. + * @see {@link BillingClientResolvedConfig | config} for BillingClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *You don't have sufficient access to perform this action.
+ * + * @throws {@link InternalServerException} (server fault) + *The request processing failed because of an unknown error, exception, or failure. + *
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *+ * The specified ARN in the request doesn't exist. + *
+ * + * @throws {@link ThrottlingException} (client fault) + *The request was denied due to request throttling. + *
+ * + * @throws {@link ValidationException} (client fault) + *The input fails to satisfy the constraints specified by an Amazon Web Services service. + *
+ * + * @throws {@link BillingServiceException} + *Base exception class for all service exceptions from Billing service.
+ * + * @public + */ +export class TagResourceCommand extends $Command + .classBuilder< + TagResourceCommandInput, + TagResourceCommandOutput, + BillingClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: BillingClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSBilling", "TagResource", {}) + .n("BillingClient", "TagResourceCommand") + .f(void 0, void 0) + .ser(se_TagResourceCommand) + .de(de_TagResourceCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: TagResourceRequest; + output: {}; + }; + sdk: { + input: TagResourceCommandInput; + output: TagResourceCommandOutput; + }; + }; +} diff --git a/clients/client-billing/src/commands/UntagResourceCommand.ts b/clients/client-billing/src/commands/UntagResourceCommand.ts new file mode 100644 index 0000000000000..c28187e4b86ee --- /dev/null +++ b/clients/client-billing/src/commands/UntagResourceCommand.ts @@ -0,0 +1,115 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { BillingClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BillingClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { UntagResourceRequest, UntagResourceResponse } from "../models/models_0"; +import { de_UntagResourceCommand, se_UntagResourceCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link UntagResourceCommand}. + */ +export interface UntagResourceCommandInput extends UntagResourceRequest {} +/** + * @public + * + * The output of {@link UntagResourceCommand}. + */ +export interface UntagResourceCommandOutput extends UntagResourceResponse, __MetadataBearer {} + +/** + *+ * Removes one or more tags from a resource. Specify only tag keys in your request. Don't specify the value. + *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BillingClient, UntagResourceCommand } from "@aws-sdk/client-billing"; // ES Modules import + * // const { BillingClient, UntagResourceCommand } = require("@aws-sdk/client-billing"); // CommonJS import + * const client = new BillingClient(config); + * const input = { // UntagResourceRequest + * resourceArn: "STRING_VALUE", // required + * resourceTagKeys: [ // ResourceTagKeyList // required + * "STRING_VALUE", + * ], + * }; + * const command = new UntagResourceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UntagResourceCommandInput - {@link UntagResourceCommandInput} + * @returns {@link UntagResourceCommandOutput} + * @see {@link UntagResourceCommandInput} for command's `input` shape. + * @see {@link UntagResourceCommandOutput} for command's `response` shape. + * @see {@link BillingClientResolvedConfig | config} for BillingClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *You don't have sufficient access to perform this action.
+ * + * @throws {@link InternalServerException} (server fault) + *The request processing failed because of an unknown error, exception, or failure. + *
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *+ * The specified ARN in the request doesn't exist. + *
+ * + * @throws {@link ThrottlingException} (client fault) + *The request was denied due to request throttling. + *
+ * + * @throws {@link ValidationException} (client fault) + *The input fails to satisfy the constraints specified by an Amazon Web Services service. + *
+ * + * @throws {@link BillingServiceException} + *Base exception class for all service exceptions from Billing service.
+ * + * @public + */ +export class UntagResourceCommand extends $Command + .classBuilder< + UntagResourceCommandInput, + UntagResourceCommandOutput, + BillingClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: BillingClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSBilling", "UntagResource", {}) + .n("BillingClient", "UntagResourceCommand") + .f(void 0, void 0) + .ser(se_UntagResourceCommand) + .de(de_UntagResourceCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: UntagResourceRequest; + output: {}; + }; + sdk: { + input: UntagResourceCommandInput; + output: UntagResourceCommandOutput; + }; + }; +} diff --git a/clients/client-billing/src/commands/UpdateBillingViewCommand.ts b/clients/client-billing/src/commands/UpdateBillingViewCommand.ts new file mode 100644 index 0000000000000..a2eef70fd0272 --- /dev/null +++ b/clients/client-billing/src/commands/UpdateBillingViewCommand.ts @@ -0,0 +1,144 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { BillingClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BillingClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { + UpdateBillingViewRequest, + UpdateBillingViewRequestFilterSensitiveLog, + UpdateBillingViewResponse, +} from "../models/models_0"; +import { de_UpdateBillingViewCommand, se_UpdateBillingViewCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link UpdateBillingViewCommand}. + */ +export interface UpdateBillingViewCommandInput extends UpdateBillingViewRequest {} +/** + * @public + * + * The output of {@link UpdateBillingViewCommand}. + */ +export interface UpdateBillingViewCommandOutput extends UpdateBillingViewResponse, __MetadataBearer {} + +/** + *An API to update the attributes of the billing view. + *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BillingClient, UpdateBillingViewCommand } from "@aws-sdk/client-billing"; // ES Modules import + * // const { BillingClient, UpdateBillingViewCommand } = require("@aws-sdk/client-billing"); // CommonJS import + * const client = new BillingClient(config); + * const input = { // UpdateBillingViewRequest + * arn: "STRING_VALUE", // required + * name: "STRING_VALUE", + * description: "STRING_VALUE", + * dataFilterExpression: { // Expression + * dimensions: { // DimensionValues + * key: "LINKED_ACCOUNT", // required + * values: [ // Values // required + * "STRING_VALUE", + * ], + * }, + * tags: { // TagValues + * key: "STRING_VALUE", // required + * values: [ // required + * "STRING_VALUE", + * ], + * }, + * }, + * }; + * const command = new UpdateBillingViewCommand(input); + * const response = await client.send(command); + * // { // UpdateBillingViewResponse + * // arn: "STRING_VALUE", // required + * // updatedAt: new Date("TIMESTAMP"), + * // }; + * + * ``` + * + * @param UpdateBillingViewCommandInput - {@link UpdateBillingViewCommandInput} + * @returns {@link UpdateBillingViewCommandOutput} + * @see {@link UpdateBillingViewCommandInput} for command's `input` shape. + * @see {@link UpdateBillingViewCommandOutput} for command's `response` shape. + * @see {@link BillingClientResolvedConfig | config} for BillingClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *You don't have sufficient access to perform this action.
+ * + * @throws {@link ConflictException} (client fault) + *+ * 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. + *
+ * + * @throws {@link InternalServerException} (server fault) + *The request processing failed because of an unknown error, exception, or failure. + *
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *+ * The specified ARN in the request doesn't exist. + *
+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *+ * You've reached the limit of resources you can create, or exceeded the size of an individual resource. + *
+ * + * @throws {@link ThrottlingException} (client fault) + *The request was denied due to request throttling. + *
+ * + * @throws {@link ValidationException} (client fault) + *The input fails to satisfy the constraints specified by an Amazon Web Services service. + *
+ * + * @throws {@link BillingServiceException} + *Base exception class for all service exceptions from Billing service.
+ * + * @public + */ +export class UpdateBillingViewCommand extends $Command + .classBuilder< + UpdateBillingViewCommandInput, + UpdateBillingViewCommandOutput, + BillingClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: BillingClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AWSBilling", "UpdateBillingView", {}) + .n("BillingClient", "UpdateBillingViewCommand") + .f(UpdateBillingViewRequestFilterSensitiveLog, void 0) + .ser(se_UpdateBillingViewCommand) + .de(de_UpdateBillingViewCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: UpdateBillingViewRequest; + output: UpdateBillingViewResponse; + }; + sdk: { + input: UpdateBillingViewCommandInput; + output: UpdateBillingViewCommandOutput; + }; + }; +} diff --git a/clients/client-billing/src/commands/index.ts b/clients/client-billing/src/commands/index.ts index 853515c0fc646..561836d2a9602 100644 --- a/clients/client-billing/src/commands/index.ts +++ b/clients/client-billing/src/commands/index.ts @@ -1,2 +1,11 @@ // smithy-typescript generated code +export * from "./CreateBillingViewCommand"; +export * from "./DeleteBillingViewCommand"; +export * from "./GetBillingViewCommand"; +export * from "./GetResourcePolicyCommand"; export * from "./ListBillingViewsCommand"; +export * from "./ListSourceViewsForBillingViewCommand"; +export * from "./ListTagsForResourceCommand"; +export * from "./TagResourceCommand"; +export * from "./UntagResourceCommand"; +export * from "./UpdateBillingViewCommand"; diff --git a/clients/client-billing/src/models/models_0.ts b/clients/client-billing/src/models/models_0.ts index 07776857a2432..7b0cfff283669 100644 --- a/clients/client-billing/src/models/models_0.ts +++ b/clients/client-billing/src/models/models_0.ts @@ -44,117 +44,301 @@ export interface ActiveTimeRange { } /** - *The request processing failed because of an unknown error, exception, or failure. - *
+ *+ * 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. + *
* @public */ -export class InternalServerException extends __BaseException { - readonly name: "InternalServerException" = "InternalServerException"; - readonly $fault: "server" = "server"; +export class ConflictException extends __BaseException { + readonly name: "ConflictException" = "ConflictException"; + readonly $fault: "client" = "client"; + /** + *+ * The identifier for the service resource associated with the request. + *
+ * @public + */ + resourceId: string | undefined; + + /** + *+ * The type of resource associated with the request. + *
+ * @public + */ + resourceType: string | undefined; + /** * @internal */ - constructor(opts: __ExceptionOptionType+ * The metadata that you can use to filter and group your results. + *
+ * @public + */ +export interface DimensionValues { /** *
- * The time range for the billing views listed. PRIMARY
billing view is always listed. BILLING_GROUP
billing views are listed for time ranges when the associated billing group resource in Billing Conductor is active. The time range must be within one calendar month.
+ * The names of the metadata types that you can use to filter and group your results.
*
The maximum number of billing views to retrieve. Default is 100. - *
+ *+ * The metadata values that you can use to filter and group your results. + *
* @public */ - maxResults?: number | undefined; + values: string[] | undefined; +} +/** + *+ * The values that are available for a tag. + *
+ * @public + */ +export interface TagValues { /** - *The pagination token that is used on subsequent calls to list billing views.
+ *+ * The key for the tag. + *
* @public */ - nextToken?: string | undefined; + key: string | undefined; + + /** + *+ * The specific value of the tag. + *
+ * @public + */ + values: string[] | undefined; } /** + *
+ * See Expression. Billing view only supports LINKED_ACCOUNT
and Tags
.
+ *
+ * The specific Dimension
to use for Expression
.
+ *
+ * The specific Tag
to use for Expression
.
+ *
+ * The tag structure that contains a tag key and value. + *
* @public */ -export type BillingViewType = (typeof BillingViewType)[keyof typeof BillingViewType]; +export interface ResourceTag { + /** + *+ * The key that's associated with the tag. + *
+ * @public + */ + key: string | undefined; + + /** + *+ * The value that's associated with the tag. + *
+ * @public + */ + value?: string | undefined; +} /** - *A representation of a billing view.
* @public */ -export interface BillingViewListElement { +export interface CreateBillingViewRequest { /** - *The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view. - *
+ *+ * The name of the billing view. + *
* @public */ - arn?: string | undefined; + name: string | undefined; /** *- * A list of names of the Billing view. + * The description of the billing view. *
* @public */ - name?: string | undefined; + description?: string | undefined; + + /** + *A list of billing views used as the data source for the custom billing view.
+ * @public + */ + sourceViews: string[] | undefined; /** *
- * The list of owners of the Billing view.
+ * See Expression. Billing view only supports LINKED_ACCOUNT
and Tags
.
*
The type of billing view.
+ *A unique, case-sensitive identifier you specify to ensure idempotency of the request. Idempotency ensures that an API request completes no more than one time. If the original request completes successfully, any subsequent retries complete successfully without performing any further actions with an idempotent request. + *
* @public */ - billingViewType?: BillingViewType | undefined; + clientToken?: string | undefined; + + /** + *A list of key value map specifying tags associated to the billing view being created. + *
+ * @public + */ + resourceTags?: ResourceTag[] | undefined; } /** * @public */ -export interface ListBillingViewsResponse { +export interface CreateBillingViewResponse { /** - *A list of BillingViewListElement
retrieved.
+ * The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view. + *
* @public */ - billingViews: BillingViewListElement[] | undefined; + arn: string | undefined; /** - *The pagination token to use on subsequent calls to list billing views. - *
+ *+ * The time when the billing view was created. + *
* @public */ - nextToken?: string | undefined; + createdAt?: Date | undefined; +} + +/** + *The request processing failed because of an unknown error, exception, or failure. + *
+ * @public + */ +export class InternalServerException extends __BaseException { + readonly name: "InternalServerException" = "InternalServerException"; + readonly $fault: "server" = "server"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType+ * You've reached the limit of resources you can create, or exceeded the size of an individual resource. + *
+ * @public + */ +export class ServiceQuotaExceededException extends __BaseException { + readonly name: "ServiceQuotaExceededException" = "ServiceQuotaExceededException"; + readonly $fault: "client" = "client"; + /** + *+ * The ID of the resource. + *
+ * @public + */ + resourceId: string | undefined; + + /** + *+ * The type of Amazon Web Services resource. + *
+ * @public + */ + resourceType: string | undefined; + + /** + *
+ * The container for the serviceCode
.
+ *
+ * The container for the quotaCode
.
+ *
+ * The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view. + *
+ * @public + */ + arn: string | undefined; +} /** - * @internal + * @public */ -export const ListBillingViewsResponseFilterSensitiveLog = (obj: ListBillingViewsResponse): any => ({ - ...obj, - ...(obj.billingViews && { - billingViews: obj.billingViews.map((item) => BillingViewListElementFilterSensitiveLog(item)), - }), +export interface DeleteBillingViewResponse { + /** + *+ * The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view. + *
+ * @public + */ + arn: string | undefined; +} + +/** + * @public + */ +export interface GetBillingViewRequest { + /** + *+ * The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view. + *
+ * @public + */ + arn: string | undefined; +} + +/** + * @public + * @enum + */ +export const BillingViewType = { + BILLING_GROUP: "BILLING_GROUP", + CUSTOM: "CUSTOM", + PRIMARY: "PRIMARY", +} as const; + +/** + * @public + */ +export type BillingViewType = (typeof BillingViewType)[keyof typeof BillingViewType]; + +/** + *The metadata associated to the billing view. + *
+ * @public + */ +export interface BillingViewElement { + /** + *+ * The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view. + *
+ * @public + */ + arn?: string | undefined; + + /** + *+ * A list of names of the billing view. + *
+ * @public + */ + name?: string | undefined; + + /** + *+ * The description of the billing view. + *
+ * @public + */ + description?: string | undefined; + + /** + *The type of billing group. + *
+ * @public + */ + billingViewType?: BillingViewType | undefined; + + /** + *+ * The list of owners of the billing view. + *
+ * @public + */ + ownerAccountId?: string | undefined; + + /** + *
+ * See Expression. Billing view only supports LINKED_ACCOUNT
and Tags
.
+ *
The time when the billing view was created. + *
+ * @public + */ + createdAt?: Date | undefined; + + /** + *The time when the billing view was last updated. + *
+ * @public + */ + updatedAt?: Date | undefined; +} + +/** + * @public + */ +export interface GetBillingViewResponse { + /** + *The billing view element associated with the specified ARN. + *
+ * @public + */ + billingView: BillingViewElement | undefined; +} + +/** + *+ * The specified ARN in the request doesn't exist. + *
+ * @public + */ +export class ResourceNotFoundException extends __BaseException { + readonly name: "ResourceNotFoundException" = "ResourceNotFoundException"; + readonly $fault: "client" = "client"; + /** + *+ * Value is a list of resource IDs that were not found. + *
+ * @public + */ + resourceId: string | undefined; + + /** + *+ * Value is the type of resource that was not found. + *
+ * @public + */ + resourceType: string | undefined; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeThe Amazon Resource Name (ARN) of the billing view resource to which the policy is attached to. + *
+ * @public + */ + resourceArn: string | undefined; +} + +/** + * @public + */ +export interface GetResourcePolicyResponse { + /** + *The Amazon Resource Name (ARN) of the billing view resource to which the policy is attached to. + *
+ * @public + */ + resourceArn: string | undefined; + + /** + *The resource-based policy document attached to the resource in JSON
format.
+ *
+ * The time range for the billing views listed. PRIMARY
billing view is always listed. BILLING_GROUP
billing views are listed for time ranges when the associated billing group resource in Billing Conductor is active. The time range must be within one calendar month.
+ *
The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view. + *
+ * @public + */ + arns?: string[] | undefined; + + /** + *The type of billing view.
+ * @public + */ + billingViewTypes?: BillingViewType[] | undefined; + + /** + *+ * The list of owners of the billing view. + *
+ * @public + */ + ownerAccountId?: string | undefined; + + /** + *The maximum number of billing views to retrieve. Default is 100. + *
+ * @public + */ + maxResults?: number | undefined; + + /** + *The pagination token that is used on subsequent calls to list billing views.
+ * @public + */ + nextToken?: string | undefined; +} + +/** + *A representation of a billing view.
+ * @public + */ +export interface BillingViewListElement { + /** + *The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view. + *
+ * @public + */ + arn?: string | undefined; + + /** + *+ * A list of names of the Billing view. + *
+ * @public + */ + name?: string | undefined; + + /** + *+ * The description of the billing view. + *
+ * @public + */ + description?: string | undefined; + + /** + *+ * The list of owners of the Billing view. + *
+ * @public + */ + ownerAccountId?: string | undefined; + + /** + *The type of billing view.
+ * @public + */ + billingViewType?: BillingViewType | undefined; +} + +/** + * @public + */ +export interface ListBillingViewsResponse { + /** + *A list of BillingViewListElement
retrieved.
The pagination token to use on subsequent calls to list billing views. + *
+ * @public + */ + nextToken?: string | undefined; +} + +/** + * @public + */ +export interface ListSourceViewsForBillingViewRequest { + /** + *+ * The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view. + *
+ * @public + */ + arn: string | undefined; + + /** + *+ * The number of entries a paginated response contains. + *
+ * @public + */ + maxResults?: number | undefined; + + /** + *+ * The pagination token that is used on subsequent calls to list billing views. + *
+ * @public + */ + nextToken?: string | undefined; +} + +/** + * @public + */ +export interface ListSourceViewsForBillingViewResponse { + /** + *A list of billing views used as the data source for the custom billing view. + *
+ * @public + */ + sourceViews: string[] | undefined; + + /** + *+ * The pagination token that is used on subsequent calls to list billing views. + *
+ * @public + */ + nextToken?: string | undefined; +} + +/** + * @public + */ +export interface ListTagsForResourceRequest { + /** + *+ * The Amazon Resource Name (ARN) of the resource. + *
+ * @public + */ + resourceArn: string | undefined; +} + +/** + * @public + */ +export interface ListTagsForResourceResponse { + /** + *+ * A list of tag key value pairs that are associated with the resource. + *
+ * @public + */ + resourceTags?: ResourceTag[] | undefined; +} + +/** + * @public + */ +export interface TagResourceRequest { + /** + *+ * The Amazon Resource Name (ARN) of the resource. + *
+ * @public + */ + resourceArn: string | undefined; + + /** + *+ * A list of tag key value pairs that are associated with the resource. + *
+ * @public + */ + resourceTags: ResourceTag[] | undefined; +} + +/** + * @public + */ +export interface TagResourceResponse {} + +/** + * @public + */ +export interface UntagResourceRequest { + /** + *+ * The Amazon Resource Name (ARN) of the resource. + *
+ * @public + */ + resourceArn: string | undefined; + + /** + *+ * A list of tag key value pairs that are associated with the resource. + *
+ * @public + */ + resourceTagKeys: string[] | undefined; +} + +/** + * @public + */ +export interface UntagResourceResponse {} + +/** + * @public + */ +export interface UpdateBillingViewRequest { + /** + *+ * The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view. + *
+ * @public + */ + arn: string | undefined; + + /** + *+ * The name of the billing view. + *
+ * @public + */ + name?: string | undefined; + + /** + *+ * The description of the billing view. + *
+ * @public + */ + description?: string | undefined; + + /** + *See Expression. Billing view only supports LINKED_ACCOUNT
and Tags
.
+ *
+ * The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view. + *
+ * @public + */ + arn: string | undefined; + + /** + *+ * The time when the billing view was last updated. + *
+ * @public + */ + updatedAt?: Date | undefined; +} + +/** + * @internal + */ +export const CreateBillingViewRequestFilterSensitiveLog = (obj: CreateBillingViewRequest): any => ({ + ...obj, + ...(obj.name && { name: SENSITIVE_STRING }), + ...(obj.description && { description: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const BillingViewElementFilterSensitiveLog = (obj: BillingViewElement): any => ({ + ...obj, + ...(obj.name && { name: SENSITIVE_STRING }), + ...(obj.description && { description: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const GetBillingViewResponseFilterSensitiveLog = (obj: GetBillingViewResponse): any => ({ + ...obj, + ...(obj.billingView && { billingView: BillingViewElementFilterSensitiveLog(obj.billingView) }), +}); + +/** + * @internal + */ +export const BillingViewListElementFilterSensitiveLog = (obj: BillingViewListElement): any => ({ + ...obj, + ...(obj.name && { name: SENSITIVE_STRING }), + ...(obj.description && { description: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const ListBillingViewsResponseFilterSensitiveLog = (obj: ListBillingViewsResponse): any => ({ + ...obj, + ...(obj.billingViews && { + billingViews: obj.billingViews.map((item) => BillingViewListElementFilterSensitiveLog(item)), + }), +}); + +/** + * @internal + */ +export const UpdateBillingViewRequestFilterSensitiveLog = (obj: UpdateBillingViewRequest): any => ({ + ...obj, + ...(obj.name && { name: SENSITIVE_STRING }), + ...(obj.description && { description: SENSITIVE_STRING }), }); diff --git a/clients/client-billing/src/pagination/ListSourceViewsForBillingViewPaginator.ts b/clients/client-billing/src/pagination/ListSourceViewsForBillingViewPaginator.ts new file mode 100644 index 0000000000000..94c95a419f1f8 --- /dev/null +++ b/clients/client-billing/src/pagination/ListSourceViewsForBillingViewPaginator.ts @@ -0,0 +1,24 @@ +// smithy-typescript generated code +import { createPaginator } from "@smithy/core"; +import { Paginator } from "@smithy/types"; + +import { BillingClient } from "../BillingClient"; +import { + ListSourceViewsForBillingViewCommand, + ListSourceViewsForBillingViewCommandInput, + ListSourceViewsForBillingViewCommandOutput, +} from "../commands/ListSourceViewsForBillingViewCommand"; +import { BillingPaginationConfiguration } from "./Interfaces"; + +/** + * @public + */ +export const paginateListSourceViewsForBillingView: ( + config: BillingPaginationConfiguration, + input: ListSourceViewsForBillingViewCommandInput, + ...rest: any[] +) => Paginator\n The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.\n
" + } + }, + "name": { + "target": "com.amazonaws.billing#BillingViewName", + "traits": { + "smithy.api#documentation": "\n A list of names of the billing view.\n
" + } + }, + "description": { + "target": "com.amazonaws.billing#BillingViewDescription", + "traits": { + "smithy.api#documentation": "\n The description of the billing view.\n
" + } + }, + "billingViewType": { + "target": "com.amazonaws.billing#BillingViewType", + "traits": { + "smithy.api#documentation": "The type of billing group.\n
" + } + }, + "ownerAccountId": { + "target": "com.amazonaws.billing#AccountId", + "traits": { + "smithy.api#documentation": "\n The list of owners of the billing view.\n
" + } + }, + "dataFilterExpression": { + "target": "com.amazonaws.billing#Expression", + "traits": { + "smithy.api#documentation": "\n See Expression. Billing view only supports LINKED_ACCOUNT
and Tags
.\n
The time when the billing view was created.\n
" + } + }, + "updatedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "The time when the billing view was last updated.\n
" + } + } + }, + "traits": { + "smithy.api#documentation": "The metadata associated to the billing view.\n
" } }, "com.amazonaws.billing#BillingViewList": { @@ -567,6 +673,12 @@ "smithy.api#documentation": "\n A list of names of the Billing view.\n
" } }, + "description": { + "target": "com.amazonaws.billing#BillingViewDescription", + "traits": { + "smithy.api#documentation": "\n The description of the billing view.\n
" + } + }, "ownerAccountId": { "target": "com.amazonaws.billing#AccountId", "traits": { @@ -587,10 +699,26 @@ "com.amazonaws.billing#BillingViewName": { "type": "string", "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, "smithy.api#pattern": "^[ a-zA-Z0-9_\\+=\\.\\-@]+$", "smithy.api#sensitive": {} } }, + "com.amazonaws.billing#BillingViewSourceViewsList": { + "type": "list", + "member": { + "target": "com.amazonaws.billing#BillingViewArn" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + }, "com.amazonaws.billing#BillingViewType": { "type": "enum", "members": { @@ -605,9 +733,21 @@ "traits": { "smithy.api#enumValue": "BILLING_GROUP" } + }, + "CUSTOM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CUSTOM" + } } } }, + "com.amazonaws.billing#BillingViewTypeList": { + "type": "list", + "member": { + "target": "com.amazonaws.billing#BillingViewType" + } + }, "com.amazonaws.billing#BillingViewsMaxResults": { "type": "integer", "traits": { @@ -617,23 +757,13 @@ } } }, - "com.amazonaws.billing#ErrorMessage": { - "type": "string", - "traits": { - "smithy.api#length": { - "max": 1024 - } - } - }, - "com.amazonaws.billing#FieldName": { + "com.amazonaws.billing#ClientToken": { "type": "string", "traits": { - "smithy.api#length": { - "max": 100 - } + "smithy.api#pattern": "^[a-zA-Z0-9-]+$" } }, - "com.amazonaws.billing#InternalServerException": { + "com.amazonaws.billing#ConflictException": { "type": "structure", "members": { "message": { @@ -641,33 +771,53 @@ "traits": { "smithy.api#required": {} } + }, + "resourceId": { + "target": "com.amazonaws.billing#ResourceId", + "traits": { + "smithy.api#documentation": "\n The identifier for the service resource associated with the request.\n
", + "smithy.api#required": {} + } + }, + "resourceType": { + "target": "com.amazonaws.billing#ResourceType", + "traits": { + "smithy.api#documentation": "\n The type of resource associated with the request.\n
", + "smithy.api#required": {} + } } }, "traits": { "aws.protocols#awsQueryError": { - "code": "BillingInternalServer", - "httpResponseCode": 500 + "code": "BillingConflict", + "httpResponseCode": 409 }, - "smithy.api#documentation": "The request processing failed because of an unknown error, exception, or failure.\n
", - "smithy.api#error": "server", - "smithy.api#httpError": 500 + "smithy.api#documentation": "\n 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.\n
", + "smithy.api#error": "client", + "smithy.api#httpError": 409 } }, - "com.amazonaws.billing#ListBillingViews": { + "com.amazonaws.billing#CreateBillingView": { "type": "operation", "input": { - "target": "com.amazonaws.billing#ListBillingViewsRequest" + "target": "com.amazonaws.billing#CreateBillingViewRequest" }, "output": { - "target": "com.amazonaws.billing#ListBillingViewsResponse" + "target": "com.amazonaws.billing#CreateBillingViewResponse" }, "errors": [ { "target": "com.amazonaws.billing#AccessDeniedException" }, + { + "target": "com.amazonaws.billing#ConflictException" + }, { "target": "com.amazonaws.billing#InternalServerException" }, + { + "target": "com.amazonaws.billing#ServiceQuotaExceededException" + }, { "target": "com.amazonaws.billing#ThrottlingException" }, @@ -676,97 +826,71 @@ } ], "traits": { - "smithy.api#documentation": "Lists the billing views available for a given time period.\n
\nEvery Amazon Web Services account has a unique PRIMARY
billing view that represents the billing data available by default. Accounts that use Billing Conductor also have BILLING_GROUP
billing views representing pro forma costs associated with each created billing group.
\nCreates a billing view with the specified billing view attributes.\n
", "smithy.api#examples": [ { - "title": "Invoke ListBillingViews", + "title": "Invoke CreateBillingView", "input": { - "activeTimeRange": { - "activeAfterInclusive": 1719792000, - "activeBeforeInclusive": 1.722470399999e9 + "name": "Example Custom Billing View", + "sourceViews": ["arn:aws:billing::123456789101:billingview/primary"], + "description": "Custom Billing View Example", + "dataFilterExpression": { + "dimensions": { + "key": "LINKED_ACCOUNT", + "values": ["000000000000"] + } } }, "output": { - "billingViews": [ - { - "arn": "arn:aws:billing::123456789101:billingview/primary", - "billingViewType": "PRIMARY", - "name": "Primary Billing View Account 123456789101", - "ownerAccountId": "123456789101" - } - ] + "arn": "arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899", + "createdAt": 1719792001 } - }, - { - "title": "Error example for ListBillingViews", - "input": { - "activeTimeRange": { - "activeAfterInclusive": 1719792001, - "activeBeforeInclusive": 1719792000 - } - }, - "error": { - "shapeId": "com.amazonaws.billing#ValidationException", - "content": { - "message": "Failed to get billing view data for an invalid time range.", - "reason": "other" - } - }, - "allowConstraintErrors": true } ], - "smithy.api#http": { - "method": "POST", - "uri": "/", - "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "nextToken", - "outputToken": "nextToken", - "pageSize": "maxResults", - "items": "billingViews" - }, - "smithy.api#readonly": {}, - "smithy.test#smokeTests": [ - { - "id": "ListBillingViewsSuccess", - "params": { - "activeTimeRange": { - "activeAfterInclusive": 1719792000, - "activeBeforeInclusive": 1.722470399999e9 - } - }, - "expect": { - "success": {} - }, - "vendorParamsShape": "aws.test#AwsVendorParams", - "vendorParams": { - "region": "us-east-1" - } - } - ] + "smithy.api#idempotent": {} } }, - "com.amazonaws.billing#ListBillingViewsRequest": { + "com.amazonaws.billing#CreateBillingViewRequest": { "type": "structure", "members": { - "activeTimeRange": { - "target": "com.amazonaws.billing#ActiveTimeRange", + "name": { + "target": "com.amazonaws.billing#BillingViewName", "traits": { - "smithy.api#documentation": "\n The time range for the billing views listed. PRIMARY
billing view is always listed. BILLING_GROUP
billing views are listed for time ranges when the associated billing group resource in Billing Conductor is active. The time range must be within one calendar month.\n
\n The name of the billing view.\n
", "smithy.api#required": {} } }, - "maxResults": { - "target": "com.amazonaws.billing#BillingViewsMaxResults", + "description": { + "target": "com.amazonaws.billing#BillingViewDescription", "traits": { - "smithy.api#documentation": "The maximum number of billing views to retrieve. Default is 100.\n
" + "smithy.api#documentation": "\n The description of the billing view.\n
" } }, - "nextToken": { - "target": "com.amazonaws.billing#PageToken", + "sourceViews": { + "target": "com.amazonaws.billing#BillingViewSourceViewsList", "traits": { - "smithy.api#documentation": "The pagination token that is used on subsequent calls to list billing views.
" + "smithy.api#documentation": "A list of billing views used as the data source for the custom billing view.
", + "smithy.api#required": {} + } + }, + "dataFilterExpression": { + "target": "com.amazonaws.billing#Expression", + "traits": { + "smithy.api#documentation": "\n See Expression. Billing view only supports LINKED_ACCOUNT
and Tags
.\n
A unique, case-sensitive identifier you specify to ensure idempotency of the request. Idempotency ensures that an API request completes no more than one time. If the original request completes successfully, any subsequent retries complete successfully without performing any further actions with an idempotent request.\n
", + "smithy.api#httpHeader": "X-Amzn-Client-Token", + "smithy.api#idempotencyToken": {} + } + }, + "resourceTags": { + "target": "com.amazonaws.billing#ResourceTagList", + "traits": { + "smithy.api#documentation": "A list of key value map specifying tags associated to the billing view being created.\n
" } } }, @@ -774,20 +898,20 @@ "smithy.api#input": {} } }, - "com.amazonaws.billing#ListBillingViewsResponse": { + "com.amazonaws.billing#CreateBillingViewResponse": { "type": "structure", "members": { - "billingViews": { - "target": "com.amazonaws.billing#BillingViewList", + "arn": { + "target": "com.amazonaws.billing#BillingViewArn", "traits": { - "smithy.api#documentation": "A list of BillingViewListElement
retrieved.
\n The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.\n
", "smithy.api#required": {} } }, - "nextToken": { - "target": "com.amazonaws.billing#PageToken", + "createdAt": { + "target": "smithy.api#Timestamp", "traits": { - "smithy.api#documentation": "The pagination token to use on subsequent calls to list billing views.\n
" + "smithy.api#documentation": "\n The time when the billing view was created.\n
" } } }, @@ -795,34 +919,1157 @@ "smithy.api#output": {} } }, - "com.amazonaws.billing#PageToken": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 2047 - } - } - }, - "com.amazonaws.billing#ThrottlingException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.billing#ErrorMessage", - "traits": { - "smithy.api#required": {} - } - } + "com.amazonaws.billing#DeleteBillingView": { + "type": "operation", + "input": { + "target": "com.amazonaws.billing#DeleteBillingViewRequest" }, - "traits": { - "aws.protocols#awsQueryError": { - "code": "BillingThrottling", - "httpResponseCode": 429 + "output": { + "target": "com.amazonaws.billing#DeleteBillingViewResponse" + }, + "errors": [ + { + "target": "com.amazonaws.billing#AccessDeniedException" }, - "smithy.api#documentation": "The request was denied due to request throttling.\n
", - "smithy.api#error": "client", - "smithy.api#httpError": 429 - } + { + "target": "com.amazonaws.billing#ConflictException" + }, + { + "target": "com.amazonaws.billing#InternalServerException" + }, + { + "target": "com.amazonaws.billing#ThrottlingException" + }, + { + "target": "com.amazonaws.billing#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes the specified billing view.
", + "smithy.api#examples": [ + { + "title": "Invoke DeleteBillingView", + "input": { + "arn": "arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899" + }, + "output": { + "arn": "arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899" + } + } + ], + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.billing#DeleteBillingViewRequest": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.billing#BillingViewArn", + "traits": { + "smithy.api#documentation": "\n The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.\n
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.billing#DeleteBillingViewResponse": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.billing#BillingViewArn", + "traits": { + "smithy.api#documentation": "\n The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.\n
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.billing#Dimension": { + "type": "enum", + "members": { + "LINKED_ACCOUNT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LINKED_ACCOUNT" + } + } + } + }, + "com.amazonaws.billing#DimensionValues": { + "type": "structure", + "members": { + "key": { + "target": "com.amazonaws.billing#Dimension", + "traits": { + "smithy.api#documentation": "\n The names of the metadata types that you can use to filter and group your results. \n
", + "smithy.api#required": {} + } + }, + "values": { + "target": "com.amazonaws.billing#Values", + "traits": { + "smithy.api#documentation": "\n The metadata values that you can use to filter and group your results. \n
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "\n The metadata that you can use to filter and group your results.\n
" + } + }, + "com.amazonaws.billing#ErrorMessage": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 1024 + } + } + }, + "com.amazonaws.billing#Expression": { + "type": "structure", + "members": { + "dimensions": { + "target": "com.amazonaws.billing#DimensionValues", + "traits": { + "smithy.api#documentation": "\n The specific Dimension
to use for Expression
.\n
\n The specific Tag
to use for Expression
.\n
\n See Expression. Billing view only supports LINKED_ACCOUNT
and Tags
.\n
Returns the metadata associated to the specified billing view ARN.\n
", + "smithy.api#examples": [ + { + "title": "Invoke GetBillingView", + "input": { + "arn": "arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899" + }, + "output": { + "billingView": { + "arn": "arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899", + "name": "Example Custom Billing View", + "description": "Custom Billing View Example -- updated description", + "dataFilterExpression": { + "dimensions": { + "key": "LINKED_ACCOUNT", + "values": ["000000000000"] + } + }, + "ownerAccountId": "123456789101", + "billingViewType": "CUSTOM" + } + } + } + ], + "smithy.api#readonly": {} + } + }, + "com.amazonaws.billing#GetBillingViewRequest": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.billing#BillingViewArn", + "traits": { + "smithy.api#documentation": "\n The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.\n
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.billing#GetBillingViewResponse": { + "type": "structure", + "members": { + "billingView": { + "target": "com.amazonaws.billing#BillingViewElement", + "traits": { + "smithy.api#documentation": "The billing view element associated with the specified ARN.\n
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.billing#GetResourcePolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.billing#GetResourcePolicyRequest" + }, + "output": { + "target": "com.amazonaws.billing#GetResourcePolicyResponse" + }, + "errors": [ + { + "target": "com.amazonaws.billing#AccessDeniedException" + }, + { + "target": "com.amazonaws.billing#InternalServerException" + }, + { + "target": "com.amazonaws.billing#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.billing#ThrottlingException" + }, + { + "target": "com.amazonaws.billing#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Returns the resource-based policy document attached to the resource in JSON
format.\n
The Amazon Resource Name (ARN) of the billing view resource to which the policy is attached to.\n
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.billing#GetResourcePolicyResponse": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.billing#ResourceArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the billing view resource to which the policy is attached to.\n
", + "smithy.api#required": {} + } + }, + "policy": { + "target": "com.amazonaws.billing#PolicyDocument", + "traits": { + "smithy.api#documentation": "The resource-based policy document attached to the resource in JSON
format.\n
The request processing failed because of an unknown error, exception, or failure.\n
", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.billing#ListBillingViews": { + "type": "operation", + "input": { + "target": "com.amazonaws.billing#ListBillingViewsRequest" + }, + "output": { + "target": "com.amazonaws.billing#ListBillingViewsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.billing#AccessDeniedException" + }, + { + "target": "com.amazonaws.billing#InternalServerException" + }, + { + "target": "com.amazonaws.billing#ThrottlingException" + }, + { + "target": "com.amazonaws.billing#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Lists the billing views available for a given time period.\n
\nEvery Amazon Web Services account has a unique PRIMARY
billing view that represents the billing data available by default. Accounts that use Billing Conductor also have BILLING_GROUP
billing views representing pro forma costs associated with each created billing group.
\n The time range for the billing views listed. PRIMARY
billing view is always listed. BILLING_GROUP
billing views are listed for time ranges when the associated billing group resource in Billing Conductor is active. The time range must be within one calendar month.\n
The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.\n
" + } + }, + "billingViewTypes": { + "target": "com.amazonaws.billing#BillingViewTypeList", + "traits": { + "smithy.api#documentation": "The type of billing view.
" + } + }, + "ownerAccountId": { + "target": "com.amazonaws.billing#AccountId", + "traits": { + "smithy.api#documentation": "\n The list of owners of the billing view.\n
" + } + }, + "maxResults": { + "target": "com.amazonaws.billing#BillingViewsMaxResults", + "traits": { + "smithy.api#documentation": "The maximum number of billing views to retrieve. Default is 100.\n
" + } + }, + "nextToken": { + "target": "com.amazonaws.billing#PageToken", + "traits": { + "smithy.api#documentation": "The pagination token that is used on subsequent calls to list billing views.
" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.billing#ListBillingViewsResponse": { + "type": "structure", + "members": { + "billingViews": { + "target": "com.amazonaws.billing#BillingViewList", + "traits": { + "smithy.api#documentation": "A list of BillingViewListElement
retrieved.
The pagination token to use on subsequent calls to list billing views.\n
" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.billing#ListSourceViewsForBillingView": { + "type": "operation", + "input": { + "target": "com.amazonaws.billing#ListSourceViewsForBillingViewRequest" + }, + "output": { + "target": "com.amazonaws.billing#ListSourceViewsForBillingViewResponse" + }, + "errors": [ + { + "target": "com.amazonaws.billing#AccessDeniedException" + }, + { + "target": "com.amazonaws.billing#InternalServerException" + }, + { + "target": "com.amazonaws.billing#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.billing#ThrottlingException" + }, + { + "target": "com.amazonaws.billing#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Lists the source views (managed Amazon Web Services billing views) associated with the billing view.\n
", + "smithy.api#examples": [ + { + "title": "Invoke ListSourceViewsForBillingView", + "input": { + "arn": "arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899" + }, + "output": { + "sourceViews": ["arn:aws:billing::123456789101:billingview/primary"] + } + } + ], + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "sourceViews" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.billing#ListSourceViewsForBillingViewRequest": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.billing#BillingViewArn", + "traits": { + "smithy.api#documentation": "\n The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.\n
", + "smithy.api#required": {} + } + }, + "maxResults": { + "target": "com.amazonaws.billing#BillingViewsMaxResults", + "traits": { + "smithy.api#documentation": "\n The number of entries a paginated response contains.\n
" + } + }, + "nextToken": { + "target": "com.amazonaws.billing#PageToken", + "traits": { + "smithy.api#documentation": "\n The pagination token that is used on subsequent calls to list billing views.\n
" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.billing#ListSourceViewsForBillingViewResponse": { + "type": "structure", + "members": { + "sourceViews": { + "target": "com.amazonaws.billing#BillingViewSourceViewsList", + "traits": { + "smithy.api#documentation": "A list of billing views used as the data source for the custom billing view.\n
", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.billing#PageToken", + "traits": { + "smithy.api#documentation": "\n The pagination token that is used on subsequent calls to list billing views.\n
" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.billing#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.billing#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.billing#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.billing#AccessDeniedException" + }, + { + "target": "com.amazonaws.billing#InternalServerException" + }, + { + "target": "com.amazonaws.billing#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.billing#ThrottlingException" + }, + { + "target": "com.amazonaws.billing#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Lists tags associated with the billing view resource.\n
", + "smithy.api#examples": [ + { + "title": "Invoke ListTagsForResource", + "input": { + "resourceArn": "arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899" + }, + "output": { + "resourceTags": [ + { + "key": "ExampleTagKey", + "value": "ExampleTagValue" + } + ] + } + } + ], + "smithy.api#readonly": {} + } + }, + "com.amazonaws.billing#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.billing#ResourceArn", + "traits": { + "smithy.api#documentation": "\n The Amazon Resource Name (ARN) of the resource. \n
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.billing#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "resourceTags": { + "target": "com.amazonaws.billing#ResourceTagList", + "traits": { + "smithy.api#documentation": "\n A list of tag key value pairs that are associated with the resource.\n
" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.billing#PageToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2047 + } + } + }, + "com.amazonaws.billing#PolicyDocument": { + "type": "string" + }, + "com.amazonaws.billing#QuotaCode": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + } + } + }, + "com.amazonaws.billing#ResourceArn": { + "type": "string", + "traits": { + "smithy.api#pattern": "^arn:aws[a-z-]*:(billing)::[0-9]{12}:[a-zA-Z0-9/:_\\+=\\.\\@-]{0,70}[a-zA-Z0-9]$" + } + }, + "com.amazonaws.billing#ResourceId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + } + } + }, + "com.amazonaws.billing#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.billing#ErrorMessage", + "traits": { + "smithy.api#required": {} + } + }, + "resourceId": { + "target": "com.amazonaws.billing#ResourceId", + "traits": { + "smithy.api#documentation": "\n Value is a list of resource IDs that were not found.\n
", + "smithy.api#required": {} + } + }, + "resourceType": { + "target": "com.amazonaws.billing#ResourceType", + "traits": { + "smithy.api#documentation": "\n Value is the type of resource that was not found.\n
", + "smithy.api#required": {} + } + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "BillingResourceNotFound", + "httpResponseCode": 404 + }, + "smithy.api#documentation": "\n The specified ARN in the request doesn't exist.\n
", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.billing#ResourceTag": { + "type": "structure", + "members": { + "key": { + "target": "com.amazonaws.billing#ResourceTagKey", + "traits": { + "smithy.api#documentation": "\n The key that's associated with the tag.\n
", + "smithy.api#required": {} + } + }, + "value": { + "target": "com.amazonaws.billing#ResourceTagValue", + "traits": { + "smithy.api#documentation": "\n The value that's associated with the tag.\n
" + } + } + }, + "traits": { + "smithy.api#documentation": "\n The tag structure that contains a tag key and value.\n
" + } + }, + "com.amazonaws.billing#ResourceTagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + } + } + }, + "com.amazonaws.billing#ResourceTagKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.billing#ResourceTagKey" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.billing#ResourceTagList": { + "type": "list", + "member": { + "target": "com.amazonaws.billing#ResourceTag" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.billing#ResourceTagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, + "com.amazonaws.billing#ResourceType": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + } + } + }, + "com.amazonaws.billing#ServiceCode": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + } + } + }, + "com.amazonaws.billing#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.billing#ErrorMessage", + "traits": { + "smithy.api#required": {} + } + }, + "resourceId": { + "target": "com.amazonaws.billing#ResourceId", + "traits": { + "smithy.api#documentation": "\n The ID of the resource.\n
", + "smithy.api#required": {} + } + }, + "resourceType": { + "target": "com.amazonaws.billing#ResourceType", + "traits": { + "smithy.api#documentation": "\n The type of Amazon Web Services resource.\n
", + "smithy.api#required": {} + } + }, + "serviceCode": { + "target": "com.amazonaws.billing#ServiceCode", + "traits": { + "smithy.api#documentation": "\n The container for the serviceCode
.\n
\n The container for the quotaCode
.\n
\n You've reached the limit of resources you can create, or exceeded the size of an individual resource.\n
", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, + "com.amazonaws.billing#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + }, + "smithy.api#pattern": "^[\\S\\s]*$" + } + }, + "com.amazonaws.billing#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.billing#TagResourceRequest" + }, + "output": { + "target": "com.amazonaws.billing#TagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.billing#AccessDeniedException" + }, + { + "target": "com.amazonaws.billing#InternalServerException" + }, + { + "target": "com.amazonaws.billing#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.billing#ThrottlingException" + }, + { + "target": "com.amazonaws.billing#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "\n An API operation for adding one or more tags (key-value pairs) to a resource.\n
", + "smithy.api#examples": [ + { + "title": "Invoke TagResource", + "input": { + "resourceArn": "arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899", + "resourceTags": [ + { + "key": "ExampleTagKey", + "value": "ExampleTagValue" + } + ] + }, + "output": {} + } + ] + } + }, + "com.amazonaws.billing#TagResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.billing#ResourceArn", + "traits": { + "smithy.api#documentation": "\n The Amazon Resource Name (ARN) of the resource.\n
", + "smithy.api#required": {} + } + }, + "resourceTags": { + "target": "com.amazonaws.billing#ResourceTagList", + "traits": { + "smithy.api#documentation": "\n A list of tag key value pairs that are associated with the resource.\n
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.billing#TagResourceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.billing#TagValues": { + "type": "structure", + "members": { + "key": { + "target": "com.amazonaws.billing#TagKey", + "traits": { + "smithy.api#documentation": "\n The key for the tag.\n
", + "smithy.api#required": {} + } + }, + "values": { + "target": "com.amazonaws.billing#Values", + "traits": { + "smithy.api#documentation": "\n The specific value of the tag.\n
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "\n The values that are available for a tag.\n
" + } + }, + "com.amazonaws.billing#ThrottlingException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.billing#ErrorMessage", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "BillingThrottling", + "httpResponseCode": 429 + }, + "smithy.api#documentation": "The request was denied due to request throttling.\n
", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, + "com.amazonaws.billing#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.billing#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.billing#UntagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.billing#AccessDeniedException" + }, + { + "target": "com.amazonaws.billing#InternalServerException" + }, + { + "target": "com.amazonaws.billing#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.billing#ThrottlingException" + }, + { + "target": "com.amazonaws.billing#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "\n Removes one or more tags from a resource. Specify only tag keys in your request. Don't specify the value.\n
", + "smithy.api#examples": [ + { + "title": "Invoke UntagResource", + "input": { + "resourceArn": "arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899", + "resourceTagKeys": ["ExampleTagKey"] + }, + "output": {} + } + ] + } + }, + "com.amazonaws.billing#UntagResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.billing#ResourceArn", + "traits": { + "smithy.api#documentation": "\n The Amazon Resource Name (ARN) of the resource.\n
", + "smithy.api#required": {} + } + }, + "resourceTagKeys": { + "target": "com.amazonaws.billing#ResourceTagKeyList", + "traits": { + "smithy.api#documentation": "\n A list of tag key value pairs that are associated with the resource.\n
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.billing#UntagResourceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.billing#UpdateBillingView": { + "type": "operation", + "input": { + "target": "com.amazonaws.billing#UpdateBillingViewRequest" + }, + "output": { + "target": "com.amazonaws.billing#UpdateBillingViewResponse" + }, + "errors": [ + { + "target": "com.amazonaws.billing#AccessDeniedException" + }, + { + "target": "com.amazonaws.billing#ConflictException" + }, + { + "target": "com.amazonaws.billing#InternalServerException" + }, + { + "target": "com.amazonaws.billing#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.billing#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.billing#ThrottlingException" + }, + { + "target": "com.amazonaws.billing#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "An API to update the attributes of the billing view.\n
", + "smithy.api#examples": [ + { + "title": "Invoke UpdateBillingView", + "input": { + "name": "Example Custom Billing View", + "arn": "arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899", + "description": "Custom Billing View Example -- updated description", + "dataFilterExpression": { + "dimensions": { + "key": "LINKED_ACCOUNT", + "values": ["000000000000"] + } + } + }, + "output": { + "arn": "arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899", + "updatedAt": 1719792001 + } + } + ], + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.billing#UpdateBillingViewRequest": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.billing#BillingViewArn", + "traits": { + "smithy.api#documentation": "\n The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.\n
", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.billing#BillingViewName", + "traits": { + "smithy.api#documentation": "\n The name of the billing view.\n
" + } + }, + "description": { + "target": "com.amazonaws.billing#BillingViewDescription", + "traits": { + "smithy.api#documentation": "\n The description of the billing view.\n
" + } + }, + "dataFilterExpression": { + "target": "com.amazonaws.billing#Expression", + "traits": { + "smithy.api#documentation": "See Expression. Billing view only supports LINKED_ACCOUNT
and Tags
.\n
\n The Amazon Resource Name (ARN) that can be used to uniquely identify the billing view.\n
", + "smithy.api#required": {} + } + }, + "updatedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "\n The time when the billing view was last updated.\n
" + } + } + }, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.billing#ValidationException": { "type": "structure", @@ -913,6 +2160,28 @@ } } } + }, + "com.amazonaws.billing#Value": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + }, + "smithy.api#pattern": "^[\\S\\s]*$" + } + }, + "com.amazonaws.billing#Values": { + "type": "list", + "member": { + "target": "com.amazonaws.billing#Value" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + } + } } } }