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.
-
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
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 | |