Cria um novo cluster HorizonDB ou substitui um cluster existente. O PointInTimeRestore cria o novo recurso Cluster e alimenta seu armazenamento de banco de dados próprio do serviço a partir de um backup de fonte disponível. Ele não clona pools de código-fonte, endpoints com escopo de pool, regras de firewall, associações de grupos de parâmetros ou outros recursos filhos. O novo Cluster recebe seu Endpoint gerado por serviços com escopo de cluster, chamado cluster. Para restauração, o postgreSqlVersion deve ser omitido porque o serviço o obtém a partir dos metadados de backup; toda a outra configuração de novo cluster vem dos padrões de solicitação ou serviço. A restauração no mesmo local requer e honra o pointInTimeUtc e permite que creationSourceClusterLocation seja omitido. A restauração entre localizações requer creationSourceClusterLocation para identificar a localização do Azure do cluster de origem e requer pointInTimeUtc, mas ignora o carimbo de data fornecido e restaura o backup disponível mais recente. Respostas entre localizações omitem pointInTimeUtc.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}?api-version=2026-10-01-preview
Parâmetros de URI
| Nome |
Em |
Obrigatório |
Tipo |
Descrição |
|
clusterName
|
path |
True
|
string
minLength: 1 maxLength: 63 pattern: ^[a-z0-9](?:[-a-z0-9]*[a-z0-9])?$
|
O nome do cluster HorizonDB.
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
O nome do grupo de recursos. O nome não diferencia maiúsculas de minúsculas.
|
|
subscriptionId
|
path |
True
|
string
(uuid)
|
O ID da assinatura de destino. O valor deve ser uma UUID.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
A versão da API a ser usada para esta operação.
|
Corpo da solicitação
| Nome |
Obrigatório |
Tipo |
Descrição |
|
location
|
True
|
string
|
A geolocalização onde o recurso reside
|
|
identity
|
|
HorizonDbClusterManagedServiceIdentity
|
As identidades de serviço gerenciadas atribuídas a esse recurso. Omitir toda a propriedade de identidade do PUT ou PATCH preserva todas as atribuições atuais. Quando fornecido, o PUT substitui o conjunto de identidades atribuído pelo usuário e o PATCH o funde; entradas nulas do dicionário PATCH removem identidades individuais. Definir o tipo para Nenhum elimina todas as atribuições.
|
|
properties
|
|
ClusterProperties
|
As propriedades específicas do recurso para esse recurso.
|
|
tags
|
|
object
|
Tags de recursos.
|
Respostas
| Nome |
Tipo |
Descrição |
|
200 OK
|
Cluster
|
A resposta retornava quando uma substituição assíncrona do cluster HorizonDB era aceita.
Cabeçalhos
- Azure-AsyncOperation: string
- Retry-After: integer
|
|
201 Created
|
Cluster
|
A resposta retorna quando a criação assíncrona do cluster HorizonDB é aceita.
Cabeçalhos
- Azure-AsyncOperation: string
- Retry-After: integer
|
|
Other Status Codes
|
ErrorResponse
|
Uma resposta de erro inesperada.
|
Segurança
azure_auth
Fluxo do OAuth2 do Azure Active Directory.
Tipo:
oauth2
Flow:
implicit
URL de Autorização:
https://login.microsoftonline.com/common/oauth2/authorize
Escopos
| Nome |
Descrição |
|
user_impersonation
|
se passar pela sua conta de usuário
|
Exemplos
Create a HorizonDB cluster with customer-managed key data encryption
Solicitação de exemplo
PUT https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/example-cluster?api-version=2026-10-01-preview
{
"location": "eastus2",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/primary-encryption-identity": {}
}
},
"properties": {
"postgreSqlVersion": "17",
"backup": {
"geoRedundancy": "Disabled",
"retentionDays": 14
},
"dataEncryption": {
"type": "AzureKeyVault",
"primaryKeyUri": "https://primary-key-vault.vault.azure.net/keys/horizondb-primary-key",
"primaryUserAssignedIdentityId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/primary-encryption-identity"
}
}
}
import com.azure.resourcemanager.horizondb.models.BackupProperties;
import com.azure.resourcemanager.horizondb.models.ClusterProperties;
import com.azure.resourcemanager.horizondb.models.GeoRedundancyState;
import com.azure.resourcemanager.horizondb.models.HorizonDbClusterDataEncryption;
import com.azure.resourcemanager.horizondb.models.HorizonDbClusterDataEncryptionType;
import com.azure.resourcemanager.horizondb.models.HorizonDbClusterIdentityType;
import com.azure.resourcemanager.horizondb.models.HorizonDbClusterManagedServiceIdentity;
import com.azure.resourcemanager.horizondb.models.PostgreSqlVersion;
import com.azure.resourcemanager.horizondb.models.UserAssignedIdentity;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Clusters CreateOrReplace.
*/
public final class Main {
/*
* x-ms-original-file: 2026-10-01-preview/Clusters_CreateOrReplaceWithDataEncryption.json
*/
/**
* Sample code: Create a HorizonDB cluster with customer-managed key data encryption.
*
* @param manager Entry point to HorizonDbManager.
*/
public static void createAHorizonDBClusterWithCustomerManagedKeyDataEncryption(
com.azure.resourcemanager.horizondb.HorizonDbManager manager) {
manager.clusters().define("example-cluster").withRegion("eastus2")
.withExistingResourceGroup("example-resource-group")
.withProperties(new ClusterProperties().withPostgreSqlVersion(PostgreSqlVersion.V17)
.withBackup(new BackupProperties().withGeoRedundancy(GeoRedundancyState.DISABLED).withRetentionDays(14))
.withDataEncryption(new HorizonDbClusterDataEncryption()
.withType(HorizonDbClusterDataEncryptionType.AZURE_KEY_VAULT)
.withPrimaryKeyUri("fakeTokenPlaceholder").withPrimaryUserAssignedIdentityId(
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/primary-encryption-identity")))
.withIdentity(new HorizonDbClusterManagedServiceIdentity()
.withType(HorizonDbClusterIdentityType.USER_ASSIGNED)
.withUserAssignedIdentities(mapOf(
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/primary-encryption-identity",
new UserAssignedIdentity())))
.create();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.horizondb import HorizonDBMgmtClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-horizondb
# USAGE
python clusters_create_or_replace_with_data_encryption.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = HorizonDBMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.clusters.begin_create_or_replace(
resource_group_name="example-resource-group",
cluster_name="example-cluster",
resource={
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/primary-encryption-identity": {}
},
},
"location": "eastus2",
"properties": {
"backup": {"geoRedundancy": "Disabled", "retentionDays": 14},
"dataEncryption": {
"primaryKeyUri": "https://primary-key-vault.vault.azure.net/keys/horizondb-primary-key",
"primaryUserAssignedIdentityId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/primary-encryption-identity",
"type": "AzureKeyVault",
},
"postgreSqlVersion": "17",
},
},
).result()
print(response)
# x-ms-original-file: 2026-10-01-preview/Clusters_CreateOrReplaceWithDataEncryption.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armhorizondb_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/horizondb/armhorizondb"
)
// Generated from example definition: 2026-10-01-preview/Clusters_CreateOrReplaceWithDataEncryption.json
func ExampleClustersClient_BeginCreateOrReplace_createAHorizonDbClusterWithCustomerManagedKeyDataEncryption() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhorizondb.NewClientFactory("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewClustersClient().BeginCreateOrReplace(ctx, "example-resource-group", "example-cluster", armhorizondb.Cluster{
Location: to.Ptr("eastus2"),
Identity: &armhorizondb.ClusterManagedServiceIdentity{
Type: to.Ptr(armhorizondb.ClusterIdentityTypeUserAssigned),
UserAssignedIdentities: map[string]*armhorizondb.UserAssignedIdentity{
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/primary-encryption-identity": {},
},
},
Properties: &armhorizondb.ClusterProperties{
PostgreSQLVersion: to.Ptr(armhorizondb.PostgreSQLVersionV17),
Backup: &armhorizondb.BackupProperties{
GeoRedundancy: to.Ptr(armhorizondb.GeoRedundancyStateDisabled),
RetentionDays: to.Ptr[int32](14),
},
DataEncryption: &armhorizondb.ClusterDataEncryption{
Type: to.Ptr(armhorizondb.ClusterDataEncryptionTypeAzureKeyVault),
PrimaryKeyURI: to.Ptr("https://primary-key-vault.vault.azure.net/keys/horizondb-primary-key"),
PrimaryUserAssignedIdentityID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/primary-encryption-identity"),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armhorizondb.ClustersClientCreateOrReplaceResponse{
// Cluster: armhorizondb.Cluster{
// ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/example-cluster"),
// Name: to.Ptr("example-cluster"),
// Type: to.Ptr("Microsoft.HorizonDb/clusters"),
// Location: to.Ptr("eastus2"),
// Identity: &armhorizondb.ClusterManagedServiceIdentity{
// Type: to.Ptr(armhorizondb.ClusterIdentityTypeUserAssigned),
// UserAssignedIdentities: map[string]*armhorizondb.UserAssignedIdentity{
// "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/primary-encryption-identity": &armhorizondb.UserAssignedIdentity{
// PrincipalID: to.Ptr("11111111-1111-1111-1111-111111111111"),
// ClientID: to.Ptr("22222222-2222-2222-2222-222222222222"),
// },
// },
// },
// Properties: &armhorizondb.ClusterProperties{
// PostgreSQLVersion: to.Ptr(armhorizondb.PostgreSQLVersionV17),
// CreationMode: to.Ptr(armhorizondb.ClusterCreateModeCreate),
// Network: &armhorizondb.Network{
// PublicAccess: to.Ptr(armhorizondb.PublicNetworkAccessStateDisabled),
// },
// Backup: &armhorizondb.BackupProperties{
// GeoRedundancy: to.Ptr(armhorizondb.GeoRedundancyStateDisabled),
// RetentionDays: to.Ptr[int32](14),
// },
// DataEncryption: &armhorizondb.ClusterDataEncryption{
// Type: to.Ptr(armhorizondb.ClusterDataEncryptionTypeAzureKeyVault),
// PrimaryKeyURI: to.Ptr("https://primary-key-vault.vault.azure.net/keys/horizondb-primary-key"),
// PrimaryUserAssignedIdentityID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/primary-encryption-identity"),
// PrimaryEncryptionKeyStatus: to.Ptr(armhorizondb.ClusterEncryptionKeyStatusValid),
// PrimaryEncryptionKeyCurrentVersion: to.Ptr("33333333333333333333333333333333"),
// },
// State: to.Ptr(armhorizondb.ClusterStateUpdating),
// ProvisioningState: to.Ptr(armhorizondb.ProvisioningStateInProgress),
// ReadWritePool: &armhorizondb.ReadWritePoolProperties{
// },
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { HorizonDbClient } = require("@azure/arm-horizondb");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates a new HorizonDB cluster or replaces an existing cluster. PointInTimeRestore creates the new Cluster resource and hydrates its service-owned database storage from an available source backup. It does not clone source pools, Pool-scoped endpoints, firewall rules, parameter-group associations, or other child resources. The new Cluster receives its service-generated Cluster-scoped Endpoint named cluster. For restore, postgreSqlVersion must be omitted because the service obtains it from backup metadata; all other new-cluster configuration comes from the request or service defaults. Same-location restore requires and honors pointInTimeUtc and allows creationSourceClusterLocation to be omitted. Cross-location restore requires creationSourceClusterLocation to identify the source cluster's Azure location and requires pointInTimeUtc, but ignores the supplied timestamp and restores the latest available backup. Cross-location responses omit pointInTimeUtc.
*
* @summary creates a new HorizonDB cluster or replaces an existing cluster. PointInTimeRestore creates the new Cluster resource and hydrates its service-owned database storage from an available source backup. It does not clone source pools, Pool-scoped endpoints, firewall rules, parameter-group associations, or other child resources. The new Cluster receives its service-generated Cluster-scoped Endpoint named cluster. For restore, postgreSqlVersion must be omitted because the service obtains it from backup metadata; all other new-cluster configuration comes from the request or service defaults. Same-location restore requires and honors pointInTimeUtc and allows creationSourceClusterLocation to be omitted. Cross-location restore requires creationSourceClusterLocation to identify the source cluster's Azure location and requires pointInTimeUtc, but ignores the supplied timestamp and restores the latest available backup. Cross-location responses omit pointInTimeUtc.
* x-ms-original-file: 2026-10-01-preview/Clusters_CreateOrReplaceWithDataEncryption.json
*/
async function createAHorizonDBClusterWithCustomerManagedKeyDataEncryption() {
const credential = new DefaultAzureCredential();
const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff";
const client = new HorizonDbClient(credential, subscriptionId);
const result = await client.clusters.createOrReplace(
"example-resource-group",
"example-cluster",
{
location: "eastus2",
identity: {
type: "UserAssigned",
userAssignedIdentities: {
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/primary-encryption-identity":
{},
},
},
properties: {
postgreSqlVersion: "17",
backup: { geoRedundancy: "Disabled", retentionDays: 14 },
dataEncryption: {
type: "AzureKeyVault",
primaryKeyUri: "https://primary-key-vault.vault.azure.net/keys/horizondb-primary-key",
primaryUserAssignedIdentityId:
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/primary-encryption-identity",
},
},
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Resposta de exemplo
Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.HorizonDb/locations/eastus2/operationStatuses/11111111-1111-1111-1111-111111111111?api-version=2026-10-01-preview
Retry-After: 30
{
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/example-cluster",
"name": "example-cluster",
"type": "Microsoft.HorizonDb/clusters",
"location": "eastus2",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/primary-encryption-identity": {
"principalId": "11111111-1111-1111-1111-111111111111",
"clientId": "22222222-2222-2222-2222-222222222222"
}
}
},
"properties": {
"postgreSqlVersion": "17",
"creationMode": "Create",
"network": {
"publicAccess": "Disabled"
},
"backup": {
"geoRedundancy": "Disabled",
"retentionDays": 14
},
"dataEncryption": {
"type": "AzureKeyVault",
"primaryKeyUri": "https://primary-key-vault.vault.azure.net/keys/horizondb-primary-key",
"primaryUserAssignedIdentityId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/primary-encryption-identity",
"primaryEncryptionKeyStatus": "Valid",
"primaryEncryptionKeyCurrentVersion": "33333333333333333333333333333333"
},
"state": "Updating",
"provisioningState": "InProgress",
"readWritePool": {}
}
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.HorizonDb/locations/eastus2/operationStatuses/11111111-1111-1111-1111-111111111111?api-version=2026-10-01-preview
Retry-After: 30
{
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/example-cluster",
"name": "example-cluster",
"type": "Microsoft.HorizonDb/clusters",
"location": "eastus2",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/primary-encryption-identity": {
"principalId": "11111111-1111-1111-1111-111111111111",
"clientId": "22222222-2222-2222-2222-222222222222"
}
}
},
"properties": {
"postgreSqlVersion": "17",
"creationMode": "Create",
"network": {
"publicAccess": "Disabled"
},
"backup": {
"geoRedundancy": "Disabled",
"retentionDays": 14
},
"dataEncryption": {
"type": "AzureKeyVault",
"primaryKeyUri": "https://primary-key-vault.vault.azure.net/keys/horizondb-primary-key",
"primaryUserAssignedIdentityId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/primary-encryption-identity",
"primaryEncryptionKeyStatus": "Valid",
"primaryEncryptionKeyCurrentVersion": "33333333333333333333333333333333"
},
"state": "Provisioning",
"provisioningState": "Provisioning",
"readWritePool": {}
}
}
Create a PostgreSQL 18 HorizonDB cluster with minimum configuration and service defaults
Solicitação de exemplo
PUT https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/minimum-defaults?api-version=2026-10-01-preview
{
"location": "eastus2",
"properties": {
"postgreSqlVersion": "18",
"backup": {
"geoRedundancy": "Disabled"
}
}
}
import com.azure.resourcemanager.horizondb.models.BackupProperties;
import com.azure.resourcemanager.horizondb.models.ClusterProperties;
import com.azure.resourcemanager.horizondb.models.GeoRedundancyState;
import com.azure.resourcemanager.horizondb.models.PostgreSqlVersion;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Clusters CreateOrReplace.
*/
public final class Main {
/*
* x-ms-original-file: 2026-10-01-preview/Clusters_CreateOrReplaceMinimumDefaults.json
*/
/**
* Sample code: Create a PostgreSQL 18 HorizonDB cluster with minimum configuration and service defaults.
*
* @param manager Entry point to HorizonDbManager.
*/
public static void createAPostgreSQL18HorizonDBClusterWithMinimumConfigurationAndServiceDefaults(
com.azure.resourcemanager.horizondb.HorizonDbManager manager) {
manager.clusters().define("minimum-defaults").withRegion("eastus2")
.withExistingResourceGroup("example-resource-group")
.withProperties(new ClusterProperties().withPostgreSqlVersion(PostgreSqlVersion.V18)
.withBackup(new BackupProperties().withGeoRedundancy(GeoRedundancyState.DISABLED)))
.create();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.horizondb import HorizonDBMgmtClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-horizondb
# USAGE
python clusters_create_or_replace_minimum_defaults.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = HorizonDBMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.clusters.begin_create_or_replace(
resource_group_name="example-resource-group",
cluster_name="minimum-defaults",
resource={
"location": "eastus2",
"properties": {"backup": {"geoRedundancy": "Disabled"}, "postgreSqlVersion": "18"},
},
).result()
print(response)
# x-ms-original-file: 2026-10-01-preview/Clusters_CreateOrReplaceMinimumDefaults.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armhorizondb_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/horizondb/armhorizondb"
)
// Generated from example definition: 2026-10-01-preview/Clusters_CreateOrReplaceMinimumDefaults.json
func ExampleClustersClient_BeginCreateOrReplace_createAPostgreSql18HorizonDbClusterWithMinimumConfigurationAndServiceDefaults() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhorizondb.NewClientFactory("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewClustersClient().BeginCreateOrReplace(ctx, "example-resource-group", "minimum-defaults", armhorizondb.Cluster{
Location: to.Ptr("eastus2"),
Properties: &armhorizondb.ClusterProperties{
PostgreSQLVersion: to.Ptr(armhorizondb.PostgreSQLVersionV18),
Backup: &armhorizondb.BackupProperties{
GeoRedundancy: to.Ptr(armhorizondb.GeoRedundancyStateDisabled),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armhorizondb.ClustersClientCreateOrReplaceResponse{
// Cluster: armhorizondb.Cluster{
// ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/minimum-defaults"),
// Name: to.Ptr("minimum-defaults"),
// Type: to.Ptr("Microsoft.HorizonDb/clusters"),
// Location: to.Ptr("eastus2"),
// Properties: &armhorizondb.ClusterProperties{
// PostgreSQLVersion: to.Ptr(armhorizondb.PostgreSQLVersionV18),
// CreationMode: to.Ptr(armhorizondb.ClusterCreateModeCreate),
// Network: &armhorizondb.Network{
// PublicAccess: to.Ptr(armhorizondb.PublicNetworkAccessStateDisabled),
// },
// Backup: &armhorizondb.BackupProperties{
// GeoRedundancy: to.Ptr(armhorizondb.GeoRedundancyStateDisabled),
// RetentionDays: to.Ptr[int32](7),
// },
// State: to.Ptr(armhorizondb.ClusterStateUpdating),
// ProvisioningState: to.Ptr(armhorizondb.ProvisioningStateInProgress),
// ReadWritePool: &armhorizondb.ReadWritePoolProperties{
// },
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { HorizonDbClient } = require("@azure/arm-horizondb");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates a new HorizonDB cluster or replaces an existing cluster. PointInTimeRestore creates the new Cluster resource and hydrates its service-owned database storage from an available source backup. It does not clone source pools, Pool-scoped endpoints, firewall rules, parameter-group associations, or other child resources. The new Cluster receives its service-generated Cluster-scoped Endpoint named cluster. For restore, postgreSqlVersion must be omitted because the service obtains it from backup metadata; all other new-cluster configuration comes from the request or service defaults. Same-location restore requires and honors pointInTimeUtc and allows creationSourceClusterLocation to be omitted. Cross-location restore requires creationSourceClusterLocation to identify the source cluster's Azure location and requires pointInTimeUtc, but ignores the supplied timestamp and restores the latest available backup. Cross-location responses omit pointInTimeUtc.
*
* @summary creates a new HorizonDB cluster or replaces an existing cluster. PointInTimeRestore creates the new Cluster resource and hydrates its service-owned database storage from an available source backup. It does not clone source pools, Pool-scoped endpoints, firewall rules, parameter-group associations, or other child resources. The new Cluster receives its service-generated Cluster-scoped Endpoint named cluster. For restore, postgreSqlVersion must be omitted because the service obtains it from backup metadata; all other new-cluster configuration comes from the request or service defaults. Same-location restore requires and honors pointInTimeUtc and allows creationSourceClusterLocation to be omitted. Cross-location restore requires creationSourceClusterLocation to identify the source cluster's Azure location and requires pointInTimeUtc, but ignores the supplied timestamp and restores the latest available backup. Cross-location responses omit pointInTimeUtc.
* x-ms-original-file: 2026-10-01-preview/Clusters_CreateOrReplaceMinimumDefaults.json
*/
async function createAPostgreSQL18HorizonDBClusterWithMinimumConfigurationAndServiceDefaults() {
const credential = new DefaultAzureCredential();
const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff";
const client = new HorizonDbClient(credential, subscriptionId);
const result = await client.clusters.createOrReplace(
"example-resource-group",
"minimum-defaults",
{
location: "eastus2",
properties: { postgreSqlVersion: "18", backup: { geoRedundancy: "Disabled" } },
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Resposta de exemplo
Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.HorizonDb/locations/eastus2/operationStatuses/55555555-5555-5555-5555-555555555555?api-version=2026-10-01-preview
Retry-After: 30
{
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/minimum-defaults",
"name": "minimum-defaults",
"type": "Microsoft.HorizonDb/clusters",
"location": "eastus2",
"properties": {
"postgreSqlVersion": "18",
"creationMode": "Create",
"network": {
"publicAccess": "Disabled"
},
"backup": {
"geoRedundancy": "Disabled",
"retentionDays": 7
},
"state": "Updating",
"provisioningState": "InProgress",
"readWritePool": {}
}
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.HorizonDb/locations/eastus2/operationStatuses/55555555-5555-5555-5555-555555555555?api-version=2026-10-01-preview
Retry-After: 30
{
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/minimum-defaults",
"name": "minimum-defaults",
"type": "Microsoft.HorizonDb/clusters",
"location": "eastus2",
"properties": {
"postgreSqlVersion": "18",
"creationMode": "Create",
"network": {
"publicAccess": "Disabled"
},
"backup": {
"geoRedundancy": "Disabled",
"retentionDays": 7
},
"state": "Provisioning",
"provisioningState": "Provisioning",
"readWritePool": {}
}
}
Create or replace a HorizonDB cluster
Solicitação de exemplo
PUT https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/example-cluster?api-version=2026-10-01-preview
{
"location": "eastus2",
"tags": {
"environment": "production"
},
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fabric-writer": {}
}
},
"properties": {
"postgreSqlVersion": "17",
"network": {
"publicAccess": "Enabled"
},
"backup": {
"geoRedundancy": "Enabled",
"retentionDays": 14
}
}
}
import com.azure.resourcemanager.horizondb.models.BackupProperties;
import com.azure.resourcemanager.horizondb.models.ClusterProperties;
import com.azure.resourcemanager.horizondb.models.GeoRedundancyState;
import com.azure.resourcemanager.horizondb.models.HorizonDbClusterIdentityType;
import com.azure.resourcemanager.horizondb.models.HorizonDbClusterManagedServiceIdentity;
import com.azure.resourcemanager.horizondb.models.Network;
import com.azure.resourcemanager.horizondb.models.PostgreSqlVersion;
import com.azure.resourcemanager.horizondb.models.PublicNetworkAccessState;
import com.azure.resourcemanager.horizondb.models.UserAssignedIdentity;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Clusters CreateOrReplace.
*/
public final class Main {
/*
* x-ms-original-file: 2026-10-01-preview/Clusters_CreateOrReplace.json
*/
/**
* Sample code: Create or replace a HorizonDB cluster.
*
* @param manager Entry point to HorizonDbManager.
*/
public static void createOrReplaceAHorizonDBCluster(com.azure.resourcemanager.horizondb.HorizonDbManager manager) {
manager.clusters().define("example-cluster").withRegion("eastus2")
.withExistingResourceGroup("example-resource-group").withTags(mapOf("environment", "production"))
.withProperties(new ClusterProperties().withPostgreSqlVersion(PostgreSqlVersion.V17)
.withNetwork(new Network().withPublicAccess(PublicNetworkAccessState.ENABLED))
.withBackup(new BackupProperties().withGeoRedundancy(GeoRedundancyState.ENABLED).withRetentionDays(14)))
.withIdentity(new HorizonDbClusterManagedServiceIdentity()
.withType(HorizonDbClusterIdentityType.USER_ASSIGNED)
.withUserAssignedIdentities(mapOf(
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fabric-writer",
new UserAssignedIdentity())))
.create();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.horizondb import HorizonDBMgmtClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-horizondb
# USAGE
python clusters_create_or_replace.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = HorizonDBMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.clusters.begin_create_or_replace(
resource_group_name="example-resource-group",
cluster_name="example-cluster",
resource={
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fabric-writer": {}
},
},
"location": "eastus2",
"properties": {
"backup": {"geoRedundancy": "Enabled", "retentionDays": 14},
"network": {"publicAccess": "Enabled"},
"postgreSqlVersion": "17",
},
"tags": {"environment": "production"},
},
).result()
print(response)
# x-ms-original-file: 2026-10-01-preview/Clusters_CreateOrReplace.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armhorizondb_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/horizondb/armhorizondb"
)
// Generated from example definition: 2026-10-01-preview/Clusters_CreateOrReplace.json
func ExampleClustersClient_BeginCreateOrReplace_createOrReplaceAHorizonDbCluster() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhorizondb.NewClientFactory("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewClustersClient().BeginCreateOrReplace(ctx, "example-resource-group", "example-cluster", armhorizondb.Cluster{
Location: to.Ptr("eastus2"),
Tags: map[string]*string{
"environment": to.Ptr("production"),
},
Identity: &armhorizondb.ClusterManagedServiceIdentity{
Type: to.Ptr(armhorizondb.ClusterIdentityTypeUserAssigned),
UserAssignedIdentities: map[string]*armhorizondb.UserAssignedIdentity{
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fabric-writer": {},
},
},
Properties: &armhorizondb.ClusterProperties{
PostgreSQLVersion: to.Ptr(armhorizondb.PostgreSQLVersionV17),
Network: &armhorizondb.Network{
PublicAccess: to.Ptr(armhorizondb.PublicNetworkAccessStateEnabled),
},
Backup: &armhorizondb.BackupProperties{
GeoRedundancy: to.Ptr(armhorizondb.GeoRedundancyStateEnabled),
RetentionDays: to.Ptr[int32](14),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armhorizondb.ClustersClientCreateOrReplaceResponse{
// Cluster: armhorizondb.Cluster{
// ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/example-cluster"),
// Name: to.Ptr("example-cluster"),
// Type: to.Ptr("Microsoft.HorizonDb/clusters"),
// Location: to.Ptr("eastus2"),
// Tags: map[string]*string{
// "environment": to.Ptr("production"),
// },
// Identity: &armhorizondb.ClusterManagedServiceIdentity{
// Type: to.Ptr(armhorizondb.ClusterIdentityTypeUserAssigned),
// UserAssignedIdentities: map[string]*armhorizondb.UserAssignedIdentity{
// "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fabric-writer": &armhorizondb.UserAssignedIdentity{
// PrincipalID: to.Ptr("11111111-1111-1111-1111-111111111111"),
// ClientID: to.Ptr("22222222-2222-2222-2222-222222222222"),
// },
// },
// },
// Properties: &armhorizondb.ClusterProperties{
// PostgreSQLVersion: to.Ptr(armhorizondb.PostgreSQLVersionV17),
// CreationMode: to.Ptr(armhorizondb.ClusterCreateModeCreate),
// Network: &armhorizondb.Network{
// PublicAccess: to.Ptr(armhorizondb.PublicNetworkAccessStateEnabled),
// },
// Backup: &armhorizondb.BackupProperties{
// GeoRedundancy: to.Ptr(armhorizondb.GeoRedundancyStateEnabled),
// RetentionDays: to.Ptr[int32](14),
// EarliestRestorePointUTC: to.Ptr(time.Date(2026, time.July, 27, 2, 0, 0, 0, time.UTC)),
// },
// State: to.Ptr(armhorizondb.ClusterStateUpdating),
// ProvisioningState: to.Ptr(armhorizondb.ProvisioningStateInProgress),
// ReadWritePool: &armhorizondb.ReadWritePoolProperties{
// DesignatedPoolResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/example-cluster/pools/example-pool-01"),
// },
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { HorizonDbClient } = require("@azure/arm-horizondb");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates a new HorizonDB cluster or replaces an existing cluster. PointInTimeRestore creates the new Cluster resource and hydrates its service-owned database storage from an available source backup. It does not clone source pools, Pool-scoped endpoints, firewall rules, parameter-group associations, or other child resources. The new Cluster receives its service-generated Cluster-scoped Endpoint named cluster. For restore, postgreSqlVersion must be omitted because the service obtains it from backup metadata; all other new-cluster configuration comes from the request or service defaults. Same-location restore requires and honors pointInTimeUtc and allows creationSourceClusterLocation to be omitted. Cross-location restore requires creationSourceClusterLocation to identify the source cluster's Azure location and requires pointInTimeUtc, but ignores the supplied timestamp and restores the latest available backup. Cross-location responses omit pointInTimeUtc.
*
* @summary creates a new HorizonDB cluster or replaces an existing cluster. PointInTimeRestore creates the new Cluster resource and hydrates its service-owned database storage from an available source backup. It does not clone source pools, Pool-scoped endpoints, firewall rules, parameter-group associations, or other child resources. The new Cluster receives its service-generated Cluster-scoped Endpoint named cluster. For restore, postgreSqlVersion must be omitted because the service obtains it from backup metadata; all other new-cluster configuration comes from the request or service defaults. Same-location restore requires and honors pointInTimeUtc and allows creationSourceClusterLocation to be omitted. Cross-location restore requires creationSourceClusterLocation to identify the source cluster's Azure location and requires pointInTimeUtc, but ignores the supplied timestamp and restores the latest available backup. Cross-location responses omit pointInTimeUtc.
* x-ms-original-file: 2026-10-01-preview/Clusters_CreateOrReplace.json
*/
async function createOrReplaceAHorizonDBCluster() {
const credential = new DefaultAzureCredential();
const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff";
const client = new HorizonDbClient(credential, subscriptionId);
const result = await client.clusters.createOrReplace(
"example-resource-group",
"example-cluster",
{
location: "eastus2",
tags: { environment: "production" },
identity: {
type: "UserAssigned",
userAssignedIdentities: {
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fabric-writer":
{},
},
},
properties: {
postgreSqlVersion: "17",
network: { publicAccess: "Enabled" },
backup: { geoRedundancy: "Enabled", retentionDays: 14 },
},
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Resposta de exemplo
Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.HorizonDb/locations/eastus2/operationStatuses/44444444-4444-4444-4444-444444444444?api-version=2026-10-01-preview
Retry-After: 30
{
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/example-cluster",
"name": "example-cluster",
"type": "Microsoft.HorizonDb/clusters",
"location": "eastus2",
"tags": {
"environment": "production"
},
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fabric-writer": {
"principalId": "11111111-1111-1111-1111-111111111111",
"clientId": "22222222-2222-2222-2222-222222222222"
}
}
},
"properties": {
"postgreSqlVersion": "17",
"creationMode": "Create",
"network": {
"publicAccess": "Enabled"
},
"backup": {
"geoRedundancy": "Enabled",
"retentionDays": 14,
"earliestRestorePointUtc": "2026-07-27T02:00:00Z"
},
"state": "Updating",
"provisioningState": "InProgress",
"readWritePool": {
"designatedPoolResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/example-cluster/pools/example-pool-01"
}
}
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.HorizonDb/locations/eastus2/operationStatuses/11111111-1111-1111-1111-111111111111?api-version=2026-10-01-preview
Retry-After: 30
{
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/example-cluster",
"name": "example-cluster",
"type": "Microsoft.HorizonDb/clusters",
"location": "eastus2",
"tags": {
"environment": "production"
},
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/identity-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fabric-writer": {
"principalId": "11111111-1111-1111-1111-111111111111",
"clientId": "22222222-2222-2222-2222-222222222222"
}
}
},
"properties": {
"postgreSqlVersion": "17",
"creationMode": "Create",
"network": {
"publicAccess": "Enabled"
},
"backup": {
"geoRedundancy": "Enabled",
"retentionDays": 14,
"earliestRestorePointUtc": "2026-07-27T02:00:00Z"
},
"state": "Provisioning",
"provisioningState": "Provisioning",
"readWritePool": {}
}
}
Restore a HorizonDB cluster across Azure regions from the latest available backup
Solicitação de exemplo
PUT https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/cross-region-restored-cluster?api-version=2026-10-01-preview
{
"location": "westus2",
"properties": {
"creationMode": "PointInTimeRestore",
"pointInTimeUtc": "2026-07-27T12:00:00Z",
"creationSourceClusterResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/source-cluster",
"creationSourceClusterLocation": "eastus2",
"network": {
"publicAccess": "Disabled"
},
"backup": {
"geoRedundancy": "Enabled",
"retentionDays": 14
}
}
}
import com.azure.resourcemanager.horizondb.models.BackupProperties;
import com.azure.resourcemanager.horizondb.models.ClusterCreateMode;
import com.azure.resourcemanager.horizondb.models.ClusterProperties;
import com.azure.resourcemanager.horizondb.models.GeoRedundancyState;
import com.azure.resourcemanager.horizondb.models.Network;
import com.azure.resourcemanager.horizondb.models.PublicNetworkAccessState;
import java.time.OffsetDateTime;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Clusters CreateOrReplace.
*/
public final class Main {
/*
* x-ms-original-file: 2026-10-01-preview/Clusters_CreateOrReplaceCrossRegionPointInTimeRestore.json
*/
/**
* Sample code: Restore a HorizonDB cluster across Azure regions from the latest available backup.
*
* @param manager Entry point to HorizonDbManager.
*/
public static void restoreAHorizonDBClusterAcrossAzureRegionsFromTheLatestAvailableBackup(
com.azure.resourcemanager.horizondb.HorizonDbManager manager) {
manager.clusters().define("cross-region-restored-cluster").withRegion("westus2")
.withExistingResourceGroup("example-resource-group")
.withProperties(new ClusterProperties().withCreationMode(ClusterCreateMode.POINT_IN_TIME_RESTORE)
.withPointInTimeUtc(OffsetDateTime.parse("2026-07-27T12:00:00Z"))
.withCreationSourceClusterResourceId(
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/source-cluster")
.withCreationSourceClusterLocation("eastus2")
.withNetwork(new Network().withPublicAccess(PublicNetworkAccessState.DISABLED))
.withBackup(new BackupProperties().withGeoRedundancy(GeoRedundancyState.ENABLED).withRetentionDays(14)))
.create();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.horizondb import HorizonDBMgmtClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-horizondb
# USAGE
python clusters_create_or_replace_cross_region_point_in_time_restore.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = HorizonDBMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.clusters.begin_create_or_replace(
resource_group_name="example-resource-group",
cluster_name="cross-region-restored-cluster",
resource={
"location": "westus2",
"properties": {
"backup": {"geoRedundancy": "Enabled", "retentionDays": 14},
"creationMode": "PointInTimeRestore",
"creationSourceClusterLocation": "eastus2",
"creationSourceClusterResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/source-cluster",
"network": {"publicAccess": "Disabled"},
"pointInTimeUtc": "2026-07-27T12:00:00Z",
},
},
).result()
print(response)
# x-ms-original-file: 2026-10-01-preview/Clusters_CreateOrReplaceCrossRegionPointInTimeRestore.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armhorizondb_test
import (
"context"
"log"
"time"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/horizondb/armhorizondb"
)
// Generated from example definition: 2026-10-01-preview/Clusters_CreateOrReplaceCrossRegionPointInTimeRestore.json
func ExampleClustersClient_BeginCreateOrReplace_restoreAHorizonDbClusterAcrossAzureRegionsFromTheLatestAvailableBackup() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhorizondb.NewClientFactory("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewClustersClient().BeginCreateOrReplace(ctx, "example-resource-group", "cross-region-restored-cluster", armhorizondb.Cluster{
Location: to.Ptr("westus2"),
Properties: &armhorizondb.ClusterProperties{
CreationMode: to.Ptr(armhorizondb.ClusterCreateModePointInTimeRestore),
PointInTimeUTC: to.Ptr(time.Date(2026, time.July, 27, 12, 0, 0, 0, time.UTC)),
CreationSourceClusterResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/source-cluster"),
CreationSourceClusterLocation: to.Ptr("eastus2"),
Network: &armhorizondb.Network{
PublicAccess: to.Ptr(armhorizondb.PublicNetworkAccessStateDisabled),
},
Backup: &armhorizondb.BackupProperties{
GeoRedundancy: to.Ptr(armhorizondb.GeoRedundancyStateEnabled),
RetentionDays: to.Ptr[int32](14),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armhorizondb.ClustersClientCreateOrReplaceResponse{
// Cluster: armhorizondb.Cluster{
// ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/cross-region-restored-cluster"),
// Name: to.Ptr("cross-region-restored-cluster"),
// Type: to.Ptr("Microsoft.HorizonDb/clusters"),
// Location: to.Ptr("westus2"),
// Properties: &armhorizondb.ClusterProperties{
// PostgreSQLVersion: to.Ptr(armhorizondb.PostgreSQLVersionV17),
// CreationMode: to.Ptr(armhorizondb.ClusterCreateModePointInTimeRestore),
// CreationSourceClusterResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/source-cluster"),
// CreationSourceClusterLocation: to.Ptr("eastus2"),
// Network: &armhorizondb.Network{
// PublicAccess: to.Ptr(armhorizondb.PublicNetworkAccessStateDisabled),
// },
// Backup: &armhorizondb.BackupProperties{
// GeoRedundancy: to.Ptr(armhorizondb.GeoRedundancyStateEnabled),
// RetentionDays: to.Ptr[int32](14),
// },
// State: to.Ptr(armhorizondb.ClusterStateProvisioning),
// ProvisioningState: to.Ptr(armhorizondb.ProvisioningStateProvisioning),
// ReadWritePool: &armhorizondb.ReadWritePoolProperties{
// },
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { HorizonDbClient } = require("@azure/arm-horizondb");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates a new HorizonDB cluster or replaces an existing cluster. PointInTimeRestore creates the new Cluster resource and hydrates its service-owned database storage from an available source backup. It does not clone source pools, Pool-scoped endpoints, firewall rules, parameter-group associations, or other child resources. The new Cluster receives its service-generated Cluster-scoped Endpoint named cluster. For restore, postgreSqlVersion must be omitted because the service obtains it from backup metadata; all other new-cluster configuration comes from the request or service defaults. Same-location restore requires and honors pointInTimeUtc and allows creationSourceClusterLocation to be omitted. Cross-location restore requires creationSourceClusterLocation to identify the source cluster's Azure location and requires pointInTimeUtc, but ignores the supplied timestamp and restores the latest available backup. Cross-location responses omit pointInTimeUtc.
*
* @summary creates a new HorizonDB cluster or replaces an existing cluster. PointInTimeRestore creates the new Cluster resource and hydrates its service-owned database storage from an available source backup. It does not clone source pools, Pool-scoped endpoints, firewall rules, parameter-group associations, or other child resources. The new Cluster receives its service-generated Cluster-scoped Endpoint named cluster. For restore, postgreSqlVersion must be omitted because the service obtains it from backup metadata; all other new-cluster configuration comes from the request or service defaults. Same-location restore requires and honors pointInTimeUtc and allows creationSourceClusterLocation to be omitted. Cross-location restore requires creationSourceClusterLocation to identify the source cluster's Azure location and requires pointInTimeUtc, but ignores the supplied timestamp and restores the latest available backup. Cross-location responses omit pointInTimeUtc.
* x-ms-original-file: 2026-10-01-preview/Clusters_CreateOrReplaceCrossRegionPointInTimeRestore.json
*/
async function restoreAHorizonDBClusterAcrossAzureRegionsFromTheLatestAvailableBackup() {
const credential = new DefaultAzureCredential();
const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff";
const client = new HorizonDbClient(credential, subscriptionId);
const result = await client.clusters.createOrReplace(
"example-resource-group",
"cross-region-restored-cluster",
{
location: "westus2",
properties: {
creationMode: "PointInTimeRestore",
pointInTimeUtc: new Date("2026-07-27T12:00:00Z"),
creationSourceClusterResourceId:
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/source-cluster",
creationSourceClusterLocation: "eastus2",
network: { publicAccess: "Disabled" },
backup: { geoRedundancy: "Enabled", retentionDays: 14 },
},
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Resposta de exemplo
Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.HorizonDb/locations/westus2/operationStatuses/44444444-4444-4444-4444-444444444444?api-version=2026-10-01-preview
Retry-After: 30
{
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/cross-region-restored-cluster",
"name": "cross-region-restored-cluster",
"type": "Microsoft.HorizonDb/clusters",
"location": "westus2",
"properties": {
"postgreSqlVersion": "17",
"creationMode": "PointInTimeRestore",
"creationSourceClusterResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/source-cluster",
"creationSourceClusterLocation": "eastus2",
"network": {
"publicAccess": "Disabled"
},
"backup": {
"geoRedundancy": "Enabled",
"retentionDays": 14
},
"state": "Provisioning",
"provisioningState": "Provisioning",
"readWritePool": {}
}
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.HorizonDb/locations/westus2/operationStatuses/44444444-4444-4444-4444-444444444444?api-version=2026-10-01-preview
Retry-After: 30
{
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/cross-region-restored-cluster",
"name": "cross-region-restored-cluster",
"type": "Microsoft.HorizonDb/clusters",
"location": "westus2",
"properties": {
"postgreSqlVersion": "17",
"creationMode": "PointInTimeRestore",
"creationSourceClusterResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/source-cluster",
"creationSourceClusterLocation": "eastus2",
"network": {
"publicAccess": "Disabled"
},
"backup": {
"geoRedundancy": "Enabled",
"retentionDays": 14
},
"state": "Provisioning",
"provisioningState": "Provisioning",
"readWritePool": {}
}
}
Restore a HorizonDB cluster to a point in time
Solicitação de exemplo
PUT https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/restored-cluster?api-version=2026-10-01-preview
{
"location": "eastus2",
"properties": {
"creationMode": "PointInTimeRestore",
"pointInTimeUtc": "2026-07-27T12:00:00Z",
"creationSourceClusterResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/source-cluster",
"network": {
"publicAccess": "Disabled"
},
"backup": {
"geoRedundancy": "Enabled",
"retentionDays": 14
}
}
}
import com.azure.resourcemanager.horizondb.models.BackupProperties;
import com.azure.resourcemanager.horizondb.models.ClusterCreateMode;
import com.azure.resourcemanager.horizondb.models.ClusterProperties;
import com.azure.resourcemanager.horizondb.models.GeoRedundancyState;
import com.azure.resourcemanager.horizondb.models.Network;
import com.azure.resourcemanager.horizondb.models.PublicNetworkAccessState;
import java.time.OffsetDateTime;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Clusters CreateOrReplace.
*/
public final class Main {
/*
* x-ms-original-file: 2026-10-01-preview/Clusters_CreateOrReplacePointInTimeRestore.json
*/
/**
* Sample code: Restore a HorizonDB cluster to a point in time.
*
* @param manager Entry point to HorizonDbManager.
*/
public static void
restoreAHorizonDBClusterToAPointInTime(com.azure.resourcemanager.horizondb.HorizonDbManager manager) {
manager.clusters().define("restored-cluster").withRegion("eastus2")
.withExistingResourceGroup("example-resource-group")
.withProperties(new ClusterProperties().withCreationMode(ClusterCreateMode.POINT_IN_TIME_RESTORE)
.withPointInTimeUtc(OffsetDateTime.parse("2026-07-27T12:00:00Z"))
.withCreationSourceClusterResourceId(
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/source-cluster")
.withNetwork(new Network().withPublicAccess(PublicNetworkAccessState.DISABLED))
.withBackup(new BackupProperties().withGeoRedundancy(GeoRedundancyState.ENABLED).withRetentionDays(14)))
.create();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.horizondb import HorizonDBMgmtClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-horizondb
# USAGE
python clusters_create_or_replace_point_in_time_restore.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = HorizonDBMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.clusters.begin_create_or_replace(
resource_group_name="example-resource-group",
cluster_name="restored-cluster",
resource={
"location": "eastus2",
"properties": {
"backup": {"geoRedundancy": "Enabled", "retentionDays": 14},
"creationMode": "PointInTimeRestore",
"creationSourceClusterResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/source-cluster",
"network": {"publicAccess": "Disabled"},
"pointInTimeUtc": "2026-07-27T12:00:00Z",
},
},
).result()
print(response)
# x-ms-original-file: 2026-10-01-preview/Clusters_CreateOrReplacePointInTimeRestore.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armhorizondb_test
import (
"context"
"log"
"time"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/horizondb/armhorizondb"
)
// Generated from example definition: 2026-10-01-preview/Clusters_CreateOrReplacePointInTimeRestore.json
func ExampleClustersClient_BeginCreateOrReplace_restoreAHorizonDbClusterToAPointInTime() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhorizondb.NewClientFactory("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewClustersClient().BeginCreateOrReplace(ctx, "example-resource-group", "restored-cluster", armhorizondb.Cluster{
Location: to.Ptr("eastus2"),
Properties: &armhorizondb.ClusterProperties{
CreationMode: to.Ptr(armhorizondb.ClusterCreateModePointInTimeRestore),
PointInTimeUTC: to.Ptr(time.Date(2026, time.July, 27, 12, 0, 0, 0, time.UTC)),
CreationSourceClusterResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/source-cluster"),
Network: &armhorizondb.Network{
PublicAccess: to.Ptr(armhorizondb.PublicNetworkAccessStateDisabled),
},
Backup: &armhorizondb.BackupProperties{
GeoRedundancy: to.Ptr(armhorizondb.GeoRedundancyStateEnabled),
RetentionDays: to.Ptr[int32](14),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armhorizondb.ClustersClientCreateOrReplaceResponse{
// Cluster: armhorizondb.Cluster{
// ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/restored-cluster"),
// Name: to.Ptr("restored-cluster"),
// Type: to.Ptr("Microsoft.HorizonDb/clusters"),
// Location: to.Ptr("eastus2"),
// Properties: &armhorizondb.ClusterProperties{
// PostgreSQLVersion: to.Ptr(armhorizondb.PostgreSQLVersionV17),
// CreationMode: to.Ptr(armhorizondb.ClusterCreateModePointInTimeRestore),
// PointInTimeUTC: to.Ptr(time.Date(2026, time.July, 27, 12, 0, 0, 0, time.UTC)),
// CreationSourceClusterResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/source-cluster"),
// Network: &armhorizondb.Network{
// PublicAccess: to.Ptr(armhorizondb.PublicNetworkAccessStateDisabled),
// },
// Backup: &armhorizondb.BackupProperties{
// GeoRedundancy: to.Ptr(armhorizondb.GeoRedundancyStateEnabled),
// RetentionDays: to.Ptr[int32](14),
// },
// State: to.Ptr(armhorizondb.ClusterStateProvisioning),
// ProvisioningState: to.Ptr(armhorizondb.ProvisioningStateProvisioning),
// ReadWritePool: &armhorizondb.ReadWritePoolProperties{
// },
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { HorizonDbClient } = require("@azure/arm-horizondb");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates a new HorizonDB cluster or replaces an existing cluster. PointInTimeRestore creates the new Cluster resource and hydrates its service-owned database storage from an available source backup. It does not clone source pools, Pool-scoped endpoints, firewall rules, parameter-group associations, or other child resources. The new Cluster receives its service-generated Cluster-scoped Endpoint named cluster. For restore, postgreSqlVersion must be omitted because the service obtains it from backup metadata; all other new-cluster configuration comes from the request or service defaults. Same-location restore requires and honors pointInTimeUtc and allows creationSourceClusterLocation to be omitted. Cross-location restore requires creationSourceClusterLocation to identify the source cluster's Azure location and requires pointInTimeUtc, but ignores the supplied timestamp and restores the latest available backup. Cross-location responses omit pointInTimeUtc.
*
* @summary creates a new HorizonDB cluster or replaces an existing cluster. PointInTimeRestore creates the new Cluster resource and hydrates its service-owned database storage from an available source backup. It does not clone source pools, Pool-scoped endpoints, firewall rules, parameter-group associations, or other child resources. The new Cluster receives its service-generated Cluster-scoped Endpoint named cluster. For restore, postgreSqlVersion must be omitted because the service obtains it from backup metadata; all other new-cluster configuration comes from the request or service defaults. Same-location restore requires and honors pointInTimeUtc and allows creationSourceClusterLocation to be omitted. Cross-location restore requires creationSourceClusterLocation to identify the source cluster's Azure location and requires pointInTimeUtc, but ignores the supplied timestamp and restores the latest available backup. Cross-location responses omit pointInTimeUtc.
* x-ms-original-file: 2026-10-01-preview/Clusters_CreateOrReplacePointInTimeRestore.json
*/
async function restoreAHorizonDBClusterToAPointInTime() {
const credential = new DefaultAzureCredential();
const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff";
const client = new HorizonDbClient(credential, subscriptionId);
const result = await client.clusters.createOrReplace(
"example-resource-group",
"restored-cluster",
{
location: "eastus2",
properties: {
creationMode: "PointInTimeRestore",
pointInTimeUtc: new Date("2026-07-27T12:00:00Z"),
creationSourceClusterResourceId:
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/source-cluster",
network: { publicAccess: "Disabled" },
backup: { geoRedundancy: "Enabled", retentionDays: 14 },
},
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Resposta de exemplo
Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.HorizonDb/locations/eastus2/operationStatuses/33333333-3333-3333-3333-333333333333?api-version=2026-10-01-preview
Retry-After: 30
{
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/restored-cluster",
"name": "restored-cluster",
"type": "Microsoft.HorizonDb/clusters",
"location": "eastus2",
"properties": {
"postgreSqlVersion": "17",
"creationMode": "PointInTimeRestore",
"pointInTimeUtc": "2026-07-27T12:00:00Z",
"creationSourceClusterResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/source-cluster",
"network": {
"publicAccess": "Disabled"
},
"backup": {
"geoRedundancy": "Enabled",
"retentionDays": 14
},
"state": "Provisioning",
"provisioningState": "Provisioning",
"readWritePool": {}
}
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.HorizonDb/locations/eastus2/operationStatuses/33333333-3333-3333-3333-333333333333?api-version=2026-10-01-preview
Retry-After: 30
{
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/restored-cluster",
"name": "restored-cluster",
"type": "Microsoft.HorizonDb/clusters",
"location": "eastus2",
"properties": {
"postgreSqlVersion": "17",
"creationMode": "PointInTimeRestore",
"pointInTimeUtc": "2026-07-27T12:00:00Z",
"creationSourceClusterResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/example-resource-group/providers/Microsoft.HorizonDb/clusters/source-cluster",
"network": {
"publicAccess": "Disabled"
},
"backup": {
"geoRedundancy": "Enabled",
"retentionDays": 14
},
"state": "Provisioning",
"provisioningState": "Provisioning",
"readWritePool": {}
}
}
Definições
| Nome |
Descrição |
|
AiModelManagementStatus
|
O status de Gerenciamento de Modelos de IA para um cluster do HorizonDB.
|
|
BackupProperties
|
Propriedades de configuração de backup para um cluster HorizonDB.
|
|
Cluster
|
Representa o cluster HorizonDB.
|
|
ClusterCreateMode
|
Controle como uma solicitação PUT do cluster HorizonDB é processada.
|
|
ClusterProperties
|
Propriedades de um cluster HorizonDB.
|
|
ClusterState
|
Estado atual de um cluster do HorizonDB.
|
|
createdByType
|
O tipo de identidade que criou o recurso.
|
|
ErrorAdditionalInfo
|
Informações adicionais sobre o erro de gerenciamento de recursos.
|
|
ErrorDetail
|
O detalhe do erro.
|
|
ErrorResponse
|
Resposta de erro
|
|
GeoRedundancyState
|
Indica o estado de geo-redundância.
|
|
HorizonDbClusterDataEncryption
|
A configuração de criptografia de dados em nível de cluster. O tipo de criptografia é selecionado na criação do cluster; a alternância entre SystemManaged e AzureKeyVault após a criação não é suportada. Para criptografia AzureKeyVault, primaryKeyUri e primaryUserAssignedIdentityId são necessários, e backup.geoRedundancy deve ser desativado. Tanto primaryKeyUri quanto primaryUserAssignedIdentityId podem ser fornecidos durante a criação inicial do cluster. Para atualizações de um cluster existente via PUT ou PATCH, apenas uma dessas propriedades pode ser alterada por requisição, e essa atualização deve ser concluída antes de enviar uma atualização separada para alterar a outra propriedade. As identidades-chave gerenciadas pelo cliente também devem ser atribuídas ao Cluster por meio de sua propriedade de identidade de nível superior. Apenas URIs de chave do Azure Key Vault sem versão são suportados; caminhos de versão de chave são rejeitados. Para criptografia SystemManageed, propriedades de chave e identidade devem ser omitidas.
|
|
HorizonDbClusterDataEncryptionType
|
O tipo de criptografia de dados usado por um cluster HorizonDB. O tipo é selecionado na criação do cluster; a alternância entre SystemManaged e AzureKeyVault após a criação não é suportada.
|
|
HorizonDbClusterEncryptionKeyStatus
|
O status de validação de uma chave de criptografia gerenciada pelo cliente usada por um cluster HorizonDB.
|
|
HorizonDbClusterIdentityType
|
Os tipos de identidade gerenciada suportados por um cluster HorizonDB.
|
|
HorizonDbClusterManagedServiceIdentity
|
As identidades gerenciadas atribuídas pelo usuário são atribuídas a um cluster do HorizonDB. Omitir toda a propriedade de identidade de nível superior do PUT ou PATCH preserva todas as atribuições atuais. Quando userAssignedIdentities é fornecido, PUT substitui o conjunto completo e PATCH funde as entradas fornecidas com o conjunto existente; uma entrada PATCH nula remove essa identidade individual. Definir o tipo para Nenhum elimina todas as atribuições. Remover uma identidade referenciada por uma atribuição de identidade de captura de dados de mudança é rejeitada até que a atribuição de referência seja excluída.
|
|
Network
|
Propriedades de rede.
|
|
PostgreSqlVersion
|
Uma versão principal para PostgreSQL suportada pelo HorizonDB. A versão API 2026-10-01-preview aceita as versões 17 e 18. Versões futuras da API podem adicionar valores nomeados, e os clientes devem tolerar valores desconhecidos retornados pelo serviço.
|
|
ProvisioningState
|
O estado de provisionamento.
|
|
PublicNetworkAccessState
|
Indica se o acesso à rede pública está habilitado ou não.
|
|
ReadWritePoolProperties
|
O pool atualmente designado para hospedar o nó de leitura-escrita de um cluster HorizonDB. Quando um pool é criado enquanto o cluster atualmente não possui pools, o serviço automaticamente designa o novo pool como pool de leitura-escrita. Esse comportamento também se aplica após todos os pools que existiam anteriormente na vida útil do cluster terem sido deletados.
|
|
systemData
|
Metadados relativos à criação e última modificação do recurso.
|
|
UserAssignedIdentity
|
Propriedades de identidade atribuídas pelo usuário
|
AiModelManagementStatus
Enumeração
O status de Gerenciamento de Modelos de IA para um cluster do HorizonDB.
| Valor |
Descrição |
|
Enabled
|
O Gerenciamento de Modelos de IA está habilitado.
|
|
Disabled
|
O gerenciamento de modelos de IA está desativado.
|
BackupProperties
Objeto
Propriedades de configuração de backup para um cluster HorizonDB.
| Nome |
Tipo |
Valor padrão |
Descrição |
|
earliestRestorePointUtc
|
string
(date-time)
|
|
O ponto mais antigo, no UTC, para o qual o aglomerado pode atualmente ser restaurado.
|
|
geoRedundancy
|
GeoRedundancyState
|
|
O estado de geo-redundância. Backup geo-redundante não é suportado quando dataEncryption.type é AzureKeyVault.
|
|
retentionDays
|
integer
(int32)
minimum: 1 maximum: 35
|
7
|
O número de dias em que backups automáticos são mantidos. O serviço tem como padrão 7 dias quando essa característica é omitida.
|
Cluster
Objeto
Representa o cluster HorizonDB.
| Nome |
Tipo |
Descrição |
|
id
|
string
(arm-id)
|
ID de recurso totalmente qualificada para o recurso. Por exemplo, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
identity
|
HorizonDbClusterManagedServiceIdentity
|
As identidades de serviço gerenciadas atribuídas a esse recurso. Omitir toda a propriedade de identidade do PUT ou PATCH preserva todas as atribuições atuais. Quando fornecido, o PUT substitui o conjunto de identidades atribuído pelo usuário e o PATCH o funde; entradas nulas do dicionário PATCH removem identidades individuais. Definir o tipo para Nenhum elimina todas as atribuições.
|
|
location
|
string
|
A geolocalização onde o recurso reside
|
|
name
|
string
|
O nome do recurso
|
|
properties
|
ClusterProperties
|
As propriedades específicas do recurso para esse recurso.
|
|
systemData
|
systemData
|
Metadados do Azure Resource Manager que contêm informações createdBy e modifiedBy.
|
|
tags
|
object
|
Tags de recursos.
|
|
type
|
string
|
O tipo do recurso. Por exemplo, "Microsoft.Compute/virtualMachines" ou "Microsoft.Storage/storageAccounts"
|
ClusterCreateMode
Enumeração
Controle como uma solicitação PUT do cluster HorizonDB é processada.
| Valor |
Descrição |
|
Create
|
Processe a solicitação como uma criação normal de cluster.
|
|
PointInTimeRestore
|
Crie o cluster a partir de uma restauração em um momento no tempo.
|
ClusterProperties
Objeto
Propriedades de um cluster HorizonDB.
| Nome |
Tipo |
Descrição |
|
aiModelManagement
|
AiModelManagementStatus
|
Especifica se o Gerenciamento de Modelos de IA está ativado para o cluster.
|
|
backup
|
BackupProperties
|
A configuração de backup do cluster.
|
|
creationMode
|
ClusterCreateMode
|
O modo usado para criar o cluster. Quando essa propriedade é omitida ao criar um novo cluster, o serviço registra Criar. PointInTimeRestore cria um novo cluster a partir de um backup disponível; pointInTimeUtc e creationSourceClusterResourceId são então necessários, postgreSqlVersion deve ser omitido porque é obtido a partir dos metadados do backup, e creationSourceClusterLocation é necessário quando as localizações de cluster de origem e destino diferem. Essa propriedade é imutável e é retornada como proveniência de criação. Na substituição, a omissão preserva o valor registrado, reenviar o mesmo valor é aceito e a alteração é rejeitada.
|
|
creationSourceClusterLocation
|
string
|
A localização do Azure do cluster HorizonDB de origem usado para restauração ponto no tempo. Essa propriedade é opcional quando as localizações dos clusters de origem e destino são as mesmas. É necessário quando a localização do cluster de origem difere da localização do cluster de destino e deve identificar a localização do cluster de origem. Essa propriedade deve estar ausente para modos de criação que não sejam PointInTimeRestore ou quando creationMode for omitido. Esse valor de proveniência de criação imutável não muda após a criação.
|
|
creationSourceClusterResourceId
|
string
(arm-id)
|
O ID de recurso Azure do cluster HorizonDB de origem usado pelo modo de criação selecionado. Essa propriedade é necessária para o PointInTimeRestore e outros modos de criação baseados em código-fonte, e deve estar ausente quando creationMode for Create ou omitido. Um cluster de código não precisa ter um pool para ser restaurado, desde que exista um backup disponível. Esse valor de proveniência de criação imutável não muda após a criação.
|
|
dataEncryption
|
HorizonDbClusterDataEncryption
|
A configuração de criptografia de dados para o cluster. Quando omitido durante a criação inicial do cluster, o serviço utiliza criptografia SystemManageed. Quando fornecido durante a criação inicial do cluster, o tipo é necessário. Para atualizações PUT de um cluster existente, o tipo pode ser omitido; se fornecida, ele deve corresponder ao tipo de criptografia existente. O tipo de criptografia é selecionado na criação do cluster; a alternância entre SystemManaged e AzureKeyVault após a criação não é suportada.
|
|
network
|
Network
|
A configuração da rede do cluster. Quando esse objeto é omitido, o serviço o define como publicAccess Desabilitado.
|
|
pointInTimeUtc
|
string
(date-time)
|
O ponto no tempo solicitado, no UTC. Essa propriedade é necessária em todas as solicitações do PointInTimeRe. Para uma restauração no mesmo local, o serviço restaura o backup mais recente disponível a partir desse valor ou antes. Para uma restauração entre localizações, o serviço requer, mas ignora esse valor e restaura o backup disponível mais recente; respostas entre localizações omitem essa propriedade. Essa propriedade deve estar ausente para outros modos de criação ou quando creationMode for omitido e só pode ser especificada durante a criação de recursos.
|
|
postgreSqlVersion
|
PostgreSqlVersion
|
A versão principal do PostgreSQL usada pelo cluster HorizonDB. A versão API 2026-10-01-preview suporta as versões 17 e 18. Para a criação comum de clusters, a versão é fornecida no pedido e permanece imutável após a criação. Para restauração pontual, o serviço obtém a versão a partir dos metadados de backup de origem e a solicitação deve omitir essa propriedade. Esta versão da API não suporta atualizações principais de PostgreSQL no local.
|
|
provisioningState
|
ProvisioningState
|
O estado de provisionamento do cluster.
|
|
readWritePool
|
ReadWritePoolProperties
|
O pool atualmente designado para hospedar o nó de leitura-gravação do cluster.
|
|
state
|
ClusterState
|
Estado atual do aglomerado.
|
ClusterState
Enumeração
Estado atual de um cluster do HorizonDB.
| Valor |
Descrição |
|
Ready
|
Está pronto e operacional
|
|
Provisioning
|
É provisionamento
|
|
Deleting
|
Está sendo deletado
|
|
Inaccessible
|
É inacessível
|
|
Updating
|
Está sendo atualizado
|
createdByType
Enumeração
O tipo de identidade que criou o recurso.
| Valor |
Descrição |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
ErrorAdditionalInfo
Objeto
Informações adicionais sobre o erro de gerenciamento de recursos.
| Nome |
Tipo |
Descrição |
|
info
|
object
|
As informações adicionais.
|
|
type
|
string
|
O tipo de informação adicional.
|
ErrorDetail
Objeto
O detalhe do erro.
| Nome |
Tipo |
Descrição |
|
additionalInfo
|
ErrorAdditionalInfo[]
|
Informações adicionais do erro.
|
|
code
|
string
|
O código de erro.
|
|
details
|
ErrorDetail[]
|
Os detalhes do erro.
|
|
message
|
string
|
A mensagem de erro.
|
|
target
|
string
|
O alvo do erro.
|
ErrorResponse
Objeto
Resposta de erro
| Nome |
Tipo |
Descrição |
|
error
|
ErrorDetail
|
O objeto de erro.
|
GeoRedundancyState
Enumeração
Indica o estado de geo-redundância.
| Valor |
Descrição |
|
Enabled
|
A geo-redundância está ativada. Esse valor não é suportado quando dataEncryption.type é AzureKeyVault.
|
|
Disabled
|
A geo-redundância está desativada
|
HorizonDbClusterDataEncryption
Objeto
A configuração de criptografia de dados em nível de cluster. O tipo de criptografia é selecionado na criação do cluster; a alternância entre SystemManaged e AzureKeyVault após a criação não é suportada. Para criptografia AzureKeyVault, primaryKeyUri e primaryUserAssignedIdentityId são necessários, e backup.geoRedundancy deve ser desativado. Tanto primaryKeyUri quanto primaryUserAssignedIdentityId podem ser fornecidos durante a criação inicial do cluster. Para atualizações de um cluster existente via PUT ou PATCH, apenas uma dessas propriedades pode ser alterada por requisição, e essa atualização deve ser concluída antes de enviar uma atualização separada para alterar a outra propriedade. As identidades-chave gerenciadas pelo cliente também devem ser atribuídas ao Cluster por meio de sua propriedade de identidade de nível superior. Apenas URIs de chave do Azure Key Vault sem versão são suportados; caminhos de versão de chave são rejeitados. Para criptografia SystemManageed, propriedades de chave e identidade devem ser omitidas.
| Nome |
Tipo |
Descrição |
|
primaryEncryptionKeyCurrentVersion
|
string
|
A versão atual da chave de criptografia principal usada pelo cluster. Essa propriedade é retornada para criptografia AzureKeyVault e está ausente para criptografia SystemManageed.
|
|
primaryEncryptionKeyStatus
|
HorizonDbClusterEncryptionKeyStatus
|
O status de validação da chave principal de criptografia. Essa propriedade é retornada para criptografia AzureKeyVault e está ausente para criptografia SystemManageed.
|
|
primaryKeyUri
|
string
(uri)
pattern: ^https://[A-Za-z0-9-]+[.]vault([.]azure[.]net|[.]usgovcloudapi[.]net|[.]azure[.]cn)/keys/[A-Za-z0-9-]+/?$
|
O URI da chave sem versão do Azure Key Vault era usado para criptografar o armazenamento principal do cluster. Caminhos de versão chave não são suportados. Durante a criação inicial do cluster, essa propriedade pode ser fornecida junto com o primaryUserAssignedIdentityId. Para atualizações de um cluster existente via PUT ou PATCH, essa propriedade e o primárioUserAssignedIdentityId não podem ser alterados na mesma solicitação; a primeira atualização deve ser concluída antes de enviar uma atualização separada para a outra propriedade.
|
|
primaryUserAssignedIdentityId
|
string
(arm-id)
|
O ID de recurso Azure da identidade gerenciada atribuída pelo usuário usada para acessar a chave principal de criptografia. A identidade também deve ser atribuída ao Cluster por meio de sua propriedade de identidade de nível superior. Durante a criação inicial do cluster, essa propriedade pode ser fornecida junto com o primaryKeyUri. Para atualizações de um cluster existente via PUT ou PATCH, essa propriedade e o primárioKeyUri não podem ser alterados na mesma solicitação; a primeira atualização deve ser concluída antes de enviar uma atualização separada para a outra propriedade.
|
|
type
|
HorizonDbClusterDataEncryptionType
|
O tipo de criptografia de dados usada pelo cluster. Quando a configuração de criptografia de dados é fornecida durante a criação inicial do cluster, essa propriedade é necessária. Para atualizações PUT de um cluster existente, essa propriedade pode ser omitida; se fornecida, ela deve corresponder ao tipo de criptografia existente. Esse valor é selecionado na criação do cluster e não pode ser alterado posteriormente de SystemManaged para AzureKeyVault ou de AzureKeyVault para SystemManaged.
|
HorizonDbClusterDataEncryptionType
Enumeração
O tipo de criptografia de dados usado por um cluster HorizonDB. O tipo é selecionado na criação do cluster; a alternância entre SystemManaged e AzureKeyVault após a criação não é suportada.
| Valor |
Descrição |
|
SystemManaged
|
A criptografia de dados é gerenciada pelo Azure usando chaves gerenciadas pela plataforma.
|
|
AzureKeyVault
|
A criptografia de dados utiliza chaves gerenciadas pelo cliente armazenadas no Azure Key Vault.
|
HorizonDbClusterEncryptionKeyStatus
Enumeração
O status de validação de uma chave de criptografia gerenciada pelo cliente usada por um cluster HorizonDB.
| Valor |
Descrição |
|
Valid
|
A chave de criptografia é válida e acessível à identidade gerenciada designada pelo usuário configurada.
|
|
Invalid
|
A chave de criptografia é inválida ou inacessível à identidade gerenciada atribuída pelo usuário configurada.
|
HorizonDbClusterIdentityType
Enumeração
Os tipos de identidade gerenciada suportados por um cluster HorizonDB.
| Valor |
Descrição |
|
None
|
Nenhuma identidade gerenciada é atribuída. Definir o tipo para Nenhum limpa todas as atribuições de identidade gerenciadas.
|
|
UserAssigned
|
Identidades gerenciadas atribuídas pelo usuário são atribuídas.
|
HorizonDbClusterManagedServiceIdentity
Objeto
As identidades gerenciadas atribuídas pelo usuário são atribuídas a um cluster do HorizonDB. Omitir toda a propriedade de identidade de nível superior do PUT ou PATCH preserva todas as atribuições atuais. Quando userAssignedIdentities é fornecido, PUT substitui o conjunto completo e PATCH funde as entradas fornecidas com o conjunto existente; uma entrada PATCH nula remove essa identidade individual. Definir o tipo para Nenhum elimina todas as atribuições. Remover uma identidade referenciada por uma atribuição de identidade de captura de dados de mudança é rejeitada até que a atribuição de referência seja excluída.
| Nome |
Tipo |
Descrição |
|
type
|
HorizonDbClusterIdentityType
|
O tipo de identidade gerenciada atribuído ao cluster. Definir essa propriedade como Nenhum limpa todas as atribuições de identidade gerenciadas.
|
|
userAssignedIdentities
|
<string,
UserAssignedIdentity>
|
As identidades gerenciadas atribuídas pelo usuário associadas ao cluster. Quando fornecido no PUT, este dicionário substitui o conjunto completo de atribuições. Quando fornecido no PATCH, as entradas são fundidas com o conjunto existente e um valor nulo remove a identidade correspondente. Cada chave de dicionário deve ser o ID completo do recurso Azure de uma Microsoft. Recurso Managed Identity/userAssignedIdentities. Valores de requisição não nulos podem ser objetos vazios; valores de resposta contêm o clientId e o principalId, preenchidos pelo serviço. Atribuir uma identidade não concede acesso aos recursos de destino; as atribuições de funções necessárias devem ser configuradas separadamente.
|
Network
Objeto
Propriedades de rede.
| Nome |
Tipo |
Valor padrão |
Descrição |
|
publicAccess
|
PublicNetworkAccessState
|
Disabled
|
Especifica se o acesso público está habilitado para o cluster. O serviço passa a ser desativado por padrão quando essa propriedade é omitida.
|
PostgreSqlVersion
Enumeração
Uma versão principal para PostgreSQL suportada pelo HorizonDB. A versão API 2026-10-01-preview aceita as versões 17 e 18. Versões futuras da API podem adicionar valores nomeados, e os clientes devem tolerar valores desconhecidos retornados pelo serviço.
| Valor |
Descrição |
|
17
|
PostgreSQL versão principal 17.
|
|
18
|
PostgreSQL versão principal 18.
|
ProvisioningState
Enumeração
O estado de provisionamento.
| Valor |
Descrição |
|
Succeeded
|
O recurso foi criado.
|
|
Failed
|
Falha na criação de recursos.
|
|
Canceled
|
A criação de recursos foi cancelada.
|
|
InProgress
|
A operação de recursos do HorizonDB está em execução ativa.
|
|
Provisioning
|
O recurso do HorizonDB ainda está sendo provisionado.
|
PublicNetworkAccessState
Enumeração
Indica se o acesso à rede pública está habilitado ou não.
| Valor |
Descrição |
|
Enabled
|
O acesso à rede pública é habilitado
|
|
Disabled
|
O acesso à rede pública está desativado
|
ReadWritePoolProperties
Objeto
O pool atualmente designado para hospedar o nó de leitura-escrita de um cluster HorizonDB. Quando um pool é criado enquanto o cluster atualmente não possui pools, o serviço automaticamente designa o novo pool como pool de leitura-escrita. Esse comportamento também se aplica após todos os pools que existiam anteriormente na vida útil do cluster terem sido deletados.
| Nome |
Tipo |
Descrição |
|
designatedPoolResourceId
|
string
(arm-id)
|
O ID de recurso Azure do pool designado para hospedar o nó de leitura-escrita do cluster. O pool é um recurso filho desse cluster. Quando um pool é criado enquanto o cluster atualmente não possui pools, o serviço define automaticamente essa propriedade para o ID de recurso do novo pool, incluindo quando todos os pools que existiam anteriormente na vida útil do cluster foram deletados. Essa propriedade está ausente quando nenhum pool é designado, como após o sucesso do clearReadWritePool.
|
systemData
Objeto
Metadados relativos à criação e última modificação do recurso.
| Nome |
Tipo |
Descrição |
|
createdAt
|
string
(date-time)
|
O registro de data e hora da criação do recurso (UTC).
|
|
createdBy
|
string
|
A identidade que criou o recurso.
|
|
createdByType
|
createdByType
|
O tipo de identidade que criou o recurso.
|
|
lastModifiedAt
|
string
(date-time)
|
O carimbo de data/hora da última modificação do recurso (UTC)
|
|
lastModifiedBy
|
string
|
A identidade que modificou o recurso pela última vez.
|
|
lastModifiedByType
|
createdByType
|
O tipo de identidade que modificou o recurso pela última vez.
|
UserAssignedIdentity
Objeto
Propriedades de identidade atribuídas pelo usuário
| Nome |
Tipo |
Descrição |
|
clientId
|
string
(uuid)
|
A ID do cliente da identidade atribuída.
|
|
principalId
|
string
(uuid)
|
A ID da entidade de segurança da identidade atribuída.
|