Replace accounts

Changes a connected account's configuration for the given provider, by id.

PUT /v1/o11y/cloud_integrations/{cloud_provider}/accounts/{id}

Addresshttps://api.hanzo.ai/v1/o11y/cloud_integrations/{cloud_provider}/accounts/{id}
MethodPUT
OperationUpdateAccount
AuthAuthorization: Bearer $HANZO_API_KEY

Changes a connected account's configuration for the given provider, by id. Admin gate.

Request

11 fields, body application/json (required).

FieldInTypeRequiredDescription
cloud_providerpathstringyes
idpathstringyes
configbodyo11y.UpdatableAccountConfig—
config.awsbodyo11y.AWSAccountConfig—
config.aws.regionsbodystring[]—
config.azurebodyo11y.UpdatableAzureAccountConfig—
config.azure.resourceGroupsbodystring[]—
config.gcpbodyo11y.UpdatableGCPAccountConfig—
config.gcp.deploymentProjectIdbodystring—Project ID where central pub/sub for logs exist
config.gcp.deploymentRegionbodystring—Compute service region where otel collector will be deployed
config.gcp.projectIdsbodystring[]—List of project IDs to monitor

Response

StatusBodyMeaning
202Approvalheld for approval
204—no content
defaultproblem-detailsrefused

202 body — 3 fields.

FieldInTypeAlwaysDescription
clausebodystring—
reasonbodystring—
statusbodystring—

Failure carries the platform error shape — see Errors.

Examples

hanzo o11y cloud_integrations accounts set <cloud_provider> <id>
import { Configuration, O11yApi } from 'hanzoai';

const api = new O11yApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.updateAccount({ cloud_provider: 'cloud_provider', id: 'id', config: {"aws":{"regions":["<regions>"]},"azure":{"resourceGroups":["<resourceGroups>"]},"gcp":{"deploymentProjectId":"<deploymentProjectId>","deploymentRegion":"<deploymentRegion>","projectIds":["<projectIds>"]}} });
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import O11yApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = O11yApi(client).update_account(cloud_provider='cloud_provider', id='id', config={"aws":{"regions":["<regions>"]},"azure":{"resourceGroups":["<resourceGroups>"]},"gcp":{"deploymentProjectId":"<deploymentProjectId>","deploymentRegion":"<deploymentRegion>","projectIds":["<projectIds>"]}})
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.O11yAPI.UpdateAccount(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, o11y_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = o11y_api::update_account(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.O11yApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new O11yApi(client).updateAccount();
curl -X PUT https://api.hanzo.ai/v1/o11y/cloud_integrations/<cloud_provider>/accounts/<id> \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "config": {
         "aws": {
           "regions": [
             "<regions>"
           ]
         },
         "azure": {
           "resourceGroups": [
             "<resourceGroups>"
           ]
         },
         "gcp": {
           "deploymentProjectId": "<deploymentProjectId>",
           "deploymentRegion": "<deploymentRegion>",
           "projectIds": [
             "<projectIds>"
           ]
         }
       }
     }'

Tool o11y, op UpdateAccount — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.

curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "o11y",
         "arguments": {
           "op": "UpdateAccount",
           "input": {
             "cloud_provider": "<cloud_provider>",
             "id": "<id>",
             "config": {
               "aws": {
                 "regions": [
                   "<regions>"
                 ]
               },
               "azure": {
                 "resourceGroups": [
                   "<resourceGroups>"
                 ]
               },
               "gcp": {
                 "deploymentProjectId": "<deploymentProjectId>",
                 "deploymentRegion": "<deploymentRegion>",
                 "projectIds": [
                   "<projectIds>"
                 ]
               }
             }
           }
         }
       }
     }'

O11y API · All Hanzo APIs · Interactive reference

Was this page useful?