Skip to content

disassociate_service_role_from_account async

disassociate_service_role_from_account(
    *, config_overrides: Optional[AsyncGreengrassClientConfig] = None
) -> DisassociateServiceRoleFromAccountResponse

Disassociates the service role from your account. Without a service role, deployments will not work.

Raises:

Source code in docs_src/capo_greengrass/_services/async_greengrass.py
async def disassociate_service_role_from_account(
    self, *, config_overrides: Optional[AsyncGreengrassClientConfig] = None
) -> "capo_greengrass.types.disassociate_service_role_from_account_response.DisassociateServiceRoleFromAccountResponse":
    """Disassociates the service role from your account. Without a service role, deployments will not work.

    Raises:
        capo_greengrass.errors.internal_server_error_exception.InternalServerErrorException: General error information.
        capo_greengrass.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_greengrass.types.disassociate_service_role_from_account_request.DisassociateServiceRoleFromAccountRequest]",
    ) -> AsyncOperationResponse[
        "capo_greengrass.types.disassociate_service_role_from_account_response.DisassociateServiceRoleFromAccountResponse"
    ]:
        import capo_greengrass._operations.greengrass.disassociate_service_role_from_account

        (
            output,
            http_response,
        ) = await capo_greengrass._operations.greengrass.disassociate_service_role_from_account.async_disassociate_service_role_from_account(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DisassociateServiceRoleFromAccount")
    )
    input_: capo_greengrass.types.disassociate_service_role_from_account_request.DisassociateServiceRoleFromAccountRequest = {}

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output