GitLab API

GitlabTool

Actions905

Overview

This node operation deletes a specific cluster in the GitLab Admin Clusters resource by its cluster ID. It is useful for administrators who need to manage and remove clusters from their GitLab instance programmatically. For example, an admin can automate the cleanup of unused or deprecated clusters by specifying the cluster ID to delete.

Use Case Examples

  1. Delete a cluster with ID 123 from the GitLab admin clusters.
  2. Automate cluster management by removing clusters that are no longer needed.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
Authentication The authentication method used for the request, defaulting to GitLab API key.
baseUrl The base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET but DELETE is used for this operation.
Path Parameters The path parameters for the request, specifically the cluster_id to identify which cluster to delete.

Output

JSON

  • statusCode - HTTP status code of the delete operation response.
  • body - Response body from the delete operation, typically empty or confirmation message.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the cluster_id path parameter is provided and valid; missing or incorrect cluster_id will cause errors.
  • Authentication errors may occur if the API key is missing or invalid; verify credentials.
  • HTTP 404 error indicates the cluster ID does not exist.
  • HTTP 403 error indicates insufficient permissions to delete the cluster.

Links

Discussion