create_billing_view
async
¶
create_billing_view(
name: BillingViewName,
source_views: BillingViewSourceViewsList,
*,
config_overrides: Optional[AsyncBillingClientConfig] = None,
description: Optional[BillingViewDescription] = None,
data_filter_expression: Optional[Expression] = None,
client_token: Optional[ClientToken] = None,
resource_tags: Optional[ResourceTagList] = None,
) -> CreateBillingViewResponse
Creates a billing view with the specified billing view attributes.
Parameters:
-
name(BillingViewName) –The name of the billing view.
-
description(Optional[BillingViewDescription], default:None) –The description of the billing view.
-
source_views(BillingViewSourceViewsList) –A list of billing views used as the data source for the custom billing view. Source views can be of the following types:
-
PRIMARY- The billing view that contains all cost management data associated with an account. -
CUSTOM- A billing view that a customer creates from one or more source views. -
BILLING_GROUP- The billing view for an Billing Conductor billing group. -
BILLING_TRANSFER- The billing view for the billing data that a bill transfer account is financially responsible for. -
BILLING_TRANSFER_SHOWBACK- The billing view for billing data configured for showback or chargeback purposes.
-
-
data_filter_expression(Optional[Expression], default:None) –See Expression. Billing view only supports
LINKED_ACCOUNT,Tags, andCostCategories. -
client_token(Optional[ClientToken], default:None) –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.
-
resource_tags(Optional[ResourceTagList], default:None) –A list of key value map specifying tags associated to the billing view being created.
Raises:
-
AccessDeniedException–You don't have sufficient access to perform this action.
-
BillingViewHealthStatusException–Exception thrown when a billing view's health status prevents an operation from being performed. This may occur if the billing view is in a state other than
HEALTHY. -
ConflictException–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.
-
InternalServerException–The request processing failed because of an unknown error, exception, or failure.
-
ResourceNotFoundException–The specified ARN in the request doesn't exist.
-
ServiceQuotaExceededException–You've reached the limit of resources you can create, or exceeded the size of an individual resource.
-
ThrottlingException–The request was denied due to request throttling.
-
ValidationException–The input fails to satisfy the constraints specified by an Amazon Web Services service.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Invoke CreateBillingView
>>> await client.create_billing_view(name='Example Custom Billing View', source_views=['arn:aws:billing::123456789101:billingview/primary'], description='Custom Billing View Example', data_filter_expression={'dimensions': {'key': 'LINKED_ACCOUNT', 'values': ['000000000000']}})
Source code in docs_src/capo_billing/_services/async_billing.py
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 | |