{ "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}/backups/{backupName}": { "put": { "tags": [ "Backups" ], "operationId": "Backups_Create", "x-ms-examples": { "Create an on demand backup of a flexible server.": { "$ref": "./examples/BackupCreate.json" } }, "description": "Creates an on demand backup of 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" }, { "$ref": "#/parameters/BackupNameParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/ServerBackup" } }, "201": { "description": "Successfully created backup", "schema": { "$ref": "#/definitions/ServerBackup" } }, "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": "azure-async-operation" } }, "delete": { "tags": [ "Backups" ], "operationId": "Backups_Delete", "x-ms-examples": { "Delete an on demand backup, given its name.": { "$ref": "./examples/BackupDelete.json" } }, "description": "Deletes a specific backup, given its name.", "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" }, { "$ref": "#/parameters/BackupNameParameter" } ], "responses": { "202": { "description": "Accepted", "headers": { "Location": { "type": "string" } } }, "204": { "description": "NoContent" }, "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" } }, "get": { "tags": [ "Backups" ], "operationId": "Backups_Get", "x-ms-examples": { "Get an on demand backup, given its name.": { "$ref": "./examples/BackupGet.json" } }, "description": "Gets information of an on demand backup, given its name.", "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" }, { "$ref": "#/parameters/BackupNameParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/ServerBackup" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups": { "get": { "tags": [ "Backups" ], "operationId": "Backups_ListByServer", "x-ms-examples": { "List all available backups of a flexible server.": { "$ref": "./examples/BackupListByServer.json" } }, "description": "Lists all available backups of 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", "schema": { "$ref": "#/definitions/ServerBackupListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } } }, "definitions": { "ServerBackupProperties": { "type": "object", "properties": { "backupType": { "type": "string", "description": "Type of backup.", "enum": [ "Full", "Customer On-Demand" ], "x-ms-enum": { "name": "Origin", "modelAsString": true } }, "completedTime": { "type": "string", "format": "date-time", "description": "Time(ISO8601 format) at which the backup was completed." }, "source": { "type": "string", "description": "Source of the backup." } }, "description": "Properties of a backup." }, "ServerBackup": { "type": "object", "properties": { "properties": { "$ref": "#/definitions/ServerBackupProperties", "x-ms-client-flatten": true, "description": "Properties of a backup." } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ], "description": "Properties of a backup." }, "ServerBackupListResult": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/ServerBackup" }, "description": "List of available backups." }, "nextLink": { "description": "Link used to get the next page of results.", "type": "string" } }, "description": "List of backups." } }, "parameters": { "BackupNameParameter": { "name": "backupName", "in": "path", "required": true, "type": "string", "description": "Name of the backup.", "minLength": 1, "pattern": "^[-\\w\\._]+$", "x-ms-parameter-location": "method" } } }