Cria um novo cluster HorizonDB ou substitui um cluster existente. O PointInTimeRestore cria o novo recurso Cluster e alimenta o armazenamento da base de dados detido pelo serviço a partir de uma cópia de segurança de origem disponível. Não clona pools de código-fonte, endpoints com alcance de pool, regras de firewall, associações a grupos de parâmetros ou outros recursos filhos. O novo Cluster recebe o seu Endpoint Cluster-Scoped gerado por serviços, denominado cluster. Para restaurar, o postgreSqlVersion deve ser omitido porque o serviço obtém-no a partir dos metadados de backup; todas as outras configurações de novo cluster provêm dos predefinidos de pedidos ou serviços. 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 Azure do cluster de origem e requer pointInTimeUtc, mas ignora o carimbo temporal 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 do 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 faz distinção entre maiúsculas e minúsculas.
|
|
subscriptionId
|
path |
True
|
string
(uuid)
|
O ID da assinatura de destino. O valor deve ser um UUID.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
A versão da API a utilizar para esta operação.
|
Corpo do Pedido
| Nome |
Obrigatório |
Tipo |
Descrição |
|
location
|
True
|
string
|
A geolocalização onde o recurso vive
|
|
identity
|
|
HorizonDbClusterManagedServiceIdentity
|
As identidades de serviço gerenciado atribuídas a este 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 utilizador e o PATCH funde-o; 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 este recurso.
|
|
tags
|
|
object
|
Tags de recursos.
|
Respostas
| Nome |
Tipo |
Descrição |
|
200 OK
|
Cluster
|
A resposta regressa quando uma substituição assíncrona do cluster HorizonDB é aceite.
Cabeçalhos
- Azure-AsyncOperation: string
- Retry-After: integer
|
|
201 Created
|
Cluster
|
A resposta é dada quando a criação assíncrona do cluster HorizonDB é aceite.
Cabeçalhos
- Azure-AsyncOperation: string
- Retry-After: integer
|
|
Other Status Codes
|
ErrorResponse
|
Uma resposta de erro inesperada.
|
Segurança
azure_auth
Fluxo OAuth2 do Azure Active Directory.
Tipo:
oauth2
Fluxo:
implicit
URL de Autorização:
https://login.microsoftonline.com/common/oauth2/authorize
Âmbitos
| Nome |
Descrição |
|
user_impersonation
|
assumir a identidade da sua conta de utilizador
|
Exemplos
Create a HorizonDB cluster with customer-managed key data encryption
Pedido de amostra
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 da amostra
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
Pedido de amostra
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 da amostra
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
Pedido de amostra
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 da amostra
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
Pedido de amostra
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 da amostra
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
Pedido de amostra
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 da amostra
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 estado da Gestão de Modelos de IA para um cluster HorizonDB.
|
|
BackupProperties
|
Propriedades de configuração de backup para um cluster HorizonDB.
|
|
Cluster
|
Representa o cluster HorizonDB.
|
|
ClusterCreateMode
|
Controla como um pedido PUT de cluster HorizonDB é processado.
|
|
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 gestão de recursos.
|
|
ErrorDetail
|
O detalhe do erro.
|
|
ErrorResponse
|
Resposta de erro
|
|
GeoRedundancyState
|
Indica o estado de redundância geográfica.
|
|
HorizonDbClusterDataEncryption
|
A configuração de encriptação de dados ao nível do Cluster. O tipo de encriptação é selecionado na criação do cluster; a alternância entre SystemManaged e AzureKeyVault após a criação não é suportada. Para encriptação AzureKeyVault, são necessários primaryKeyUri e primaryUserAssignedIdentityId, e o backup.geoRedundancy deve ser desativado. Tanto o primaryKeyUri como o primaryUserAssignedIdentityId podem ser fornecidos durante a criação inicial do cluster. Para atualizações de um cluster existente através de PUT ou PATCH, apenas uma destas propriedades pode ser alterada por pedido, e essa atualização deve ser concluída antes de submeter uma atualização separada para alterar a outra propriedade. As identidades-chave geridas pelo cliente também devem ser atribuídas ao Cluster através da sua propriedade de identidade de nível superior. Apenas URIs de chave do Azure Key Vault sem versão são suportados; os caminhos de versão de chave são rejeitados. Para a encriptação SystemManaged, as propriedades de chave e identidade devem ser omitidas.
|
|
HorizonDbClusterDataEncryptionType
|
O tipo de encriptação 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 estado de validação de uma chave de encriptação gerida pelo cliente usada por um cluster HorizonDB.
|
|
HorizonDbClusterIdentityType
|
Os tipos de identidade geridos suportados por um cluster HorizonDB.
|
|
HorizonDbClusterManagedServiceIdentity
|
As identidades geridas atribuídas pelo utilizador são atribuídas a um cluster HorizonDB. Omitir toda a propriedade de identidade de topo do PUT ou PATCH preserva todas as atribuições atuais. Quando o userAssignedIdentities é fornecido, o PUT substitui o conjunto completo e o 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 alteração é rejeitada até que a atribuição de referência seja eliminada.
|
|
Network
|
Propriedades de rede.
|
|
PostgreSqlVersion
|
Uma versão principal do 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 devolvidos pelo serviço.
|
|
ProvisioningState
|
O estado de provisionamento.
|
|
PublicNetworkAccessState
|
Indica se o acesso à rede pública está habilitado ou não.
|
|
ReadWritePoolProperties
|
O pool está atualmente designado para alojar o nó de leitura-escrita de um cluster HorizonDB. Quando um pool é criado enquanto o cluster atualmente não tem pools, o serviço designa automaticamente o novo pool como pool de leitura-escrita. Este comportamento também se aplica depois de todos os pools que existiam anteriormente na vida útil do cluster terem sido eliminados.
|
|
systemData
|
Metadados referentes à criação e última modificação do recurso.
|
|
UserAssignedIdentity
|
Propriedades de identidade atribuídas pelo usuário
|
AiModelManagementStatus
Enumeração
O estado da Gestão de Modelos de IA para um cluster HorizonDB.
| Valor |
Descrição |
|
Enabled
|
A Gestão de Modelos de IA está ativada.
|
|
Disabled
|
A Gestão de Modelos de IA está desativada.
|
BackupProperties
Object
Propriedades de configuração de backup para um cluster HorizonDB.
| Nome |
Tipo |
Valor predefinido |
Descrição |
|
earliestRestorePointUtc
|
string
(date-time)
|
|
O ponto mais antigo no tempo, no UTC, onde o aglomerado pode atualmente ser restaurado.
|
|
geoRedundancy
|
GeoRedundancyState
|
|
O estado de geo-redundância. Backup geo-redundante não é suportado quando o dataEncryption.type é AzureKeyVault.
|
|
retentionDays
|
integer
(int32)
minimum: 1 maximum: 35
|
7
|
O número de dias em que as cópias de segurança automáticas são mantidas. O serviço passa por defeito a 7 dias quando esta característica é omitida.
|
Cluster
Object
Representa o cluster HorizonDB.
| Nome |
Tipo |
Descrição |
|
id
|
string
(arm-id)
|
ID de recurso totalmente qualificado para o recurso. Por exemplo, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
identity
|
HorizonDbClusterManagedServiceIdentity
|
As identidades de serviço gerenciado atribuídas a este 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 utilizador e o PATCH funde-o; 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 vive
|
|
name
|
string
|
O nome do recurso
|
|
properties
|
ClusterProperties
|
As propriedades específicas do recurso para este recurso.
|
|
systemData
|
systemData
|
Metadados do Azure Resource Manager contendo 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
Controla como um pedido PUT de cluster HorizonDB é processado.
| Valor |
Descrição |
|
Create
|
Processe o pedido como uma criação normal de cluster.
|
|
PointInTimeRestore
|
Crie o cluster a partir de uma restauração num momento no tempo.
|
ClusterProperties
Object
Propriedades de um cluster HorizonDB.
| Nome |
Tipo |
Descrição |
|
aiModelManagement
|
AiModelManagementStatus
|
Especifica se a Gestão de Modelos de IA está ativada para o cluster.
|
|
backup
|
BackupProperties
|
A configuração de backup para o cluster.
|
|
creationMode
|
ClusterCreateMode
|
O modo usado para criar o cluster. Quando esta propriedade é omitida ao criar um novo cluster, o serviço regista Criar. O PointInTimeRestore cria um novo cluster a partir de um backup disponível; pointInTimeUtc e creationSourceClusterResourceId são então necessários, o postgreSqlVersion deve ser omitido porque é obtido a partir dos metadados do backup, e creationSourceClusterLocation é necessário quando as localizações do cluster de origem e destino diferem. Esta propriedade é imutável e é devolvida como proveniência de criação. Na substituição, a omissão preserva o valor registado, aceite-se novamente o mesmo valor e a alteração é rejeitada.
|
|
creationSourceClusterLocation
|
string
|
A localização do Azure do cluster HorizonDB de origem usado para restauração em ponto no tempo. Esta propriedade é opcional quando as localizações dos clusters de origem e destino são as mesmas. É necessária quando a localização do cluster de origem difere da localização do cluster de origem e deve identificar a localização do cluster de origem. Esta propriedade deve estar ausente para modos de criação que não sejam PointInTimeRestore ou quando creationMode for omitido. Este 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. Esta 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 origem não precisa de ter um pool para ser restaurado, desde que exista uma cópia de segurança disponível. Este valor de proveniência de criação imutável não muda após a criação.
|
|
dataEncryption
|
HorizonDbClusterDataEncryption
|
A configuração de encriptação de dados para o cluster. Quando omitido durante a criação inicial do cluster, o serviço utiliza encriptação SystemManageed. Quando fornecido durante a criação inicial do cluster, é necessário o tipo. Para atualizações PUT de um cluster existente, o tipo pode ser omitido; se for, deve corresponder ao tipo de encriptação existente. O tipo de encriptação é 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 este objeto é omitido, o serviço coloca-o por defeito como publicAccess Disabled.
|
|
pointInTimeUtc
|
string
(date-time)
|
O ponto temporal pedido, no UTC. Esta propriedade é necessária em todos os pedidos PointInTimeRestore. Para uma restauração no mesmo local, o serviço restaura a cópia de segurança mais recente disponível a este valor ou antes. Para uma restauração entre localizações, o serviço requer este valor mas ignora e restaura a última cópia de segurança disponível; as respostas entre localizações omitem esta propriedade. Esta propriedade deve estar ausente para outros modos de criação ou quando o creationMode é 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 ordinária 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 o pedido deve omitir esta 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 alojar o nó de leitura-escrita 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
|
É o provisionamento
|
|
Deleting
|
Está a ser eliminado
|
|
Inaccessible
|
É inacessível
|
|
Updating
|
Está a ser atualizado
|
createdByType
Enumeração
O tipo de identidade que criou o recurso.
| Valor |
Descrição |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
ErrorAdditionalInfo
Object
Informações adicionais sobre o erro de gestão de recursos.
| Nome |
Tipo |
Descrição |
|
info
|
object
|
As informações adicionais.
|
|
type
|
string
|
O tipo de informação adicional.
|
ErrorDetail
Object
O detalhe do erro.
| Nome |
Tipo |
Descrição |
|
additionalInfo
|
ErrorAdditionalInfo[]
|
As 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
Object
Resposta de erro
| Nome |
Tipo |
Descrição |
|
error
|
ErrorDetail
|
O objeto de erro.
|
GeoRedundancyState
Enumeração
Indica o estado de redundância geográfica.
| Valor |
Descrição |
|
Enabled
|
A geo-redundância está ativada. Este valor não é suportado quando dataEncryption.type é AzureKeyVault.
|
|
Disabled
|
A geo-redundância está desativada
|
HorizonDbClusterDataEncryption
Object
A configuração de encriptação de dados ao nível do Cluster. O tipo de encriptação é selecionado na criação do cluster; a alternância entre SystemManaged e AzureKeyVault após a criação não é suportada. Para encriptação AzureKeyVault, são necessários primaryKeyUri e primaryUserAssignedIdentityId, e o backup.geoRedundancy deve ser desativado. Tanto o primaryKeyUri como o primaryUserAssignedIdentityId podem ser fornecidos durante a criação inicial do cluster. Para atualizações de um cluster existente através de PUT ou PATCH, apenas uma destas propriedades pode ser alterada por pedido, e essa atualização deve ser concluída antes de submeter uma atualização separada para alterar a outra propriedade. As identidades-chave geridas pelo cliente também devem ser atribuídas ao Cluster através da sua propriedade de identidade de nível superior. Apenas URIs de chave do Azure Key Vault sem versão são suportados; os caminhos de versão de chave são rejeitados. Para a encriptação SystemManaged, as propriedades de chave e identidade devem ser omitidas.
| Nome |
Tipo |
Descrição |
|
primaryEncryptionKeyCurrentVersion
|
string
|
A versão atual da chave principal de encriptação usada pelo cluster. Esta propriedade é devolvida para a encriptação AzureKeyVault e está ausente para a encriptação SystemManageed.
|
|
primaryEncryptionKeyStatus
|
HorizonDbClusterEncryptionKeyStatus
|
O estado de validação da chave principal de encriptação. Esta propriedade é devolvida para a encriptação AzureKeyVault e está ausente para a encriptação 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 Azure Key Vault sem versão usado para encriptar o armazenamento principal do cluster. Os caminhos de versão chave não são suportados. Durante a criação inicial do cluster, esta propriedade pode ser fornecida juntamente com o primaryUserAssignedIdentityId. Para atualizações a um cluster existente através de PUT ou PATCH, esta propriedade e primaryUserAssignedIdentityId não podem ambas mudar no mesmo pedido; a primeira atualização deve ser concluída antes de submeter uma atualização separada para a outra propriedade.
|
|
primaryUserAssignedIdentityId
|
string
(arm-id)
|
O ID de recurso Azure da identidade gerida atribuída pelo utilizador usada para aceder à chave principal de encriptação. A identidade deve também ser atribuída ao Cluster através da sua propriedade de identidade de nível superior. Durante a criação inicial do cluster, esta propriedade pode ser fornecida juntamente com o primaryKeyUri. Para atualizações de um cluster existente através de PUT ou PATCH, esta propriedade e o primaryKeyUri não podem ser alterados no mesmo pedido; a primeira atualização deve ser concluída antes de submeter uma atualização separada para a outra propriedade.
|
|
type
|
HorizonDbClusterDataEncryptionType
|
O tipo de encriptação de dados utilizado pelo cluster. Quando a configuração de encriptação de dados é fornecida durante a criação inicial do cluster, esta propriedade é necessária. Para atualizações PUT de um cluster existente, esta propriedade pode ser omitida; se fornecida, deve corresponder ao tipo de encriptação existente. Este 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 encriptação 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 encriptação de dados é gerida pelo Azure utilizando chaves geridas pela plataforma.
|
|
AzureKeyVault
|
A encriptação de dados utiliza chaves geridas pelo cliente armazenadas no Azure Key Vault.
|
HorizonDbClusterEncryptionKeyStatus
Enumeração
O estado de validação de uma chave de encriptação gerida pelo cliente usada por um cluster HorizonDB.
| Valor |
Descrição |
|
Valid
|
A chave de encriptação é válida e acessível à identidade gerida atribuída pelo utilizador configurada.
|
|
Invalid
|
A chave de encriptação é inválida ou inacessível à identidade gerida atribuída pelo utilizador configurada.
|
HorizonDbClusterIdentityType
Enumeração
Os tipos de identidade geridos suportados por um cluster HorizonDB.
| Valor |
Descrição |
|
None
|
Não é atribuída uma identidade gerida. Definir o tipo para Nenhum limpa todas as atribuições de identidade geridas.
|
|
UserAssigned
|
São atribuídas identidades geridas atribuídas pelo utilizador.
|
HorizonDbClusterManagedServiceIdentity
Object
As identidades geridas atribuídas pelo utilizador são atribuídas a um cluster HorizonDB. Omitir toda a propriedade de identidade de topo do PUT ou PATCH preserva todas as atribuições atuais. Quando o userAssignedIdentities é fornecido, o PUT substitui o conjunto completo e o 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 alteração é rejeitada até que a atribuição de referência seja eliminada.
| Nome |
Tipo |
Descrição |
|
type
|
HorizonDbClusterIdentityType
|
O tipo de identidade gerida atribuído ao cluster. Definir esta propriedade para Nenhum apaga todas as atribuições de identidade geridas.
|
|
userAssignedIdentities
|
<string,
UserAssignedIdentity>
|
As identidades geridas atribuídas pelo utilizador 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. Os valores de pedido não nulos podem ser objetos vazios; os valores de resposta contêm o clientId e o principalId, preenchidos pelo serviço. Atribuir uma identidade não lhe concede acesso a recursos de destino; as atribuições de funções necessárias devem ser configuradas separadamente.
|
Network
Object
Propriedades de rede.
| Nome |
Tipo |
Valor predefinido |
Descrição |
|
publicAccess
|
PublicNetworkAccessState
|
Disabled
|
Especifica se o acesso público está ativado para o cluster. O serviço passa a desativar por defeito quando esta propriedade é omitida.
|
PostgreSqlVersion
Enumeração
Uma versão principal do 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 devolvidos 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á a correr ativamente.
|
|
Provisioning
|
O recurso do HorizonDB ainda está a ser 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 está ativado
|
|
Disabled
|
O acesso à rede pública está desativado
|
ReadWritePoolProperties
Object
O pool está atualmente designado para alojar o nó de leitura-escrita de um cluster HorizonDB. Quando um pool é criado enquanto o cluster atualmente não tem pools, o serviço designa automaticamente o novo pool como pool de leitura-escrita. Este comportamento também se aplica depois de todos os pools que existiam anteriormente na vida útil do cluster terem sido eliminados.
| Nome |
Tipo |
Descrição |
|
designatedPoolResourceId
|
string
(arm-id)
|
O ID de recurso Azure do pool designado para alojar o nó de leitura-escrita do cluster. O pool é um recurso filho deste cluster. Quando um pool é criado enquanto o cluster atualmente não tem pools, o serviço define automaticamente esta propriedade para o ID de recurso do novo pool, incluindo quando todos os pools que existiam anteriormente na vida útil do cluster foram eliminados. Esta propriedade está ausente quando nenhum pool é designado, como após o sucesso do clearReadWritePool.
|
systemData
Object
Metadados referentes à criação e última modificação do recurso.
| Nome |
Tipo |
Descrição |
|
createdAt
|
string
(date-time)
|
A marca temporal 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)
|
A data e 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
Object
Propriedades de identidade atribuídas pelo usuário
| Nome |
Tipo |
Descrição |
|
clientId
|
string
(uuid)
|
O ID do cliente da identidade atribuída.
|
|
principalId
|
string
(uuid)
|
O ID principal da identidade atribuída.
|