Associates one or more source billing views with an existing billing view. This allows creating aggregate billing views that combine data from multiple sources.
Parameters:
-
arn
(BillingViewArn)
–
The Amazon Resource Name (ARN) of the billing view to associate source views with.
-
source_views
(BillingViewSourceViewsList)
–
A list of ARNs of the source billing views to associate.
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 AssociateSourceViews
>>> client.associate_source_views(arn='arn:aws:billing::123456789012:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899', source_views=['arn:aws:billing::123456789012:billingview/primary', 'arn:aws:billing::123456789012:billingview/custom-d3f9c7e4-8b2f-4a6e-9d3b-2f7c8a1e5f6d'])
Source code in docs_src/capo_billing/_services/billing.py
| def associate_source_views(
self,
arn: "capo_billing.types.billing_view_arn.BillingViewArn",
source_views: "capo_billing.types.billing_view_source_views_list.BillingViewSourceViewsList",
*,
config_overrides: Optional[BillingClientConfig] = None,
) -> "capo_billing.types.associate_source_views_response.AssociateSourceViewsResponse":
"""<p> Associates one or more source billing views with an existing billing view. This allows creating aggregate billing views that combine data from multiple sources. </p>
Args:
arn: <p> The Amazon Resource Name (ARN) of the billing view to associate source views with. </p>
source_views: <p> A list of ARNs of the source billing views to associate. </p>
Raises:
capo_billing.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this action.</p>
capo_billing.errors.billing_view_health_status_exception.BillingViewHealthStatusException: <p> Exception thrown when a billing view's health status prevents an operation from being performed. This may occur if the billing view is in a state other than <code>HEALTHY</code>.</p>
capo_billing.errors.conflict_exception.ConflictException: <p> The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request. </p>
capo_billing.errors.internal_server_exception.InternalServerException: <p>The request processing failed because of an unknown error, exception, or failure. </p>
capo_billing.errors.resource_not_found_exception.ResourceNotFoundException: <p> The specified ARN in the request doesn't exist. </p>
capo_billing.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p> You've reached the limit of resources you can create, or exceeded the size of an individual resource. </p>
capo_billing.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. </p>
capo_billing.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service. </p>
capo_billing.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Invoke AssociateSourceViews
>>> client.associate_source_views(arn='arn:aws:billing::123456789012:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899', source_views=['arn:aws:billing::123456789012:billingview/primary', 'arn:aws:billing::123456789012:billingview/custom-d3f9c7e4-8b2f-4a6e-9d3b-2f7c8a1e5f6d'])
"""
def _handler(
req: "OperationRequest[capo_billing.types.associate_source_views_request.AssociateSourceViewsRequest]",
) -> OperationResponse[
"capo_billing.types.associate_source_views_response.AssociateSourceViewsResponse"
]:
import capo_billing._operations.aws_billing.associate_source_views
output, http_response = (
capo_billing._operations.aws_billing.associate_source_views.associate_source_views(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AssociateSourceViews")
)
input_: capo_billing.types.associate_source_views_request.AssociateSourceViewsRequest = {
"arn": arn,
"source_views": source_views,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|