{ "swagger": "2.0", "info": { "title": "PostgreSQLManagementClient", "description": "The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, network configuration, security alert policies, log files and configurations with new business model.", "version": "2024-08-01" }, "host": "management.azure.com", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "flow": "implicit", "description": "Microsoft Entra OAuth2 Flow", "scopes": { "user_impersonation": "impersonate your user account" } } }, "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/restart": { "post": { "tags": [ "ServerRestart" ], "operationId": "Servers_Restart", "x-ms-examples": { "Restart PostgreSQL database engine in a flexible server.": { "$ref": "./examples/ServerRestart.json" }, "Restart PostgreSQL database engine in a flexible server with a forced failover to standby server.": { "$ref": "./examples/ServerRestartWithFailover.json" } }, "description": "Restarts PostgreSQL database engine in a flexible server.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./types/common-types.json#/parameters/ServerNameParameter" }, { "name": "parameters", "in": "body", "schema": { "$ref": "#/definitions/RestartParameter" }, "description": "Parameters to restart a flexible server." } ], "responses": { "200": { "description": "OK" }, "202": { "description": "Accepted", "headers": { "Location": { "type": "string" } } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "location" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/start": { "post": { "tags": [ "ServerStart" ], "operationId": "Servers_Start", "x-ms-examples": { "Start a stopped flexible server.": { "$ref": "./examples/ServerStart.json" } }, "description": "Starts a stopped flexible server.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./types/common-types.json#/parameters/ServerNameParameter" } ], "responses": { "200": { "description": "OK" }, "202": { "description": "Accepted", "headers": { "Location": { "type": "string" } } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "location" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/stop": { "post": { "tags": [ "ServerStop" ], "operationId": "Servers_Stop", "x-ms-examples": { "Stop a flexible server.": { "$ref": "./examples/ServerStop.json" } }, "description": "Stops a flexible server.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./types/common-types.json#/parameters/ServerNameParameter" } ], "responses": { "200": { "description": "OK" }, "202": { "description": "Accepted", "headers": { "Location": { "type": "string" } } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "location" } } } }, "definitions": { "RestartParameter": { "type": "object", "properties": { "restartWithFailover": { "type": "boolean", "description": "Indicates if restart the PostgreSQL database engine should failover or switch over from primary to standby. This only works if flexible server has high availability enabled." }, "failoverMode": { "type": "string", "description": "Failover mode.", "enum": [ "PlannedFailover", "ForcedFailover", "PlannedSwitchover", "ForcedSwitchover" ], "x-ms-enum": { "name": "FailoverMode", "modelAsString": true } } }, "description": "PostgreSQL database engine restart parameters." } }, "parameters": {} }