operations.go (package eai)
Source: sdks/go/operations.go. Back to the Go SDK reference index.
This page is generated by tools/docs/gen_sdk_reference.py from the SDK sources and the OpenAPI text folders. Do not edit it by hand: change the source and regenerate.
Class OperationsService
OperationsService groups the endpoints of: long operations (architecture B6.3). Every long creation answers with the Operation-Id and Operation-Location headers; an Idempotency-Key header makes a retry replay the first answer.
OperationsService.Get
Get(ctx context.Context, operationID string, opts ...CallOption) (json.RawMessage, error)
Follow a long operation. The operation (kind, state pending or accepted, method, path, HTTP status, idempotency key, tracked resource, creator and dates), its accepted answer and the live state of the tracked resource. The resource is read with the caller's credentials through the resource route, so the resource authorization applies: when that read fails, result stays null and result_error.http_status gives the status. status is pending while the request runs, then the status or state of the resource. Requires a tenant principal (403 tenant_required); an operation created by someone else answers 404 not_found unless the caller holds tenant_admin, platform_admin, auditor or security_officer.
Route: /v1/operations/{operation_id} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
ctx | context.Context | yes | Context of the call: cancellation and deadline. | |
operationID | string | yes | Identifier of the operation, as returned in the Operation-Id header. | |
opts | ...CallOption | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Follow a long operation". The error is a typed error of the SDK, nil on success.
Raises: error, the typed errors of the transport (Errors).