diff --git a/custom-words.txt b/custom-words.txt index 6d417cd05b14..35d9cd9c2d43 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -3872,6 +3872,9 @@ DialOut Vectorizable vectorizers Entra +virtualendpoints +siteswap +Siteswap CapacityReservationGroup CapacityReservationGroups Paas @@ -3881,5 +3884,3 @@ capacityreservationgroup capacityreservationgroups ciam CIAM - - diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/Administrators.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/Administrators.json new file mode 100644 index 000000000000..fd6c3b5f0a00 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/Administrators.json @@ -0,0 +1,406 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "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 and configurations with new business model.", + "version": "2023-06-01-preview" + }, + "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": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}": { + "put": { + "tags": [ + "Administrators" + ], + "operationId": "Administrators_Create", + "x-ms-examples": { + "Adds an Active DIrectory Administrator for the server": { + "$ref": "./examples/AdministratorAdd.json" + } + }, + "description": "Creates a new server.", + "parameters": [ + { + "$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/ObjectIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ActiveDirectoryAdministratorAdd" + }, + "description": "The required parameters for adding an active directory administrator for a server." + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ActiveDirectoryAdministrator" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/ActiveDirectoryAdministrator" + } + }, + "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": [ + "Administrators" + ], + "operationId": "Administrators_Delete", + "x-ms-examples": { + "AdministratorDelete": { + "$ref": "./examples/AdministratorDelete.json" + } + }, + "description": "Deletes an Active Directory Administrator associated with the 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/ObjectIdParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "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": [ + "Administrators" + ], + "operationId": "Administrators_Get", + "x-ms-examples": { + "ServerGet": { + "$ref": "./examples/AdministratorGet.json" + } + }, + "description": "Gets information about a 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/ObjectIdParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ActiveDirectoryAdministrator" + } + }, + "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}/administrators": { + "get": { + "tags": [ + "Administrators" + ], + "operationId": "Administrators_ListByServer", + "x-ms-examples": { + "AdministratorsListByServer": { + "$ref": "./examples/AdministratorsListByServer.json" + } + }, + "description": "List all the AAD administrators for a given 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/AdministratorListResult" + } + }, + "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": { + "ActiveDirectoryAdministratorAdd": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/AdministratorPropertiesForAdd", + "x-ms-client-flatten": true, + "description": "Properties of the active directory administrator." + } + }, + "description": "Represents an Active Directory administrator." + }, + "AdministratorPropertiesForAdd": { + "type": "object", + "properties": { + "principalType": { + "type": "string", + "description": "The principal type used to represent the type of Active Directory Administrator.", + "enum": [ + "Unknown", + "User", + "Group", + "ServicePrincipal" + ], + "x-ms-enum": { + "name": "PrincipalType", + "modelAsString": true + }, + "x-ms-mutability": [ + "create", + "update", + "read" + ] + }, + "principalName": { + "type": "string", + "description": "Active Directory administrator principal name.", + "x-ms-mutability": [ + "create", + "update", + "read" + ] + }, + "tenantId": { + "type": "string", + "description": "The tenantId of the Active Directory administrator.", + "x-ms-mutability": [ + "create", + "update" + ] + } + }, + "description": "The properties of an Active Directory administrator." + }, + "AdministratorProperties": { + "type": "object", + "properties": { + "principalType": { + "type": "string", + "description": "The principal type used to represent the type of Active Directory Administrator.", + "enum": [ + "Unknown", + "User", + "Group", + "ServicePrincipal" + ], + "x-ms-enum": { + "name": "PrincipalType", + "modelAsString": true + }, + "x-ms-mutability": [ + "create", + "update", + "read" + ] + }, + "principalName": { + "type": "string", + "description": "Active Directory administrator principal name.", + "x-ms-mutability": [ + "create", + "update", + "read" + ] + }, + "objectId": { + "type": "string", + "description": "The objectId of the Active Directory administrator.", + "x-ms-mutability": [ + "create", + "update", + "read" + ] + }, + "tenantId": { + "type": "string", + "description": "The tenantId of the Active Directory administrator.", + "x-ms-mutability": [ + "create", + "update", + "read" + ] + } + }, + "description": "The properties of an Active Directory administrator." + }, + "ActiveDirectoryAdministrator": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/AdministratorProperties", + "x-ms-client-flatten": true, + "description": "Properties of the active directory administrator." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ], + "required": [ + "properties" + ], + "description": "Represents an Active Directory administrator." + }, + "AdministratorListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ActiveDirectoryAdministrator" + }, + "description": "The list of active directory administrators" + }, + "nextLink": { + "description": "The link used to get the next page of active directory.", + "type": "string" + } + }, + "description": "A list of active directory administrators." + } + }, + "parameters": { + "ObjectIdParameter": { + "name": "objectId", + "in": "path", + "required": true, + "type": "string", + "description": "Guid of the objectId for the administrator.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/Backups.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/Backups.json new file mode 100644 index 000000000000..d96b46da3fdd --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/Backups.json @@ -0,0 +1,201 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "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 and configurations with new business model.", + "version": "2023-06-01-preview" + }, + "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": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}": { + "get": { + "tags": [ + "Backups" + ], + "operationId": "Backups_Get", + "x-ms-examples": { + "Get a backup for a server": { + "$ref": "./examples/BackupGet.json" + } + }, + "description": "Get specific backup for a given 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" + } + }, + "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 backups for a server": { + "$ref": "./examples/BackupListByServer.json" + } + }, + "description": "List all the backups for a given 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": "Backup type.", + "enum": [ + "Full" + ], + "x-ms-enum": { + "name": "Origin", + "modelAsString": true + } + }, + "completedTime": { + "type": "string", + "format": "date-time", + "description": "Backup completed time (ISO8601 format)." + }, + "source": { + "type": "string", + "description": "Backup source" + } + }, + "description": "The properties of a server backup." + }, + "ServerBackup": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/ServerBackupProperties", + "x-ms-client-flatten": true, + "description": "The properties of a server backup." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ], + "description": "Server backup properties" + }, + "ServerBackupListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ServerBackup" + }, + "description": "The list of backups of a server." + }, + "nextLink": { + "description": "The link used to get the next page of operations.", + "type": "string" + } + }, + "description": "A list of server backups." + } + }, + "parameters": { + "BackupNameParameter": { + "name": "backupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the backup.", + "minLength": 1, + "pattern": "^[-\\w\\._]+$", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/Capabilities.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/Capabilities.json new file mode 100644 index 000000000000..c626a2cd0866 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/Capabilities.json @@ -0,0 +1,586 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "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 and configurations with new business model.", + "version": "2023-06-01-preview" + }, + "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": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/capabilities": { + "get": { + "tags": [ + "LocationBasedCapabilities" + ], + "operationId": "LocationBasedCapabilities_Execute", + "x-ms-examples": { + "CapabilitiesList": { + "$ref": "./examples/CapabilitiesByLocation.json" + } + }, + "description": "Get capabilities at specified location in a given subscription.", + "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" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/CapabilitiesListResult" + } + }, + "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" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/capabilities": { + "get": { + "tags": [ + "FlexibleServerCapabilities" + ], + "operationId": "ServerCapabilities_List", + "x-ms-examples": { + "ServerCapabilitiesList": { + "$ref": "./examples/ServerCapabilities.json" + } + }, + "description": "Get capabilities for 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/CapabilitiesListResult" + } + }, + "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": { + "StorageTierCapability": { + "type": "object", + "description": "Represents capability of a storage tier", + "properties": { + "name": { + "type": "string", + "description": "Name to represent Storage tier capability", + "readOnly": true + }, + "iops": { + "type": "integer", + "format": "int32", + "description": "Supported IOPS for this storage tier", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "../../../types/common-types.json#/definitions/CapabilityBase" + } + ] + }, + "StorageMbCapability": { + "type": "object", + "properties": { + "supportedIops": { + "type": "integer", + "format": "int32", + "description": "Supported IOPS", + "readOnly": true + }, + "supportedMaximumIops": { + "type": "integer", + "format": "int32", + "description": "Maximum IOPS supported by this #Vcores or PremiumV2_LRS Storage Size", + "readOnly": true + }, + "storageSizeMb": { + "type": "integer", + "format": "int64", + "description": "Storage size in MB", + "readOnly": true + }, + "maximumStorageSizeMb": { + "type": "integer", + "format": "int64", + "description": "Maximum value of Storage size in MB", + "readOnly": true + }, + "supportedThroughput": { + "type": "integer", + "format": "int32", + "description": "Values of throughput in MB/s", + "readOnly": true + }, + "supportedMaximumThroughput": { + "type": "integer", + "format": "int32", + "description": "Maximum values of throughput in MB/s", + "readOnly": true + }, + "defaultIopsTier": { + "type": "string", + "description": "Default tier for IOPS", + "readOnly": true + }, + "supportedIopsTiers": { + "type": "array", + "description": "List of available options to upgrade the storage performance", + "items": { + "$ref": "#/definitions/StorageTierCapability" + }, + "x-ms-identifiers": [ + "name" + ], + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "../../../types/common-types.json#/definitions/CapabilityBase" + } + ], + "description": "storage size in MB capability" + }, + "ServerSkuCapability": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Sku name", + "readOnly": true + }, + "vCores": { + "type": "integer", + "format": "int32", + "description": "Supported vCores", + "readOnly": true + }, + "supportedIops": { + "type": "integer", + "format": "int32", + "description": "Supported IOPS", + "readOnly": true + }, + "supportedMemoryPerVcoreMb": { + "type": "integer", + "format": "int64", + "description": "Supported memory per vCore in MB", + "readOnly": true + }, + "supportedZones": { + "type": "array", + "description": "List of supported Availability Zones. E.g. \"1\", \"2\", \"3\"", + "items": { + "type": "string" + }, + "readOnly": true + }, + "supportedHaMode": { + "type": "array", + "items": { + "type": "string", + "description": "HA mode supported for a server.", + "enum": [ + "SameZone", + "ZoneRedundant" + ], + "x-ms-enum": { + "name": "HaMode", + "modelAsString": true + } + }, + "description": "Supported high availability mode", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "../../../types/common-types.json#/definitions/CapabilityBase" + } + ], + "description": "Sku capability" + }, + "ServerVersion": { + "type": "string", + "description": "The version of a server.", + "enum": [ + "15", + "14", + "13", + "12", + "11" + ], + "x-ms-enum": { + "name": "ServerVersion", + "modelAsString": true + } + }, + "ServerVersionCapability": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Server version", + "readOnly": true + }, + "supportedVersionsToUpgrade": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Supported servers versions to upgrade", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "../../../types/common-types.json#/definitions/CapabilityBase" + } + ], + "description": "Server version capabilities." + }, + "StorageEditionCapability": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Storage edition name", + "readOnly": true + }, + "defaultStorageSizeMb": { + "type": "integer", + "format": "int64", + "description": "Default storage size in MB for storage edition", + "readOnly": true + }, + "supportedStorageMb": { + "type": "array", + "description": "Flexible server supported storage range in MB", + "items": { + "$ref": "#/definitions/StorageMbCapability" + }, + "x-ms-identifiers": [ + "storageSizeMb" + ], + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "../../../types/common-types.json#/definitions/CapabilityBase" + } + ], + "description": "Storage edition capability" + }, + "FastProvisioningEditionCapability": { + "type": "object", + "description": "Represents capability of a fast provisioning edition", + "properties": { + "supportedTier": { + "type": "string", + "description": "Fast provisioning supported tier name", + "readOnly": true + }, + "supportedSku": { + "type": "string", + "description": "Fast provisioning supported sku name", + "readOnly": true + }, + "supportedStorageGb": { + "type": "integer", + "format": "int32", + "description": "Fast provisioning supported storage in Gb", + "readOnly": true + }, + "supportedServerVersions": { + "type": "string", + "description": "Fast provisioning supported version", + "readOnly": true + }, + "serverCount": { + "type": "integer", + "description": "Count of servers in cache matching the spec", + "format": "int32", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "../../../types/common-types.json#/definitions/CapabilityBase" + } + ] + }, + "FlexibleServerEditionCapability": { + "type": "object", + "allOf": [ + { + "$ref": "../../../types/common-types.json#/definitions/CapabilityBase" + } + ], + "properties": { + "name": { + "type": "string", + "description": "Server edition name", + "readOnly": true + }, + "defaultSkuName": { + "type": "string", + "description": "Default sku name for the server edition", + "readOnly": true + }, + "supportedStorageEditions": { + "type": "array", + "items": { + "$ref": "#/definitions/StorageEditionCapability" + }, + "description": "The list of editions supported by this server edition.", + "readOnly": true, + "x-ms-identifiers": [ + "name" + ] + }, + "supportedServerSkus": { + "type": "array", + "description": "List of supported server SKUs.", + "items": { + "$ref": "#/definitions/ServerSkuCapability" + }, + "x-ms-identifiers": [ + "name" + ], + "readOnly": true + } + }, + "description": "Flexible server edition capabilities." + }, + "FlexibleServerCapability": { + "type": "object", + "allOf": [ + { + "$ref": "../../../types/common-types.json#/definitions/CapabilityBase" + } + ], + "properties": { + "name": { + "type": "string", + "description": "Name of flexible servers capability" + }, + "supportedServerEditions": { + "type": "array", + "items": { + "$ref": "#/definitions/FlexibleServerEditionCapability" + }, + "x-ms-identifiers": [ + "name" + ], + "readOnly": true, + "description": "List of supported flexible server editions" + }, + "supportedServerVersions": { + "type": "array", + "items": { + "$ref": "#/definitions/ServerVersionCapability" + }, + "x-ms-identifiers": [ + "name" + ], + "description": "The list of server versions supported for this capability.", + "readOnly": true + }, + "fastProvisioningSupported": { + "type": "string", + "description": "Gets a value indicating whether fast provisioning is supported. \"Enabled\" means fast provisioning is supported. \"Disabled\" stands for fast provisioning is not supported.", + "readOnly": true, + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "fastProvisioningSupportedEnum", + "modelAsString": true + } + }, + "supportedFastProvisioningEditions": { + "type": "array", + "description": "List of supported server editions for fast provisioning", + "items": { + "$ref": "#/definitions/FastProvisioningEditionCapability" + }, + "x-ms-identifiers": [ + "supportedSku" + ], + "readOnly": true + }, + "geoBackupSupported": { + "type": "string", + "description": "Determines if geo-backup is supported in this region. \"Enabled\" means geo-backup is supported. \"Disabled\" stands for geo-back is not supported.", + "readOnly": true, + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "geoBackupSupportedEnum", + "modelAsString": true + } + }, + "zoneRedundantHaSupported": { + "type": "string", + "description": "A value indicating whether Zone Redundant HA is supported in this region. \"Enabled\" means zone redundant HA is supported. \"Disabled\" stands for zone redundant HA is not supported.", + "readOnly": true, + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "zoneRedundantHaSupportedEnum", + "modelAsString": true + } + }, + "zoneRedundantHaAndGeoBackupSupported": { + "type": "string", + "description": "A value indicating whether Zone Redundant HA and Geo-backup is supported in this region. \"Enabled\" means zone redundant HA and geo-backup is supported. \"Disabled\" stands for zone redundant HA and geo-backup is not supported.", + "readOnly": true, + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "zoneRedundantHaAndGeoBackupSupportedEnum", + "modelAsString": true + } + }, + "storageAutoGrowthSupported": { + "type": "string", + "description": "A value indicating whether storage auto-grow is supported in this region. \"Enabled\" means storage auto-grow is supported. \"Disabled\" stands for storage auto-grow is not supported.", + "readOnly": true, + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "storageAutoGrowthSupportedEnum", + "modelAsString": true + } + }, + "onlineResizeSupported": { + "type": "string", + "description": "A value indicating whether online resize is supported in this region for the given subscription. \"Enabled\" means storage online resize is supported. \"Disabled\" means storage online resize is not supported.", + "readOnly": true, + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "onlineResizeSupportedEnum", + "modelAsString": true + } + }, + "restricted": { + "type": "string", + "description": "A value indicating whether this region is restricted. \"Enabled\" means region is restricted. \"Disabled\" stands for region is not restricted.", + "readOnly": true, + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "restrictedEnum", + "modelAsString": true + } + } + }, + "description": "Capability for the PostgreSQL server" + }, + "CapabilitiesListResult": { + "type": "object", + "properties": { + "value": { + "description": "A list of supported capabilities.", + "type": "array", + "items": { + "$ref": "#/definitions/FlexibleServerCapability" + }, + "x-ms-identifiers": [ + "name" + ], + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + }, + "description": "Capability for the PostgreSQL server" + } + }, + "parameters": {} +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/CheckNameAvailability.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/CheckNameAvailability.json new file mode 100644 index 000000000000..d8dc56792e5a --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/CheckNameAvailability.json @@ -0,0 +1,155 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "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 and configurations with new business model.", + "version": "2023-06-01-preview" + }, + "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": "Azure Active Directory 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": { + "NameAvailability": { + "$ref": "./examples/CheckNameAvailability.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" + }, + { + "name": "nameAvailabilityRequest", + "in": "body", + "required": true, + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/CheckNameAvailabilityRequest" + }, + "description": "The required parameters for checking if resource 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" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/checkNameAvailability": { + "post": { + "tags": [ + "CheckNameAvailability" + ], + "operationId": "CheckNameAvailabilityWithLocation_Execute", + "x-ms-examples": { + "NameAvailability": { + "$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": "The required parameters for checking if resource 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 server.", + "readOnly": true + }, + "type": { + "type": "string", + "description": "type of the server", + "readOnly": true + } + }, + "description": "Represents a resource name availability.", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/CheckNameAvailabilityResponse" + } + ] + } + }, + "parameters": {} +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/Configuration.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/Configuration.json new file mode 100644 index 000000000000..1a038bcacebf --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/Configuration.json @@ -0,0 +1,395 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "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 and configurations with new business model.", + "version": "2023-06-01-preview" + }, + "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": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations": { + "get": { + "tags": [ + "Configurations" + ], + "operationId": "Configurations_ListByServer", + "x-ms-examples": { + "ConfigurationList": { + "$ref": "./examples/ConfigurationListByServer.json" + } + }, + "description": "List all the configurations in a given 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/ConfigurationListResult" + } + }, + "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" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations/{configurationName}": { + "get": { + "tags": [ + "Configurations" + ], + "operationId": "Configurations_Get", + "x-ms-examples": { + "ConfigurationGet": { + "$ref": "./examples/ConfigurationGet.json" + } + }, + "description": "Gets information about a configuration of 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/ConfigurationNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Configuration" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "tags": [ + "Configurations" + ], + "operationId": "Configurations_Update", + "x-ms-examples": { + "Update a user configuration": { + "$ref": "./examples/ConfigurationUpdate.json" + } + }, + "description": "Updates a configuration of a 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/ConfigurationNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ConfigurationForUpdate" + }, + "description": "The required parameters for updating a server configuration." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Configuration" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/Configuration" + } + }, + "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" + } + }, + "put": { + "tags": [ + "Configurations" + ], + "operationId": "Configurations_Put", + "x-ms-examples": { + "Update a user configuration": { + "$ref": "./examples/ConfigurationUpdate.json" + } + }, + "description": "Updates a configuration of a 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/ConfigurationNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Configuration" + }, + "description": "The required parameters for updating a server configuration." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Configuration" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/Configuration" + } + }, + "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": { + "ConfigurationProperties": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "Value of the configuration." + }, + "description": { + "type": "string", + "readOnly": true, + "description": "Description of the configuration." + }, + "defaultValue": { + "type": "string", + "readOnly": true, + "description": "Default value of the configuration." + }, + "dataType": { + "type": "string", + "readOnly": true, + "description": "Data type of the configuration.", + "enum": [ + "Boolean", + "Numeric", + "Integer", + "Enumeration" + ], + "x-ms-enum": { + "name": "ConfigurationDataType", + "modelAsString": true + } + }, + "allowedValues": { + "type": "string", + "readOnly": true, + "description": "Allowed values of the configuration." + }, + "source": { + "type": "string", + "description": "Source of the configuration." + }, + "isDynamicConfig": { + "type": "boolean", + "readOnly": true, + "description": "Configuration dynamic or static." + }, + "isReadOnly": { + "type": "boolean", + "readOnly": true, + "description": "Configuration read-only or not." + }, + "isConfigPendingRestart": { + "type": "boolean", + "readOnly": true, + "description": "Configuration is pending restart or not." + }, + "unit": { + "type": "string", + "readOnly": true, + "description": "Configuration unit." + }, + "documentationLink": { + "type": "string", + "readOnly": true, + "description": "Configuration documentation link." + } + }, + "description": "The properties of a configuration." + }, + "Configuration": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/ConfigurationProperties", + "x-ms-client-flatten": true, + "description": "The properties of a configuration." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ], + "description": "Represents a Configuration." + }, + "ConfigurationForUpdate": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/ConfigurationProperties", + "x-ms-client-flatten": true, + "description": "The properties of a configuration." + } + }, + "description": "Represents a Configuration." + }, + "ConfigurationListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Configuration" + }, + "description": "The list of server configurations." + }, + "nextLink": { + "description": "The link used to get the next page of operations.", + "type": "string" + } + }, + "description": "A list of server configurations." + } + }, + "parameters": { + "ConfigurationNameParameter": { + "name": "configurationName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the server configuration.", + "minLength": 1, + "pattern": "^[-\\w\\._]+$", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/Databases.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/Databases.json new file mode 100644 index 000000000000..3cefe75119c9 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/Databases.json @@ -0,0 +1,317 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "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 and configurations with new business model.", + "version": "2023-06-01-preview" + }, + "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": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases/{databaseName}": { + "put": { + "tags": [ + "Databases" + ], + "operationId": "Databases_Create", + "x-ms-examples": { + "Create a database": { + "$ref": "./examples/DatabaseCreate.json" + } + }, + "description": "Creates a new database or updates an existing database.", + "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/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Database" + }, + "description": "The required parameters for creating or updating a database." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Database" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/Database" + } + }, + "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": [ + "Databases" + ], + "operationId": "Databases_Delete", + "x-ms-examples": { + "Delete a database": { + "$ref": "./examples/DatabaseDelete.json" + } + }, + "description": "Deletes a database.", + "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/DatabaseNameParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "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": [ + "Databases" + ], + "operationId": "Databases_Get", + "x-ms-examples": { + "Get a database": { + "$ref": "./examples/DatabaseGet.json" + } + }, + "description": "Gets information about a database.", + "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/DatabaseNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Database" + } + }, + "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}/databases": { + "get": { + "tags": [ + "Databases" + ], + "operationId": "Databases_ListByServer", + "x-ms-examples": { + "List databases in a server": { + "$ref": "./examples/DatabasesListByServer.json" + } + }, + "description": "List all the databases in a given 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/DatabaseListResult" + } + }, + "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": { + "DatabaseProperties": { + "type": "object", + "properties": { + "charset": { + "type": "string", + "description": "The charset of the database.", + "pattern": "^[a-zA-Z]+\\w*$" + }, + "collation": { + "type": "string", + "description": "The collation of the database.", + "pattern": "^[a-zA-Z\\-]+([. ]|\\w)*$" + } + }, + "description": "The properties of a database." + }, + "Database": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseProperties", + "x-ms-client-flatten": true, + "description": "The properties of a database." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ], + "description": "Represents a Database." + }, + "DatabaseListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Database" + }, + "description": "The list of databases housed in a server" + }, + "nextLink": { + "description": "The link used to get the next page of databases.", + "type": "string", + "format": "uri" + } + }, + "description": "A List of databases." + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the database.", + "minLength": 1, + "pattern": "^[-\\w\\._]+$", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/FirewallRules.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/FirewallRules.json new file mode 100644 index 000000000000..c07db38ca754 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/FirewallRules.json @@ -0,0 +1,323 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "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 and configurations with new business model.", + "version": "2023-06-01-preview" + }, + "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": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}": { + "put": { + "tags": [ + "FirewallRules" + ], + "operationId": "FirewallRules_CreateOrUpdate", + "x-ms-examples": { + "FirewallRuleCreate": { + "$ref": "./examples/FirewallRuleCreate.json" + } + }, + "description": "Creates a new firewall rule or updates an existing firewall rule.", + "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/FirewallRuleNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/FirewallRule" + }, + "description": "The required parameters for creating or updating a firewall rule." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/FirewallRule" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/FirewallRule" + } + }, + "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": [ + "FirewallRules" + ], + "operationId": "FirewallRules_Delete", + "x-ms-examples": { + "FirewallRuleDelete": { + "$ref": "./examples/FirewallRuleDelete.json" + } + }, + "description": "Deletes a PostgreSQL server firewall rule.", + "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/FirewallRuleNameParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "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": [ + "FirewallRules" + ], + "operationId": "FirewallRules_Get", + "x-ms-examples": { + "FirewallRuleList": { + "$ref": "./examples/FirewallRuleGet.json" + } + }, + "description": "List all the firewall rules in a given 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/FirewallRuleNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/FirewallRule" + } + }, + "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}/firewallRules": { + "get": { + "tags": [ + "FirewallRules" + ], + "operationId": "FirewallRules_ListByServer", + "x-ms-examples": { + "FirewallRuleList": { + "$ref": "./examples/FirewallRuleListByServer.json" + } + }, + "description": "List all the firewall rules in a given PostgreSQL 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/FirewallRuleListResult" + } + }, + "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": { + "FirewallRuleProperties": { + "type": "object", + "properties": { + "startIpAddress": { + "type": "string", + "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])$", + "description": "The start IP address of the server firewall rule. Must be IPv4 format." + }, + "endIpAddress": { + "type": "string", + "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])$", + "description": "The end IP address of the server firewall rule. Must be IPv4 format." + } + }, + "required": [ + "startIpAddress", + "endIpAddress" + ], + "description": "The properties of a server firewall rule." + }, + "FirewallRule": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/FirewallRuleProperties", + "x-ms-client-flatten": true, + "description": "The properties of a firewall rule." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ], + "required": [ + "properties" + ], + "description": "Represents a server firewall rule." + }, + "FirewallRuleListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/FirewallRule" + }, + "description": "The list of firewall rules in a server." + }, + "nextLink": { + "description": "The link used to get the next page of operations.", + "type": "string" + } + }, + "description": "A list of firewall rules." + } + }, + "parameters": { + "FirewallRuleNameParameter": { + "name": "firewallRuleName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the server firewall rule.", + "minLength": 1, + "pattern": "^[-\\w\\._]+$", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/FlexibleServers.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/FlexibleServers.json new file mode 100644 index 000000000000..e9a7e67bed83 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/FlexibleServers.json @@ -0,0 +1,1203 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "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 and configurations with new business model.", + "version": "2023-06-01-preview" + }, + "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": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}": { + "put": { + "tags": [ + "Servers" + ], + "operationId": "Servers_Create", + "x-ms-examples": { + "Create a new server": { + "$ref": "./examples/ServerCreate.json" + }, + "Create a new server with active directory authentication enabled": { + "$ref": "./examples/ServerCreateWithAadAuthEnabled.json" + }, + "ServerCreateWithDataEncryptionEnabled": { + "$ref": "./examples/ServerCreateWithDataEncryptionEnabled.json" + }, + "Create a database as a point in time restore": { + "$ref": "./examples/ServerCreatePointInTimeRestore.json" + }, + "Create a database as a geo-restore in geo-paired location": { + "$ref": "./examples/ServerCreateGeoRestoreWithDataEncryptionEnabled.json" + }, + "ServerCreateReplica": { + "$ref": "./examples/ServerCreateReplica.json" + }, + "ServerCreateReviveDropped": { + "$ref": "./examples/ServerCreateReviveDropped.json" + } + }, + "description": "Creates a new 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", + "required": true, + "schema": { + "$ref": "#/definitions/Server" + }, + "description": "The required parameters for creating or updating a server." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Server" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/Server" + } + }, + "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" + } + }, + "patch": { + "tags": [ + "Servers" + ], + "operationId": "Servers_Update", + "x-ms-examples": { + "ServerUpdate": { + "$ref": "./examples/ServerUpdate.json" + }, + "ServerUpdateWithAadAuthEnabled": { + "$ref": "./examples/ServerUpdateWithAadAuthEnabled.json" + }, + "ServerUpdateWithDataEncryptionEnabled": { + "$ref": "./examples/ServerUpdateWithDataEncryptionEnabled.json" + }, + "ServerUpdateWithCustomerMaintenanceWindow": { + "$ref": "./examples/ServerUpdateWithCustomerMaintenanceWindow.json" + }, + "ServerUpdateWithMajorVersionUpgrade": { + "$ref": "./examples/ServerUpdateWithMajorVersionUpgrade.json" + }, + "Promote a replica server as a Standalone server as planned, i.e. it will wait for replication to complete.": { + "$ref": "./examples/PromoteReplicaAsPlannedStandaloneServer.json" + }, + "Promote a replica server as a Standalone server as forced, i.e. it will promote a replica server immediately without waiting for primary and replica to be in sync.": { + "$ref": "./examples/PromoteReplicaAsForcedStandaloneServer.json" + }, + "Siteswap a replica server as planned, i.e. it will wait for replication to complete before promoting replica as Primary and original primary as replica.": { + "$ref": "./examples/PromoteReplicaAsPlannedSiteswap.json" + }, + "Siteswap a replica server as forced, i.e. it will replica as Primary and original primary as replica immediately without waiting for primary and replica to be in sync.": { + "$ref": "./examples/PromoteReplicaAsForcedSiteswap.json" + } + }, + "description": "Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.", + "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", + "required": true, + "schema": { + "$ref": "#/definitions/ServerForUpdate" + }, + "description": "The required parameters for updating a server." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Server" + } + }, + "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": [ + "Servers" + ], + "operationId": "Servers_Delete", + "x-ms-examples": { + "ServerDelete": { + "$ref": "./examples/ServerDelete.json" + } + }, + "description": "Deletes a 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" + } + } + }, + "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": [ + "Servers" + ], + "operationId": "Servers_Get", + "x-ms-examples": { + "ServerGet": { + "$ref": "./examples/ServerGet.json" + }, + "ServerGetWithVnet": { + "$ref": "./examples/ServerGetWithVnet.json" + }, + "ServerGetWithPrivateEndpoints": { + "$ref": "./examples/ServerGetWithPrivateEndpoints.json" + } + }, + "description": "Gets information about a 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/Server" + } + }, + "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": { + "get": { + "tags": [ + "Servers" + ], + "operationId": "Servers_ListByResourceGroup", + "x-ms-examples": { + "ServerListByResourceGroup": { + "$ref": "./examples/ServerListByResourceGroup.json" + } + }, + "description": "List all the servers in a given resource group.", + "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" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerListResult" + } + }, + "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" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/flexibleServers": { + "get": { + "tags": [ + "Servers" + ], + "operationId": "Servers_List", + "x-ms-examples": { + "ServerList": { + "$ref": "./examples/ServerList.json" + } + }, + "description": "List all the servers in a given subscription.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerListResult" + } + }, + "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": { + "ServerVersion": { + "type": "string", + "description": "The version of a server.", + "enum": [ + "16", + "15", + "14", + "13", + "12", + "11" + ], + "x-ms-enum": { + "name": "ServerVersion", + "modelAsString": true + } + }, + "Replica": { + "type": "object", + "description": "Replica properties of a server", + "properties": { + "role": { + "$ref": "#/definitions/ReplicationRole", + "description": "Used to indicate role of the server in replication set." + }, + "capacity": { + "type": "integer", + "format": "int32", + "description": "Replicas allowed for a server.", + "readOnly": true + }, + "linkState": { + "type": "string", + "enum": [ + "Active", + "Catchup", + "Provisioning", + "Updating", + "Broken", + "Reconfiguring" + ], + "x-ms-enum": { + "name": "ReplicaLinkState", + "modelAsString": true + }, + "description": "Gets the link state of a replica server. This property is returned only for replicas api call. Supported values are Active, Catchup, Provisioning, Updating, Broken, Reconfiguring", + "readOnly": true + }, + "promoteMode": { + "type": "string", + "description": "Sets the promote mode for a replica server. This is a write only property.", + "enum": [ + "standalone", + "siteswap" + ], + "x-ms-enum": { + "name": "ReplicationPromoteMode", + "modelAsString": true + }, + "x-ms-mutability": [ + "update" + ] + }, + "promoteOption": { + "type": "string", + "description": "Sets the promote options for a replica server. This is a write only property.", + "enum": [ + "planned", + "forced" + ], + "x-ms-enum": { + "name": "ReplicationPromoteOption", + "modelAsString": true + }, + "x-ms-mutability": [ + "update" + ] + } + } + }, + "ServerProperties": { + "type": "object", + "properties": { + "administratorLogin": { + "type": "string", + "description": "The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "administratorLoginPassword": { + "type": "string", + "description": "The administrator login password (required for server creation).", + "x-ms-secret": true, + "format": "password", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "version": { + "$ref": "#/definitions/ServerVersion", + "description": "PostgreSQL Server version." + }, + "minorVersion": { + "type": "string", + "description": "The minor version of the server.", + "readOnly": true + }, + "state": { + "type": "string", + "description": "A state of a server that is visible to user.", + "readOnly": true, + "enum": [ + "Ready", + "Dropping", + "Disabled", + "Starting", + "Stopping", + "Stopped", + "Updating" + ], + "x-ms-enum": { + "name": "ServerState", + "modelAsString": true + } + }, + "fullyQualifiedDomainName": { + "type": "string", + "description": "The fully qualified domain name of a server.", + "readOnly": true + }, + "storage": { + "$ref": "#/definitions/Storage", + "default": null, + "description": "Storage properties of a server." + }, + "authConfig": { + "$ref": "#/definitions/AuthConfig", + "default": null, + "description": "AuthConfig properties of a server." + }, + "dataEncryption": { + "$ref": "#/definitions/DataEncryption", + "default": null, + "description": "Data encryption properties of a server." + }, + "backup": { + "$ref": "#/definitions/Backup", + "default": null, + "description": "Backup properties of a server." + }, + "network": { + "$ref": "#/definitions/Network", + "default": null, + "description": "Network properties of a server. This Network property is required to be passed only in case you want the server to be Private access server." + }, + "highAvailability": { + "$ref": "#/definitions/HighAvailability", + "default": null, + "description": "High availability properties of a server." + }, + "maintenanceWindow": { + "$ref": "#/definitions/MaintenanceWindow", + "default": null, + "description": "Maintenance window properties of a server.", + "x-ms-mutability": [ + "update", + "read" + ] + }, + "sourceServerResourceId": { + "type": "string", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.DBforPostgreSQL/flexibleServers" + } + ] + }, + "description": "The source server resource ID to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica' or 'ReviveDropped'. This property is returned only for Replica server", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "pointInTimeUTC": { + "type": "string", + "format": "date-time", + "description": "Restore point creation time (ISO8601 format), specifying the time to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'ReviveDropped'.", + "x-ms-mutability": [ + "create" + ] + }, + "availabilityZone": { + "type": "string", + "default": "", + "description": "availability zone information of the server.", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "replicationRole": { + "$ref": "#/definitions/ReplicationRole", + "description": "Replication role of the server" + }, + "replicaCapacity": { + "type": "integer", + "format": "int32", + "description": "Replicas allowed for a server.", + "readOnly": true + }, + "replica": { + "$ref": "#/definitions/Replica", + "description": "Replica properties of a server. These Replica properties are required to be passed only in case you want to Promote a server.", + "x-ms-mutability": [ + "read", + "update" + ] + }, + "createMode": { + "type": "string", + "description": "The mode to create a new PostgreSQL server.", + "enum": [ + "Default", + "Create", + "Update", + "PointInTimeRestore", + "GeoRestore", + "Replica", + "ReviveDropped" + ], + "x-ms-enum": { + "name": "CreateMode", + "modelAsString": true + }, + "x-ms-mutability": [ + "create", + "update" + ] + }, + "privateEndpointConnections": { + "type": "array", + "items": { + "$ref": "../../../../../common-types/resource-management/v5/privatelinks.json#/definitions/PrivateEndpointConnection" + }, + "description": "List of private endpoint connections associated with the specified resource.", + "readOnly": true + } + }, + "description": "The properties of a server." + }, + "Server": { + "type": "object", + "properties": { + "sku": { + "$ref": "#/definitions/Sku", + "description": "The SKU (pricing tier) of the server." + }, + "identity": { + "$ref": "#/definitions/UserAssignedIdentity", + "description": "Describes the identity of the application." + }, + "properties": { + "$ref": "#/definitions/ServerProperties", + "x-ms-client-flatten": true, + "description": "Properties of the server." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/TrackedResource" + } + ], + "description": "Represents a server." + }, + "ServerPropertiesForUpdate": { + "type": "object", + "properties": { + "administratorLoginPassword": { + "type": "string", + "x-ms-secret": true, + "format": "password", + "description": "The password of the administrator login.", + "x-ms-mutability": [ + "update" + ] + }, + "version": { + "$ref": "#/definitions/ServerVersion", + "description": "PostgreSQL Server version. Version 16 is currently not supported for MVU." + }, + "storage": { + "$ref": "#/definitions/Storage", + "default": null, + "description": "Storage properties of a server." + }, + "backup": { + "$ref": "#/definitions/Backup", + "default": null, + "description": "Backup properties of a server." + }, + "highAvailability": { + "$ref": "#/definitions/HighAvailability", + "default": null, + "description": "High availability properties of a server." + }, + "maintenanceWindow": { + "$ref": "#/definitions/MaintenanceWindow", + "default": null, + "description": "Maintenance window properties of a server.", + "x-ms-mutability": [ + "update", + "read" + ] + }, + "authConfig": { + "$ref": "#/definitions/AuthConfig", + "default": null, + "description": "AuthConfig properties of a server." + }, + "dataEncryption": { + "$ref": "#/definitions/DataEncryption", + "default": null, + "description": "Data encryption properties of a server." + }, + "createMode": { + "type": "string", + "description": "The mode to update a new PostgreSQL server.", + "enum": [ + "Default", + "Update" + ], + "x-ms-enum": { + "name": "CreateModeForUpdate", + "modelAsString": true + }, + "x-ms-mutability": [ + "update" + ] + }, + "replicationRole": { + "$ref": "#/definitions/ReplicationRole", + "description": "Replication role of the server" + }, + "replica": { + "$ref": "#/definitions/Replica", + "description": "Replica properties of a server. These Replica properties are required to be passed only in case you want to Promote a server.", + "x-ms-mutability": [ + "read", + "update" + ] + }, + "network": { + "$ref": "#/definitions/Network", + "default": null, + "description": "Network properties of a server. These are required to be passed only in case if server is a private access server." + } + } + }, + "ServerForUpdate": { + "type": "object", + "properties": { + "sku": { + "$ref": "#/definitions/Sku", + "description": "The SKU (pricing tier) of the server." + }, + "identity": { + "$ref": "#/definitions/UserAssignedIdentity", + "description": "Describes the identity of the application." + }, + "properties": { + "$ref": "#/definitions/ServerPropertiesForUpdate", + "x-ms-client-flatten": true, + "description": "Properties of the server." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Application-specific metadata in the form of key-value pairs." + } + }, + "description": "Represents a server to be updated." + }, + "ServerListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Server" + }, + "description": "The list of flexible servers" + }, + "nextLink": { + "description": "The link used to get the next page of operations.", + "type": "string" + } + }, + "description": "A list of servers." + }, + "Sku": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3." + }, + "tier": { + "type": "string", + "description": "The tier of the particular SKU, e.g. Burstable.", + "enum": [ + "Burstable", + "GeneralPurpose", + "MemoryOptimized" + ], + "x-ms-enum": { + "name": "SkuTier", + "modelAsString": true + } + } + }, + "required": [ + "name", + "tier" + ], + "description": "Sku information related properties of a server." + }, + "Storage": { + "type": "object", + "properties": { + "storageSizeGB": { + "type": "integer", + "format": "int32", + "description": "Max storage allowed for a server." + }, + "autoGrow": { + "type": "string", + "description": "Flag to enable / disable Storage Auto grow for flexible server.", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "StorageAutoGrow", + "modelAsString": true + } + }, + "tier": { + "type": "string", + "description": "Name of storage tier for IOPS.", + "enum": [ + "P1", + "P2", + "P3", + "P4", + "P6", + "P10", + "P15", + "P20", + "P30", + "P40", + "P50", + "P60", + "P70", + "P80" + ], + "x-ms-enum": { + "name": "AzureManagedDiskPerformanceTiers", + "modelAsString": true + } + }, + "iops": { + "type": "integer", + "format": "int32", + "description": "Storage tier IOPS quantity. This property is required to be set for storage Type PremiumV2_LRS" + }, + "throughput": { + "type": "integer", + "format": "int32", + "description": "Storage throughput for the server. This is required to be set for storage Type PremiumV2_LRS" + }, + "type": { + "type": "string", + "enum": [ + "Premium_LRS", + "PremiumV2_LRS" + ], + "x-ms-enum": { + "name": "StorageType", + "modelAsString": true + }, + "description": "Storage type for the server. Allowed values are Premium_LRS and PremiumV2_LRS, and default is Premium_LRS if not specified" + } + }, + "description": "Storage properties of a server" + }, + "AuthConfig": { + "type": "object", + "properties": { + "activeDirectoryAuth": { + "type": "string", + "description": "If Enabled, Azure Active Directory authentication is enabled.", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "activeDirectoryAuthEnum", + "modelAsString": true + } + }, + "passwordAuth": { + "type": "string", + "default": "Enabled", + "description": "If Enabled, Password authentication is enabled.", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "passwordAuthEnum", + "modelAsString": true + } + }, + "tenantId": { + "type": "string", + "default": "", + "description": "Tenant id of the server." + } + }, + "description": "Authentication configuration properties of a server" + }, + "DataEncryption": { + "type": "object", + "properties": { + "primaryKeyURI": { + "type": "string", + "description": "URI for the key in keyvault for data encryption of the primary server." + }, + "primaryUserAssignedIdentityId": { + "type": "string", + "description": "Resource Id for the User assigned identity to be used for data encryption of the primary server." + }, + "geoBackupKeyURI": { + "type": "string", + "description": "URI for the key in keyvault for data encryption for geo-backup of server." + }, + "geoBackupUserAssignedIdentityId": { + "type": "string", + "description": "Resource Id for the User assigned identity to be used for data encryption for geo-backup of server." + }, + "type": { + "type": "string", + "description": "Data encryption type to depict if it is System Managed vs Azure Key vault.", + "enum": [ + "SystemManaged", + "AzureKeyVault" + ], + "x-ms-enum": { + "name": "ArmServerKeyType", + "modelAsString": true + } + }, + "primaryEncryptionKeyStatus": { + "type": "string", + "description": "Primary encryption key status for Data encryption enabled server.", + "x-ms-mutability": [ + "read" + ], + "enum": [ + "Valid", + "Invalid" + ], + "x-ms-enum": { + "name": "keyStatusEnum", + "modelAsString": true + } + }, + "geoBackupEncryptionKeyStatus": { + "type": "string", + "description": "Geo-backup encryption key status for Data encryption enabled server.", + "x-ms-mutability": [ + "read" + ], + "enum": [ + "Valid", + "Invalid" + ], + "x-ms-enum": { + "name": "keyStatusEnum", + "modelAsString": true + } + } + }, + "description": "Data encryption properties of a server" + }, + "UserIdentity": { + "description": "Describes a single user-assigned identity associated with the application.", + "type": "object", + "properties": { + "principalId": { + "type": "string", + "description": "the object identifier of the Service Principal which this identity represents." + }, + "clientId": { + "type": "string", + "description": "the client identifier of the Service Principal which this identity represents." + } + } + }, + "UserAssignedIdentityMap": { + "type": "object", + "description": "Defines a map that contains user assigned identities.", + "additionalProperties": { + "$ref": "#/definitions/UserIdentity" + } + }, + "UserAssignedIdentity": { + "type": "object", + "properties": { + "userAssignedIdentities": { + "$ref": "#/definitions/UserAssignedIdentityMap", + "description": "represents user assigned identities map." + }, + "type": { + "type": "string", + "description": "the types of identities associated with this resource; currently restricted to 'None and UserAssigned'", + "enum": [ + "None", + "UserAssigned" + ], + "x-ms-enum": { + "name": "IdentityType", + "modelAsString": true + } + }, + "tenantId": { + "type": "string", + "description": "Tenant id of the server.", + "readOnly": true + } + }, + "required": [ + "type" + ], + "description": "Information describing the identities associated with this application." + }, + "ReplicationRole": { + "type": "string", + "description": "Used to indicate role of the server in replication set.", + "enum": [ + "None", + "Primary", + "AsyncReplica", + "GeoAsyncReplica" + ], + "x-ms-enum": { + "name": "ReplicationRole", + "modelAsString": true + } + }, + "Backup": { + "type": "object", + "properties": { + "backupRetentionDays": { + "type": "integer", + "format": "int32", + "default": 7, + "description": "Backup retention days for the server." + }, + "geoRedundantBackup": { + "type": "string", + "default": "Disabled", + "description": "A value indicating whether Geo-Redundant backup is enabled on the server.", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "GeoRedundantBackupEnum", + "modelAsString": true + }, + "x-ms-mutability": [ + "create", + "read" + ] + }, + "earliestRestoreDate": { + "type": "string", + "format": "date-time", + "description": "The earliest restore point time (ISO8601 format) for server.", + "readOnly": true + } + }, + "description": "Backup properties of a server" + }, + "Network": { + "type": "object", + "properties": { + "publicNetworkAccess": { + "type": "string", + "description": "public network access is enabled or not", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "ServerPublicNetworkAccessState", + "modelAsString": true + } + }, + "delegatedSubnetResourceId": { + "type": "string", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Network/virtualNetworks/subnets" + } + ] + }, + "description": "Delegated subnet arm resource id. This is required to be passed during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass this only if we want to update the value for Private DNS zone." + }, + "privateDnsZoneArmResourceId": { + "type": "string", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Network/privateDnsZones" + } + ] + }, + "description": "Private dns zone arm resource id. This is required to be passed during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass this only if we want to update the value for Private DNS zone." + } + }, + "description": "Network properties of a server." + }, + "HighAvailability": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "default": "Disabled", + "description": "The HA mode for the server.", + "enum": [ + "Disabled", + "ZoneRedundant", + "SameZone" + ], + "x-ms-enum": { + "name": "HighAvailabilityMode", + "modelAsString": true + } + }, + "state": { + "type": "string", + "description": "A state of a HA server that is visible to user.", + "enum": [ + "NotEnabled", + "CreatingStandby", + "ReplicatingData", + "FailingOver", + "Healthy", + "RemovingStandby" + ], + "x-ms-enum": { + "name": "ServerHAState", + "modelAsString": true + }, + "readOnly": true + }, + "standbyAvailabilityZone": { + "type": "string", + "default": "", + "description": "availability zone information of the standby." + } + }, + "description": "High availability properties of a server" + }, + "MaintenanceWindow": { + "type": "object", + "description": "Maintenance window properties of a server.", + "properties": { + "customWindow": { + "type": "string", + "default": "Disabled", + "description": "indicates whether custom window is enabled or disabled" + }, + "startHour": { + "type": "integer", + "format": "int32", + "default": 0, + "description": "start hour for maintenance window" + }, + "startMinute": { + "type": "integer", + "format": "int32", + "default": 0, + "description": "start minute for maintenance window" + }, + "dayOfWeek": { + "type": "integer", + "format": "int32", + "default": 0, + "description": "day of week for maintenance window" + } + } + } + }, + "parameters": {} +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/LongTermRetentionOperation.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/LongTermRetentionOperation.json new file mode 100644 index 000000000000..64b999175dc8 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/LongTermRetentionOperation.json @@ -0,0 +1,524 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "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 and configurations with new business model.", + "version": "2023-06-01-preview" + }, + "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": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrPreBackup": { + "post": { + "description": "PreBackup operation performs all the checks that are needed for the subsequent long term retention backup operation to succeed.", + "tags": [ + "LongTermRetentionBackup" + ], + "operationId": "FlexibleServer_TriggerLtrPreBackup", + "produces": [ + "application/json" + ], + "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", + "description": "Request body for operation", + "required": true, + "schema": { + "$ref": "#/definitions/LtrPreBackupRequest" + } + } + ], + "responses": { + "200": { + "description": "Ok. API finished synchronously with Success.", + "schema": { + "$ref": "#/definitions/LtrPreBackupResponse" + }, + "headers": { + "x-ms-request-id": { + "description": "A unique ID for the current operation, service generated. All the resource providers must return this value in the response headers to facilitate debugging.", + "type": "string" + } + } + }, + "default": { + "description": "Error Scenario 4xx/5xx", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "description": "ErrorCode string in the event of a failure.", + "type": "string" + }, + "x-ms-request-id": { + "description": "A unique ID for the current operation, service generated. All the resource providers must return this value in the response headers to facilitate debugging.", + "type": "string" + } + } + } + }, + "x-ms-examples": { + "Sample_Prebackup": { + "$ref": "./examples/LongTermRetentionPreBackup.json" + } + }, + "deprecated": false + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/startLtrBackup": { + "post": { + "description": "Start the Long Term Retention Backup operation", + "tags": [ + "LongTermRetentionBackup" + ], + "operationId": "FlexibleServer_StartLtrBackup", + "produces": [ + "application/json" + ], + "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", + "description": "Request body for operation", + "required": true, + "schema": { + "$ref": "#/definitions/LtrBackupRequest" + } + } + ], + "responses": { + "200": { + "description": "Ok. API finished synchronously with Success.", + "schema": { + "$ref": "#/definitions/LtrBackupResponse" + }, + "headers": { + "x-ms-request-id": { + "description": "A unique ID for the current operation, service generated. All the resource providers must return this value in the response headers to facilitate debugging.", + "type": "string" + } + } + }, + "202": { + "description": "Accepted.", + "headers": { + "Retry-After": { + "description": "The number of seconds to wait before checking the status of the asynchronous operation.", + "type": "integer", + "format": "int32" + }, + "x-ms-request-id": { + "description": "A unique ID for the current operation, service generated. All the resource providers must return this value in the response headers to facilitate debugging.", + "type": "string" + }, + "Location": { + "description": "URL to retrieve the final result after operation completes.", + "type": "string" + }, + "Azure-AsyncOperation": { + "description": "URL for checking the ongoing status of the operation.", + "type": "string" + } + } + }, + "default": { + "description": "Error Scenario 4xx/5xx", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "description": "ErrorCode string in the event of a failure.", + "type": "string" + }, + "x-ms-request-id": { + "description": "A unique ID for the current operation, service generated. All the resource providers must return this value in the response headers to facilitate debugging.", + "type": "string" + } + } + } + }, + "x-ms-examples": { + "Sample_ExecuteBackup": { + "$ref": "./examples/LongTermRetentionBackup.json" + } + }, + "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}/ltrBackupOperations/{backupName}": { + "get": { + "tags": [ + "LongTermRetentionBackup" + ], + "operationId": "ltrBackupOperations_Get", + "x-ms-examples": { + "Sample": { + "$ref": "./examples/LongTermRetentionOperationGet.json" + } + }, + "description": "Gets the result of the give long term retention backup operation for the 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/LtrServerBackupOperation" + } + }, + "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}/ltrBackupOperations": { + "get": { + "tags": [ + "LongTermRetentionBackup" + ], + "operationId": "ltrBackupOperations_ListByServer", + "x-ms-examples": { + "Sample List of Long Tern Retention Operations by Flexible Server": { + "$ref": "./examples/LongTermRetentionOperationListByServer.json" + } + }, + "description": "Gets the result of the give long term retention backup operations for the 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/LtrServerBackupOperationList" + } + }, + "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": { + "BackupRequestBase": { + "description": "BackupRequestBase is the base for all backup request.", + "required": [ + "backupSettings" + ], + "type": "object", + "properties": { + "backupSettings": { + "$ref": "#/definitions/BackupSettings", + "description": "Backup Settings" + } + } + }, + "LtrBackupRequest": { + "description": "The request that is made for a long term retention backup.", + "type": "object", + "properties": { + "targetDetails": { + "$ref": "#/definitions/BackupStoreDetails", + "description": "Backup store detail for target server" + } + }, + "allOf": [ + { + "$ref": "#/definitions/BackupRequestBase" + } + ], + "required": [ + "targetDetails" + ] + }, + "LtrPreBackupRequest": { + "description": "A request that is made for pre-backup.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/BackupRequestBase" + } + ] + }, + "BackupSettings": { + "description": "The settings for the long term backup.", + "type": "object", + "required": [ + "backupName" + ], + "properties": { + "backupName": { + "type": "string", + "description": "Backup Name for the current backup" + } + } + }, + "BackupStoreDetails": { + "description": "Details about the target where the backup content will be stored.", + "required": [ + "sasUriList" + ], + "type": "object", + "properties": { + "sasUriList": { + "description": "List of SAS uri of storage containers where backup data is to be streamed/copied.", + "type": "array", + "items": { + "type": "string", + "description": "SAS URI of Azure Storage Account Container.", + "x-ms-secret": true + } + } + } + }, + "LtrPreBackupResponseProperties": { + "description": "Response for the pre-backup request.", + "type": "object", + "required": [ + "numberOfContainers" + ], + "properties": { + "numberOfContainers": { + "format": "int32", + "description": "Number of storage containers the plugin will use during backup. More than one containers may be used for size limitations, parallelism, or redundancy etc.", + "type": "integer" + } + } + }, + "LtrBackupOperationResponseProperties": { + "description": "Response for the backup request.", + "type": "object", + "required": [ + "status", + "startTime" + ], + "properties": { + "datasourceSizeInBytes": { + "format": "int64", + "description": "Size of datasource in bytes", + "type": "integer" + }, + "dataTransferredInBytes": { + "format": "int64", + "description": "Data transferred in bytes", + "type": "integer" + }, + "backupName": { + "description": "Name of Backup operation", + "type": "string" + }, + "backupMetadata": { + "description": "Metadata to be stored in RP. Store everything that will be required to perform a successful restore using this Recovery point. e.g. Versions, DataFormat etc", + "type": "string" + }, + "status": { + "description": "Service-set extensible enum indicating the status of operation", + "enum": [ + "Running", + "Cancelled", + "Failed", + "Succeeded" + ], + "type": "string", + "x-ms-enum": { + "name": "ExecutionStatus", + "modelAsString": true + } + }, + "startTime": { + "description": "Start time of the operation.", + "format": "date-time", + "type": "string" + }, + "endTime": { + "description": "End time of the operation.", + "format": "date-time", + "type": "string" + }, + "percentComplete": { + "description": "PercentageCompleted", + "format": "double", + "type": "number", + "minimum": 0, + "maximum": 100 + }, + "errorCode": { + "readOnly": true, + "type": "string", + "description": "The error code." + }, + "errorMessage": { + "readOnly": true, + "type": "string", + "description": "The error message." + } + } + }, + "LtrBackupResponse": { + "description": "Response for the LTR backup API call", + "type": "object", + "properties": { + "properties": { + "description": "Long Term Retention Backup Operation Resource Properties", + "x-ms-client-flatten": true, + "$ref": "#/definitions/LtrBackupOperationResponseProperties" + } + } + }, + "LtrServerBackupOperation": { + "description": "Response for the LTR backup Operation API call", + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "properties": { + "description": "Long Term Retention Backup Operation Resource Properties", + "x-ms-client-flatten": true, + "$ref": "#/definitions/LtrBackupOperationResponseProperties" + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ] + }, + "LtrServerBackupOperationList": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/LtrServerBackupOperation" + }, + "description": "The list of long term retention server backup operations" + }, + "nextLink": { + "description": "The link used to get the next page of operations.", + "type": "string" + } + }, + "description": "A list of long term retention backup operations for server." + }, + "LtrPreBackupResponse": { + "description": "Response for the LTR pre-backup API call", + "type": "object", + "required": [ + "properties" + ], + "properties": { + "properties": { + "description": "Additional Properties for the pre backup response", + "x-ms-client-flatten": true, + "$ref": "#/definitions/LtrPreBackupResponseProperties" + } + } + } + }, + "parameters": { + "BackupNameParameter": { + "name": "backupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the backup.", + "x-ms-parameter-location": "method", + "pattern": "^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*" + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/Migrations.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/Migrations.json new file mode 100644 index 000000000000..0a1dabf6fc4c --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/Migrations.json @@ -0,0 +1,1254 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "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 and configurations with new business model.", + "version": "2023-06-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "description": "Azure Active Directory OAuth2 Flow", + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/migrations/{migrationName}": { + "put": { + "tags": [ + "Migrations" + ], + "operationId": "Migrations_Create", + "x-ms-examples": { + "Migrations_Create": { + "$ref": "./examples/Migrations_Create.json" + }, + "Migrations Create by passing user names": { + "$ref": "./examples/Migrations_Create_With_Other_Users.json" + }, + "Create Migration with other source types for Validate and Migrate": { + "$ref": "./examples/Migrations_Create_Other_SourceTypes_Validate_Migrate.json" + }, + "Create Pre-migration Validation": { + "$ref": "./examples/Migrations_Create_Validate_Only.json" + } + }, + "description": "Creates a new migration.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/TargetDbServerSubscriptionIdParameter" + }, + { + "$ref": "#/parameters/TargetDbServerResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/TargetDbServerNameParameter" + }, + { + "$ref": "#/parameters/MigrationNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MigrationResource" + }, + "description": "The required parameters for creating a migration." + } + ], + "responses": { + "200": { + "description": "Successfully set or update the Migration for a server", + "schema": { + "$ref": "#/definitions/MigrationResource" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/MigrationResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "tags": [ + "Migrations" + ], + "operationId": "Migrations_Get", + "x-ms-examples": { + "Migrations_Get": { + "$ref": "./examples/Migrations_Get.json" + }, + "Migrations_GetMigrationWithValidationFailures": { + "$ref": "./examples/Migrations_GetMigrationWithValidationFailures.json" + }, + "Migrations_GetMigrationWithSuccessfulValidationOnly": { + "$ref": "./examples/Migrations_GetMigrationWithSuccessfulValidationOnly.json" + }, + "Migrations_GetMigrationWithSuccessfulValidationButMigrationFailure": { + "$ref": "./examples/Migrations_GetMigrationWithSuccessfulValidationButMigrationFailure.json" + }, + "Migrations_GetMigrationWithSuccessfulValidationAndMigration": { + "$ref": "./examples/Migrations_GetMigrationWithSuccessfulValidationAndMigration.json" + } + }, + "description": "Gets details of a migration.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/TargetDbServerSubscriptionIdParameter" + }, + { + "$ref": "#/parameters/TargetDbServerResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/TargetDbServerNameParameter" + }, + { + "$ref": "#/parameters/MigrationNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MigrationResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "tags": [ + "Migrations" + ], + "operationId": "Migrations_Update", + "x-ms-examples": { + "Migrations_Update": { + "$ref": "./examples/Migrations_Update.json" + }, + "Cancel migration": { + "$ref": "./examples/Migrations_Cancel.json" + } + }, + "description": "Updates an existing migration. The request body can contain one to many of the mutable properties present in the migration definition. Certain property updates initiate migration state transitions.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/TargetDbServerSubscriptionIdParameter" + }, + { + "$ref": "#/parameters/TargetDbServerResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/TargetDbServerNameParameter" + }, + { + "$ref": "#/parameters/MigrationNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MigrationResourceForPatch" + }, + "description": "The required parameters for updating a migration." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MigrationResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Migrations" + ], + "operationId": "Migrations_Delete", + "x-ms-examples": { + "Migrations_Delete": { + "$ref": "./examples/Migrations_Delete.json" + } + }, + "description": "Deletes a migration.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/TargetDbServerSubscriptionIdParameter" + }, + { + "$ref": "#/parameters/TargetDbServerResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/TargetDbServerNameParameter" + }, + { + "$ref": "#/parameters/MigrationNameParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "204": { + "description": "NoContent" + }, + "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/{targetDbServerName}/migrations": { + "get": { + "tags": [ + "Migrations" + ], + "operationId": "Migrations_ListByTargetServer", + "x-ms-examples": { + "Migrations_ListByTargetServer": { + "$ref": "./examples/Migrations_ListByTargetServer.json" + } + }, + "description": "List all the migrations on a given target server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/TargetDbServerSubscriptionIdParameter" + }, + { + "$ref": "#/parameters/TargetDbServerResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/TargetDbServerNameParameter" + }, + { + "$ref": "#/parameters/MigrationListFilter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/MigrationResourceListResult" + } + }, + "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" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/checkMigrationNameAvailability": { + "post": { + "summary": "Check migration name validity and availability", + "description": "This method checks whether a proposed migration name is valid and available.", + "tags": [ + "Custom operation", + "POST" + ], + "operationId": "CheckMigrationNameAvailability", + "x-ms-examples": { + "CheckMigrationNameAvailability": { + "$ref": "./examples/CheckMigrationNameAvailability.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/TargetDbServerSubscriptionIdParameter" + }, + { + "$ref": "#/parameters/TargetDbServerResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/TargetDbServerNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MigrationNameAvailabilityResource" + }, + "description": "The required parameters for checking if a migration name is available." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/MigrationNameAvailabilityResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "MigrationResource": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/MigrationResourceProperties", + "description": "Migration resource properties.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/TrackedResource" + } + ], + "description": "Represents a migration resource." + }, + "MigrationResourceProperties": { + "type": "object", + "properties": { + "migrationId": { + "type": "string", + "readOnly": true, + "description": "ID for migration, a GUID." + }, + "currentStatus": { + "$ref": "#/definitions/MigrationStatus", + "readOnly": true, + "description": "Current status of migration" + }, + "migrationMode": { + "$ref": "#/definitions/MigrationMode", + "description": "There are two types of migration modes Online and Offline" + }, + "migrationOption": { + "$ref": "#/definitions/MigrationOption", + "description": "This indicates the supported Migration option for the migration" + }, + "sourceType": { + "$ref": "#/definitions/SourceType", + "description": "migration source server type : OnPremises, AWS, GCP, AzureVM or PostgreSQLSingleServer" + }, + "sslMode": { + "$ref": "#/definitions/SslMode", + "description": "SSL modes for migration. Default SSL mode for PostgreSQLSingleServer is VerifyFull and Prefer for other source types" + }, + "sourceDbServerMetadata": { + "$ref": "#/definitions/DbServerMetadata", + "readOnly": true, + "description": "Metadata of the source database server" + }, + "targetDbServerMetadata": { + "$ref": "#/definitions/DbServerMetadata", + "readOnly": true, + "description": "Metadata of the target database server" + }, + "sourceDbServerResourceId": { + "type": "string", + "description": "ResourceId of the source database server in case the sourceType is PostgreSQLSingleServer. For other source types this should be ipaddress:port@username or hostname:port@username" + }, + "sourceDbServerFullyQualifiedDomainName": { + "type": "string", + "description": "Source server fully qualified domain name or ip. It is a optional value, if customer provide it, dms will always use it for connection" + }, + "targetDbServerResourceId": { + "type": "string", + "readOnly": true, + "description": "ResourceId of the source database server" + }, + "targetDbServerFullyQualifiedDomainName": { + "type": "string", + "description": "Target server fully qualified domain name or ip. It is a optional value, if customer provide it, dms will always use it for connection" + }, + "secretParameters": { + "$ref": "#/definitions/MigrationSecretParameters", + "description": "Migration secret parameters" + }, + "dbsToMigrate": { + "maxItems": 50, + "type": "array", + "items": { + "type": "string" + }, + "description": "Number of databases to migrate", + "x-ms-identifiers": [] + }, + "setupLogicalReplicationOnSourceDbIfNeeded": { + "type": "string", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "LogicalReplicationOnSourceDbEnum", + "modelAsString": true + }, + "description": "Indicates whether to setup LogicalReplicationOnSourceDb, if needed" + }, + "overwriteDbsInTarget": { + "type": "string", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "OverwriteDbsInTargetEnum", + "modelAsString": true + }, + "description": "Indicates whether the databases on the target server can be overwritten, if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the database already exists." + }, + "migrationWindowStartTimeInUtc": { + "format": "date-time", + "type": "string", + "description": "Start time in UTC for migration window" + }, + "migrationWindowEndTimeInUtc": { + "format": "date-time", + "type": "string", + "description": "End time in UTC for migration window" + }, + "startDataMigration": { + "type": "string", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "StartDataMigrationEnum", + "modelAsString": true + }, + "description": "Indicates whether the data migration should start right away" + }, + "triggerCutover": { + "type": "string", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "TriggerCutoverEnum", + "modelAsString": true + }, + "description": "To trigger cutover for entire migration we need to send this flag as True" + }, + "dbsToTriggerCutoverOn": { + "type": "array", + "items": { + "type": "string" + }, + "description": "When you want to trigger cutover for specific databases send triggerCutover flag as True and database names in this array", + "x-ms-identifiers": [] + }, + "cancel": { + "type": "string", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "CancelEnum", + "modelAsString": true + }, + "description": "To trigger cancel for entire migration we need to send this flag as True" + }, + "dbsToCancelMigrationOn": { + "type": "array", + "items": { + "type": "string" + }, + "description": "When you want to trigger cancel for specific databases send cancel flag as True and database names in this array", + "x-ms-identifiers": [] + } + }, + "description": "Migration resource properties." + }, + "MigrationResourceListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/MigrationResource" + }, + "readOnly": true, + "description": "A list of migration resources.", + "x-ms-identifiers": [] + }, + "nextLink": { + "description": "The link used to get the next page of migrations.", + "type": "string", + "readOnly": true + } + }, + "description": "A list of migration resources." + }, + "MigrationResourceForPatch": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/MigrationResourcePropertiesForPatch", + "description": "Migration resource properties.", + "x-ms-client-flatten": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Application-specific metadata in the form of key-value pairs." + } + }, + "description": "Represents a migration resource for patch." + }, + "MigrationResourcePropertiesForPatch": { + "type": "object", + "properties": { + "sourceDbServerResourceId": { + "type": "string", + "description": "ResourceId of the source database server" + }, + "sourceDbServerFullyQualifiedDomainName": { + "type": "string", + "description": "Source server fully qualified domain name or ip. It is a optional value, if customer provide it, dms will always use it for connection" + }, + "targetDbServerFullyQualifiedDomainName": { + "type": "string", + "description": "Target server fully qualified domain name or ip. It is a optional value, if customer provide it, dms will always use it for connection" + }, + "secretParameters": { + "$ref": "#/definitions/MigrationSecretParameters", + "description": "Migration secret parameters" + }, + "dbsToMigrate": { + "maxItems": 50, + "type": "array", + "items": { + "type": "string" + }, + "description": "Number of databases to migrate", + "x-ms-identifiers": [] + }, + "setupLogicalReplicationOnSourceDbIfNeeded": { + "type": "string", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "LogicalReplicationOnSourceDbEnum", + "modelAsString": true + }, + "description": "Indicates whether to setup LogicalReplicationOnSourceDb, if needed" + }, + "overwriteDbsInTarget": { + "type": "string", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "OverwriteDbsInTargetEnum", + "modelAsString": true + }, + "description": "Indicates whether the databases on the target server can be overwritten, if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the database already exists." + }, + "migrationWindowStartTimeInUtc": { + "format": "date-time", + "type": "string", + "description": "Start time in UTC for migration window" + }, + "startDataMigration": { + "type": "string", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "StartDataMigrationEnum", + "modelAsString": true + }, + "description": "Indicates whether the data migration should start right away" + }, + "triggerCutover": { + "type": "string", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "TriggerCutoverEnum", + "modelAsString": true + }, + "description": "To trigger cutover for entire migration we need to send this flag as True" + }, + "dbsToTriggerCutoverOn": { + "type": "array", + "items": { + "type": "string" + }, + "description": "When you want to trigger cutover for specific databases send triggerCutover flag as True and database names in this array", + "x-ms-identifiers": [] + }, + "cancel": { + "type": "string", + "enum": [ + "True", + "False" + ], + "x-ms-enum": { + "name": "CancelEnum", + "modelAsString": true + }, + "description": "To trigger cancel for entire migration we need to send this flag as True" + }, + "dbsToCancelMigrationOn": { + "type": "array", + "items": { + "type": "string" + }, + "description": "When you want to trigger cancel for specific databases send cancel flag as True and database names in this array", + "x-ms-identifiers": [] + }, + "migrationMode": { + "$ref": "#/definitions/MigrationMode", + "description": "There are two types of migration modes Online and Offline" + } + }, + "description": "Migration resource properties for patch." + }, + "MigrationSecretParameters": { + "required": [ + "adminCredentials" + ], + "type": "object", + "properties": { + "adminCredentials": { + "x-ms-secret": true, + "x-ms-external": true, + "$ref": "#/definitions/AdminCredentials", + "description": "Admin credentials for source and target servers" + }, + "sourceServerUsername": { + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ], + "description": "Gets or sets the username for the source server. This user need not be an admin." + }, + "targetServerUsername": { + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ], + "description": "Gets or sets the username for the target server. This user need not be an admin." + } + }, + "description": "Migration secret parameters." + }, + "AdminCredentials": { + "type": "object", + "required": [ + "sourceServerPassword", + "targetServerPassword" + ], + "properties": { + "sourceServerPassword": { + "type": "string", + "x-ms-secret": true, + "x-ms-external": true, + "x-ms-mutability": [ + "create", + "update" + ], + "description": "Password for source server." + }, + "targetServerPassword": { + "type": "string", + "x-ms-secret": true, + "x-ms-external": true, + "x-ms-mutability": [ + "create", + "update" + ], + "description": "Password for target server." + } + }, + "description": "Server admin credentials." + }, + "DbServerMetadata": { + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "Location of database server", + "x-ms-mutability": [ + "read" + ], + "readOnly": true + }, + "version": { + "type": "string", + "description": "Version for database engine" + }, + "storageMb": { + "format": "int32", + "type": "integer", + "description": "Storage size in MB for database server" + }, + "sku": { + "$ref": "#/definitions/ServerSku", + "description": "SKU for the database server. This object is empty for PG single server" + } + }, + "description": "Database server metadata." + }, + "MigrationDetailsLevel": { + "enum": [ + "Default", + "Summary", + "Full" + ], + "type": "string", + "description": "Migration details level.", + "x-ms-enum": { + "name": "MigrationDetailsLevel", + "modelAsString": true + } + }, + "MigrationMode": { + "enum": [ + "Offline", + "Online" + ], + "type": "string", + "description": "There are two types of migration modes Online and Offline", + "x-ms-enum": { + "name": "MigrationMode", + "modelAsString": true + } + }, + "MigrationOption": { + "enum": [ + "Validate", + "Migrate", + "ValidateAndMigrate" + ], + "type": "string", + "description": "Supported types of migration request include Validate, Migrate and ValidateAndMigrate", + "x-ms-enum": { + "name": "MigrationOption", + "modelAsString": true + } + }, + "MigrationState": { + "enum": [ + "InProgress", + "WaitingForUserAction", + "Canceled", + "Failed", + "Succeeded", + "ValidationFailed", + "CleaningUp" + ], + "type": "string", + "description": "Migration state.", + "x-ms-enum": { + "name": "MigrationState", + "modelAsString": true + } + }, + "MigrationStatus": { + "type": "object", + "properties": { + "state": { + "$ref": "#/definitions/MigrationState", + "readOnly": true, + "description": "State of migration" + }, + "error": { + "type": "string", + "readOnly": true, + "description": "Error message, if any, for the migration state" + }, + "currentSubStateDetails": { + "$ref": "#/definitions/MigrationSubStateDetails", + "readOnly": true, + "description": "Current Migration sub state details." + } + }, + "description": "Migration status." + }, + "MigrationSubState": { + "enum": [ + "PerformingPreRequisiteSteps", + "WaitingForLogicalReplicationSetupRequestOnSourceDB", + "WaitingForDBsToMigrateSpecification", + "WaitingForTargetDBOverwriteConfirmation", + "WaitingForDataMigrationScheduling", + "WaitingForDataMigrationWindow", + "MigratingData", + "WaitingForCutoverTrigger", + "CompletingMigration", + "Completed", + "CancelingRequestedDBMigrations", + "ValidationInProgress" + ], + "type": "string", + "description": "Migration sub state.", + "x-ms-enum": { + "name": "MigrationSubState", + "modelAsString": true + } + }, + "MigrationSubStateDetails": { + "type": "object", + "properties": { + "currentSubState": { + "$ref": "#/definitions/MigrationSubState", + "readOnly": true + }, + "dbDetails": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/DbMigrationStatus" + } + }, + "validationDetails": { + "$ref": "#/definitions/ValidationDetails" + } + }, + "description": "Migration sub state details." + }, + "DbMigrationStatus": { + "type": "object", + "description": "Migration status of an individual database", + "properties": { + "databaseName": { + "type": "string", + "description": "Name of the database" + }, + "migrationState": { + "type": "string", + "description": "Migration db state of an individual database", + "enum": [ + "InProgress", + "WaitingForCutoverTrigger", + "Failed", + "Canceled", + "Succeeded", + "Canceling" + ], + "x-ms-enum": { + "name": "MigrationDbState", + "modelAsString": true + } + }, + "migrationOperation": { + "type": "string", + "description": "Migration operation of an individual database" + }, + "startedOn": { + "type": "string", + "format": "date-time", + "description": "Start date-time of a migration state" + }, + "endedOn": { + "type": "string", + "format": "date-time", + "description": "End date-time of a migration state" + }, + "fullLoadQueuedTables": { + "format": "int32", + "type": "integer", + "description": "Number of tables queued for the migration of a DB" + }, + "fullLoadErroredTables": { + "format": "int32", + "type": "integer", + "description": "Number of tables errored out during the migration of a DB" + }, + "fullLoadLoadingTables": { + "format": "int32", + "type": "integer", + "description": "Number of tables loading during the migration of a DB" + }, + "fullLoadCompletedTables": { + "format": "int32", + "type": "integer", + "description": "Number of tables loaded during the migration of a DB" + }, + "cdcUpdateCounter": { + "format": "int32", + "type": "integer", + "description": "CDC update counter" + }, + "cdcDeleteCounter": { + "format": "int32", + "type": "integer", + "description": "CDC delete counter" + }, + "cdcInsertCounter": { + "format": "int32", + "type": "integer", + "description": "CDC insert counter" + }, + "appliedChanges": { + "format": "int32", + "type": "integer", + "description": "CDC applied changes counter" + }, + "incomingChanges": { + "format": "int32", + "type": "integer", + "description": "CDC incoming changes counter" + }, + "latency": { + "format": "int32", + "type": "integer", + "description": "Lag in seconds between source and target during online phase" + }, + "message": { + "type": "string", + "description": "Error message, if any, for the migration state" + } + } + }, + "ValidationDetails": { + "type": "object", + "description": "Details for the validation for migration", + "properties": { + "status": { + "$ref": "#/definitions/ValidationState" + }, + "validationStartTimeInUtc": { + "type": "string", + "format": "date-time", + "description": "Validation Start date-time in UTC" + }, + "validationEndTimeInUtc": { + "type": "string", + "format": "date-time", + "description": "Validation End date-time in UTC" + }, + "serverLevelValidationDetails": { + "type": "array", + "items": { + "$ref": "#/definitions/ValidationSummaryItem" + }, + "description": "Details of server level validations", + "x-ms-identifiers": [] + }, + "dbLevelValidationDetails": { + "type": "array", + "items": { + "$ref": "#/definitions/DbLevelValidationStatus" + }, + "description": "Details of server level validations", + "x-ms-identifiers": [ + "databaseName" + ] + } + } + }, + "DbLevelValidationStatus": { + "type": "object", + "description": "Validation status summary for an individual database", + "properties": { + "databaseName": { + "type": "string", + "description": "Name of the database" + }, + "startedOn": { + "type": "string", + "format": "date-time", + "description": "Start date-time of a database level validation" + }, + "endedOn": { + "type": "string", + "format": "date-time", + "description": "End date-time of a database level validation" + }, + "summary": { + "type": "array", + "items": { + "$ref": "#/definitions/ValidationSummaryItem" + }, + "description": "Summary of database level validations", + "x-ms-identifiers": [] + } + } + }, + "ValidationSummaryItem": { + "type": "object", + "description": "Validation summary object", + "properties": { + "type": { + "type": "string", + "description": "Validation type" + }, + "state": { + "$ref": "#/definitions/ValidationState" + }, + "messages": { + "type": "array", + "items": { + "$ref": "#/definitions/ValidationMessage" + }, + "description": "Validation messages", + "x-ms-identifiers": [] + } + } + }, + "ValidationMessage": { + "type": "object", + "description": "Validation message object", + "properties": { + "state": { + "$ref": "#/definitions/ValidationState", + "description": "Severity of validation message" + }, + "message": { + "type": "string", + "description": "Validation message string" + } + } + }, + "ValidationState": { + "type": "string", + "description": "Validation status for migration", + "enum": [ + "Failed", + "Succeeded", + "Warning" + ], + "x-ms-enum": { + "name": "ValidationState", + "modelAsString": true + } + }, + "SourceType": { + "enum": [ + "OnPremises", + "AWS", + "GCP", + "AzureVM", + "PostgreSQLSingleServer" + ], + "type": "string", + "description": "Migration source server type : OnPremises, AWS, GCP, AzureVM or PostgreSQLSingleServer", + "x-ms-enum": { + "name": "SourceType", + "modelAsString": true + } + }, + "SslMode": { + "enum": [ + "Prefer", + "Require", + "VerifyCA", + "VerifyFull" + ], + "type": "string", + "description": "Supported SSL modes for migration. VerifyFull is the recommended SSL mode for Single server migration. Prefer, Require are recommended SSL modes for other source types", + "x-ms-enum": { + "name": "SslMode", + "modelAsString": true + } + }, + "ServerSku": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3." + }, + "tier": { + "type": "string", + "description": "The tier of the particular SKU, e.g. Burstable.", + "enum": [ + "Burstable", + "GeneralPurpose", + "MemoryOptimized" + ], + "x-ms-enum": { + "name": "SkuTier", + "modelAsString": true + } + } + }, + "description": "Sku information related properties of a server." + }, + "MigrationNameAvailabilityReason": { + "enum": [ + "Invalid", + "AlreadyExists" + ], + "type": "string", + "description": "Migration name availability reason.", + "x-ms-enum": { + "name": "MigrationNameAvailabilityReason", + "modelAsString": true + } + }, + "MigrationNameAvailabilityResource": { + "required": [ + "name", + "type" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The resource name to verify." + }, + "type": { + "type": "string", + "description": "The type of the resource." + }, + "nameAvailable": { + "type": "boolean", + "description": "Indicates whether the resource name is available.", + "readOnly": true + }, + "reason": { + "$ref": "#/definitions/MigrationNameAvailabilityReason", + "description": "Migration name availability reason", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Migration name availability message.", + "readOnly": true + } + }, + "description": "Represents a migration name's availability." + } + }, + "parameters": { + "TargetDbServerSubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The subscription ID of the target database server.", + "pattern": "([a-z0-9]){8,8}[-]([a-z0-9]){4,4}[-]([a-z0-9]){4,4}[-]([a-z0-9]){4,4}[-]([a-z0-9]){12,12}", + "x-ms-parameter-location": "method" + }, + "TargetDbServerResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The resource group name of the target database server.", + "pattern": "^[-a-z0-9A-Z._()]+[^.]$", + "x-ms-parameter-location": "method" + }, + "TargetDbServerNameParameter": { + "name": "targetDbServerName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the target database server.", + "pattern": "([-a-z0-9]){3,63}", + "x-ms-parameter-location": "method" + }, + "MigrationNameParameter": { + "name": "migrationName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the migration.", + "pattern": "^[a-z][a-z0-9]*$", + "x-ms-parameter-location": "method" + }, + "MigrationListFilter": { + "name": "migrationListFilter", + "in": "query", + "required": false, + "enum": [ + "Active", + "All" + ], + "type": "string", + "description": "Migration list filter. Retrieves either active migrations or all migrations.", + "x-ms-enum": { + "name": "MigrationListFilter", + "modelAsString": true + }, + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/Operations.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/Operations.json new file mode 100644 index 000000000000..414d581c499f --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/Operations.json @@ -0,0 +1,164 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "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 and configurations with new business model.", + "version": "2023-06-01-preview" + }, + "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": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/providers/Microsoft.DBforPostgreSQL/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "x-ms-examples": { + "OperationList": { + "$ref": "./examples/OperationList.json" + } + }, + "description": "Lists all of the available REST API operations.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "OperationDisplay": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "readOnly": true, + "description": "Operation resource provider name." + }, + "resource": { + "type": "string", + "readOnly": true, + "description": "Resource on which the operation is performed." + }, + "operation": { + "type": "string", + "readOnly": true, + "description": "Localized friendly name for the operation." + }, + "description": { + "type": "string", + "readOnly": true, + "description": "Operation description." + } + }, + "description": "Display metadata associated with the operation." + }, + "Operation": { + "type": "object", + "properties": { + "name": { + "type": "string", + "readOnly": true, + "description": "The name of the operation being performed on this particular object." + }, + "display": { + "$ref": "#/definitions/OperationDisplay", + "readOnly": true, + "description": "The localized display information for this particular operation or action." + }, + "isDataAction": { + "description": "Indicates whether the operation is a data action", + "type": "boolean" + }, + "origin": { + "type": "string", + "readOnly": true, + "description": "The intended executor of the operation.", + "enum": [ + "NotSpecified", + "user", + "system" + ], + "x-ms-enum": { + "name": "OperationOrigin", + "modelAsString": true + } + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "object" + }, + "readOnly": true, + "x-ms-client-flatten": false, + "description": "Additional descriptions for the operation." + } + }, + "description": "REST API operation definition." + }, + "OperationListResult": { + "description": "A list of resource provider operations.", + "type": "object", + "properties": { + "value": { + "description": "Collection of available operation details", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "nextLink": { + "description": "URL client should use to fetch the next page (per server side paging).\r\nIt's null for now, added for future use.", + "type": "string" + } + } + } + }, + "parameters": {} +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/PrivateDnsZone.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/PrivateDnsZone.json new file mode 100644 index 000000000000..8571eac3fac9 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/PrivateDnsZone.json @@ -0,0 +1,77 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-06-01-preview", + "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 and configurations with new business model." + }, + "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": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/providers/Microsoft.DBforPostgreSQL/getPrivateDnsZoneSuffix": { + "post": { + "tags": [ + "GetPrivateDnsZoneSuffix" + ], + "operationId": "GetPrivateDnsZoneSuffix_Execute", + "x-ms-examples": { + "GetPrivateDnsZoneSuffix": { + "$ref": "./examples/GetPrivateDnsZoneSuffix.json" + } + }, + "description": "Get private DNS zone suffix in the cloud", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/PrivateDnsZoneSuffix" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "PrivateDnsZoneSuffix": { + "type": "string", + "description": "Represents a resource name availability." + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/PrivateEndpointConnections.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/PrivateEndpointConnections.json new file mode 100644 index 000000000000..880c6cf850b4 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/PrivateEndpointConnections.json @@ -0,0 +1,270 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "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 and configurations with new business model.", + "version": "2023-06-01-preview" + }, + "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": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}": { + "get": { + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Gets a private endpoint connection.", + "operationId": "PrivateEndpointConnections_Get", + "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": "../../../types/common-types.json#/parameters/PrivateEndpointConnectionNameParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved a specified private endpoint connection.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/privatelinks.json#/definitions/PrivateEndpointConnection" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Gets private endpoint connection.": { + "$ref": "./examples/PrivateEndpointConnectionGet.json" + } + } + }, + "put": { + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Approve or reject a private endpoint connection with a given name.", + "operationId": "PrivateEndpointConnection_Update", + "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": "../../../types/common-types.json#/parameters/PrivateEndpointConnectionNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/privatelinks.json#/definitions/PrivateEndpointConnection" + }, + "description": "The required parameters for updating private endpoint connection." + } + ], + "responses": { + "200": { + "description": "Successfully approved or rejected private endpoint connection.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/privatelinks.json#/definitions/PrivateEndpointConnection" + } + }, + "201": { + "description": "Successfully approved or rejected private endpoint connection.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/privatelinks.json#/definitions/PrivateEndpointConnection" + } + }, + "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-examples": { + "Approve or reject a private endpoint connection with a given name.": { + "$ref": "./examples/PrivateEndpointConnectionUpdate.json" + } + } + }, + "delete": { + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Deletes a private endpoint connection with a given name.", + "operationId": "PrivateEndpointConnection_Delete", + "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": "../../../types/common-types.json#/parameters/PrivateEndpointConnectionNameParameter" + } + ], + "responses": { + "202": { + "description": "Accepted and the operation will complete asynchronously.", + "headers": { + "Location": { + "type": "string" + } + } + }, + "204": { + "description": "Private endpoint connection does not exist." + }, + "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" + }, + "x-ms-examples": { + "Deletes a private endpoint connection with a given name.": { + "$ref": "./examples/PrivateEndpointConnectionDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections": { + "get": { + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Gets all private endpoint connections on a server.", + "operationId": "PrivateEndpointConnections_ListByServer", + "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": "Successfully retrieved private endpoint connections.", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnectionListResult" + } + }, + "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" + }, + "x-ms-examples": { + "Gets list of private endpoint connections on a server.": { + "$ref": "./examples/PrivateEndpointConnectionList.json" + } + } + } + } + }, + "definitions": { + "PrivateEndpointConnectionListResult": { + "description": "A list of private endpoint connections.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "../../../../../common-types/resource-management/v5/privatelinks.json#/definitions/PrivateEndpointConnection" + }, + "readOnly": true + }, + "nextLink": { + "description": "The URL to get the next set of results.", + "type": "string", + "format": "uri", + "readOnly": true + } + } + } + }, + "parameters": {} +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/PrivateLinkResources.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/PrivateLinkResources.json new file mode 100644 index 000000000000..d182220ea98b --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/PrivateLinkResources.json @@ -0,0 +1,155 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "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 and configurations with new business model.", + "version": "2023-06-01-preview" + }, + "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": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateLinkResources": { + "get": { + "tags": [ + "PrivateLinkResources" + ], + "description": "Gets the private link resources for PostgreSQL server.", + "operationId": "PrivateLinkResources_ListByServer", + "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": "Successfully retrieved private link resources.", + "schema": { + "$ref": "#/definitions/PrivateLinkResourceListResult" + } + }, + "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" + }, + "x-ms-examples": { + "Gets private link resources for PostgreSQL.": { + "$ref": "./examples/PrivateLinkResourcesList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateLinkResources/{groupName}": { + "get": { + "tags": [ + "PrivateLinkResources" + ], + "description": "Gets a private link resource for PostgreSQL server.", + "operationId": "PrivateLinkResources_Get", + "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": "groupName", + "in": "path", + "description": "The name of the private link resource.", + "required": true, + "type": "string", + "pattern": "^.*$" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved private link resources.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/privatelinks.json#/definitions/PrivateLinkResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Gets a private link resource for PostgreSQL.": { + "$ref": "./examples/PrivateLinkResourcesGet.json" + } + } + } + } + }, + "definitions": { + "PrivateLinkResourceListResult": { + "description": "A list of private link resources", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "../../../../../common-types/resource-management/v5/privatelinks.json#/definitions/PrivateLinkResource" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": {} +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/QuotaUsages.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/QuotaUsages.json new file mode 100644 index 000000000000..481bdd5e25c0 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/QuotaUsages.json @@ -0,0 +1,148 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "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 and configurations with new business model.", + "version": "2023-06-01-preview" + }, + "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": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/resourceType/flexibleServers/usages": { + "get": { + "tags": [ + "QuotaUsagesForFlexibleServers" + ], + "operationId": "QuotaUsages_List", + "x-ms-examples": { + "List of quota usages for flexible servers": { + "$ref": "./examples/QuotaUsagesForFlexibleServers.json" + } + }, + "description": "Get quota usages at specified location in a given subscription.", + "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" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/QuotaUsagesListResult" + } + }, + "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": { + "QuotaUsage": { + "type": "object", + "properties": { + "name": { + "$ref": "#/definitions/NameProperty", + "description": "Name of quota usage for flexible servers" + }, + "limit": { + "type": "integer", + "format": "int64", + "description": "Quota limit" + }, + "unit": { + "type": "string", + "description": "Quota unit", + "default": "Count" + }, + "currentValue": { + "type": "integer", + "format": "int64", + "description": "Current Quota usage value" + }, + "id": { + "type": "string", + "description": "Fully qualified ARM resource Id" + } + }, + "description": "Quota usage for flexible servers" + }, + "NameProperty": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "Name value" + }, + "localizedValue": { + "type": "string", + "description": "Localized name" + } + }, + "description": "Name property for quota usage" + }, + "QuotaUsagesListResult": { + "type": "object", + "properties": { + "value": { + "description": "A list of quota usages.", + "type": "array", + "items": { + "$ref": "#/definitions/QuotaUsage" + }, + "x-ms-identifiers": [ + "name" + ], + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + }, + "description": "Capability for the PostgreSQL server" + } + }, + "parameters": {} +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/Replicas.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/Replicas.json new file mode 100644 index 000000000000..a6c22b182fe2 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/Replicas.json @@ -0,0 +1,83 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "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 and configurations with new business model.", + "version": "2023-06-01-preview" + }, + "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": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/replicas": { + "get": { + "tags": [ + "Replicas" + ], + "operationId": "Replicas_ListByServer", + "x-ms-examples": { + "ReplicasListByServer": { + "$ref": "./examples/ReplicasListByServer.json" + } + }, + "description": "List all the replicas for a given 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": "./FlexibleServers.json#/definitions/ServerListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/ServerLogs.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/ServerLogs.json new file mode 100644 index 000000000000..0832f5007d74 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/ServerLogs.json @@ -0,0 +1,148 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "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 and configurations with new business model.", + "version": "2023-06-01-preview" + }, + "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": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/logFiles": { + "get": { + "tags": [ + "LogFiles" + ], + "operationId": "LogFiles_ListByServer", + "x-ms-examples": { + "List all server log files for a server": { + "$ref": "./examples/LogFilesListByServer.json" + } + }, + "description": "List all the server log files in a given 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/LogFileListResult" + } + }, + "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": { + "LogFileProperties": { + "type": "object", + "properties": { + "createdTime": { + "type": "string", + "format": "date-time", + "description": "Creation timestamp of the log file." + }, + "lastModifiedTime": { + "type": "string", + "format": "date-time", + "description": "Last modified timestamp of the log file." + }, + "sizeInKb": { + "type": "integer", + "format": "int64", + "description": "The size in kb of the logFile." + }, + "type": { + "type": "string", + "description": "Type of the log file." + }, + "url": { + "type": "string", + "description": "The url to download the log file from." + } + }, + "description": "The properties of a logFile." + }, + "LogFile": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/LogFileProperties", + "x-ms-client-flatten": true, + "description": "The properties of a logFile." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ], + "description": "Represents a logFile." + }, + "LogFileListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/LogFile" + }, + "description": "The list of logFiles in a server" + }, + "nextLink": { + "description": "The link used to get the next page of operations.", + "type": "string" + } + }, + "description": "A List of logFiles." + } + }, + "parameters": {} +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/ServerStartStopRestart.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/ServerStartStopRestart.json new file mode 100644 index 000000000000..fd4d1293a102 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/ServerStartStopRestart.json @@ -0,0 +1,229 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "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 and configurations with new business model.", + "version": "2023-06-01-preview" + }, + "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": "Azure Active Directory 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": { + "ServerRestart": { + "$ref": "./examples/ServerRestart.json" + }, + "ServerRestartWithFailover": { + "$ref": "./examples/ServerRestartWithFailover.json" + } + }, + "description": "Restarts a 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": "The parameters for restarting a 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": { + "ServerStart": { + "$ref": "./examples/ServerStart.json" + } + }, + "description": "Starts a 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": { + "ServerStop": { + "$ref": "./examples/ServerStop.json" + } + }, + "description": "Stops a 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 whether to restart the server with failover." + }, + "failoverMode": { + "type": "string", + "description": "Failover mode.", + "enum": [ + "PlannedFailover", + "ForcedFailover", + "PlannedSwitchover", + "ForcedSwitchover" + ], + "x-ms-enum": { + "name": "FailoverMode", + "modelAsString": true + } + } + }, + "description": "Represents server restart parameters." + } + }, + "parameters": {} +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/ThreatProtection.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/ThreatProtection.json new file mode 100644 index 000000000000..14d6408e7d39 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/ThreatProtection.json @@ -0,0 +1,272 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, administrators, log files, configurations, migrations, advanced threat protection settings with new business model.", + "version": "2023-06-01-preview" + }, + "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": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings": { + "get": { + "tags": [ + "AdvancedThreatProtectionSettings" + ], + "description": "Get a list of server's Threat Protection state.", + "operationId": "ServerThreatProtectionSettings_ListByServer", + "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": "Successfully retrieved the server threat detection policy.", + "schema": { + "$ref": "#/definitions/ServerThreatProtectionListResult" + } + }, + "default": { + "description": "Error response describing why the operation of advanced threat protection on the flexible server failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get a server's Advanced Threat Protection settings": { + "$ref": "./examples/ServerThreatProtectionSettingsListByServer.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{threatProtectionName}": { + "get": { + "tags": [ + "AdvancedThreatProtectionSettings" + ], + "description": "Get a server's Advanced Threat Protection settings.", + "operationId": "ServerThreatProtectionSettings_Get", + "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/ThreatProtectionNameParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the server advanced threat protection settings.", + "schema": { + "$ref": "#/definitions/ServerThreatProtectionSettingsModel" + } + }, + "default": { + "description": "Error response describing why the operation of threat protection on the flexible server failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get a server's Threat Protection settings": { + "$ref": "./examples/ServerThreatProtectionSettingsGet.json" + } + } + }, + "put": { + "tags": [ + "AdvancedThreatProtectionSettings" + ], + "description": "Creates or updates a server's Advanced Threat Protection settings.", + "operationId": "ServerThreatProtectionSettings_CreateOrUpdate", + "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/ThreatProtectionNameParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "The Advanced Threat Protection state for the flexible server.", + "required": true, + "schema": { + "$ref": "#/definitions/ServerThreatProtectionSettingsModel" + } + } + ], + "responses": { + "200": { + "description": "Successfully set or update the server Threat Protection settings.", + "schema": { + "$ref": "#/definitions/ServerThreatProtectionSettingsModel" + } + }, + "default": { + "description": "Error response describing why the operation of setting Threat Protection failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + }, + "201": { + "description": "Successfully created the server Threat Protection settings.", + "schema": { + "$ref": "#/definitions/ServerThreatProtectionSettingsModel" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Update a server's Threat Protection settings": { + "$ref": "./examples/ServerThreatProtectionSettingsCreate.json" + } + } + } + } + }, + "definitions": { + "ServerThreatProtectionProperties": { + "description": "Properties of server Threat Protection state.", + "required": [ + "state" + ], + "type": "object", + "properties": { + "state": { + "description": "Specifies the state of the Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific server.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "ThreatProtectionState", + "modelAsString": false + } + }, + "creationTime": { + "format": "date-time", + "description": "Specifies the UTC creation time of the policy.", + "type": "string", + "readOnly": true + } + } + }, + "ServerThreatProtectionSettingsModel": { + "description": "Server's Advanced Threat Protection settings.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ServerThreatProtectionProperties", + "description": "Advanced Threat Protection properties.", + "x-ms-client-flatten": true + } + } + }, + "ServerThreatProtectionListResult": { + "description": "A list of the server's Advanced Threat Protection settings.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerThreatProtectionSettingsModel" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ThreatProtectionNameParameter": { + "name": "threatProtectionName", + "in": "path", + "description": "The name of the Threat Protection state.", + "required": true, + "type": "string", + "enum": [ + "Default" + ], + "x-ms-enum": { + "name": "ThreatProtectionName", + "modelAsString": true + }, + "pattern": "^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/VirtualEndpoints.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/VirtualEndpoints.json new file mode 100644 index 000000000000..b3c2c9f95389 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-06-01-preview/VirtualEndpoints.json @@ -0,0 +1,403 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "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 and configurations with new business model.", + "version": "2023-06-01-preview" + }, + "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": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}": { + "put": { + "tags": [ + "VirtualEndpoints" + ], + "operationId": "VirtualEndpoints_Create", + "x-ms-examples": { + "Create a new virtual endpoint for a flexible server": { + "$ref": "./examples/VirtualEndpointCreate.json" + } + }, + "description": "Creates a new virtual endpoint for PostgreSQL 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/VirtualEndpointNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/VirtualEndpointResource" + }, + "description": "The required parameters for creating or updating virtual endpoints." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/VirtualEndpointResource" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/VirtualEndpointResource" + } + }, + "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" + } + }, + "patch": { + "tags": [ + "VirtualEndpoints" + ], + "operationId": "VirtualEndpoints_Update", + "x-ms-examples": { + "Update a virtual endpoint for a server to update the ": { + "$ref": "./examples/VirtualEndpointUpdate.json" + } + }, + "description": "Updates an existing virtual endpoint. The request body can contain one to many of the properties present in the normal virtual endpoint definition.", + "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/VirtualEndpointNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/VirtualEndpointResourceForPatch" + }, + "description": "The required parameters for updating a server." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/VirtualEndpointResource" + } + }, + "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": [ + "VirtualEndpoints" + ], + "operationId": "VirtualEndpoints_Delete", + "x-ms-examples": { + "Delete a virtual endpoint": { + "$ref": "./examples/VirtualEndpointDelete.json" + } + }, + "description": "Deletes a virtual endpoint.", + "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/VirtualEndpointNameParameter" + } + ], + "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": [ + "VirtualEndpoints" + ], + "operationId": "VirtualEndpoints_Get", + "x-ms-examples": { + "Get a virtual endpoint": { + "$ref": "./examples/VirtualEndpointsGet.json" + } + }, + "description": "Gets information about a virtual endpoint.", + "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/VirtualEndpointNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/VirtualEndpointResource" + } + }, + "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}/virtualendpoints": { + "get": { + "tags": [ + "VirtualEndpoints" + ], + "operationId": "VirtualEndpoints_ListByServer", + "x-ms-examples": { + "VirtualEndpointListByServer": { + "$ref": "./examples/VirtualEndpointsListByServer.json" + } + }, + "description": "List all the servers in a given resource group.", + "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/VirtualEndpointsListResult" + } + }, + "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": { + "VirtualEndpointResourceProperties": { + "type": "object", + "properties": { + "endpointType": { + "type": "string", + "description": "The endpoint type for the virtual endpoint.", + "enum": [ + "ReadWrite" + ], + "x-ms-enum": { + "name": "VirtualEndpointType", + "modelAsString": true + } + }, + "members": { + "type": "array", + "items": { + "type": "string", + "description": "Member for the virtual endpoint." + }, + "description": "List of members for a virtual endpoint" + }, + "virtualEndpoints": { + "type": "array", + "items": { + "type": "string", + "description": "Virtual endpoint for a server." + }, + "description": "List of virtual endpoints for a server", + "readOnly": true + } + }, + "description": "The properties of a virtual endpoint." + }, + "VirtualEndpointResource": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/VirtualEndpointResourceForPatch" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/Resource" + } + ], + "description": "Represents a virtual endpoint for a server." + }, + "VirtualEndpointResourceForPatch": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/VirtualEndpointResourceProperties", + "x-ms-client-flatten": true, + "description": "Properties of the virtual endpoint resource." + } + }, + "description": "Represents a virtual endpoint for a server." + }, + "VirtualEndpointsListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/VirtualEndpointResource" + }, + "description": "The list of virtual endpoints" + }, + "nextLink": { + "description": "The link used to get the next page of operations.", + "type": "string" + } + }, + "description": "A list of virtual endpoints." + } + }, + "parameters": { + "VirtualEndpointNameParameter": { + "name": "virtualEndpointName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the virtual endpoint.", + "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,62}(?