Skip to content

disassociate_budget_from_resource async

disassociate_budget_from_resource(
    budget_name: BudgetName,
    resource_id: Id,
    *,
    config_overrides: Optional[AsyncServiceCatalogClientConfig] = None,
) -> DisassociateBudgetFromResourceOutput

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/async_service_catalog.py
async 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[AsyncServiceCatalogClientConfig] = 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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_service_catalog.types.disassociate_budget_from_resource_input.DisassociateBudgetFromResourceInput]",
    ) -> AsyncOperationResponse[
        "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,
        ) = await capo_service_catalog._operations.aws242_service_catalog_service.disassociate_budget_from_resource.async_disassociate_budget_from_resource(
            req.options, req.input
        )
        return AsyncOperationResponse(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 = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output