Previous
Permissions
When you specify a data region, Viam stores all of your data, including tabular data, binary data, and even the hot data store, in that region. By default, new organizations store data in North America. Locations shared across multiple organizations store data in the primary organization region.
Viam supports the following data regions:
North America (us-central
):
us-central1
eastus2
US_EAST_2
Europe (eu-west
):
europe-west4
westeurope
EUROPE_WEST
You must set the region before syncing data. Once you sync data in an organization, you cannot change the data region.
You can check your organization’s data region using get_organization
, and set your organization’s data region using update_organization
:
viam_client = ViamClient.create_from_dial_options(
dial_options=DialOptions.with_api_key(
api_key="your-api-key",
api_key_id="your-api-key-id"
)
)
# Check organization region
org = await viam_client.app_client.get_organization(org_id="your-org-id")
print(f"Current region: {org.default_region}")
# Update organization region
updated_org = await viam_client.app_client.update_organization(
org_id="your-org-id",
region="eu-west" # or "us-central"
)
print(f"Organization region updated to: {updated_org.region}")
viam_client.close()
You can check your organization’s data region using GetOrganization
, and set your organization’s data region using UpdateOrganization
:
ctx := context.Background()
appClient, err := app.NewAppClient(ctx, app.Config{
Auth: app.Credentials{
Type: "api-key",
Payload: "your-api-key",
},
}, logging.NewLogger("client"))
if err != nil {
log.Fatal(err)
}
defer appClient.Close()
organizationId := "your-org-id"
// Check organization region
org, err := appClient.GetOrganization(ctx, organizationId)
if err != nil {
log.Fatal(err)
}
fmt.Printf("Current region: %s\n", org.DefaultRegion)
// Configure UpdateOrganizationOptions for European region
updateOptions := &app.UpdateOrganizationOptions{
Name: nil,
Region: stringPtr("eu-west"), # or "us-central"
}
// Update organization region
updatedOrg, err := appClient.UpdateOrganization(ctx, organizationId, updateOptions)
if err != nil {
log.Fatal(err)
}
fmt.Printf("Organization region updated to: %s\n", updatedOrg.DefaultRegion)
You can check your organization’s data region using getOrganization
, and set your organization’s data region using UpdateOrganization
:
const client = await createViamClient({
credential: {
type: "api-key",
authEntity: "your-api-key-id",
payload: "your-api-key",
},
});
// Check organization region
const org = await client.appClient.getOrganization({
organizationId: "your-org-id",
});
console.log(`Current region: ${org.defaultRegion}`);
// Update organization region
const updatedOrg = await client.appClient.updateOrganization({
organizationId: "your-org-id",
region: "eu-west", // or "us-central"
});
console.log(`Organization region updated to: ${updatedOrg.region}`);
client.disconnect();
Was this page helpful?
Glad to hear it! If you have any other feedback please let us know:
We're sorry about that. To help us improve, please tell us what we can do better:
Thank you!