Поделиться через


Clusters - Update

Обновляет существующий кластер. Текст запроса может содержать одно или несколько свойств из определения кластера.

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}?api-version=2023-03-02-preview

Параметры URI

Имя В Обязательно Тип Описание
clusterName
path True

string

minLength: 3
maxLength: 40
pattern: ^(?![0-9]+$)(?!-)[a-z0-9-]{3,40}(?

Имя кластера.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

Имя группы ресурсов. Имя не учитывает регистр.

subscriptionId
path True

string (uuid)

Идентификатор целевой подписки. Значение должно быть UUID.

api-version
query True

string

minLength: 1

Версия API, используемая для этой операции.

Текст запроса

Имя Тип Описание
identity

IdentityProperties

Описывает удостоверение кластера.

properties.administratorLoginPassword

string (password)

Пароль для входа администратора. Каждый кластер создается с предварительно определенной административной ролью с именем citus.

properties.citusVersion

string

Версия расширения Citus на всех серверах кластера.

properties.coordinatorEnablePublicIpAccess

boolean

Если общедоступный доступ включен в координаторе.

properties.coordinatorServerEdition

string

Выпуск координатора (по умолчанию: GeneralPurpose).

properties.coordinatorStorageQuotaInMb

integer (int32)

Хранилище координатора в МБ.

properties.coordinatorVCores

integer (int32)

Количество виртуальных ядер координатора (максимум: 96).

properties.enableHa

boolean

Если высокий уровень доступности (HA) включен или не для кластера.

properties.enableShardsOnCoordinator

boolean

Если распределенные таблицы размещаются на координаторе или нет. Должно быть задано значение true в кластерах с одним узлом. Требует перебалансирования сегментов после изменения значения.

properties.maintenanceWindow

MaintenanceWindow

Период обслуживания кластера.

properties.nodeCount

integer (int32)

Количество рабочих узлов кластера. Если число узлов равно 0, он представляет конфигурацию одного узла с возможностью создания распределенных таблиц на этом узле. 2 или более рабочих узлов представляют конфигурацию с несколькими узлами. Значение счетчика узлов не может быть 1.

properties.nodeServerEdition

string

Выпуск узла (по умолчанию: MemoryOptimized).

properties.nodeStorageQuotaInMb

integer (int32)

Хранилище в МБ на каждом рабочем узле.

properties.nodeVCores

integer (int32)

Вычисления в виртуальных ядрах на каждом рабочем узле (максимум: 104).

properties.postgresqlVersion

string

Основная версия PostgreSQL на всех серверах кластера.

properties.preferredPrimaryZone

string

Предпочтительная первичная зона доступности (AZ) для всех серверов кластера.

tags

object

Метаданные, относящиеся к приложению, в виде пар "ключ-значение".

Ответы

Имя Тип Описание
200 OK

Cluster

Операция Azure успешно завершена.

202 Accepted

Cluster

Заявка принята в обработку, но обработка еще не завершена.

Заголовки

  • Azure-AsyncOperation: string
  • Location: string
Other Status Codes

ErrorResponse

Непредвиденное сообщение об ошибке.

Безопасность

azure_auth

Azure Active Directory OAuth2 Flow.

Тип: oauth2
Flow: implicit
URL-адрес авторизации: https://login.microsoftonline.com/common/oauth2/authorize

Области

Имя Описание
user_impersonation олицетворения учетной записи пользователя

Примеры

Scale compute up or down
Scale out: Add new worker nodes
Scale up storage
Update multiple configuration settings of the cluster
Update or define maintenance window

Scale compute up or down

Образец запроса

PATCH https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster?api-version=2023-03-02-preview

{
  "properties": {
    "nodeVCores": 16
  }
}

Пример ответа

{
  "name": "testcluster",
  "type": "Microsoft.DBforPostgreSQL/serverGroupsv2",
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster",
  "location": "westus",
  "properties": {
    "aadAuthEnabled": "disabled",
    "administratorLogin": "citus",
    "citusVersion": "11.1",
    "coordinatorEnablePublicIpAccess": true,
    "coordinatorServerEdition": "GeneralPurpose",
    "coordinatorStorageQuotaInMb": 2097152,
    "coordinatorVCores": 16,
    "dataEncryption": {
      "type": "SystemManaged"
    },
    "databaseName": "citus",
    "earliestRestoreTime": "2020-09-14T00:00:37.467Z",
    "enableHa": false,
    "enableShardsOnCoordinator": false,
    "maintenanceWindow": {
      "customWindow": "Disabled",
      "dayOfWeek": 0,
      "startHour": 0,
      "startMinute": 0
    },
    "nodeCount": 3,
    "nodeEnablePublicIpAccess": false,
    "nodeServerEdition": "MemoryOptimized",
    "nodeStorageQuotaInMb": 2097152,
    "nodeVCores": 16,
    "passwordEnabled": "enabled",
    "postgresqlVersion": "14",
    "preferredPrimaryZone": "1",
    "privateEndpointConnections": [],
    "provisioningState": "Succeeded",
    "readReplicas": [],
    "serverNames": [
      {
        "name": "testcluster1-c",
        "fullyQualifiedDomainName": "testcluster1-c.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w0",
        "fullyQualifiedDomainName": "testcluster1-w0.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w1",
        "fullyQualifiedDomainName": "testcluster1-w1.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w2",
        "fullyQualifiedDomainName": "testcluster1-w2.postgres.database.azure.com"
      }
    ],
    "sourceResourceId": null,
    "state": "Ready"
  },
  "systemData": {
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "createdBy": "user1",
    "createdByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User"
  }
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/westus/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-03-02-preview
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/westus/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-03-02-preview
{
  "name": "testcluster",
  "type": "Microsoft.DBforPostgreSQL/serverGroupsv2",
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster",
  "location": "westus",
  "properties": {
    "aadAuthEnabled": "disabled",
    "administratorLogin": "citus",
    "citusVersion": "11.1",
    "coordinatorEnablePublicIpAccess": true,
    "coordinatorServerEdition": "GeneralPurpose",
    "coordinatorStorageQuotaInMb": 2097152,
    "coordinatorVCores": 16,
    "dataEncryption": {
      "type": "SystemManaged"
    },
    "databaseName": "citus",
    "earliestRestoreTime": "2020-09-14T00:00:37.467Z",
    "enableHa": false,
    "enableShardsOnCoordinator": false,
    "maintenanceWindow": {
      "customWindow": "Disabled",
      "dayOfWeek": 0,
      "startHour": 0,
      "startMinute": 0
    },
    "nodeCount": 3,
    "nodeEnablePublicIpAccess": false,
    "nodeServerEdition": "MemoryOptimized",
    "nodeStorageQuotaInMb": 2097152,
    "nodeVCores": 16,
    "passwordEnabled": "enabled",
    "postgresqlVersion": "14",
    "preferredPrimaryZone": "1",
    "privateEndpointConnections": [],
    "provisioningState": "Succeeded",
    "readReplicas": [],
    "serverNames": [
      {
        "name": "testcluster1-c",
        "fullyQualifiedDomainName": "testcluster1-c.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w0",
        "fullyQualifiedDomainName": "testcluster1-w0.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w1",
        "fullyQualifiedDomainName": "testcluster1-w1.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w2",
        "fullyQualifiedDomainName": "testcluster1-w2.postgres.database.azure.com"
      }
    ],
    "sourceResourceId": null,
    "state": "Ready"
  },
  "systemData": {
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "createdBy": "user1",
    "createdByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User"
  }
}

Scale out: Add new worker nodes

Образец запроса

PATCH https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster?api-version=2023-03-02-preview

{
  "properties": {
    "nodeCount": 2
  }
}

Пример ответа

{
  "name": "testcluster",
  "type": "Microsoft.DBforPostgreSQL/serverGroupsv2",
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster",
  "location": "westus",
  "properties": {
    "aadAuthEnabled": "disabled",
    "citusVersion": "11.1",
    "coordinatorEnablePublicIpAccess": true,
    "coordinatorServerEdition": "GeneralPurpose",
    "coordinatorStorageQuotaInMb": 524288,
    "coordinatorVCores": 4,
    "dataEncryption": {
      "type": "SystemManaged"
    },
    "databaseName": "citus",
    "earliestRestoreTime": null,
    "enableGeoBackup": false,
    "enableHa": true,
    "enableShardsOnCoordinator": false,
    "maintenanceWindow": {
      "customWindow": "Disabled",
      "dayOfWeek": 0,
      "startHour": 0,
      "startMinute": 0
    },
    "nodeCount": 2,
    "nodeEnablePublicIpAccess": false,
    "nodeServerEdition": "MemoryOptimized",
    "nodeStorageQuotaInMb": 524288,
    "nodeVCores": 8,
    "passwordEnabled": "enabled",
    "postgresqlVersion": "15",
    "preferredPrimaryZone": "1",
    "privateEndpointConnections": [],
    "provisioningState": "Provisioning",
    "readReplicas": [],
    "serverNames": [
      {
        "name": "testcluster-c",
        "fullyQualifiedDomainName": "c.testcluster.postgres.database.azure.com"
      },
      {
        "name": "testcluster-w0",
        "fullyQualifiedDomainName": "w0.testcluster.postgres.database.azure.com"
      },
      {
        "name": "testcluster-w1",
        "fullyQualifiedDomainName": "w1.testcluster.postgres.database.azure.com"
      }
    ],
    "sourceResourceId": null,
    "state": "Provisioning"
  },
  "systemData": {
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "createdBy": "user1",
    "createdByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User"
  }
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/westus/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-03-02-preview
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/westus/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-03-02-preview
{
  "name": "testcluster",
  "type": "Microsoft.DBforPostgreSQL/serverGroupsv2",
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster",
  "location": "westus",
  "properties": {
    "aadAuthEnabled": "disabled",
    "citusVersion": "11.1",
    "coordinatorEnablePublicIpAccess": true,
    "coordinatorServerEdition": "GeneralPurpose",
    "coordinatorStorageQuotaInMb": 524288,
    "coordinatorVCores": 4,
    "dataEncryption": {
      "type": "SystemManaged"
    },
    "databaseName": "citus",
    "earliestRestoreTime": null,
    "enableGeoBackup": false,
    "enableHa": true,
    "enableShardsOnCoordinator": false,
    "maintenanceWindow": {
      "customWindow": "Disabled",
      "dayOfWeek": 0,
      "startHour": 0,
      "startMinute": 0
    },
    "nodeCount": 2,
    "nodeEnablePublicIpAccess": false,
    "nodeServerEdition": "MemoryOptimized",
    "nodeStorageQuotaInMb": 524288,
    "nodeVCores": 8,
    "passwordEnabled": "enabled",
    "postgresqlVersion": "15",
    "preferredPrimaryZone": "1",
    "privateEndpointConnections": [],
    "provisioningState": "Provisioning",
    "readReplicas": [],
    "serverNames": [
      {
        "name": "testcluster-c",
        "fullyQualifiedDomainName": "c.testcluster.postgres.database.azure.com"
      },
      {
        "name": "testcluster-w0",
        "fullyQualifiedDomainName": "w0.testcluster.postgres.database.azure.com"
      },
      {
        "name": "testcluster-w1",
        "fullyQualifiedDomainName": "w1.testcluster.postgres.database.azure.com"
      }
    ],
    "sourceResourceId": null,
    "state": "Provisioning"
  },
  "systemData": {
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "createdBy": "user1",
    "createdByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User"
  }
}

Scale up storage

Образец запроса

PATCH https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster?api-version=2023-03-02-preview

{
  "properties": {
    "nodeStorageQuotaInMb": 2097152
  }
}

Пример ответа

{
  "name": "testcluster",
  "type": "Microsoft.DBforPostgreSQL/serverGroupsv2",
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster",
  "location": "westus",
  "properties": {
    "aadAuthEnabled": "disabled",
    "administratorLogin": "citus",
    "citusVersion": "11.1",
    "coordinatorEnablePublicIpAccess": true,
    "coordinatorServerEdition": "GeneralPurpose",
    "coordinatorStorageQuotaInMb": 2097152,
    "coordinatorVCores": 16,
    "dataEncryption": {
      "type": "SystemManaged"
    },
    "databaseName": "citus",
    "earliestRestoreTime": "2020-09-14T00:00:37.467Z",
    "enableHa": false,
    "enableShardsOnCoordinator": false,
    "maintenanceWindow": {
      "customWindow": "Disabled",
      "dayOfWeek": 0,
      "startHour": 0,
      "startMinute": 0
    },
    "nodeCount": 3,
    "nodeEnablePublicIpAccess": false,
    "nodeServerEdition": "MemoryOptimized",
    "nodeStorageQuotaInMb": 2097152,
    "nodeVCores": 16,
    "passwordEnabled": "enabled",
    "postgresqlVersion": "14",
    "preferredPrimaryZone": "1",
    "privateEndpointConnections": [],
    "provisioningState": "Succeeded",
    "readReplicas": [],
    "serverNames": [
      {
        "name": "testcluster1-c",
        "fullyQualifiedDomainName": "testcluster1-c.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w0",
        "fullyQualifiedDomainName": "testcluster1-w0.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w1",
        "fullyQualifiedDomainName": "testcluster1-w1.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w2",
        "fullyQualifiedDomainName": "testcluster1-w2.postgres.database.azure.com"
      }
    ],
    "sourceResourceId": null,
    "state": "Ready"
  },
  "systemData": {
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "createdBy": "user1",
    "createdByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User"
  }
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/westus/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-03-02-preview
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/westus/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-03-02-preview
{
  "name": "testcluster",
  "type": "Microsoft.DBforPostgreSQL/serverGroupsv2",
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster",
  "location": "westus",
  "properties": {
    "aadAuthEnabled": "disabled",
    "administratorLogin": "citus",
    "citusVersion": "11.1",
    "coordinatorEnablePublicIpAccess": true,
    "coordinatorServerEdition": "GeneralPurpose",
    "coordinatorStorageQuotaInMb": 2097152,
    "coordinatorVCores": 16,
    "dataEncryption": {
      "type": "SystemManaged"
    },
    "databaseName": "citus",
    "earliestRestoreTime": "2020-09-14T00:00:37.467Z",
    "enableHa": false,
    "enableShardsOnCoordinator": false,
    "maintenanceWindow": {
      "customWindow": "Disabled",
      "dayOfWeek": 0,
      "startHour": 0,
      "startMinute": 0
    },
    "nodeCount": 3,
    "nodeEnablePublicIpAccess": false,
    "nodeServerEdition": "MemoryOptimized",
    "nodeStorageQuotaInMb": 2097152,
    "nodeVCores": 16,
    "passwordEnabled": "enabled",
    "postgresqlVersion": "14",
    "preferredPrimaryZone": "1",
    "privateEndpointConnections": [],
    "provisioningState": "Succeeded",
    "readReplicas": [],
    "serverNames": [
      {
        "name": "testcluster1-c",
        "fullyQualifiedDomainName": "testcluster1-c.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w0",
        "fullyQualifiedDomainName": "testcluster1-w0.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w1",
        "fullyQualifiedDomainName": "testcluster1-w1.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w2",
        "fullyQualifiedDomainName": "testcluster1-w2.postgres.database.azure.com"
      }
    ],
    "sourceResourceId": null,
    "state": "Ready"
  },
  "systemData": {
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "createdBy": "user1",
    "createdByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User"
  }
}

Update multiple configuration settings of the cluster

Образец запроса

PATCH https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster?api-version=2023-03-02-preview

{
  "properties": {
    "administratorLoginPassword": "newpassword",
    "coordinatorVCores": 16,
    "nodeCount": 4,
    "nodeVCores": 16
  }
}

Пример ответа

{
  "name": "testcluster1",
  "type": "Microsoft.DBforPostgreSQL/serverGroupsv2",
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster1",
  "location": "westus",
  "properties": {
    "aadAuthEnabled": "disabled",
    "administratorLogin": "citus",
    "citusVersion": "11.1",
    "coordinatorEnablePublicIpAccess": true,
    "coordinatorServerEdition": "GeneralPurpose",
    "coordinatorStorageQuotaInMb": 2097152,
    "coordinatorVCores": 16,
    "dataEncryption": {
      "type": "SystemManaged"
    },
    "databaseName": "citus",
    "earliestRestoreTime": "2020-09-14T00:00:37.467Z",
    "enableHa": false,
    "enableShardsOnCoordinator": false,
    "maintenanceWindow": {
      "customWindow": "Disabled",
      "dayOfWeek": 0,
      "startHour": 0,
      "startMinute": 0
    },
    "nodeCount": 4,
    "nodeEnablePublicIpAccess": false,
    "nodeServerEdition": "MemoryOptimized",
    "nodeStorageQuotaInMb": 2097152,
    "nodeVCores": 16,
    "passwordEnabled": "enabled",
    "postgresqlVersion": "14",
    "preferredPrimaryZone": "1",
    "privateEndpointConnections": [],
    "provisioningState": "Succeeded",
    "readReplicas": [
      "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSQL/serverGroupsv2/testreadreplica-01",
      "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSQL/serverGroupsv2/testreadreplica-02"
    ],
    "serverNames": [
      {
        "name": "testcluster1-c",
        "fullyQualifiedDomainName": "testcluster1-c.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w0",
        "fullyQualifiedDomainName": "testcluster1-w0.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w1",
        "fullyQualifiedDomainName": "testcluster1-w1.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w2",
        "fullyQualifiedDomainName": "testcluster1-w2.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w3",
        "fullyQualifiedDomainName": "testcluster1-w2.postgres.database.azure.com"
      }
    ],
    "sourceResourceId": null,
    "state": "Ready"
  },
  "systemData": {
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "createdBy": "user1",
    "createdByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User"
  },
  "tags": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  }
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/westus/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-03-02-preview
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/westus/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-03-02-preview
{
  "name": "testcluster1",
  "type": "Microsoft.DBforPostgreSQL/serverGroupsv2",
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster1",
  "location": "westus",
  "properties": {
    "aadAuthEnabled": "disabled",
    "administratorLogin": "citus",
    "citusVersion": "11.1",
    "coordinatorEnablePublicIpAccess": true,
    "coordinatorServerEdition": "GeneralPurpose",
    "coordinatorStorageQuotaInMb": 2097152,
    "coordinatorVCores": 16,
    "dataEncryption": {
      "type": "SystemManaged"
    },
    "databaseName": "citus",
    "earliestRestoreTime": "2020-09-14T00:00:37.467Z",
    "enableHa": false,
    "enableShardsOnCoordinator": false,
    "maintenanceWindow": {
      "customWindow": "Disabled",
      "dayOfWeek": 0,
      "startHour": 0,
      "startMinute": 0
    },
    "nodeCount": 4,
    "nodeEnablePublicIpAccess": false,
    "nodeServerEdition": "MemoryOptimized",
    "nodeStorageQuotaInMb": 2097152,
    "nodeVCores": 16,
    "passwordEnabled": "enabled",
    "postgresqlVersion": "14",
    "preferredPrimaryZone": "1",
    "privateEndpointConnections": [],
    "provisioningState": "Succeeded",
    "readReplicas": [
      "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSQL/serverGroupsv2/testreadreplica-01",
      "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSQL/serverGroupsv2/testreadreplica-02"
    ],
    "serverNames": [
      {
        "name": "testcluster1-c",
        "fullyQualifiedDomainName": "testcluster1-c.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w0",
        "fullyQualifiedDomainName": "testcluster1-w0.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w1",
        "fullyQualifiedDomainName": "testcluster1-w1.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w2",
        "fullyQualifiedDomainName": "testcluster1-w2.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w3",
        "fullyQualifiedDomainName": "testcluster1-w2.postgres.database.azure.com"
      }
    ],
    "sourceResourceId": null,
    "state": "Ready"
  },
  "systemData": {
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "createdBy": "user1",
    "createdByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User"
  },
  "tags": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  }
}

Update or define maintenance window

Образец запроса

PATCH https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster?api-version=2023-03-02-preview

{
  "properties": {
    "maintenanceWindow": {
      "customWindow": "Enabled",
      "dayOfWeek": 0,
      "startHour": 8,
      "startMinute": 0
    }
  }
}

Пример ответа

{
  "name": "testcluster",
  "type": "Microsoft.DBforPostgreSQL/serverGroupsv2",
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster",
  "location": "westus",
  "properties": {
    "aadAuthEnabled": "disabled",
    "administratorLogin": "citus",
    "citusVersion": "11.1",
    "coordinatorEnablePublicIpAccess": true,
    "coordinatorServerEdition": "GeneralPurpose",
    "coordinatorStorageQuotaInMb": 2097152,
    "coordinatorVCores": 16,
    "dataEncryption": {
      "type": "SystemManaged"
    },
    "databaseName": "citus",
    "earliestRestoreTime": "2020-09-14T00:00:37.467Z",
    "enableHa": false,
    "enableShardsOnCoordinator": false,
    "maintenanceWindow": {
      "customWindow": "Enabled",
      "dayOfWeek": 0,
      "startHour": 8,
      "startMinute": 0
    },
    "nodeCount": 2,
    "nodeEnablePublicIpAccess": false,
    "nodeServerEdition": "MemoryOptimized",
    "nodeStorageQuotaInMb": 2097152,
    "nodeVCores": 16,
    "passwordEnabled": "enabled",
    "postgresqlVersion": "14",
    "preferredPrimaryZone": "1",
    "privateEndpointConnections": [],
    "provisioningState": "Succeeded",
    "readReplicas": [],
    "serverNames": [
      {
        "name": "testcluster1-c",
        "fullyQualifiedDomainName": "testcluster1-c.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w0",
        "fullyQualifiedDomainName": "testcluster1-w0.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w1",
        "fullyQualifiedDomainName": "testcluster1-w1.postgres.database.azure.com"
      }
    ],
    "sourceResourceId": null,
    "state": "Ready"
  },
  "systemData": {
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "createdBy": "user1",
    "createdByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User"
  }
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/westus/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-03-02-preview
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/westus/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-03-02-preview
{
  "name": "testcluster",
  "type": "Microsoft.DBforPostgreSQL/serverGroupsv2",
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster",
  "location": "westus",
  "properties": {
    "aadAuthEnabled": "disabled",
    "administratorLogin": "citus",
    "citusVersion": "11.1",
    "coordinatorEnablePublicIpAccess": true,
    "coordinatorServerEdition": "GeneralPurpose",
    "coordinatorStorageQuotaInMb": 2097152,
    "coordinatorVCores": 16,
    "dataEncryption": {
      "type": "SystemManaged"
    },
    "databaseName": "citus",
    "earliestRestoreTime": "2020-09-14T00:00:37.467Z",
    "enableHa": false,
    "enableShardsOnCoordinator": false,
    "maintenanceWindow": {
      "customWindow": "Enabled",
      "dayOfWeek": 0,
      "startHour": 8,
      "startMinute": 0
    },
    "nodeCount": 2,
    "nodeEnablePublicIpAccess": false,
    "nodeServerEdition": "MemoryOptimized",
    "nodeStorageQuotaInMb": 2097152,
    "nodeVCores": 16,
    "passwordEnabled": "enabled",
    "postgresqlVersion": "14",
    "preferredPrimaryZone": "1",
    "privateEndpointConnections": [],
    "provisioningState": "Succeeded",
    "readReplicas": [],
    "serverNames": [
      {
        "name": "testcluster1-c",
        "fullyQualifiedDomainName": "testcluster1-c.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w0",
        "fullyQualifiedDomainName": "testcluster1-w0.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w1",
        "fullyQualifiedDomainName": "testcluster1-w1.postgres.database.azure.com"
      }
    ],
    "sourceResourceId": null,
    "state": "Ready"
  },
  "systemData": {
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "createdBy": "user1",
    "createdByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User"
  }
}

Определения

Имя Описание
AadEnabledEnum

Указывает, был ли кластер создан с помощью проверки подлинности AAD.

ActiveDirectoryAuth
AuthConfig

Конфигурация проверки подлинности кластера.

Cluster

Представляет кластер.

ClusterForUpdate

Представляет кластер для обновления.

createdByType

Тип удостоверения, создавшего ресурс.

DataEncryption

Свойства шифрования данных кластера.

DataEncryptionType
ErrorAdditionalInfo

Дополнительные сведения об ошибке управления ресурсами.

ErrorDetail

Сведения об ошибке.

ErrorResponse

Ответ на ошибку

IdentityProperties

Описывает удостоверение кластера.

IdentityType
MaintenanceWindow

Планирование параметров для регулярных обновлений кластера.

PasswordAuth
PasswordEnabledEnum

Указывает, был ли кластер создан паролем или с помощью проверки подлинности AAD.

PrivateEndpointProperty

Свойство для представления идентификатора ресурса частной конечной точки.

PrivateEndpointServiceConnectionStatus

Состояние подключения к частной конечной точке.

PrivateLinkServiceConnectionState

Коллекция сведений о состоянии подключения между потребителем службы и поставщиком.

ServerNameItem

Объект name для сервера.

SimplePrivateEndpointConnection

Подключение к частной конечной точке.

systemData

Метаданные, относящиеся к созданию и последнему изменении ресурса.

UserAssignedIdentity

Свойства назначаемого пользователем удостоверения

AadEnabledEnum

Указывает, был ли кластер создан с помощью проверки подлинности AAD.

Значение Описание
enabled
disabled

ActiveDirectoryAuth

Значение Описание
enabled
disabled

AuthConfig

Конфигурация проверки подлинности кластера.

Имя Тип Описание
activeDirectoryAuth

ActiveDirectoryAuth

passwordAuth

PasswordAuth

Cluster

Представляет кластер.

Имя Тип Описание
id

string (arm-id)

Полный идентификатор ресурса для ресурса. Например, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

identity

IdentityProperties

Описывает удостоверение кластера.

location

string

Географическое расположение, в котором находится ресурс

name

string

Имя ресурса

properties.aadAuthEnabled

AadEnabledEnum

Указывает, был ли кластер создан с помощью проверки подлинности AAD.

properties.administratorLogin

string

Имя входа администратора серверов в кластере.

properties.administratorLoginPassword

string (password)

Пароль для входа администратора. Требуется для создания.

properties.authConfig

AuthConfig

Конфигурация проверки подлинности кластера.

properties.citusVersion

string

Версия расширения Citus на всех серверах кластера.

properties.coordinatorEnablePublicIpAccess

boolean

Если общедоступный доступ включен в координаторе.

properties.coordinatorServerEdition

string

Выпуск сервера координатора (по умолчанию: GeneralPurpose). Требуется для создания.

properties.coordinatorStorageQuotaInMb

integer (int32)

Хранилище сервера в МБ. Требуется для создания. Дополнительные сведения см. в https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute.

properties.coordinatorVCores

integer (int32)

Количество виртуальных ядер сервера (максимум: 96). Требуется для создания. Дополнительные сведения см. в https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute.

properties.dataEncryption

DataEncryption

Свойства шифрования данных кластера.

properties.databaseName

string

Имя базы данных кластера. Поддерживается только одна база данных на кластер.

properties.earliestRestoreTime

string (date-time)

Самое раннее время восстановления (ISO8601 формат) для кластера.

properties.enableGeoBackup

boolean

Если резервное копирование кластера хранится в другом регионе Azure в дополнение к копии резервной копии, хранящейся в регионе кластера. Включена только во время создания кластера.

properties.enableHa

boolean

Если высокий уровень доступности (HA) включен или не для кластера.

properties.enableShardsOnCoordinator

boolean

Если распределенные таблицы размещаются на координаторе или нет. Должно быть задано значение true в кластерах с одним узлом. Требует перебалансирования сегментов после изменения значения.

properties.maintenanceWindow

MaintenanceWindow

Период обслуживания кластера.

properties.nodeCount

integer (int32)

Количество рабочих узлов кластера. Если число узлов равно 0, он представляет конфигурацию одного узла с возможностью создания распределенных таблиц на этом узле. 2 или более рабочих узлов представляют конфигурацию с несколькими узлами. Значение счетчика узлов не может быть 1. Требуется для создания.

properties.nodeEnablePublicIpAccess

boolean

Если общедоступный доступ включен на рабочих узлах.

properties.nodeServerEdition

string

Выпуск сервера узлов (по умолчанию: MemoryOptimized).

properties.nodeStorageQuotaInMb

integer (int32)

Хранилище в МБ на каждом рабочем узле. Дополнительные сведения см. в https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute.

properties.nodeVCores

integer (int32)

Вычисления в виртуальных ядрах на каждом рабочем узле (максимум: 104). Дополнительные сведения см. в https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute.

properties.passwordEnabled

PasswordEnabledEnum

Указывает, был ли кластер создан паролем или с помощью проверки подлинности AAD.

properties.pointInTimeUTC

string (date-time)

Дата и время в формате UTC (ISO8601 формате) для восстановления кластера.

properties.postgresqlVersion

string

Основная версия PostgreSQL на всех серверах кластера.

properties.preferredPrimaryZone

string

Предпочтительная первичная зона доступности (AZ) для всех серверов кластера.

properties.privateEndpointConnections

SimplePrivateEndpointConnection[]

Подключения к частной конечной точке для кластера.

properties.provisioningState

string

Состояние подготовки кластера

properties.readReplicas

string[]

Массив кластеров реплик чтения.

properties.serverNames

ServerNameItem[]

Список имен серверов в кластере

properties.sourceLocation

string

Регион Azure исходного кластера для кластеров реплик чтения.

properties.sourceResourceId

string

Идентификатор ресурса исходного кластера для кластеров реплик чтения.

properties.state

string

Состояние кластера или сервера, видимого пользователю.

systemData

systemData

Метаданные Azure Resource Manager, содержащие данные createdBy и modifiedBy.

tags

object

Теги ресурсов.

type

string

Тип ресурса. Например, "Microsoft.Compute/virtualMachines" или "Microsoft.Storage/storageAccounts"

ClusterForUpdate

Представляет кластер для обновления.

Имя Тип Описание
identity

IdentityProperties

Описывает удостоверение кластера.

properties.administratorLoginPassword

string (password)

Пароль для входа администратора. Каждый кластер создается с предварительно определенной административной ролью с именем citus.

properties.citusVersion

string

Версия расширения Citus на всех серверах кластера.

properties.coordinatorEnablePublicIpAccess

boolean

Если общедоступный доступ включен в координаторе.

properties.coordinatorServerEdition

string

Выпуск координатора (по умолчанию: GeneralPurpose).

properties.coordinatorStorageQuotaInMb

integer (int32)

Хранилище координатора в МБ.

properties.coordinatorVCores

integer (int32)

Количество виртуальных ядер координатора (максимум: 96).

properties.enableHa

boolean

Если высокий уровень доступности (HA) включен или не для кластера.

properties.enableShardsOnCoordinator

boolean

Если распределенные таблицы размещаются на координаторе или нет. Должно быть задано значение true в кластерах с одним узлом. Требует перебалансирования сегментов после изменения значения.

properties.maintenanceWindow

MaintenanceWindow

Период обслуживания кластера.

properties.nodeCount

integer (int32)

Количество рабочих узлов кластера. Если число узлов равно 0, он представляет конфигурацию одного узла с возможностью создания распределенных таблиц на этом узле. 2 или более рабочих узлов представляют конфигурацию с несколькими узлами. Значение счетчика узлов не может быть 1.

properties.nodeEnablePublicIpAccess

boolean

Если общедоступный доступ включен на рабочих узлах.

properties.nodeServerEdition

string

Выпуск узла (по умолчанию: MemoryOptimized).

properties.nodeStorageQuotaInMb

integer (int32)

Хранилище в МБ на каждом рабочем узле.

properties.nodeVCores

integer (int32)

Вычисления в виртуальных ядрах на каждом рабочем узле (максимум: 104).

properties.postgresqlVersion

string

Основная версия PostgreSQL на всех серверах кластера.

properties.preferredPrimaryZone

string

Предпочтительная первичная зона доступности (AZ) для всех серверов кластера.

tags

object

Метаданные, относящиеся к приложению, в виде пар "ключ-значение".

createdByType

Тип удостоверения, создавшего ресурс.

Значение Описание
User
Application
ManagedIdentity
Key

DataEncryption

Свойства шифрования данных кластера.

Имя Тип Описание
primaryKeyUri

string

Универсальный код ресурса (URI) для ключа в keyvault для шифрования данных первичного сервера.

primaryUserAssignedIdentityId

string

Идентификатор ресурса для удостоверения, назначаемого пользователем, для шифрования данных первичного сервера.

type

DataEncryptionType

DataEncryptionType

Значение Описание
AzureKeyVault
SystemAssigned

ErrorAdditionalInfo

Дополнительные сведения об ошибке управления ресурсами.

Имя Тип Описание
info

object

Дополнительные сведения.

type

string

Дополнительный тип сведений.

ErrorDetail

Сведения об ошибке.

Имя Тип Описание
additionalInfo

ErrorAdditionalInfo[]

Дополнительные сведения об ошибке.

code

string

Код ошибки.

details

ErrorDetail[]

Сведения об ошибке.

message

string

Сообщение об ошибке.

target

string

Целевой объект ошибки.

ErrorResponse

Ответ на ошибку

Имя Тип Описание
error

ErrorDetail

Объект ошибки.

IdentityProperties

Описывает удостоверение кластера.

Имя Тип Описание
type

IdentityType

userAssignedIdentities

<string,  UserAssignedIdentity>

Набор назначенных пользователем удостоверений, связанных с ресурсом. Ключи словаря userAssignedIdentities будут идентификаторами ресурсов ARM в форме: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. Значения словаря могут быть пустыми объектами ({}) в запросах.

IdentityType

Значение Описание
UserAssigned
SystemAssigned

MaintenanceWindow

Планирование параметров для регулярных обновлений кластера.

Имя Тип Описание
customWindow

string

Указывает, включен ли пользовательский период обслуживания.

dayOfWeek

integer (int32)

Предпочтительный день недели для периода обслуживания.

startHour

integer (int32)

Начало часа в течение предпочтительного дня недели для периода обслуживания.

startMinute

integer (int32)

Начало минуты в течение начального часа для периода обслуживания.

PasswordAuth

Значение Описание
enabled
disabled

PasswordEnabledEnum

Указывает, был ли кластер создан паролем или с помощью проверки подлинности AAD.

Значение Описание
enabled
disabled

PrivateEndpointProperty

Свойство для представления идентификатора ресурса частной конечной точки.

Имя Тип Описание
id

string

Идентификатор ресурса частной конечной точки.

PrivateEndpointServiceConnectionStatus

Состояние подключения к частной конечной точке.

Значение Описание
Pending
Approved
Rejected

PrivateLinkServiceConnectionState

Коллекция сведений о состоянии подключения между потребителем службы и поставщиком.

Имя Тип Описание
actionsRequired

string

Сообщение, указывающее, требуются ли изменения в поставщике услуг, требуются какие-либо обновления для потребителя.

description

string

Причина утверждения или отклонения подключения.

status

PrivateEndpointServiceConnectionStatus

Указывает, утверждено ли подключение, отклонено или удалено владельцем службы.

ServerNameItem

Объект name для сервера.

Имя Тип Описание
fullyQualifiedDomainName

string

Полное доменное имя сервера.

name

string

Имя сервера.

SimplePrivateEndpointConnection

Подключение к частной конечной точке.

Имя Тип Описание
id

string (arm-id)

Полный идентификатор ресурса для ресурса. Например, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

name

string

Имя ресурса

properties.groupIds

string[]

Идентификаторы групп подключения к частной конечной точке.

properties.privateEndpoint

PrivateEndpointProperty

Частная конечная точка, к которой принадлежит подключение.

properties.privateLinkServiceConnectionState

PrivateLinkServiceConnectionState

Коллекция сведений о состоянии подключения между потребителем службы и поставщиком.

systemData

systemData

Метаданные Azure Resource Manager, содержащие данные createdBy и modifiedBy.

type

string

Тип ресурса. Например, "Microsoft.Compute/virtualMachines" или "Microsoft.Storage/storageAccounts"

systemData

Метаданные, относящиеся к созданию и последнему изменении ресурса.

Имя Тип Описание
createdAt

string (date-time)

Метка времени создания ресурса (UTC).

createdBy

string

Удостоверение, создающее ресурс.

createdByType

createdByType

Тип удостоверения, создавшего ресурс.

lastModifiedAt

string (date-time)

Метка времени последнего изменения ресурса (UTC)

lastModifiedBy

string

Идентификатор, который последний раз изменил ресурс.

lastModifiedByType

createdByType

Тип удостоверения, который последний раз изменил ресурс.

UserAssignedIdentity

Свойства назначаемого пользователем удостоверения

Имя Тип Описание
clientId

string (uuid)

Идентификатор клиента назначенного удостоверения.

principalId

string (uuid)

Основной идентификатор назначенного удостоверения.