GitLab API

GitlabTool

Actions1000

Overview

This node operation updates a specific cluster within a GitLab group by sending a PUT request to the GitLab API endpoint `/api/v4/groups/{id}/clusters/{cluster_id}`. It is useful for managing and modifying cluster configurations associated with a GitLab group, such as updating cluster details or settings.

Use Case Examples

  1. Updating cluster details for a specific group in GitLab by providing the group ID and cluster ID along with the updated cluster data in the request body.
  2. Automating cluster management tasks in GitLab CI/CD pipelines by programmatically modifying cluster configurations.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the API request is sent, defaulting to https://gitlab.com.
Method The HTTP method used for the request, defaulting to GET but can be set to PUT for this operation.
Path Parameters Parameters required in the URL path to identify the group and cluster to update, including 'id' (group ID) and 'cluster_id' (cluster ID).

Output

JSON

  • response - The JSON response from the GitLab API after updating the cluster, containing the updated cluster details.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the 'id' and 'cluster_id' path parameters are correctly set and correspond to existing group and cluster IDs in GitLab.
  • Verify that the authentication credentials are valid and have sufficient permissions to update clusters in the specified group.
  • Check the request body schema to ensure it matches the expected structure for updating a cluster in GitLab.
  • Common error messages may include 401 Unauthorized (invalid or missing authentication), 404 Not Found (invalid group or cluster ID), and 400 Bad Request (invalid request body). Resolving these involves correcting credentials, IDs, or request data.

Links

Discussion