Skip to content

remove_thing_from_billing_group async

remove_thing_from_billing_group(
    *,
    config_overrides: Optional[AsyncIoTClientConfig] = None,
    billing_group_name: Optional[BillingGroupName] = None,
    billing_group_arn: Optional[BillingGroupArn] = None,
    thing_name: Optional[ThingName] = None,
    thing_arn: Optional[ThingArn] = None,
) -> RemoveThingFromBillingGroupResponse

Removes the given thing from the billing group.

Requires permission to access the RemoveThingFromBillingGroup action.

This call is asynchronous. It might take several seconds for the detachment to propagate.

Parameters:

  • billing_group_name (Optional[BillingGroupName], default: None ) –

    The name of the billing group.

  • billing_group_arn (Optional[BillingGroupArn], default: None ) –

    The ARN of the billing group.

  • thing_name (Optional[ThingName], default: None ) –

    The name of the thing to be removed from the billing group.

  • thing_arn (Optional[ThingArn], default: None ) –

    The ARN of the thing to be removed from the billing group.

Raises:

Source code in docs_src/capo_iot/_services/async_io_t.py
async def remove_thing_from_billing_group(
    self,
    *,
    config_overrides: Optional[AsyncIoTClientConfig] = None,
    billing_group_name: Optional[
        "capo_iot.types.billing_group_name.BillingGroupName"
    ] = None,
    billing_group_arn: Optional[
        "capo_iot.types.billing_group_arn.BillingGroupArn"
    ] = None,
    thing_name: Optional["capo_iot.types.thing_name.ThingName"] = None,
    thing_arn: Optional["capo_iot.types.thing_arn.ThingArn"] = None,
) -> "capo_iot.types.remove_thing_from_billing_group_response.RemoveThingFromBillingGroupResponse":
    """<p>Removes the given thing from the billing group.</p> <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">RemoveThingFromBillingGroup</a> action.</p> <note> <p>This call is asynchronous. It might take several seconds for the detachment to propagate.</p> </note>

    Args:
        billing_group_name: <p>The name of the billing group.</p>
        billing_group_arn: <p>The ARN of the billing group.</p>
        thing_name: <p>The name of the thing to be removed from the billing group.</p>
        thing_arn: <p>The ARN of the thing to be removed from the billing group.</p>

    Raises:
        capo_iot.errors.internal_failure_exception.InternalFailureException: <p>An unexpected error has occurred.</p>
        capo_iot.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
        capo_iot.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
        capo_iot.errors.throttling_exception.ThrottlingException: <p>The rate exceeds the limit.</p>
        capo_iot.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_iot.types.remove_thing_from_billing_group_request.RemoveThingFromBillingGroupRequest]",
    ) -> AsyncOperationResponse[
        "capo_iot.types.remove_thing_from_billing_group_response.RemoveThingFromBillingGroupResponse"
    ]:
        import capo_iot._operations.aws_iot_service.remove_thing_from_billing_group

        (
            output,
            http_response,
        ) = await capo_iot._operations.aws_iot_service.remove_thing_from_billing_group.async_remove_thing_from_billing_group(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RemoveThingFromBillingGroup")
    )
    input_: capo_iot.types.remove_thing_from_billing_group_request.RemoveThingFromBillingGroupRequest = {}
    if billing_group_name is not None:
        input_["billing_group_name"] = billing_group_name
    if billing_group_arn is not None:
        input_["billing_group_arn"] = billing_group_arn
    if thing_name is not None:
        input_["thing_name"] = thing_name
    if thing_arn is not None:
        input_["thing_arn"] = thing_arn

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