{ "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}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability": { "post": { "tags": [ "CheckNameAvailability" ], "operationId": "CheckNameAvailability_Execute", "x-ms-examples": { "Check the validity and availability of the given name, to assign it to a new flexible server.": { "$ref": "./examples/CheckNameAvailability.json" } }, "description": "Checks the validity and availability of the given name, to assign it to a new flexible server.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "name": "nameAvailabilityRequest", "in": "body", "required": true, "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/CheckNameAvailabilityRequest" }, "description": "Parameters required to check if a server name is valid and available to assign it to a new flexible server." } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/NameAvailability" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/checkNameAvailability": { "post": { "tags": [ "CheckNameAvailability" ], "operationId": "CheckNameAvailabilityWithLocation_Execute", "x-ms-examples": { "Check the validity and availability of the given server name in the given location, to assign it to a new flexible server": { "$ref": "./examples/CheckNameAvailabilityLocationBased.json" } }, "description": "Check the availability of name for resource", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "./types/common-types.json#/parameters/LocationNameParameter" }, { "name": "nameAvailabilityRequest", "in": "body", "required": true, "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/CheckNameAvailabilityRequest" }, "description": "Parameters required to check if server name is available." } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/NameAvailability" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } } } } }, "definitions": { "NameAvailability": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the PostgreSQL flexible server.", "readOnly": true }, "type": { "type": "string", "description": "Type of the server.", "readOnly": true } }, "description": "Availability of a server name.", "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/CheckNameAvailabilityResponse" } ] } }, "parameters": {} }