Removes the association between one or more source billing views and an existing billing view. This allows modifying the composition of aggregate billing views.
Parameters:
-
arn
(BillingViewArn)
–
The Amazon Resource Name (ARN) of the billing view to disassociate source views from.
-
source_views
(BillingViewSourceViewsList)
–
A list of ARNs of the source billing views to disassociate.
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.
-
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 DisassociateSourceViews
>>> await client.disassociate_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/async_billing.py
| async def disassociate_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[AsyncBillingClientConfig] = None,
) -> "capo_billing.types.disassociate_source_views_response.DisassociateSourceViewsResponse":
"""<p> Removes the association between one or more source billing views and an existing billing view. This allows modifying the composition of aggregate billing views. </p>
Args:
arn: <p> The Amazon Resource Name (ARN) of the billing view to disassociate source views from. </p>
source_views: <p> A list of ARNs of the source billing views to disassociate. </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.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 DisassociateSourceViews
>>> await client.disassociate_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'])
"""
async def _handler(
req: "AsyncOperationRequest[capo_billing.types.disassociate_source_views_request.DisassociateSourceViewsRequest]",
) -> AsyncOperationResponse[
"capo_billing.types.disassociate_source_views_response.DisassociateSourceViewsResponse"
]:
import capo_billing._operations.aws_billing.disassociate_source_views
(
output,
http_response,
) = await capo_billing._operations.aws_billing.disassociate_source_views.async_disassociate_source_views(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DisassociateSourceViews")
)
input_: capo_billing.types.disassociate_source_views_request.DisassociateSourceViewsRequest = {
"arn": arn,
"source_views": source_views,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|