Yeni bir HorizonDB kümesi oluşturur veya mevcut bir kümeyi değiştirir. PointInTimeRestore yeni Küme kaynağını oluşturur ve servise ait veritabanı depolamasını mevcut bir kaynak yedekten nemlendirir. Kaynak havuzlarını, Havuz kapsamlı uç noktalarını, güvenlik duvarı kurallarını, parametre-grup ilişkilerini veya diğer alt kaynakları klonlamaz. Yeni Küme, hizmet tarafından oluşturulan Küme-kapsamlı Uç noktası olan cluster adlı Uç noktasını alır. Geri yükleme için, postgreSqlVersion (postgreSqlVersion) çıkarılmalıdır çünkü servis bunu yedek meta verilerinden alır; diğer tüm yeni küme yapılandırmaları istek veya hizmet varsayılan verilerinden gelir. Aynı konuma geri yükleme, pointInTimeUtc gerektirir ve onaylar ve creationSourceClusterLocation'ın çıkarılmasına izin verir. Çapraz konum geri yükleme, kaynak kümesinin Azure konumunu tanımlamak için creationSourceClusterLocation gerektirir ve pointInTimeUtc gerektirir, ancak verilen zaman damgasını görmezden gelir ve en son mevcut yedeklemeyi geri getirir. Çapraz konum yanıtlarında pointInTimeUtc atlanır.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HorizonDb/clusters/{clusterName}?api-version=2026-10-01-preview
URI Parametreleri
| Veri Akışı Adı |
İçinde |
Gerekli |
Tür |
Description |
|
clusterName
|
path |
True
|
string
minLength: 1 maxLength: 63 pattern: ^[a-z0-9](?:[-a-z0-9]*[a-z0-9])?$
|
HorizonDB kümesinin adı.
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
Kaynak grubunun adı. Ad büyük/küçük harfe duyarsız.
|
|
subscriptionId
|
path |
True
|
string
(uuid)
|
Hedef aboneliğin kimliği. Değer bir UUID olmalıdır.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
Bu işlem için kullanılacak API sürümü.
|
İstek Gövdesi
| Veri Akışı Adı |
Gerekli |
Tür |
Description |
|
location
|
True
|
string
|
Kaynağın bulunduğu coğrafi konum
|
|
identity
|
|
HorizonDbClusterManagedServiceIdentity
|
Bu kaynağa atanan yönetilen hizmet kimlikleri. PUT veya PATCH'den tüm kimlik özelliğinin çıkarılması, tüm mevcut atamaları korur. Sağlandığında, PUT kullanıcı tarafından atanan kimlik setini değiştirir ve PATCH bunu birleştirir; null PATCH sözlük girişleri bireysel kimlikleri kaldırır. Tip None olarak ayarlandığında tüm atamalar temizlenir.
|
|
properties
|
|
ClusterProperties
|
Bu kaynağın kaynağa özgü özellikleri.
|
|
tags
|
|
object
|
Kaynak etiketleri.
|
Yanıtlar
| Veri Akışı Adı |
Tür |
Description |
|
200 OK
|
Cluster
|
Yanıt, asenkron HorizonDB küme değişimi kabul edildiğinde geri döner.
Üst Bilgiler
- Azure-AsyncOperation: string
- Retry-After: integer
|
|
201 Created
|
Cluster
|
Asenkron HorizonDB küme oluşturma kabul edildiğinde yanıt geri döner.
Üst Bilgiler
- Azure-AsyncOperation: string
- Retry-After: integer
|
|
Other Status Codes
|
ErrorResponse
|
Beklenmeyen bir hata yanıtı.
|
Güvenlik
azure_auth
Azure Active Directory OAuth2 Akışı.
Tür:
oauth2
Akış:
implicit
Yetkilendirme URL’si:
https://login.microsoftonline.com/common/oauth2/authorize
Kapsamlar
| Veri Akışı Adı |
Description |
|
user_impersonation
|
kullanıcı hesabınızı taklit etme
|
Örnekler
Create a HorizonDB cluster with customer-managed key data encryption
Örnek isteği
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
Örnek yanıt
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
Örnek isteği
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
Örnek yanıt
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
Örnek isteği
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
Örnek yanıt
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
Örnek isteği
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
Örnek yanıt
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
Örnek isteği
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
Örnek yanıt
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": {}
}
}
Tanımlar
| Veri Akışı Adı |
Description |
|
AiModelManagementStatus
|
HorizonDB kümesi için Yapay Zeka Model Yönetimi durumu.
|
|
BackupProperties
|
HorizonDB kümesi için yedekleme yapılandırma özellikleri.
|
|
Cluster
|
HorizonDB kümesini temsil eder.
|
|
ClusterCreateMode
|
HorizonDB kümesi PUT talebinin nasıl işlendiğini kontrol eder.
|
|
ClusterProperties
|
HorizonDB kümesinin özellikleri.
|
|
ClusterState
|
Bir HorizonDB kümesinin mevcut durumu.
|
|
createdByType
|
Kaynağı oluşturan kimliğin türü.
|
|
ErrorAdditionalInfo
|
Kaynak yönetimi hatasına ilişkin ek bilgiler.
|
|
ErrorDetail
|
Hata ayrıntısı.
|
|
ErrorResponse
|
Hata yanıtı
|
|
GeoRedundancyState
|
Coğrafi yedeklik durumunu gösterir.
|
|
HorizonDbClusterDataEncryption
|
Küme düzeyinde veri şifreleme yapılandırması. Şifreleme türü küme oluşturulduğunda seçilir; oluşturulduktan sonra SystemManaged ile AzureKeyVault arasında geçiş desteklenmez. AzureKeyVault şifreleme için primaryKeyUri ve primaryUserAssignedIdentityId gereklidir, backup.geoRedundancy ise devre dışı bırakılmalıdır. Hem primaryKeyUri hem de primaryUserAssignedIdentityId ilk küme oluşturulduğunda sağlanabilir. PUT veya PATCH ile mevcut bir kümede yapılan güncellemelerde, bu özelliklerden yalnızca biri istek başına değişebilir ve bu güncelleme, diğer özelliği değiştirmek için ayrı bir güncelleme göndermeden önce tamamlanmalıdır. Müşteri tarafından yönetilen anahtar kimlikler, üst düzey kimlik özelliği aracılığıyla Küme'ye atanmalıdır. Yalnızca sürümsüz Azure Key Vault anahtar URI'leri desteklenir; anahtar sürüm yolları reddedilir. SystemManaged şifreleme için anahtar ve kimlik özellikleri çıkarılmalıdır.
|
|
HorizonDbClusterDataEncryptionType
|
HorizonDB kümesi tarafından kullanılan veri şifreleme türü. Tür, küme oluşturulduğunda seçilir; oluşturulduktan sonra SystemManaged ile AzureKeyVault arasında geçiş desteklenmez.
|
|
HorizonDbClusterEncryptionKeyStatus
|
Bir HorizonDB kümesi tarafından kullanılan müşteri tarafından yönetilen bir şifreleme anahtarının doğrulama durumu.
|
|
HorizonDbClusterIdentityType
|
HorizonDB kümesi tarafından desteklenen yönetilen kimlik türleri.
|
|
HorizonDbClusterManagedServiceIdentity
|
HorizonDB kümesine atanan kullanıcı tarafından atanan yönetilen kimlikler. PUT veya PATCH'ten tüm üst düzey kimlik özelliğinin çıkarılması, tüm mevcut atamaları korur. userAssignedIdentities sağlandığında, PUT tüm kümeyi değiştirir ve PATCH sağlanan girişleri mevcut kümeyle birleştirir; bir null PATCH girişi bu bireysel kimliği kaldırır. Tip None olarak ayarlandığında tüm atamalar temizlenir. Bir değişiklik veri yakalama kimlik atamasıyla referans verilen bir kimliğin kaldırılması, referans ataması silinene kadar reddedilir.
|
|
Network
|
Ağ özellikleri.
|
|
PostgreSqlVersion
|
HorizonDB tarafından desteklenen bir PostgreSQL ana sürümü. API sürümü 2026-10-01-preview 17 ve 18'i kabul etmektedir. Gelecekteki API sürümleri isimli değerler ekleyebilir ve istemciler hizmet tarafından geri gönderilen bilinmeyen değerleri tolere etmek zorundadır.
|
|
ProvisioningState
|
Sağlama durumu.
|
|
PublicNetworkAccessState
|
Genel ağ erişiminin etkinleştirilip etkinleştirilmediğini gösterir.
|
|
ReadWritePoolProperties
|
Şu anda bir HorizonDB kümesinin okuma-yazma düğümünü barındırmak üzere belirlenmiş havuz. Kümede şu anda havuz yokken bir havuz oluşturulduğunda, hizmet otomatik olarak yeni havuzu okuma-yazma havuzu olarak atar. Bu davranış, kümenin yaşamında daha önce var olan tüm havuzlar silindikten sonra da geçerlidir.
|
|
systemData
|
Kaynağın oluşturulması ve son değiştirilmesiyle ilgili meta veriler.
|
|
UserAssignedIdentity
|
Kullanıcı tarafından atanan kimlik özellikleri
|
AiModelManagementStatus
Numaralandırma
HorizonDB kümesi için Yapay Zeka Model Yönetimi durumu.
| Değer |
Description |
|
Enabled
|
Yapay Zeka Model Yönetimi etkinleştirildi.
|
|
Disabled
|
Yapay Zeka Model Yönetimi devre dışı bırakıldı.
|
BackupProperties
Nesne
HorizonDB kümesi için yedekleme yapılandırma özellikleri.
| Veri Akışı Adı |
Tür |
Default value |
Description |
|
earliestRestorePointUtc
|
string
(date-time)
|
|
Kümenin şu anda geri getirilebileceği en eski zaman noktası olan UTC'de.
|
|
geoRedundancy
|
GeoRedundancyState
|
|
Coğrafi yedeklik durumu. dataEncryption.type AzureKeyVault olduğunda coğrafi yedekler desteklenmez.
|
|
retentionDays
|
integer
(int32)
minimum: 1 maximum: 35
|
7
|
Otomatik yedeklemelerin tutulduğu günler sayısı. Bu özellik atıldığında hizmet varsayılan olarak 7 gün olur.
|
Cluster
Nesne
HorizonDB kümesini temsil eder.
| Veri Akışı Adı |
Tür |
Description |
|
id
|
string
(arm-id)
|
Kaynağın tam nitelikli kaynak kimliği. Örneğin "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
identity
|
HorizonDbClusterManagedServiceIdentity
|
Bu kaynağa atanan yönetilen hizmet kimlikleri. PUT veya PATCH'den tüm kimlik özelliğinin çıkarılması, tüm mevcut atamaları korur. Sağlandığında, PUT kullanıcı tarafından atanan kimlik setini değiştirir ve PATCH bunu birleştirir; null PATCH sözlük girişleri bireysel kimlikleri kaldırır. Tip None olarak ayarlandığında tüm atamalar temizlenir.
|
|
location
|
string
|
Kaynağın bulunduğu coğrafi konum
|
|
name
|
string
|
Kaynağın adı
|
|
properties
|
ClusterProperties
|
Bu kaynağın kaynağa özgü özellikleri.
|
|
systemData
|
systemData
|
createdBy ve modifiedBy bilgilerini içeren Azure Resource Manager meta verileri.
|
|
tags
|
object
|
Kaynak etiketleri.
|
|
type
|
string
|
Kaynağın türü. Örneğin, "Microsoft.Compute/virtualMachines" veya "Microsoft.Storage/storageAccounts"
|
ClusterCreateMode
Numaralandırma
HorizonDB kümesi PUT talebinin nasıl işlendiğini kontrol eder.
| Değer |
Description |
|
Create
|
İsteyi normal bir küme oluşturma şekli olarak işle.
|
|
PointInTimeRestore
|
Zaman noktasında bir geri yüklemeden küme oluşturun.
|
ClusterProperties
Nesne
HorizonDB kümesinin özellikleri.
| Veri Akışı Adı |
Tür |
Description |
|
aiModelManagement
|
AiModelManagementStatus
|
Küme için AI Model Yönetimi'nin etkin olup olmadığını belirtir.
|
|
backup
|
BackupProperties
|
Küme için yedek yapılandırma.
|
|
creationMode
|
ClusterCreateMode
|
Küme oluşturmak için kullanılan mod. Bu özellik yeni bir küme oluştururken atladığında, hizmet Yarat kaydını alır. PointInTimeRestore mevcut bir yedekten yeni bir küme oluşturur; pointInTimeUtc ve creationSourceClusterResourceId gereklidir, postgreSqlVersion yedek metaveriden alındığı için çıkarılmalıdır ve kaynak ile hedef küme konumları farklılaştığında creationSourceClusterLocation gereklidir. Bu özellik değişmezdir ve yaratılış kökeni olarak geri döner. Değiştirildiğinde, eksik kaydedilen değeri korur, aynı değeri tekrar göndermek kabul edilir ve değişiklik reddedilir.
|
|
creationSourceClusterLocation
|
string
|
Nokta-zaman geri yükleme için kullanılan kaynak HorizonDB kümesinin Azure konumu. Bu özellik, kaynak ve hedef küme konumları aynı olduğunda isteğe bağlıdır. Kaynak küme konumu hedef küme konumundan farklı olduğunda ve kaynak kümesinin konumunu belirlemesi gerektiğinde gereklidir. Bu özellik, PointInTimeRestore dışındaki yaratım modlarında veya creationMode dışında bulunmamalıdır. Bu değişmez yaratılış-köken değeri, yaratılıştan sonra değişmez.
|
|
creationSourceClusterResourceId
|
string
(arm-id)
|
Seçilen oluşturma modunda kullanılan kaynak HorizonDB kümesinin Azure kaynak kimliği. Bu özellik PointInTimeRestore ve diğer kaynak tabanlı oluşturma modları için gereklidir ve creationMode Yaratılırsa veya çıkarıldığında bulunmamalıdır. Bir kaynak kümesinin geri yüklenmesi için havuza ihtiyacı yoktur, ancak mevcut bir yedek varsa. Bu değişmez yaratılış-köken değeri, yaratılıştan sonra değişmez.
|
|
dataEncryption
|
HorizonDbClusterDataEncryption
|
Küme için veri şifreleme yapılandırması. İlk küme oluşturma sırasında atladığında, hizmet SystemManaged şifreleme kullanır. İlk küme oluşturma sırasında sağlandığında, tip gereklidir. Mevcut bir kümenin PUT güncellemeleri için tip atlanabilir; sağlandığında, mevcut şifreleme tipiyle eşleşmelidir. Şifreleme türü küme oluşturulduğunda seçilir; oluşturulduktan sonra SystemManaged ile AzureKeyVault arasında geçiş desteklenmez.
|
|
network
|
Network
|
Küme için ağ yapılandırması. Bu nesne atıldığında, hizmet onu publicAccess Disabled olarak varsayılan olarak ayarlar.
|
|
pointInTimeUtc
|
string
(date-time)
|
İstenen zaman noktası, UTC'de. Bu özellik her PointInTimeRestore talebinde gereklidir. Aynı konumda geri yükleme için, hizmet bu değerde veya öncesinde mevcut olan en son yedeklemeyi geri getirir. Çapraz konum geri yükleme için, hizmet bu değeri gerektirir ancak en son mevcut yedeklemeyi geri getirir; çapraz konum yanıtları bu özelliği çıkarır. Bu özellik, diğer yaratım modlarında veya creationMode atıldığında bulunmamalıdır ve yalnızca kaynak oluşturma sırasında belirtilebilir.
|
|
postgreSqlVersion
|
PostgreSqlVersion
|
HorizonDB kümesi tarafından kullanılan PostgreSQL ana sürümü. API sürümü 2026-10-01-preview 17 ve 18 sürümlerini destekler. Sıradan küme oluşturma için, sürüm istekte sunulur ve oluşturulduktan sonra değiştirilemez olur. Noktada zamanında geri yükleme için, hizmet sürümü kaynak yedekleme meta verisinden alır ve istek bu özelliği çıkarmalıdır. Bu API sürümü, yerinde PostgreSQL ana sürüm yükseltmelerini desteklemez.
|
|
provisioningState
|
ProvisioningState
|
Kümenin sağlama durumu.
|
|
readWritePool
|
ReadWritePoolProperties
|
Şu anda kümesinin okuma-yazma düğümünü barındırmak üzere ayrılmış havuz.
|
|
state
|
ClusterState
|
Kümenin mevcut durumu.
|
ClusterState
Numaralandırma
Bir HorizonDB kümesinin mevcut durumu.
| Değer |
Description |
|
Ready
|
Hazır ve çalışır durumda
|
|
Provisioning
|
Sağlama
|
|
Deleting
|
Siliyor
|
|
Inaccessible
|
Erişilemez
|
|
Updating
|
Güncelleniyor
|
createdByType
Numaralandırma
Kaynağı oluşturan kimliğin türü.
| Değer |
Description |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
ErrorAdditionalInfo
Nesne
Kaynak yönetimi hatasına ilişkin ek bilgiler.
| Veri Akışı Adı |
Tür |
Description |
|
info
|
object
|
Ek bilgiler.
|
|
type
|
string
|
Ek bilgi türü.
|
ErrorDetail
Nesne
Hata ayrıntısı.
| Veri Akışı Adı |
Tür |
Description |
|
additionalInfo
|
ErrorAdditionalInfo[]
|
Hata ek bilgisi.
|
|
code
|
string
|
Hata kodu.
|
|
details
|
ErrorDetail[]
|
Hata ayrıntıları.
|
|
message
|
string
|
Hata iletisi.
|
|
target
|
string
|
Hata hedefi
|
ErrorResponse
Nesne
Hata yanıtı
| Veri Akışı Adı |
Tür |
Description |
|
error
|
ErrorDetail
|
Hata nesnesi.
|
GeoRedundancyState
Numaralandırma
Coğrafi yedeklik durumunu gösterir.
| Değer |
Description |
|
Enabled
|
Coğrafi yedeklik etkinleştirildi. dataEncryption.type AzureKeyVault olduğunda bu değer desteklenmez.
|
|
Disabled
|
Coğrafi yedeklik devre dışı bırakıldı
|
HorizonDbClusterDataEncryption
Nesne
Küme düzeyinde veri şifreleme yapılandırması. Şifreleme türü küme oluşturulduğunda seçilir; oluşturulduktan sonra SystemManaged ile AzureKeyVault arasında geçiş desteklenmez. AzureKeyVault şifreleme için primaryKeyUri ve primaryUserAssignedIdentityId gereklidir, backup.geoRedundancy ise devre dışı bırakılmalıdır. Hem primaryKeyUri hem de primaryUserAssignedIdentityId ilk küme oluşturulduğunda sağlanabilir. PUT veya PATCH ile mevcut bir kümede yapılan güncellemelerde, bu özelliklerden yalnızca biri istek başına değişebilir ve bu güncelleme, diğer özelliği değiştirmek için ayrı bir güncelleme göndermeden önce tamamlanmalıdır. Müşteri tarafından yönetilen anahtar kimlikler, üst düzey kimlik özelliği aracılığıyla Küme'ye atanmalıdır. Yalnızca sürümsüz Azure Key Vault anahtar URI'leri desteklenir; anahtar sürüm yolları reddedilir. SystemManaged şifreleme için anahtar ve kimlik özellikleri çıkarılmalıdır.
| Veri Akışı Adı |
Tür |
Description |
|
primaryEncryptionKeyCurrentVersion
|
string
|
Küme tarafından kullanılan birincil şifreleme anahtarının mevcut versiyonu. Bu özellik AzureKeyVault şifreleme için döner, SystemManaged şifreleme için ise yoktur.
|
|
primaryEncryptionKeyStatus
|
HorizonDbClusterEncryptionKeyStatus
|
Birincil şifreleme anahtarının doğrulama durumu. Bu özellik AzureKeyVault şifreleme için döner, SystemManaged şifreleme için ise yoktur.
|
|
primaryKeyUri
|
string
(uri)
pattern: ^https://[A-Za-z0-9-]+[.]vault([.]azure[.]net|[.]usgovcloudapi[.]net|[.]azure[.]cn)/keys/[A-Za-z0-9-]+/?$
|
Sürümsüz Azure Key Vault anahtar URI, kümelerin birincil depolamasını şifrelemek için kullanılır. Ana sürüm yolları desteklenmez. İlk küme oluşturma sırasında, bu özellik primaryUserAssignedIdentityID ile birlikte sağlanabilir. PUT veya PATCH aracılığıyla mevcut bir kümede yapılan güncellemeler için, bu özellik ve primaryUserAssignedIdentityId aynı istekte değişemez; ilk güncelleme, diğer özellik için ayrı bir güncelleme göndermeden önce tamamlanmalıdır.
|
|
primaryUserAssignedIdentityId
|
string
(arm-id)
|
Birincil şifreleme anahtarına erişmek için kullanılan kullanıcı tarafından atanan yönetilen kimliğin Azure kaynak kimliği. Kimlik ayrıca Küme'ye en üst düzey kimlik özelliği aracılığıyla atanmalıdır. İlk küme oluşturulması sırasında, bu özellik primaryKeyUri ile birlikte sağlanabilir. PUT veya PATCH ile mevcut bir küme güncellemesi için, bu özellik ve primaryKeyUri aynı istekte değişemez; ilk güncelleme, diğer özellik için ayrı bir güncelleme göndermeden önce tamamlanmalıdır.
|
|
type
|
HorizonDbClusterDataEncryptionType
|
Küme tarafından kullanılan veri şifreleme türü. Veri şifreleme yapılandırması ilk küme oluşturulurken sağlandığında, bu özellik gereklidir. Mevcut bir kümenin PUT güncellemelerinde bu özellik çıkarılabilir; sağlanırsa, mevcut şifreleme tipiyle eşleşmelidir. Bu değer küme oluşturulduğunda seçilir ve daha sonra SystemManaged ile AzureKeyVault veya AzureKeyVault ile SystemManaged ile değiştirilemez.
|
HorizonDbClusterDataEncryptionType
Numaralandırma
HorizonDB kümesi tarafından kullanılan veri şifreleme türü. Tür, küme oluşturulduğunda seçilir; oluşturulduktan sonra SystemManaged ile AzureKeyVault arasında geçiş desteklenmez.
| Değer |
Description |
|
SystemManaged
|
Veri şifrelemesi, platform tarafından yönetilen anahtarlar kullanılarak Azure tarafından yönetilir.
|
|
AzureKeyVault
|
Veri şifreleme, Azure Key Vault'ta depolanan müşteri tarafından yönetilen anahtarları kullanır.
|
HorizonDbClusterEncryptionKeyStatus
Numaralandırma
Bir HorizonDB kümesi tarafından kullanılan müşteri tarafından yönetilen bir şifreleme anahtarının doğrulama durumu.
| Değer |
Description |
|
Valid
|
Şifreleme anahtarı, yapılandırılmış kullanıcı tarafından atanan yönetilen kimlik için geçerlidir ve erişilebilirdir.
|
|
Invalid
|
Şifreleme anahtarı, kullanıcı tarafından atanan yönetilen kimlik tarafından dönüştürülen veya erişilemezdir.
|
HorizonDbClusterIdentityType
Numaralandırma
HorizonDB kümesi tarafından desteklenen yönetilen kimlik türleri.
| Değer |
Description |
|
None
|
Yönetilen kimlik atanmadı. Tip None olarak ayarlandığında tüm yönetilen kimlik atamaları temizlenir.
|
|
UserAssigned
|
Kullanıcı tarafından atanan yönetilen kimlikler atanır.
|
HorizonDbClusterManagedServiceIdentity
Nesne
HorizonDB kümesine atanan kullanıcı tarafından atanan yönetilen kimlikler. PUT veya PATCH'ten tüm üst düzey kimlik özelliğinin çıkarılması, tüm mevcut atamaları korur. userAssignedIdentities sağlandığında, PUT tüm kümeyi değiştirir ve PATCH sağlanan girişleri mevcut kümeyle birleştirir; bir null PATCH girişi bu bireysel kimliği kaldırır. Tip None olarak ayarlandığında tüm atamalar temizlenir. Bir değişiklik veri yakalama kimlik atamasıyla referans verilen bir kimliğin kaldırılması, referans ataması silinene kadar reddedilir.
| Veri Akışı Adı |
Tür |
Description |
|
type
|
HorizonDbClusterIdentityType
|
Kümeye atanan yönetilen kimlik tipi. Bu özelliği None olarak ayarlamak tüm yönetilen kimlik atamalarını temizler.
|
|
userAssignedIdentities
|
<string,
UserAssignedIdentity>
|
Küme ile ilişkili kullanıcı tarafından atanan yönetilen kimlikler. PUT ile sunulduğunda, bu sözlük tüm atamalar setinin yerini alır. PATCH ile sağlandığında, girişler mevcut kümeyle birleştirilir ve bir null değer ilgili kimliği kaldırır. Her sözlük anahtarı, bir Microsoft'un tam Azure kaynak kimliği olmalıdır. ManagedIdentity/userAssignedIdentities kaynağı. Null olmayan istek değerleri boş nesneler olabilir; yanıt değerleri hizmet tarafından doldurulmuş clientId ve principalId içerir. Bir kimlik atamak, ona hedef kaynaklara erişim sağlamaz; gerekli rol atamaları ayrı ayrı olarak yapılandırılmalıdır.
|
Network
Nesne
Ağ özellikleri.
| Veri Akışı Adı |
Tür |
Default value |
Description |
|
publicAccess
|
PublicNetworkAccessState
|
Disabled
|
Küme için halka açık erişimin etkin olup olmadığını belirtir. Bu özellik atlandığında hizmet varsayılan olarak Disabled olur.
|
PostgreSqlVersion
Numaralandırma
HorizonDB tarafından desteklenen bir PostgreSQL ana sürümü. API sürümü 2026-10-01-preview 17 ve 18'i kabul etmektedir. Gelecekteki API sürümleri isimli değerler ekleyebilir ve istemciler hizmet tarafından geri gönderilen bilinmeyen değerleri tolere etmek zorundadır.
| Değer |
Description |
|
17
|
PostgreSQL majör sürüm 17.
|
|
18
|
PostgreSQL majör sürüm 18.
|
ProvisioningState
Numaralandırma
Sağlama durumu.
| Değer |
Description |
|
Succeeded
|
Kaynak oluşturuldu.
|
|
Failed
|
Kaynak oluşturma başarısız oldu.
|
|
Canceled
|
Kaynak oluşturma işlemi iptal edildi.
|
|
InProgress
|
HorizonDB kaynak operasyonu aktif olarak çalışıyor.
|
|
Provisioning
|
HorizonDB kaynağı hâlâ provisioning'de.
|
PublicNetworkAccessState
Numaralandırma
Genel ağ erişiminin etkinleştirilip etkinleştirilmediğini gösterir.
| Değer |
Description |
|
Enabled
|
Kamu ağ erişimi etkinleştirildi
|
|
Disabled
|
Kamu ağ erişimi devre dışı bırakıldı
|
ReadWritePoolProperties
Nesne
Şu anda bir HorizonDB kümesinin okuma-yazma düğümünü barındırmak üzere belirlenmiş havuz. Kümede şu anda havuz yokken bir havuz oluşturulduğunda, hizmet otomatik olarak yeni havuzu okuma-yazma havuzu olarak atar. Bu davranış, kümenin yaşamında daha önce var olan tüm havuzlar silindikten sonra da geçerlidir.
| Veri Akışı Adı |
Tür |
Description |
|
designatedPoolResourceId
|
string
(arm-id)
|
Kümelerin okuma-yazma düğümünü barındırmak için belirlenen havuzun Azure kaynak kimliği. Havuz, bu kümenin bir çocuk kaynağıdır. Kümede şu anda havuz yokken bir havuz oluşturulduğunda, hizmet bu özelliği otomatik olarak yeni havuzun kaynak kimliğine ayar, özellikle kümenin ömründe daha önce var olan tüm havuzlar silindiğinde dahil. Bu özellik, clearReadWritePool başarılı olduktan sonra havuz belirtilmediğinde yoktur.
|
systemData
Nesne
Kaynağın oluşturulması ve son değiştirilmesiyle ilgili meta veriler.
| Veri Akışı Adı |
Tür |
Description |
|
createdAt
|
string
(date-time)
|
Kaynak oluşturmanın zaman damgası (UTC).
|
|
createdBy
|
string
|
Kaynağı oluşturan kimlik.
|
|
createdByType
|
createdByType
|
Kaynağı oluşturan kimliğin türü.
|
|
lastModifiedAt
|
string
(date-time)
|
Kaynağın son değişikliğinin zaman damgası (UTC)
|
|
lastModifiedBy
|
string
|
Kaynağı en son değiştiren kimlik.
|
|
lastModifiedByType
|
createdByType
|
Kaynağı en son değiştiren kimlik türü.
|
UserAssignedIdentity
Nesne
Kullanıcı tarafından atanan kimlik özellikleri
| Veri Akışı Adı |
Tür |
Description |
|
clientId
|
string
(uuid)
|
Atanan kimliğin istemci kimliği.
|
|
principalId
|
string
(uuid)
|
Atanan kimliğin asıl kimliği.
|