Skip to content

disassociate_aws_account_from_partner_account async

disassociate_aws_account_from_partner_account(
    partner_account_id: PartnerAccountId,
    partner_type: PartnerType,
    *,
    config_overrides: Optional[AsyncIoTWirelessClientConfig] = None,
) -> DisassociateAwsAccountFromPartnerAccountResponse

Disassociates your AWS account from a partner account. If PartnerAccountId and PartnerType are null, disassociates your AWS account from all partner accounts.

Parameters:

  • partner_account_id (PartnerAccountId) –

    The partner account ID to disassociate from the AWS account.

  • partner_type (PartnerType) –

    The partner type.

Raises:

Source code in docs_src/capo_iot_wireless/_services/async_io_t_wireless.py
async def disassociate_aws_account_from_partner_account(
    self,
    partner_account_id: "capo_iot_wireless.types.partner_account_id.PartnerAccountId",
    partner_type: "capo_iot_wireless.types.partner_type.PartnerType",
    *,
    config_overrides: Optional[AsyncIoTWirelessClientConfig] = None,
) -> "capo_iot_wireless.types.disassociate_aws_account_from_partner_account_response.DisassociateAwsAccountFromPartnerAccountResponse":
    """<p>Disassociates your AWS account from a partner account. If <code>PartnerAccountId</code> and <code>PartnerType</code> are <code>null</code>, disassociates your AWS account from all partner accounts.</p>

    Args:
        partner_account_id: <p>The partner account ID to disassociate from the AWS account.</p>
        partner_type: <p>The partner type.</p>

    Raises:
        capo_iot_wireless.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred while processing a request.</p>
        capo_iot_wireless.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource does not exist.</p>
        capo_iot_wireless.errors.throttling_exception.ThrottlingException: <p>The request was denied because it exceeded the allowed API request rate.</p>
        capo_iot_wireless.errors.validation_exception.ValidationException: <p>The input did not meet the specified constraints.</p>
        capo_iot_wireless.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_iot_wireless.types.disassociate_aws_account_from_partner_account_request.DisassociateAwsAccountFromPartnerAccountRequest]",
    ) -> AsyncOperationResponse[
        "capo_iot_wireless.types.disassociate_aws_account_from_partner_account_response.DisassociateAwsAccountFromPartnerAccountResponse"
    ]:
        import capo_iot_wireless._operations.iotwireless.disassociate_aws_account_from_partner_account

        (
            output,
            http_response,
        ) = await capo_iot_wireless._operations.iotwireless.disassociate_aws_account_from_partner_account.async_disassociate_aws_account_from_partner_account(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("DisassociateAwsAccountFromPartnerAccount"),
    )
    input_: capo_iot_wireless.types.disassociate_aws_account_from_partner_account_request.DisassociateAwsAccountFromPartnerAccountRequest = {
        "partner_account_id": partner_account_id,
        "partner_type": partner_type,
    }

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