Tworzy nowy klaster HorizonDB lub zastępuje istniejący. PointInTimeRestore tworzy nowy zasób klastra i hydratuje swoją usługową bazę danych z dostępnej kopii zapasowej źródłowej. Nie klonuje pul źródłowych, punktów końcowych o skali puli, reguł zapory, skojarzeń grup parametrów ani innych zasobów potomnych. Nowy klaster otrzymuje swój serwisowy, klastrowy punkt końcowy o nazwie klaster. Do przywracania postgreSqlVersion musi zostać pominięty, ponieważ usługa pobiera ją z kopii zapasowych metadanych; cała inna konfiguracja nowego klastra pochodzi z domyślnych żądań lub usług. Przywracanie w tej samej lokalizacji wymaga i szanuje pointInTimeUtc oraz pozwala pominięcie creationSourceClusterLocation. Przywracanie między lokalizacjami wymaga creationSourceClusterLocation do identyfikacji lokalizacji Azure klastra źródłowego oraz wymaga pointInTimeUtc, ale ignoruje dostarczony znacznik czasu i przywraca najnowszą dostępną kopię zapasową. Odpowiedzi międzylokalizacyjne pomijają pointInTimeUtc.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}?api-version=2026-10-01-preview
Parametry identyfikatora URI
| Nazwisko |
W |
Wymagane |
Typ |
Opis |
|
clusterName
|
path |
True
|
string
minLength: 1 maxLength: 63 pattern: ^[a-z0-9](?:[-a-z0-9]*[a-z0-9])?$
|
Nazwa klastra HorizonDB.
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
Nazwa grupy zasobów. Nazwa jest niewrażliwa na wielkość liter.
|
|
subscriptionId
|
path |
True
|
string
(uuid)
|
Identyfikator subskrypcji docelowej. Wartość musi być identyfikatorem UUID.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
Wersja interfejsu API do użycia dla tej operacji.
|
Treść żądania
| Nazwisko |
Wymagane |
Typ |
Opis |
|
location
|
True
|
string
|
Lokalizacja geograficzna, w której znajduje się zasób
|
|
identity
|
|
HorizonDbClusterManagedServiceIdentity
|
Tożsamości usługi zarządzanej przypisane do tego zasobu. Pominięcie całej właściwości tożsamości w PUT lub PATCH zachowuje wszystkie aktualne przypisania. Gdy jest dostępny, PUT zastępuje zestaw tożsamości przypisany przez użytkownika, a PATCH go łączy; wpisy w słowniku PATCH PATCH usuwają indywidualne tożsamości. Ustawienie typu na Brak usuwa wszystkie zadania.
|
|
properties
|
|
ClusterProperties
|
Właściwości specyficzne dla zasobu dla tego zasobu.
|
|
tags
|
|
object
|
Tagi zasobów.
|
Odpowiedzi
| Nazwisko |
Typ |
Opis |
|
200 OK
|
Cluster
|
Odpowiedź wraca, gdy zaakceptowana jest asynchroniczna wymiana klastra HorizonDB.
Nagłówki
- Azure-AsyncOperation: string
- Retry-After: integer
|
|
201 Created
|
Cluster
|
Odpowiedź wraca, gdy asynchroniczne tworzenie klastra HorizonDB zostaje zaakceptowane.
Nagłówki
- Azure-AsyncOperation: string
- Retry-After: integer
|
|
Other Status Codes
|
ErrorResponse
|
Nieoczekiwana odpowiedź na błąd.
|
Zabezpieczenia
azure_auth
Przepływ OAuth2 w usłudze Azure Active Directory.
Typ:
oauth2
Flow:
implicit
Adres URL autoryzacji:
https://login.microsoftonline.com/common/oauth2/authorize
Zakresy
| Nazwisko |
Opis |
|
user_impersonation
|
podszywaj się pod konto użytkownika
|
Przykłady
Create a HorizonDB cluster with customer-managed key data encryption
Przykładowe żądanie
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
Przykładowa odpowiedź
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
Przykładowe żądanie
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
Przykładowa odpowiedź
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
Przykładowe żądanie
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
Przykładowa odpowiedź
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
Przykładowe żądanie
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
Przykładowa odpowiedź
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
Przykładowe żądanie
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
Przykładowa odpowiedź
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": {}
}
}
Definicje
| Nazwisko |
Opis |
|
AiModelManagementStatus
|
Status zarządzania modelami AI dla klastra HorizonDB.
|
|
BackupProperties
|
Właściwości konfiguracji kopii zapasowej klastra HorizonDB.
|
|
Cluster
|
Reprezentuje klaster HorizonDB.
|
|
ClusterCreateMode
|
Kontroluje, jak przetwarzane jest żądanie PUT klastra HorizonDB.
|
|
ClusterProperties
|
Właściwości klastra HorizonDB.
|
|
ClusterState
|
Obecny stan klastra HorizonDB.
|
|
createdByType
|
Typ tożsamości, która utworzyła zasób.
|
|
ErrorAdditionalInfo
|
Dodatkowe informacje o błędzie zarządzania zasobami.
|
|
ErrorDetail
|
Szczegóły błędu.
|
|
ErrorResponse
|
Odpowiedź na błąd
|
|
GeoRedundancyState
|
Wskazuje stan georedundancji.
|
|
HorizonDbClusterDataEncryption
|
Konfiguracja szyfrowania danych na poziomie klastra. Typ szyfrowania jest wybierany podczas tworzenia klastra; przełączanie się między SystemManaged a AzureKeyVault po utworzeniu nie jest obsługiwane. Do szyfrowania AzureKeyVault wymagane są primaryKeyUri i primaryUserAssignedIdentityId, a backup.geoRedundancy musi być wyłączony. Zarówno primaryKeyUri, jak i primaryUserAssignedIdentityId mogą być dostępne podczas początkowego tworzenia klastra. W przypadku aktualizacji istniejącego klastra poprzez PUT lub PATCH, tylko jedna z tych właściwości może się zmienić na każde żądanie, a ta aktualizacja musi zostać ukończona przed złożeniem osobnej aktualizacji w celu zmiany drugiej właściwości. Tożsamości kluczy zarządzane przez klienta muszą być również przypisane klastrowi za pomocą jego najwyższej własności tożsamości. Obsługiwane są tylko URI kluczy Azure Key Vault bez wersji; ścieżki wersji klucza są odrzucane. W przypadku szyfrowania SystemManaged należy pominąć właściwości klucza i tożsamości.
|
|
HorizonDbClusterDataEncryptionType
|
Rodzaj szyfrowania danych używany przez klaster HorizonDB. Typ jest wybierany podczas tworzenia klastra; przełączanie się między SystemManaged a AzureKeyVault po utworzeniu nie jest obsługiwane.
|
|
HorizonDbClusterEncryptionKeyStatus
|
Status walidacji klucza szyfrującego zarządzanego przez klienta używanego przez klaster HorizonDB.
|
|
HorizonDbClusterIdentityType
|
Zarządzane typy tożsamości obsługiwane przez klaster HorizonDB.
|
|
HorizonDbClusterManagedServiceIdentity
|
Tożsamości zarządzane przypisane przez użytkownika klastrowi HorizonDB. Pominięcie całej najwyższej tożsamości w PUT lub PATCH zachowuje wszystkie aktualne przypisania. Gdy userAssignedIdentities zostanie dostarczone, PUT zastępuje pełny zbiór, a PATCH łączy dostarczone wpisy z istniejącym zbiorem; wpis null PATCH usuwa tę indywidualną tożsamość. Ustawienie typu na Brak usuwa wszystkie zadania. Usunięcie tożsamości odwołanej przez przypisanie tożsamości do przechwytywania danych zmiany jest odrzucane, dopóki przypisanie odwołania nie zostanie usunięte.
|
|
Network
|
Właściwości sieci.
|
|
PostgreSqlVersion
|
Główna wersja PostgreSQL obsługiwana przez HorizonDB. API w wersji 2026-10-01-preview akceptuje 17 i 18. Przyszłe wersje API mogą dodawać wartości nazwane, a klienci muszą tolerować nieznane wartości zwracane przez usługę.
|
|
ProvisioningState
|
Stan aprowizacji.
|
|
PublicNetworkAccessState
|
Wskazuje, czy dostęp do sieci publicznej jest włączony, czy nie.
|
|
ReadWritePoolProperties
|
Pula obecnie przeznaczona do hostowania węzła read-write klastra HorizonDB. Gdy pula zostanie utworzona, gdy klaster nie ma obecnie puli, usługa automatycznie wyznacza nową pulę jako pulę do odczytu i zapisu. To zachowanie dotyczy także po usunięciu wszystkich pul, które istniały wcześniej w okresie życia klastra.
|
|
systemData
|
Metadane dotyczące tworzenia i ostatniej modyfikacji zasobu.
|
|
UserAssignedIdentity
|
Właściwości tożsamości przypisanej przez użytkownika
|
AiModelManagementStatus
Wyliczenie
Status zarządzania modelami AI dla klastra HorizonDB.
| Wartość |
Opis |
|
Enabled
|
Zarządzanie modelami AI jest włączone.
|
|
Disabled
|
Zarządzanie modelami AI jest wyłączone.
|
BackupProperties
Objekt
Właściwości konfiguracji kopii zapasowej klastra HorizonDB.
| Nazwisko |
Typ |
Domyślna wartość |
Opis |
|
earliestRestorePointUtc
|
string
(date-time)
|
|
Najwcześniejszy punkt w czasie, w UTC, do którego klaster można obecnie przywrócić.
|
|
geoRedundancy
|
GeoRedundancyState
|
|
Stan geo-redundancji. Geo-redundantna kopia zapasowa nie jest obsługiwana, gdy dataEncryption.type to AzureKeyVault.
|
|
retentionDays
|
integer
(int32)
minimum: 1 maximum: 35
|
7
|
Liczba dni, przez które automatyczne kopie zapasowe są przechowywane. Usługa domyślnie wychodzi na 7 dni, gdy ta właściwość jest pomijana.
|
Cluster
Objekt
Reprezentuje klaster HorizonDB.
| Nazwisko |
Typ |
Opis |
|
id
|
string
(arm-id)
|
W pełni określony identyfikator zasobu dla tego zasobu. Np. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
identity
|
HorizonDbClusterManagedServiceIdentity
|
Tożsamości usługi zarządzanej przypisane do tego zasobu. Pominięcie całej właściwości tożsamości w PUT lub PATCH zachowuje wszystkie aktualne przypisania. Gdy jest dostępny, PUT zastępuje zestaw tożsamości przypisany przez użytkownika, a PATCH go łączy; wpisy w słowniku PATCH PATCH usuwają indywidualne tożsamości. Ustawienie typu na Brak usuwa wszystkie zadania.
|
|
location
|
string
|
Lokalizacja geograficzna, w której znajduje się zasób
|
|
name
|
string
|
Nazwa zasobu
|
|
properties
|
ClusterProperties
|
Właściwości specyficzne dla zasobu dla tego zasobu.
|
|
systemData
|
systemData
|
Metadane usługi Azure Resource Manager zawierające informacje „createdBy” i „modifiedBy”.
|
|
tags
|
object
|
Tagi zasobów.
|
|
type
|
string
|
Typ zasobu. Np. "Microsoft.Compute/virtualMachines" lub "Microsoft.Storage/storageAccounts"
|
ClusterCreateMode
Wyliczenie
Kontroluje, jak przetwarzane jest żądanie PUT klastra HorizonDB.
| Wartość |
Opis |
|
Create
|
Przetworzyć żądanie jako normalne tworzenie klastra.
|
|
PointInTimeRestore
|
Stwórz klaster na podstawie przywracania w określonym momencie.
|
ClusterProperties
Objekt
Właściwości klastra HorizonDB.
| Nazwisko |
Typ |
Opis |
|
aiModelManagement
|
AiModelManagementStatus
|
Określa, czy zarządzanie modelami AI jest włączone dla klastra.
|
|
backup
|
BackupProperties
|
Konfiguracja kopii zapasowej klastra.
|
|
creationMode
|
ClusterCreateMode
|
Tryb użyty do stworzenia klastra. Gdy ta właściwość zostanie pominięta podczas tworzenia nowego klastra, serwis rejestruje Create. PointInTimeRestore tworzy nowy klaster z dostępnej kopii zapasowej; następnie wymagane są pointInTimeUtc i creationSourceClusterResourceId, postgreSqlVersion musi zostać pominięte, ponieważ pochodzi z metadanych kopii zapasowej, a creationSourceClusterLocation jest wymagane, gdy lokalizacja klastra źródłowego i docelowego się różni. Ta własność jest niezmienna i zwracana jako pochodzenie kreacji. Po zastąpieniu pominięcie zachowuje zarejestrowaną wartość, ponowne przesłanie tej samej wartości jest akceptowane, a zmiana jest odrzucana.
|
|
creationSourceClusterLocation
|
string
|
Lokalizacja Azure dla źródłowego klastra HorizonDB używana do przywracania punkt-in-time. Ta właściwość jest opcjonalna, gdy lokalizacja klastra źródłowego i docelowego jest taka sama. Jest wymagany, gdy lokalizacja klastra źródłowego różni się od lokalizacji klastra docelowego i musi identyfikować lokalizację klastra źródłowego. Ta właściwość musi być nieobecna w trybach tworzenia innych niż PointInTimeRestore lub gdy CreationMode jest pomijany. Ta niezmienna wartość stworzenia-pochodzenia nie zmienia się po stworzeniu.
|
|
creationSourceClusterResourceId
|
string
(arm-id)
|
Identyfikator zasobów Azure klastra HorizonDB używanego przez wybrany tryb tworzenia. Ta właściwość jest wymagana dla PointInTimeRestore i innych trybów tworzenia opartych na źródłach, i musi być nieobecna, gdy createMode jest Create lub pominięty. Klaster źródłowy nie musi mieć puli do przywrócenia, pod warunkiem że istnieje dostępna kopia zapasowa. Ta niezmienna wartość stworzenia-pochodzenia nie zmienia się po stworzeniu.
|
|
dataEncryption
|
HorizonDbClusterDataEncryption
|
Konfiguracja szyfrowania danych dla klastra. Gdy podczas początkowego tworzenia klastra zostanie pominięty, usługa korzysta z szyfrowania SystemManaged. Gdy jest dostarczana podczas początkowego tworzenia klastra, wymagany jest typ. W przypadku aktualizacji PUT istniejącego klastra typ może zostać pominięty; jeśli jest podany, musi odpowiadać istniejącemu typowi szyfrowania. Typ szyfrowania jest wybierany podczas tworzenia klastra; przełączanie się między SystemManaged a AzureKeyVault po utworzeniu nie jest obsługiwane.
|
|
network
|
Network
|
Konfiguracja sieci dla klastra. Gdy ten obiekt zostanie pominięty, usługa domyślnie ustawia go na publicAccess Disabled.
|
|
pointInTimeUtc
|
string
(date-time)
|
Żądany punkt w czasie, w UTC. Ta właściwość jest wymagana w każdym żądaniu PointInTimeRestore. W przypadku przywracania w tej samej lokalizacji usługa przywraca najnowszą dostępną kopię zapasową na lub przed tą wartością. Dla przywracania między lokalizacjami usługa wymaga, ale ignoruje tę wartość i przywraca najnowszą dostępną kopię zapasową; odpowiedzi międzylokalizacyjne pomijają tę właściwość. Ta właściwość musi być nieobecna w innych trybach tworzenia lub gdy CreationMode jest pomijany i może być określana tylko podczas tworzenia zasobów.
|
|
postgreSqlVersion
|
PostgreSqlVersion
|
Główna wersja PostgreSQL używana przez klaster HorizonDB. Wersja API 2026-10-01-preview obsługuje wersje 17 i 18. Do zwykłego tworzenia klastrów wersja jest podawana w żądaniu i jest niezmienna po utworzeniu. Dla przywracania punktowego usługa pobiera wersję z metadanych kopii zapasowej źródłowej i żądanie musi pominąć tę właściwość. Ta wersja API nie obsługuje aktualizacji głównych wersji PostgreSQL na miejscu.
|
|
provisioningState
|
ProvisioningState
|
Stan aprowizacji klastra.
|
|
readWritePool
|
ReadWritePoolProperties
|
Pula obecnie przeznaczona do hostowania węzła odczytu-zapisu klastra.
|
|
state
|
ClusterState
|
Obecny stan klastra.
|
ClusterState
Wyliczenie
Obecny stan klastra HorizonDB.
| Wartość |
Opis |
|
Ready
|
Jest gotowy i sprawny
|
|
Provisioning
|
To provisioning
|
|
Deleting
|
Jest usuwane
|
|
Inaccessible
|
Jest niedostępny
|
|
Updating
|
Jest aktualizowana
|
createdByType
Wyliczenie
Typ tożsamości, która utworzyła zasób.
| Wartość |
Opis |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
ErrorAdditionalInfo
Objekt
Dodatkowe informacje o błędzie zarządzania zasobami.
| Nazwisko |
Typ |
Opis |
|
info
|
object
|
Dodatkowe informacje.
|
|
type
|
string
|
Dodatkowy typ informacji.
|
ErrorDetail
Objekt
Szczegóły błędu.
| Nazwisko |
Typ |
Opis |
|
additionalInfo
|
ErrorAdditionalInfo[]
|
Dodatkowe informacje o błędzie
|
|
code
|
string
|
Kod błędu.
|
|
details
|
ErrorDetail[]
|
Szczegóły błędu.
|
|
message
|
string
|
Komunikat o błędzie.
|
|
target
|
string
|
Cel błędu.
|
ErrorResponse
Objekt
Odpowiedź na błąd
GeoRedundancyState
Wyliczenie
Wskazuje stan georedundancji.
| Wartość |
Opis |
|
Enabled
|
Georedundancja jest włączona. Ta wartość nie jest obsługiwana, gdy dataEncryption.type to AzureKeyVault.
|
|
Disabled
|
Georedundancja jest wyłączona
|
HorizonDbClusterDataEncryption
Objekt
Konfiguracja szyfrowania danych na poziomie klastra. Typ szyfrowania jest wybierany podczas tworzenia klastra; przełączanie się między SystemManaged a AzureKeyVault po utworzeniu nie jest obsługiwane. Do szyfrowania AzureKeyVault wymagane są primaryKeyUri i primaryUserAssignedIdentityId, a backup.geoRedundancy musi być wyłączony. Zarówno primaryKeyUri, jak i primaryUserAssignedIdentityId mogą być dostępne podczas początkowego tworzenia klastra. W przypadku aktualizacji istniejącego klastra poprzez PUT lub PATCH, tylko jedna z tych właściwości może się zmienić na każde żądanie, a ta aktualizacja musi zostać ukończona przed złożeniem osobnej aktualizacji w celu zmiany drugiej właściwości. Tożsamości kluczy zarządzane przez klienta muszą być również przypisane klastrowi za pomocą jego najwyższej własności tożsamości. Obsługiwane są tylko URI kluczy Azure Key Vault bez wersji; ścieżki wersji klucza są odrzucane. W przypadku szyfrowania SystemManaged należy pominąć właściwości klucza i tożsamości.
| Nazwisko |
Typ |
Opis |
|
primaryEncryptionKeyCurrentVersion
|
string
|
Aktualna wersja podstawowego klucza szyfrowania używanego przez klaster. Ta właściwość jest zwracana dla szyfrowania AzureKeyVault i brakuje jej w szyfrowaniu SystemManaged.
|
|
primaryEncryptionKeyStatus
|
HorizonDbClusterEncryptionKeyStatus
|
Status walidacji podstawowego klucza szyfrującego. Ta właściwość jest zwracana dla szyfrowania AzureKeyVault i brakuje jej w szyfrowaniu SystemManaged.
|
|
primaryKeyUri
|
string
(uri)
pattern: ^https://[A-Za-z0-9-]+[.]vault([.]azure[.]net|[.]usgovcloudapi[.]net|[.]azure[.]cn)/keys/[A-Za-z0-9-]+/?$
|
Bezwersjonalny klucz Azure Key Vault URI używany do szyfrowania głównej pamięci masowej klastra. Ścieżki wersji kluczy nie są obsługiwane. Podczas początkowego tworzenia klastra ta właściwość może być udostępniona razem z primaryUserAssignedIdentityId. W przypadku aktualizacji istniejącego klastra poprzez PUT lub PATCH, ta właściwość i primaryUserAssignedIdentityId nie mogą się zmieniać w tym samym żądaniu; pierwsza aktualizacja musi zostać ukończona przed złożeniem osobnej aktualizacji dla drugiej właściwości.
|
|
primaryUserAssignedIdentityId
|
string
(arm-id)
|
Identyfikator zasobu Azure przypisanej przez użytkownika tożsamości zarządzanej używanej do dostępu do głównego klucza szyfrowania. Tożsamość musi być również przypisana klastrowi za pomocą jego najwyższej własności tożsamości. Podczas początkowego tworzenia klastra ta właściwość może być udostępniona razem z primaryKeyUri. Dla aktualizacji istniejącego klastra poprzez PUT lub PATCH, ta własność i primaryKeyUri nie mogą się zmieniać w tym samym żądaniu; pierwsza aktualizacja musi zostać ukończona przed złożeniem osobnej aktualizacji dla drugiej właściwości.
|
|
type
|
HorizonDbClusterDataEncryptionType
|
Rodzaj szyfrowania danych używany przez klaster. Gdy konfiguracja szyfrowania danych jest dostarczana podczas początkowego tworzenia klastra, ta właściwość jest wymagana. Dla aktualizacji PUT istniejącego klastra ta właściwość może zostać pominięta; jeśli jest dostępna, musi odpowiadać istniejącemu typowi szyfrowania. Ta wartość jest wybierana podczas tworzenia klastra i nie może być później zmieniona z SystemManaged na AzureKeyVault ani z AzureKeyVault na SystemManaged.
|
HorizonDbClusterDataEncryptionType
Wyliczenie
Rodzaj szyfrowania danych używany przez klaster HorizonDB. Typ jest wybierany podczas tworzenia klastra; przełączanie się między SystemManaged a AzureKeyVault po utworzeniu nie jest obsługiwane.
| Wartość |
Opis |
|
SystemManaged
|
Szyfrowanie danych jest zarządzane przez Azure przy użyciu kluczy zarządzanych przez platformę.
|
|
AzureKeyVault
|
Szyfrowanie danych wykorzystuje klucze zarządzane przez klienta przechowywane w Azure Key Vault.
|
HorizonDbClusterEncryptionKeyStatus
Wyliczenie
Status walidacji klucza szyfrującego zarządzanego przez klienta używanego przez klaster HorizonDB.
| Wartość |
Opis |
|
Valid
|
Klucz szyfrowania jest ważny i dostępny dla skonfigurowanej przez użytkownika tożsamości zarządzanej.
|
|
Invalid
|
Klucz szyfrowania jest nieprawidłowy lub niedostępny dla skonfigurowanej przez użytkownika tożsamości zarządzanej.
|
HorizonDbClusterIdentityType
Wyliczenie
Zarządzane typy tożsamości obsługiwane przez klaster HorizonDB.
| Wartość |
Opis |
|
None
|
Nie przypisano tożsamości zarządzanej. Ustawienie typu na Brak usuwa wszystkie zarządzane przypisania tożsamości.
|
|
UserAssigned
|
Przypisywane są zarządzane tożsamości przypisywane przez użytkownika.
|
HorizonDbClusterManagedServiceIdentity
Objekt
Tożsamości zarządzane przypisane przez użytkownika klastrowi HorizonDB. Pominięcie całej najwyższej tożsamości w PUT lub PATCH zachowuje wszystkie aktualne przypisania. Gdy userAssignedIdentities zostanie dostarczone, PUT zastępuje pełny zbiór, a PATCH łączy dostarczone wpisy z istniejącym zbiorem; wpis null PATCH usuwa tę indywidualną tożsamość. Ustawienie typu na Brak usuwa wszystkie zadania. Usunięcie tożsamości odwołanej przez przypisanie tożsamości do przechwytywania danych zmiany jest odrzucane, dopóki przypisanie odwołania nie zostanie usunięte.
| Nazwisko |
Typ |
Opis |
|
type
|
HorizonDbClusterIdentityType
|
Zarządzany typ tożsamości przypisany klastrze. Ustawienie tej właściwości na Brak usuwa wszystkie zarządzane przypisania tożsamości.
|
|
userAssignedIdentities
|
<string,
UserAssignedIdentity>
|
Przypisane przez użytkownika tożsamości zarządzane związane z klastrem. Po udostępnieniu w systemie PUT, ten słownik zastępuje pełny zestaw zadań. Po podaniu w PATCH, wpisy są scalane z istniejącym zbiorem, a wartość zerowa usuwa odpowiadającą im tożsamość. Każdy klucz słownikowy musi być pełnym identyfikatorem zasobu Azure Microsoft. Zasób ManagedIdentity/userAssignedIdentities. Wartości żądań niebędących null mogą być pustymi obiektami; wartości odpowiedzi zawierają clientId wypełniony przez usługę oraz principalId. Przypisanie tożsamości nie daje jej dostępu do zasobów docelowych; wymagane przypisania ról muszą być skonfigurowane osobno.
|
Network
Objekt
Właściwości sieci.
| Nazwisko |
Typ |
Domyślna wartość |
Opis |
|
publicAccess
|
PublicNetworkAccessState
|
Disabled
|
Określa, czy dostęp publiczny jest włączony dla klastra. Usługa domyślnie jest wyłączona, gdy ta właściwość zostanie pominięta.
|
PostgreSqlVersion
Wyliczenie
Główna wersja PostgreSQL obsługiwana przez HorizonDB. API w wersji 2026-10-01-preview akceptuje 17 i 18. Przyszłe wersje API mogą dodawać wartości nazwane, a klienci muszą tolerować nieznane wartości zwracane przez usługę.
| Wartość |
Opis |
|
17
|
PostgreSQL major wersja 17.
|
|
18
|
PostgreSQL w wersji głównej 18.
|
ProvisioningState
Wyliczenie
Stan aprowizacji.
| Wartość |
Opis |
|
Succeeded
|
Zasób został utworzony.
|
|
Failed
|
Tworzenie zasobu nie powiodło się.
|
|
Canceled
|
Tworzenie zasobu zostało anulowane.
|
|
InProgress
|
Operacja zasobów HorizonDB jest aktywnie uruchomiona.
|
|
Provisioning
|
Zasób HorizonDB nadal jest w trakcie udostępniania.
|
PublicNetworkAccessState
Wyliczenie
Wskazuje, czy dostęp do sieci publicznej jest włączony, czy nie.
| Wartość |
Opis |
|
Enabled
|
Dostęp do sieci publicznej jest włączony
|
|
Disabled
|
Dostęp do sieci publicznej jest wyłączony
|
ReadWritePoolProperties
Objekt
Pula obecnie przeznaczona do hostowania węzła read-write klastra HorizonDB. Gdy pula zostanie utworzona, gdy klaster nie ma obecnie puli, usługa automatycznie wyznacza nową pulę jako pulę do odczytu i zapisu. To zachowanie dotyczy także po usunięciu wszystkich pul, które istniały wcześniej w okresie życia klastra.
| Nazwisko |
Typ |
Opis |
|
designatedPoolResourceId
|
string
(arm-id)
|
Identyfikator zasobu Azure puli przeznaczonej do hostowania węzła read-write klastra. Pula jest zasobem potomnym tego klastra. Gdy pula zostanie utworzona, gdy klaster nie ma obecnie pul, usługa automatycznie ustawia tę właściwość na identyfikator zasobu nowej puli, w tym w przypadku usunięcia wszystkich pul istniejących wcześniej w okresie życia klastra. Ta właściwość nie występuje, gdy nie jest wyznaczona żadna pula, na przykład po sukcesie clearReadWritePool.
|
systemData
Objekt
Metadane dotyczące tworzenia i ostatniej modyfikacji zasobu.
| Nazwisko |
Typ |
Opis |
|
createdAt
|
string
(date-time)
|
Sygnatura czasowa tworzenia zasobu (UTC).
|
|
createdBy
|
string
|
Tożsamość, która utworzyła zasób.
|
|
createdByType
|
createdByType
|
Typ tożsamości, która utworzyła zasób.
|
|
lastModifiedAt
|
string
(date-time)
|
Znacznik czasu ostatniej modyfikacji zasobu (UTC)
|
|
lastModifiedBy
|
string
|
Tożsamość, która ostatnio zmodyfikowała zasób.
|
|
lastModifiedByType
|
createdByType
|
Typ tożsamości, która ostatnio zmodyfikowała zasób.
|
UserAssignedIdentity
Objekt
Właściwości tożsamości przypisanej przez użytkownika
| Nazwisko |
Typ |
Opis |
|
clientId
|
string
(uuid)
|
Identyfikator klienta przypisanej tożsamości.
|
|
principalId
|
string
(uuid)
|
Identyfikator podmiotu zabezpieczeń przypisanej tożsamości.
|