Skip to content

untag_resource async

untag_resource(
    resource_arn: DeviceFarmArn,
    tag_keys: TagKeyList,
    *,
    config_overrides: Optional[AsyncDeviceFarmClientConfig] = None,
) -> UntagResourceResponse

Deletes the specified tags from a resource.

Parameters:

  • resource_arn (DeviceFarmArn) –

    The Amazon Resource Name (ARN) of the resource or resources from which to delete tags. You can associate tags with the following Device Farm resources: PROJECT, TESTGRID_PROJECT, RUN, NETWORK_PROFILE, INSTANCE_PROFILE, DEVICE_INSTANCE, SESSION, DEVICE_POOL, DEVICE, and VPCE_CONFIGURATION.

  • tag_keys (TagKeyList) –

    The keys of the tags to be removed.

Raises:

Source code in docs_src/capo_device_farm/_services/async_device_farm.py
async def untag_resource(
    self,
    resource_arn: "capo_device_farm.types.device_farm_arn.DeviceFarmArn",
    tag_keys: "capo_device_farm.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[AsyncDeviceFarmClientConfig] = None,
) -> "capo_device_farm.types.untag_resource_response.UntagResourceResponse":
    """<p>Deletes the specified tags from a resource.</p>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) of the resource or resources from which to delete tags. You can associate tags with the following Device Farm resources: <code>PROJECT</code>, <code>TESTGRID_PROJECT</code>, <code>RUN</code>, <code>NETWORK_PROFILE</code>, <code>INSTANCE_PROFILE</code>, <code>DEVICE_INSTANCE</code>, <code>SESSION</code>, <code>DEVICE_POOL</code>, <code>DEVICE</code>, and <code>VPCE_CONFIGURATION</code>.</p>
        tag_keys: <p>The keys of the tags to be removed.</p>

    Raises:
        capo_device_farm.errors.argument_exception.ArgumentException: <p>An invalid argument was specified.</p>
        capo_device_farm.errors.not_found_exception.NotFoundException: <p>The specified entity was not found.</p>
        capo_device_farm.errors.tag_operation_exception.TagOperationException: <p>The operation was not successful. Try again.</p>
        capo_device_farm.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_device_farm.types.untag_resource_request.UntagResourceRequest]",
    ) -> AsyncOperationResponse[
        "capo_device_farm.types.untag_resource_response.UntagResourceResponse"
    ]:
        import capo_device_farm._operations.device_farm_20150623.untag_resource

        (
            output,
            http_response,
        ) = await capo_device_farm._operations.device_farm_20150623.untag_resource.async_untag_resource(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UntagResource")
    )
    input_: capo_device_farm.types.untag_resource_request.UntagResourceRequest = {
        "resource_arn": resource_arn,
        "tag_keys": tag_keys,
    }

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