{ "swagger": "2.0", "info": { "version": "2020-01-01", "title": "PostgreSQLManagementClient", "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files, encryption keys, active directory administrator and configurations." }, "host": "management.azure.com", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/keys": { "get": { "tags": [ "ServerKeys" ], "description": "Gets a list of Server keys.", "operationId": "ServerKeys_List", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ServerNameParameter" } ], "responses": { "200": { "description": "Successfully retrieved the list of PostgreSQL Server keys.", "schema": { "$ref": "#/definitions/ServerKeyListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/CloudError" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-examples": { "List the keys for a PostgreSQL Server.": { "$ref": "./examples/ServerKeyList.json" } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/keys/{keyName}": { "get": { "tags": [ "ServerKeys" ], "description": "Gets a PostgreSQL Server key.", "operationId": "ServerKeys_Get", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ServerNameParameter" }, { "name": "keyName", "in": "path", "description": "The name of the PostgreSQL Server key to be retrieved.", "required": true, "type": "string" }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Successfully retrieved the specified PostgreSQL Server key.", "schema": { "$ref": "#/definitions/ServerKey" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/CloudError" } } }, "x-ms-examples": { "Get the PostgreSQL Server key": { "$ref": "./examples/ServerKeyGet.json" } } }, "put": { "tags": [ "ServerKeys" ], "description": "Creates or updates a PostgreSQL Server key.", "operationId": "ServerKeys_CreateOrUpdate", "parameters": [ { "$ref": "#/parameters/ServerNameParameter" }, { "name": "keyName", "in": "path", "description": "The name of the PostgreSQL Server key to be operated on (updated or created).", "required": true, "type": "string" }, { "name": "parameters", "in": "body", "description": "The requested PostgreSQL Server key resource state.", "required": true, "schema": { "$ref": "#/definitions/ServerKey" } }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" } ], "responses": { "200": { "description": "Successfully updated the PostgreSQL Server key.", "schema": { "$ref": "#/definitions/ServerKey" } }, "202": { "description": "Operation in progress", "schema": { "$ref": "#/definitions/ServerKey" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/CloudError" } } }, "x-ms-long-running-operation": true, "x-ms-examples": { "Creates or updates a PostgreSQL Server key": { "$ref": "./examples/ServerKeyCreateOrUpdate.json" } } }, "delete": { "tags": [ "ServerKeys" ], "description": "Deletes the PostgreSQL Server key with the given name.", "operationId": "ServerKeys_Delete", "parameters": [ { "$ref": "#/parameters/ServerNameParameter" }, { "name": "keyName", "in": "path", "description": "The name of the PostgreSQL Server key to be deleted.", "required": true, "type": "string" }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" } ], "responses": { "200": { "description": "Successfully deleted the PostgreSQL Server key." }, "202": { "description": "Operation in progress" }, "204": { "description": "The specified PostgreSQL Server key does not exist." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/CloudError" } } }, "x-ms-long-running-operation": true, "x-ms-examples": { "Delete the PostgreSQL Server key": { "$ref": "./examples/ServerKeyDelete.json" } } } } }, "definitions": { "ServerKeyListResult": { "description": "A list of PostgreSQL Server keys.", "type": "object", "properties": { "value": { "description": "A list of PostgreSQL Server keys.", "type": "array", "items": { "$ref": "#/definitions/ServerKey" }, "readOnly": true }, "nextLink": { "description": "Link to retrieve next page of results.", "type": "string", "readOnly": true } } }, "ServerKeyProperties": { "description": "Properties for a key execution.", "required": [ "serverKeyType" ], "type": "object", "properties": { "serverKeyType": { "description": "The key type like 'AzureKeyVault'.", "enum": [ "AzureKeyVault" ], "type": "string", "x-ms-enum": { "name": "ServerKeyType", "modelAsString": true } }, "uri": { "description": "The URI of the key.", "type": "string" }, "creationDate": { "format": "date-time", "description": "The key creation date.", "type": "string", "readOnly": true } } }, "ServerKey": { "description": "A PostgreSQL Server key.", "type": "object", "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource" } ], "properties": { "kind": { "description": "Kind of encryption protector used to protect the key.", "type": "string", "readOnly": true }, "properties": { "$ref": "#/definitions/ServerKeyProperties", "description": "Properties of the ServerKey Resource.", "x-ms-client-flatten": true } } }, "CloudError": { "x-ms-external": true, "properties": { "error": { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse" } }, "description": "An error response from the Batch service." } }, "parameters": { "ServerNameParameter": { "name": "serverName", "in": "path", "required": true, "type": "string", "description": "The name of the server.", "x-ms-parameter-location": "method" } }, "securityDefinitions": { "azure_auth": { "type": "oauth2", "description": "Azure Active Directory OAuth2 Flow", "flow": "implicit", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "scopes": { "user_impersonation": "impersonate your user account" } } } }