From d40b67c6d47597f5254b353f53fb2db9bd4de8b6 Mon Sep 17 00:00:00 2001 From: Sena Gungor Date: Tue, 31 Jan 2023 10:50:56 +0300 Subject: [PATCH 1/6] Update response codes to 201 --- .../examples/ConfigurationListByCluster.json | 12 +- .../examples/ConfigurationListByServer.json | 9 +- .../ConfigurationUpdateCoordinator.json | 2 +- .../examples/ConfigurationUpdateNode.json | 2 +- .../examples/FirewallRuleCreate.json | 2 +- .../2022-11-08/examples/FirewallRuleGet.json | 3 +- .../examples/FirewallRuleListByCluster.json | 6 +- ...ivateEndpointConnectionCreateOrUpdate.json | 2 +- .../2022-11-08/examples/RoleCreate.json | 2 +- .../stable/2022-11-08/examples/RoleGet.json | 33 ++++ .../examples/RoleListByCluster.json | 8 +- .../stable/2022-11-08/postgresqlhsc.json | 145 +++++++++++++++++- 12 files changed, 204 insertions(+), 22 deletions(-) create mode 100644 specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/RoleGet.json diff --git a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationListByCluster.json b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationListByCluster.json index 5a23e3a93f92..2eb94b5bbfb8 100644 --- a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationListByCluster.json +++ b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationListByCluster.json @@ -38,7 +38,8 @@ "defaultValue": "on", "source": "user-override" } - ] + ], + "provisioningState": "Succeeded" } }, { @@ -70,7 +71,8 @@ "defaultValue": "safe_encoding", "source": "system-default" } - ] + ], + "provisioningState": "Succeeded" } }, { @@ -102,7 +104,8 @@ "defaultValue": "115712", "source": "system-default" } - ] + ], + "provisioningState": "Succeeded" } }, { @@ -134,7 +137,8 @@ "defaultValue": "sql_ascii", "source": "user-override" } - ] + ], + "provisioningState": "Succeeded" } } ] diff --git a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationListByServer.json b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationListByServer.json index 04262e9e1a76..d338f7238486 100644 --- a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationListByServer.json +++ b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationListByServer.json @@ -28,7 +28,8 @@ "defaultValue": "", "dataType": "String", "allowedValues": "[A-Za-z0-9._-]*", - "source": "system-default" + "source": "system-default", + "provisioningState": "Succeeded" } }, { @@ -49,7 +50,8 @@ "defaultValue": "on", "dataType": "Boolean", "allowedValues": "on,off", - "source": "system-default" + "source": "system-default", + "provisioningState": "Succeeded" } }, { @@ -70,7 +72,8 @@ "defaultValue": "on", "dataType": "Boolean", "allowedValues": "on,off", - "source": "system-default" + "source": "system-default", + "provisioningState": "Succeeded" } } ] diff --git a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationUpdateCoordinator.json b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationUpdateCoordinator.json index 6a61ac0ba0eb..075dd6bd9192 100644 --- a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationUpdateCoordinator.json +++ b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationUpdateCoordinator.json @@ -30,7 +30,7 @@ } } }, - "202": { + "201": { "headers": { "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2022-11-08", "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2022-11-08" diff --git a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationUpdateNode.json b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationUpdateNode.json index 0f5739497d9a..eaf081871787 100644 --- a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationUpdateNode.json +++ b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationUpdateNode.json @@ -30,7 +30,7 @@ } } }, - "202": { + "201": { "headers": { "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2022-11-08", "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2022-11-08" diff --git a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/FirewallRuleCreate.json b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/FirewallRuleCreate.json index ce9b77225c5e..43133f7698f0 100644 --- a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/FirewallRuleCreate.json +++ b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/FirewallRuleCreate.json @@ -32,7 +32,7 @@ } } }, - "202": { + "201": { "headers": { "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2022-11-08", "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2022-11-08" diff --git a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/FirewallRuleGet.json b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/FirewallRuleGet.json index baad985259ae..f144f64b7e12 100644 --- a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/FirewallRuleGet.json +++ b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/FirewallRuleGet.json @@ -22,7 +22,8 @@ }, "properties": { "startIpAddress": "0.0.0.0", - "endIpAddress": "255.255.255.255" + "endIpAddress": "255.255.255.255", + "provisioningState": "Succeeded" } } } diff --git a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/FirewallRuleListByCluster.json b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/FirewallRuleListByCluster.json index 0aaedac67e9d..f979e08c8e6f 100644 --- a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/FirewallRuleListByCluster.json +++ b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/FirewallRuleListByCluster.json @@ -23,7 +23,8 @@ }, "properties": { "startIpAddress": "0.0.0.0", - "endIpAddress": "255.255.255.255" + "endIpAddress": "255.255.255.255", + "provisioningState": "Succeeded" } }, { @@ -40,7 +41,8 @@ }, "properties": { "startIpAddress": "1.0.0.0", - "endIpAddress": "255.0.0.0" + "endIpAddress": "255.0.0.0", + "provisioningState": "Succeeded" } } ] diff --git a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/PrivateEndpointConnectionCreateOrUpdate.json b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/PrivateEndpointConnectionCreateOrUpdate.json index 65783a2c081d..447d337421bf 100644 --- a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/PrivateEndpointConnectionCreateOrUpdate.json +++ b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/PrivateEndpointConnectionCreateOrUpdate.json @@ -33,7 +33,7 @@ } } }, - "202": { + "201": { "headers": { "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2022-11-08", "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2022-11-08" diff --git a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/RoleCreate.json b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/RoleCreate.json index a173ebc2cefc..799eb738ecff 100644 --- a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/RoleCreate.json +++ b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/RoleCreate.json @@ -32,7 +32,7 @@ "properties": {} } }, - "202": { + "201": { "headers": { "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2022-11-08", "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2022-11-08" diff --git a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/RoleGet.json b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/RoleGet.json new file mode 100644 index 000000000000..6df359ae34af --- /dev/null +++ b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/RoleGet.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestGroup", + "clusterName": "pgtestsvc4", + "roleName": "role1", + "api-version": "2022-11-08" + }, + "responses": { + "200": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/southeastasia/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2022-11-08", + "Location": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/southeastasia/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2022-11-08" + }, + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/pgtestsvc4/roles/role1", + "name": "role1", + "type": "Microsoft.DBforPostgreSQL/serverGroupsv2/roles", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/RoleListByCluster.json b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/RoleListByCluster.json index 27967abaf9c6..d76f6465d488 100644 --- a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/RoleListByCluster.json +++ b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/RoleListByCluster.json @@ -21,7 +21,9 @@ "lastModifiedByType": "User", "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" }, - "properties": {} + "properties": { + "provisioningState": "Succeeded" + } }, { "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/pgtestsvc4/roles/role2", @@ -35,7 +37,9 @@ "lastModifiedByType": "User", "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" }, - "properties": {} + "properties": { + "provisioningState": "Succeeded" + } } ] } diff --git a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/postgresqlhsc.json b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/postgresqlhsc.json index 7d106f1d7e30..1a2da5b6552b 100644 --- a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/postgresqlhsc.json +++ b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/postgresqlhsc.json @@ -641,7 +641,7 @@ "$ref": "#/definitions/ServerConfiguration" } }, - "202": { + "201": { "description": "Accepted", "schema": { "$ref": "#/definitions/ServerConfiguration" @@ -713,7 +713,7 @@ "$ref": "#/definitions/ServerConfiguration" } }, - "202": { + "201": { "description": "Accepted", "schema": { "$ref": "#/definitions/ServerConfiguration" @@ -785,7 +785,7 @@ "$ref": "#/definitions/FirewallRule" } }, - "202": { + "201": { "description": "Accepted", "schema": { "$ref": "#/definitions/FirewallRule" @@ -952,6 +952,49 @@ } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/roles/{roleName}": { + "get": { + "description": "Gets information about a cluster role.", + "tags": [ + "Roles" + ], + "operationId": "Roles_Get", + "x-ms-examples": { + "Get the role of the cluster": { + "$ref": "./examples/RoleGet.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ClusterNameParameter" + }, + { + "$ref": "#/parameters/RoleNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Role" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + } + }, "put": { "tags": [ "Roles" @@ -1000,7 +1043,7 @@ "$ref": "#/definitions/Role" } }, - "202": { + "201": { "description": "Accepted", "schema": { "$ref": "#/definitions/Role" @@ -1551,7 +1594,7 @@ "$ref": "../../../../../common-types/resource-management/v4/privatelinks.json#/definitions/PrivateEndpointConnection" } }, - "202": { + "201": { "description": "Accepted", "schema": { "$ref": "../../../../../common-types/resource-management/v4/privatelinks.json#/definitions/PrivateEndpointConnection" @@ -2310,6 +2353,11 @@ }, "x-ms-identifiers": [], "uniqueItems": true + }, + "provisioningState": { + "type": "string", + "description": "Provisioning state of the configuration", + "readOnly": true } }, "required": [ @@ -2424,6 +2472,11 @@ "requiresRestart": { "type": "boolean", "description": "If configuration change requires restart." + }, + "provisioningState": { + "type": "string", + "description": "Provisioning state of the configuration", + "readOnly": true } }, "required": [ @@ -2487,6 +2540,26 @@ } } }, + "FirewallRuleProperties2": { + "description": "The properties of a cluster firewall rule.", + "type": "object", + "properties": { + "startIpAddress": { + "type": "string", + "description": "The start IP address of the cluster firewall rule. Must be IPv4 format.", + "pattern": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$" + }, + "endIpAddress": { + "type": "string", + "description": "The end IP address of the cluster firewall rule. Must be IPv4 format.", + "pattern": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$" + } + }, + "required": [ + "startIpAddress", + "endIpAddress" + ] + }, "FirewallRuleProperties": { "description": "The properties of a cluster firewall rule.", "type": "object", @@ -2500,6 +2573,11 @@ "type": "string", "description": "The end IP address of the cluster firewall rule. Must be IPv4 format.", "pattern": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$" + }, + "provisioningState": { + "type": "string", + "description": "Provisioning state of the firewall rule", + "readOnly": true } }, "required": [ @@ -2507,6 +2585,20 @@ "endIpAddress" ] }, + "FirewallRule2": { + "description": "The properties of a cluster firewall rule.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/FirewallRuleProperties2" + } + } + }, "FirewallRule": { "description": "Represents a cluster firewall rule.", "type": "object", @@ -2539,6 +2631,25 @@ } } }, + "RoleProperties2": { + "properties": { + "password": { + "type": "string", + "x-ms-secret": true, + "format": "password", + "x-ms-mutability": [ + "create", + "update" + ], + "description": "The password of the cluster role." + } + }, + "required": [ + "password" + ], + "description": "The properties of a cluster role.", + "type": "object" + }, "RoleProperties": { "properties": { "password": { @@ -2550,6 +2661,11 @@ "update" ], "description": "The password of the cluster role." + }, + "provisioningState": { + "type": "string", + "description": "Provisioning state of the cluster role", + "readOnly": true } }, "required": [ @@ -2558,6 +2674,25 @@ "description": "The properties of a cluster role.", "type": "object" }, + "Role2": { + "description": "Represents a cluster role.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/RoleProperties2", + "x-ms-client-flatten": true, + "description": "The properties of a role." + } + }, + "required": [ + "properties" + ] + }, "Role": { "description": "Represents a cluster role.", "type": "object", From 48e77abb0d74833c01e14e56f731e8f631af02f1 Mon Sep 17 00:00:00 2001 From: Sena Gungor Date: Tue, 31 Jan 2023 12:39:19 +0300 Subject: [PATCH 2/6] Add server configuration get --- .../examples/ConfigurationGetCoordinator.json | 29 +++ .../examples/ConfigurationGetNode.json | 29 +++ .../stable/2022-11-08/postgresqlhsc.json | 187 ++++++++++-------- 3 files changed, 161 insertions(+), 84 deletions(-) create mode 100644 specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetCoordinator.json create mode 100644 specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetNode.json diff --git a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetCoordinator.json b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetCoordinator.json new file mode 100644 index 000000000000..8a07fd7c3c66 --- /dev/null +++ b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetCoordinator.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestResourceGroup", + "clusterName": "hsctestsg", + "configurationName": "array_nulls", + "api-version": "2022-11-08" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/hsctestsg/configurations/array_nulls", + "name": "array_nulls", + "type": "Microsoft.DBforPostgreSQL/serverGroupsv2/configurations/coordinator", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "value": "on" + } + } + } + } +} diff --git a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetNode.json b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetNode.json new file mode 100644 index 000000000000..394a1722f7cf --- /dev/null +++ b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetNode.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "TestResourceGroup", + "clusterName": "hsctestsg", + "configurationName": "array_nulls", + "api-version": "2022-11-08" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/hsctestsg/configurations/array_nulls", + "name": "array_nulls", + "type": "Microsoft.DBforPostgreSQL/serverGroupsv2/configurations/node", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-01-02T17:18:19.1234567Z" + }, + "properties": { + "value": "off" + } + } + } + } +} diff --git a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/postgresqlhsc.json b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/postgresqlhsc.json index 1a2da5b6552b..6f26e5539e0c 100644 --- a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/postgresqlhsc.json +++ b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/postgresqlhsc.json @@ -593,6 +593,49 @@ } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/coordinatorConfigurations/{configurationName}": { + "get": { + "description": "Gets information of a configuration for coordinator.", + "tags": [ + "Configurations" + ], + "operationId": "Configurations_GetCoordinator", + "x-ms-examples": { + "Get configuration details for coordinator.": { + "$ref": "./examples/ConfigurationGetCoordinator.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ClusterNameParameter" + }, + { + "$ref": "#/parameters/ConfigurationNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerConfiguration" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + } + }, "put": { "description": "Updates configuration of coordinator in a cluster", "tags": [ @@ -665,6 +708,49 @@ } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/nodeConfigurations/{configurationName}": { + "get": { + "description": "Gets information of a configuration for node.", + "tags": [ + "Configurations" + ], + "operationId": "Configurations_GetCoordinator", + "x-ms-examples": { + "Get configuration details for node.": { + "$ref": "./examples/ConfigurationGetNode.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ClusterNameParameter" + }, + { + "$ref": "#/parameters/ConfigurationNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerConfiguration" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + } + }, "put": { "description": "Updates configuration of nodes in a cluster", "tags": [ @@ -2471,7 +2557,8 @@ }, "requiresRestart": { "type": "boolean", - "description": "If configuration change requires restart." + "description": "If configuration change requires restart.", + "readOnly": true }, "provisioningState": { "type": "string", @@ -2488,17 +2575,8 @@ "type": "object", "properties": { "properties": { - "description": "Represents a configuration properties", - "type": "object", - "properties": { - "value": { - "description": "Represents the value of a configuration.", - "type": "string" - } - }, - "required": [ - "value" - ], + "$ref": "#/definitions/ServerConfigurationRequestProperties", + "description": "The properties of a configuration.", "x-ms-client-flatten": true } }, @@ -2506,6 +2584,19 @@ "properties" ] }, + "ServerConfigurationRequestProperties": { + "description": "The properties of a server configuration request.", + "type": "object", + "properties": { + "value": { + "description": "Represents the value of a configuration.", + "type": "string" + } + }, + "required": [ + "value" + ] + }, "ServerConfiguration": { "description": "Represents a configuration.", "type": "object", @@ -2540,26 +2631,6 @@ } } }, - "FirewallRuleProperties2": { - "description": "The properties of a cluster firewall rule.", - "type": "object", - "properties": { - "startIpAddress": { - "type": "string", - "description": "The start IP address of the cluster firewall rule. Must be IPv4 format.", - "pattern": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$" - }, - "endIpAddress": { - "type": "string", - "description": "The end IP address of the cluster firewall rule. Must be IPv4 format.", - "pattern": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$" - } - }, - "required": [ - "startIpAddress", - "endIpAddress" - ] - }, "FirewallRuleProperties": { "description": "The properties of a cluster firewall rule.", "type": "object", @@ -2585,20 +2656,6 @@ "endIpAddress" ] }, - "FirewallRule2": { - "description": "The properties of a cluster firewall rule.", - "type": "object", - "allOf": [ - { - "$ref": "../../../../../common-types/resource-management/v4/types.json#/definitions/ProxyResource" - } - ], - "properties": { - "properties": { - "$ref": "#/definitions/FirewallRuleProperties2" - } - } - }, "FirewallRule": { "description": "Represents a cluster firewall rule.", "type": "object", @@ -2631,25 +2688,6 @@ } } }, - "RoleProperties2": { - "properties": { - "password": { - "type": "string", - "x-ms-secret": true, - "format": "password", - "x-ms-mutability": [ - "create", - "update" - ], - "description": "The password of the cluster role." - } - }, - "required": [ - "password" - ], - "description": "The properties of a cluster role.", - "type": "object" - }, "RoleProperties": { "properties": { "password": { @@ -2674,25 +2712,6 @@ "description": "The properties of a cluster role.", "type": "object" }, - "Role2": { - "description": "Represents a cluster role.", - "type": "object", - "allOf": [ - { - "$ref": "../../../../../common-types/resource-management/v4/types.json#/definitions/ProxyResource" - } - ], - "properties": { - "properties": { - "$ref": "#/definitions/RoleProperties2", - "x-ms-client-flatten": true, - "description": "The properties of a role." - } - }, - "required": [ - "properties" - ] - }, "Role": { "description": "Represents a cluster role.", "type": "object", From f5475135deaa20e2ef451d543352f83bf7715a52 Mon Sep 17 00:00:00 2001 From: Sena Gungor Date: Tue, 31 Jan 2023 13:19:28 +0300 Subject: [PATCH 3/6] Update password --- .../stable/2022-11-08/examples/ClusterCreate.json | 2 +- .../stable/2022-11-08/examples/RoleCreate.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterCreate.json b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterCreate.json index f45b57722c4f..b3b585547755 100644 --- a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterCreate.json +++ b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ClusterCreate.json @@ -7,7 +7,7 @@ "parameters": { "location": "westus", "properties": { - "administratorLoginPassword": "p@ssword1234", + "administratorLoginPassword": "password", "postgresqlVersion": "15", "citusVersion": "11.1", "enableHa": true, diff --git a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/RoleCreate.json b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/RoleCreate.json index 799eb738ecff..9466324c2693 100644 --- a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/RoleCreate.json +++ b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/RoleCreate.json @@ -7,7 +7,7 @@ "api-version": "2022-11-08", "parameters": { "properties": { - "password": "p@ssword1234" + "password": "password" } } }, From 97a4d09b51ca32872df293360cf10fbb389b4a7b Mon Sep 17 00:00:00 2001 From: Sena Gungor Date: Tue, 31 Jan 2023 13:29:30 +0300 Subject: [PATCH 4/6] Fix duplicate operation id --- .../stable/2022-11-08/postgresqlhsc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/postgresqlhsc.json b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/postgresqlhsc.json index 6f26e5539e0c..b6cf75afd359 100644 --- a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/postgresqlhsc.json +++ b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/postgresqlhsc.json @@ -713,7 +713,7 @@ "tags": [ "Configurations" ], - "operationId": "Configurations_GetCoordinator", + "operationId": "Configurations_GetNode", "x-ms-examples": { "Get configuration details for node.": { "$ref": "./examples/ConfigurationGetNode.json" From fcc26cfea7229c501a78eb7bfa69723dc22ae646 Mon Sep 17 00:00:00 2001 From: Sena Gungor Date: Tue, 31 Jan 2023 13:40:01 +0300 Subject: [PATCH 5/6] Update configuration example files --- .../stable/2022-11-08/examples/ConfigurationGetCoordinator.json | 2 +- .../stable/2022-11-08/examples/ConfigurationGetNode.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetCoordinator.json b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetCoordinator.json index 8a07fd7c3c66..95c66cacc5b6 100644 --- a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetCoordinator.json +++ b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetCoordinator.json @@ -9,7 +9,7 @@ "responses": { "200": { "body": { - "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/hsctestsg/configurations/array_nulls", + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/hsctestsg/coordinatorConfigurations/array_nulls", "name": "array_nulls", "type": "Microsoft.DBforPostgreSQL/serverGroupsv2/configurations/coordinator", "systemData": { diff --git a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetNode.json b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetNode.json index 394a1722f7cf..b016de1a0680 100644 --- a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetNode.json +++ b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetNode.json @@ -9,7 +9,7 @@ "responses": { "200": { "body": { - "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/hsctestsg/configurations/array_nulls", + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/hsctestsg/nodeConfigurations/array_nulls", "name": "array_nulls", "type": "Microsoft.DBforPostgreSQL/serverGroupsv2/configurations/node", "systemData": { From 21a65735bb6f281979afbd9a6b8d765b4174a0e4 Mon Sep 17 00:00:00 2001 From: Sena Gungor Date: Tue, 31 Jan 2023 13:41:48 +0300 Subject: [PATCH 6/6] Update configuration example files --- .../stable/2022-11-08/examples/ConfigurationGetCoordinator.json | 2 +- .../stable/2022-11-08/examples/ConfigurationGetNode.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetCoordinator.json b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetCoordinator.json index 95c66cacc5b6..5198efc5f2cc 100644 --- a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetCoordinator.json +++ b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetCoordinator.json @@ -11,7 +11,7 @@ "body": { "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/hsctestsg/coordinatorConfigurations/array_nulls", "name": "array_nulls", - "type": "Microsoft.DBforPostgreSQL/serverGroupsv2/configurations/coordinator", + "type": "Microsoft.DBforPostgreSQL/serverGroupsv2/coordinatorConfigurations", "systemData": { "createdBy": "user1", "createdByType": "User", diff --git a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetNode.json b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetNode.json index b016de1a0680..7f9b1f095d42 100644 --- a/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetNode.json +++ b/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/stable/2022-11-08/examples/ConfigurationGetNode.json @@ -11,7 +11,7 @@ "body": { "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/hsctestsg/nodeConfigurations/array_nulls", "name": "array_nulls", - "type": "Microsoft.DBforPostgreSQL/serverGroupsv2/configurations/node", + "type": "Microsoft.DBforPostgreSQL/serverGroupsv2/nodeConfigurations", "systemData": { "createdBy": "user1", "createdByType": "User",