Skip to content

tag_resource async

tag_resource(
    resource_arn: ARN,
    tags: TagMap,
    *,
    config_overrides: Optional[AsyncAppflowClientConfig] = None,
) -> TagResourceResponse

Applies a tag to the specified flow.

Parameters:

  • resource_arn (ARN) –

    The Amazon Resource Name (ARN) of the flow that you want to tag.

  • tags (TagMap) –

    The tags used to organize, track, or control access for your flow.

Raises:

Source code in docs_src/capo_appflow/_services/async_appflow.py
async def tag_resource(
    self,
    resource_arn: "capo_appflow.types.arn.ARN",
    tags: "capo_appflow.types.tag_map.TagMap",
    *,
    config_overrides: Optional[AsyncAppflowClientConfig] = None,
) -> "capo_appflow.types.tag_resource_response.TagResourceResponse":
    """<p> Applies a tag to the specified flow. </p>

    Args:
        resource_arn: <p> The Amazon Resource Name (ARN) of the flow that you want to tag. </p>
        tags: <p> The tags used to organize, track, or control access for your flow. </p>

    Raises:
        capo_appflow.errors.internal_server_exception.InternalServerException: <p> An internal service error occurred during the processing of your request. Try again later. </p>
        capo_appflow.errors.resource_not_found_exception.ResourceNotFoundException: <p> The resource specified in the request (such as the source or destination connector profile) is not found. </p>
        capo_appflow.errors.validation_exception.ValidationException: <p> The request has invalid or missing parameters. </p>
        capo_appflow.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_appflow.types.tag_resource_request.TagResourceRequest]",
    ) -> AsyncOperationResponse[
        "capo_appflow.types.tag_resource_response.TagResourceResponse"
    ]:
        import capo_appflow._operations.sandstone_configuration_service_lambda.tag_resource

        (
            output,
            http_response,
        ) = await capo_appflow._operations.sandstone_configuration_service_lambda.tag_resource.async_tag_resource(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("TagResource")
    )
    input_: capo_appflow.types.tag_resource_request.TagResourceRequest = {
        "resource_arn": resource_arn,
        "tags": tags,
    }

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