Send an HTTP request to a GKE cluster's control plane.
Arguments
cluster_id
string
The ID of the cluster.
path
string
Path to the API endpoint (for example, /api/v1/namespaces/default/pods
). For more information, see Kubernetes API reference
.
method
string
The HTTP request method. One of: GET
, HEAD
, POST
, PUT
, DELETE
, OPTIONS
, PATCH
.
location
string
project
string
The project that the cluster is hosted in. Default value is this workflow's project.
timeout
float
The request timeout, in seconds (default: 300.0
). If the request takes longer than the timeout, a TimeoutError
is raised. The maximum allowed timeout is 1800
seconds.
body
Content-Type
header is not specified and if the body value is bytes, the header is set to Content-Type: application/octet-stream
; otherwise, the body is JSON-encoded and the header is set to Content-type: application/json; charset=utf-8
.headers
Content-Type
header is specified, the request body is encoded as prescribed. For example, it might be JSON or URL-encoded.query
Returns
The HTTP response as a map with body
, code
(status code), and headers
attributes.
Raised exceptions
ConnectionError
TimeoutError
HttpError
ValueError
RUNNING
.
