Skip to content

untag_resource async

untag_resource(
    resource_arn: EnvironmentArn,
    tag_keys: TagKeyList,
    *,
    config_overrides: Optional[AsyncMWAAClientConfig] = None,
) -> UntagResourceOutput

Removes key-value tag pairs associated to your Amazon Managed Workflows for Apache Airflow (MWAA) environment. For example, "Environment": "Staging".

Parameters:

  • resource_arn (EnvironmentArn) –

    The Amazon Resource Name (ARN) of the Amazon MWAA environment. For example, arn:aws:airflow:us-east-1:123456789012:environment/MyMWAAEnvironment.

  • tag_keys (TagKeyList) –

    The key-value tag pair you want to remove. For example, "Environment": "Staging".

Raises:

Source code in docs_src/capo_mwaa/_services/async_mwaa.py
async def untag_resource(
    self,
    resource_arn: "capo_mwaa.types.environment_arn.EnvironmentArn",
    tag_keys: "capo_mwaa.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[AsyncMWAAClientConfig] = None,
) -> "capo_mwaa.types.untag_resource_output.UntagResourceOutput":
    """<p>Removes key-value tag pairs associated to your Amazon Managed Workflows for Apache Airflow (MWAA) environment. For example, <code>"Environment": "Staging"</code>.</p>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) of the Amazon MWAA environment. For example, <code>arn:aws:airflow:us-east-1:123456789012:environment/MyMWAAEnvironment</code>.</p>
        tag_keys: <p>The key-value tag pair you want to remove. For example, <code>"Environment": "Staging"</code>. </p>

    Raises:
        capo_mwaa.errors.internal_server_exception.InternalServerException: <p>InternalServerException: An internal error has occurred.</p>
        capo_mwaa.errors.resource_not_found_exception.ResourceNotFoundException: <p>ResourceNotFoundException: The resource is not available.</p>
        capo_mwaa.errors.validation_exception.ValidationException: <p>ValidationException: The provided input is not valid.</p>
        capo_mwaa.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_mwaa.types.untag_resource_input.UntagResourceInput]",
    ) -> AsyncOperationResponse[
        "capo_mwaa.types.untag_resource_output.UntagResourceOutput"
    ]:
        import capo_mwaa._operations.amazon_mwaa.untag_resource

        (
            output,
            http_response,
        ) = await capo_mwaa._operations.amazon_mwaa.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_mwaa.types.untag_resource_input.UntagResourceInput = {
        "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