Disassociates the specified budget from the specified resource.
Parameters:
-
budget_name
(BudgetName)
–
The name of the budget you want to disassociate.
-
resource_id
(Id)
–
The resource identifier you want to disassociate from. Either a portfolio-id or a product-id.
Raises:
Source code in docs_src/capo_service_catalog/_services/service_catalog.py
| def disassociate_budget_from_resource(
self,
budget_name: "capo_service_catalog.types.budget_name.BudgetName",
resource_id: "capo_service_catalog.types.id.Id",
*,
config_overrides: Optional[ServiceCatalogClientConfig] = None,
) -> "capo_service_catalog.types.disassociate_budget_from_resource_output.DisassociateBudgetFromResourceOutput":
"""<p>Disassociates the specified budget from the specified resource.</p>
Args:
budget_name: <p>The name of the budget you want to disassociate.</p>
resource_id: <p>The resource identifier you want to disassociate from. Either a portfolio-id or a product-id.</p>
Raises:
capo_service_catalog.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
capo_service_catalog.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_service_catalog.types.disassociate_budget_from_resource_input.DisassociateBudgetFromResourceInput]",
) -> OperationResponse[
"capo_service_catalog.types.disassociate_budget_from_resource_output.DisassociateBudgetFromResourceOutput"
]:
import capo_service_catalog._operations.aws242_service_catalog_service.disassociate_budget_from_resource
output, http_response = (
capo_service_catalog._operations.aws242_service_catalog_service.disassociate_budget_from_resource.disassociate_budget_from_resource(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DisassociateBudgetFromResource")
)
input_: capo_service_catalog.types.disassociate_budget_from_resource_input.DisassociateBudgetFromResourceInput = {
"budget_name": budget_name,
"resource_id": resource_id,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|