Skip to content

untag_resource

untag_resource(
    resource_id: ResourceId,
    tag_keys: TagKeys,
    *,
    config_overrides: Optional[EFSClientConfig] = None,
) -> None

Removes tags from an EFS resource. You can remove tags from EFS file systems and access points using this API operation.

This operation requires permissions for the elasticfilesystem:UntagResource action.

Parameters:

  • resource_id (ResourceId) –

    Specifies the EFS resource that you want to remove tags from.

  • tag_keys (TagKeys) –

    The keys of the key-value tag pairs that you want to remove from the specified EFS resource.

Raises:

  • AccessPointNotFound –

    Returned if the specified AccessPointId value doesn't exist in the requester's Amazon Web Services account.

  • BadRequest –

    Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.

  • FileSystemNotFound –

    Returned if the specified FileSystemId value doesn't exist in the requester's Amazon Web Services account.

  • InternalServerError –

    Returned if an error occurred on the server side.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_efs/_services/efs.py
def untag_resource(
    self,
    resource_id: "capo_efs.types.resource_id.ResourceId",
    tag_keys: "capo_efs.types.tag_keys.TagKeys",
    *,
    config_overrides: Optional[EFSClientConfig] = None,
) -> None:
    """<p>Removes tags from an EFS resource. You can remove tags from EFS file systems and access points using this API operation.</p> <p>This operation requires permissions for the <code>elasticfilesystem:UntagResource</code> action.</p>

    Args:
        resource_id: <p>Specifies the EFS resource that you want to remove tags from.</p>
        tag_keys: <p>The keys of the key-value tag pairs that you want to remove from the specified EFS resource.</p>

    Raises:
        capo_efs.errors.access_point_not_found.AccessPointNotFound: <p>Returned if the specified <code>AccessPointId</code> value doesn't exist in the requester's Amazon Web Services account.</p>
        capo_efs.errors.bad_request.BadRequest: <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
        capo_efs.errors.file_system_not_found.FileSystemNotFound: <p>Returned if the specified <code>FileSystemId</code> value doesn't exist in the requester's Amazon Web Services account.</p>
        capo_efs.errors.internal_server_error.InternalServerError: <p>Returned if an error occurred on the server side.</p>
        capo_efs.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_efs.types.untag_resource_request.UntagResourceRequest]",
    ) -> OperationResponse[None]:
        import capo_efs._operations.magnolio_api_service_v20150201.untag_resource

        output, http_response = (
            capo_efs._operations.magnolio_api_service_v20150201.untag_resource.untag_resource(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

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

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output