Create or update the High Availability Multi-Region (HAMR) organization connection.
This endpoint allows you to configure the HAMR connection between the authenticated organization
and a target organization, including setting the connection status (ONBOARDING, PASSIVE, FAILOVER, ACTIVE, RECOVERY)
Indicates whether this organization is the primary organization in the HAMR relationship.
If true, this is the primary organization. If false, this is the secondary/backup organization.
modified_by [required]
string
Username or identifier of the user who last modified this HAMR connection.
target_org_datacenter [required]
string
Datacenter location of the target organization (e.g., us1, eu1, us5).
target_org_name [required]
string
Name of the target organization in the HAMR relationship.
target_org_uuid [required]
string
UUID of the target organization in the HAMR relationship.
id [required]
string
The organization UUID for this HAMR connection. Must match the authenticated organization's UUID.
type [required]
enum
Type of the HAMR organization connection resource.
Allowed enum values: hamr_org_connections
Indicates whether this organization is the primary organization in the HAMR relationship.
If true, this is the primary organization. If false, this is the secondary/backup organization.
modified_at [required]
string
Timestamp of when this HAMR connection was last modified (RFC3339 format).
modified_by [required]
string
Username or identifier of the user who last modified this HAMR connection.
target_org_datacenter [required]
string
Datacenter location of the target organization (e.g., us1, eu1, us5).
target_org_name [required]
string
Name of the target organization in the HAMR relationship.
target_org_uuid [required]
string
UUID of the target organization in the HAMR relationship.
id [required]
string
The organization UUID for this HAMR connection.
type [required]
enum
Type of the HAMR organization connection resource.
Allowed enum values: hamr_org_connections
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"python3"example.py"
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"rb"example.rb"
// Create or update HAMR organization connection returns "OK" responsepackagemainimport("context""encoding/json""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){body:=datadogV2.HamrOrgConnectionRequest{Data:datadogV2.HamrOrgConnectionDataRequest{Attributes:datadogV2.HamrOrgConnectionAttributesRequest{HamrStatus:datadogV2.HAMRORGCONNECTIONSTATUS_ACTIVE,IsPrimary:true,ModifiedBy:"admin@example.com",TargetOrgDatacenter:"us1",TargetOrgName:"Production Backup Org",TargetOrgUuid:"660f9511-f3ac-52e5-b827-557766551111",},Id:"550e8400-e29b-41d4-a716-446655440000",Type:datadogV2.HAMRORGCONNECTIONTYPE_HAMR_ORG_CONNECTIONS,},}ctx:=datadog.NewDefaultContext(context.Background())ctx=context.WithValue(ctx,datadog.ContextAccessToken,os.Getenv("DD_BEARER_TOKEN"))configuration:=datadog.NewConfiguration()configuration.SetUnstableOperationEnabled("v2.CreateHamrOrgConnection",true)apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewHighAvailabilityMultiRegionApi(apiClient)resp,r,err:=api.CreateHamrOrgConnection(ctx,body)iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `HighAvailabilityMultiRegionApi.CreateHamrOrgConnection`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `HighAvailabilityMultiRegionApi.CreateHamrOrgConnection`:\n%s\n",responseContent)}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"go run"main.go"
// Create or update HAMR organization connection returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.HighAvailabilityMultiRegionApi;importcom.datadog.api.client.v2.model.HamrOrgConnectionAttributesRequest;importcom.datadog.api.client.v2.model.HamrOrgConnectionDataRequest;importcom.datadog.api.client.v2.model.HamrOrgConnectionRequest;importcom.datadog.api.client.v2.model.HamrOrgConnectionResponse;importcom.datadog.api.client.v2.model.HamrOrgConnectionStatus;importcom.datadog.api.client.v2.model.HamrOrgConnectionType;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));defaultClient.setUnstableOperationEnabled("v2.createHamrOrgConnection",true);HighAvailabilityMultiRegionApiapiInstance=newHighAvailabilityMultiRegionApi(defaultClient);HamrOrgConnectionRequestbody=newHamrOrgConnectionRequest().data(newHamrOrgConnectionDataRequest().attributes(newHamrOrgConnectionAttributesRequest().hamrStatus(HamrOrgConnectionStatus.ACTIVE).isPrimary(true).modifiedBy("admin@example.com").targetOrgDatacenter("us1").targetOrgName("Production Backup Org").targetOrgUuid("660f9511-f3ac-52e5-b827-557766551111")).id("550e8400-e29b-41d4-a716-446655440000").type(HamrOrgConnectionType.HAMR_ORG_CONNECTIONS));try{HamrOrgConnectionResponseresult=apiInstance.createHamrOrgConnection(body);System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling HighAvailabilityMultiRegionApi#createHamrOrgConnection");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"java"Example.java"
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Create or update HAMR organization connection returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration({authMethods:{AuthZ:{accessToken: process.env.DD_BEARER_TOKENasstring,},},});configuration.unstableOperations["v2.createHamrOrgConnection"]=true;constapiInstance=newv2.HighAvailabilityMultiRegionApi(configuration);constparams: v2.HighAvailabilityMultiRegionApiCreateHamrOrgConnectionRequest={body:{data:{attributes:{hamrStatus: 4,isPrimary: true,modifiedBy:"admin@example.com",targetOrgDatacenter:"us1",targetOrgName:"Production Backup Org",targetOrgUuid:"660f9511-f3ac-52e5-b827-557766551111",},id:"550e8400-e29b-41d4-a716-446655440000",type:"hamr_org_connections",},},};apiInstance.createHamrOrgConnection(params).then((data: v2.HamrOrgConnectionResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"tsc"example.ts"
Request a personalized demo
Get Started with Datadog
Ask AI
AI-generated responses may be inaccurate. Verify important info.