diff --git a/custom-words.txt b/custom-words.txt index 5790b582afb9..b8760a52f55c 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -1164,6 +1164,8 @@ Lockdown managedidentity managedvirtualnetworks managedprivateendpoints +Trigger +dBsToTiggerCutoverOn loganalytics loggerid logio diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-05-01-preview/Migrations.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-05-01-preview/Migrations.json new file mode 100644 index 000000000000..d1a35c4e47d6 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-05-01-preview/Migrations.json @@ -0,0 +1,822 @@ +{ + "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": "2022-05-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" + } + }, + "description": "Creates a new migration.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/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": "OK", + "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/v3/types.json#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "tags": [ + "Migrations" + ], + "operationId": "Migrations_Get", + "x-ms-examples": { + "Migrations_Get": { + "$ref": "./examples/Migrations_Get.json" + } + }, + "description": "Gets details of a migration.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/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/v3/types.json#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "tags": [ + "Migrations" + ], + "operationId": "Migrations_Update", + "x-ms-examples": { + "Migrations_Update": { + "$ref": "./examples/Migrations_Update.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/v3/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/v3/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/v3/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/v3/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/v3/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/v3/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/v3/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/v3/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "MigrationResource": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/MigrationResourceProperties", + "description": "Migration resource properties.", + "x-ms-client-flatten": true + }, + "systemData": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/systemData", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ], + "description": "Represents a migration resource." + }, + "MigrationResourceProperties": { + "type": "object", + "properties": { + "migrationId": { + "type": "string", + "readOnly": true + }, + "migrationDetailsLevel": { + "$ref": "#/definitions/MigrationDetailsLevel", + "readOnly": true + }, + "currentStatus": { + "$ref": "#/definitions/MigrationStatus", + "readOnly": true + }, + "sourceDBServerMetadata": { + "$ref": "#/definitions/DBServerMetadata", + "readOnly": true + }, + "targetDBServerMetadata": { + "$ref": "#/definitions/DBServerMetadata", + "readOnly": true + }, + "sourceDBServerResourceId": { + "type": "string" + }, + "sourceDBServerFullyQualifiedDomainName": { + "type": "string" + }, + "targetDBServerFullyQualifiedDomainName": { + "type": "string" + }, + "secretParameters": { + "$ref": "#/definitions/MigrationSecretParameters" + }, + "targetDBServerResourceId": { + "type": "string", + "readOnly": true + }, + "dBsToMigrate": { + "maxItems": 50, + "type": "array", + "items": { + "type": "string" + } + }, + "setupLogicalReplicationOnSourceDBIfNeeded": { + "type": "boolean" + }, + "overwriteDBsInTarget": { + "type": "boolean" + }, + "migrationWindowStartTimeInUtc": { + "format": "date-time", + "type": "string" + }, + "startDataMigration": { + "type": "boolean" + }, + "triggerCutover": { + "type": "boolean", + "description": "To trigger cutover for entire migration we need to send this flag as true" + }, + "dBsToTiggerCutoverOn": { + "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" + }, + "cancel": { + "type": "boolean", + "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 triggerCutover flag as true and database names in this array" + }, + "migrationMode": { + "$ref": "#/definitions/MigrationMode", + "description": "There are two types of migration modes Online and Offline" + } + }, + "description": "Migration resource properties." + }, + "MigrationResourceListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/MigrationResource" + }, + "readOnly": true + }, + "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" + }, + "sourceDBServerFullyQualifiedDomainName": { + "type": "string" + }, + "targetDBServerFullyQualifiedDomainName": { + "type": "string" + }, + "secretParameters": { + "$ref": "#/definitions/MigrationSecretParameters" + }, + "dBsToMigrate": { + "maxItems": 50, + "type": "array", + "items": { + "type": "string" + } + }, + "setupLogicalReplicationOnSourceDBIfNeeded": { + "type": "boolean" + }, + "overwriteDBsInTarget": { + "type": "boolean" + }, + "migrationWindowStartTimeInUtc": { + "format": "date-time", + "type": "string" + }, + "startDataMigration": { + "type": "boolean" + }, + "triggerCutover": { + "type": "boolean", + "description": "To trigger cutover for entire migration we need to send this flag as true" + }, + "dBsToTiggerCutoverOn": { + "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" + }, + "cancel": { + "type": "boolean", + "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 triggerCutover flag as true and database names in this array" + }, + "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": "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" + ] + }, + "targetServerPassword": { + "type": "string", + "x-ms-secret": true, + "x-ms-external": true, + "x-ms-mutability": [ + "create", + "update" + ] + } + }, + "description": "Server admin credentials." + }, + "DBServerMetadata": { + "type": "object", + "properties": { + "location": { + "type": "string" + }, + "version": { + "type": "string" + }, + "storageMB": { + "format": "int32", + "type": "integer" + }, + "sku": { + "$ref": "#/definitions/ServerSku" + } + }, + "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 + } + }, + "MigrationState": { + "enum": [ + "InProgress", + "WaitingForUserAction", + "Canceled", + "Failed", + "Succeeded" + ], + "type": "string", + "description": "Migration state.", + "x-ms-enum": { + "name": "MigrationState", + "modelAsString": true + } + }, + "MigrationStatus": { + "type": "object", + "properties": { + "state": { + "$ref": "#/definitions/MigrationState", + "readOnly": true + }, + "error": { + "type": "string", + "readOnly": true + }, + "currentSubStateDetails": { + "$ref": "#/definitions/MigrationSubStateDetails", + "readOnly": true + } + }, + "description": "Migration status." + }, + "MigrationSubState": { + "enum": [ + "PerformingPreRequisiteSteps", + "WaitingForLogicalReplicationSetupRequestOnSourceDB", + "WaitingForDBsToMigrateSpecification", + "WaitingForTargetDBOverwriteConfirmation", + "WaitingForDataMigrationScheduling", + "WaitingForDataMigrationWindow", + "MigratingData", + "WaitingForCutoverTrigger", + "CompletingMigration", + "Completed" + ], + "type": "string", + "description": "Migration sub state.", + "x-ms-enum": { + "name": "MigrationSubState", + "modelAsString": true + } + }, + "MigrationSubStateDetails": { + "type": "object", + "properties": { + "currentSubState": { + "$ref": "#/definitions/MigrationSubState", + "readOnly": true + } + }, + "description": "Migration sub state details." + }, + "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 + } + } + }, + "required": [ + "name", + "tier" + ], + "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/2022-05-01-preview/Operations.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-05-01-preview/Operations.json new file mode 100644 index 000000000000..b6ea69b963f9 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-05-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": "2022-05-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/v3/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/v3/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/2022-05-01-preview/examples/CheckMigrationNameAvailability.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-05-01-preview/examples/CheckMigrationNameAvailability.json new file mode 100644 index 000000000000..6e36531ac586 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-05-01-preview/examples/CheckMigrationNameAvailability.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2022-05-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testrg", + "targetDBServerName": "testtarget", + "parameters": { + "name": "name1", + "type": "Microsoft.DBforPostgreSQL/flexibleServers/migrations" + } + }, + "responses": { + "200": { + "body": { + "name": "name1", + "type": "Microsoft.DBforPostgreSQL/flexibleServers/migrations", + "nameAvailable": true, + "reason": null, + "message": null + } + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-05-01-preview/examples/Migrations_Create.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-05-01-preview/examples/Migrations_Create.json new file mode 100644 index 000000000000..ae489319f9ee --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-05-01-preview/examples/Migrations_Create.json @@ -0,0 +1,127 @@ +{ + "parameters": { + "api-version": "2022-05-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testrg", + "targetDBServerName": "testtarget", + "migrationName": "testmigration", + "migrationMode": "Offline", + "parameters": { + "properties": { + "sourceDBServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource", + "dBsToMigrate": [ + "db1", + "db2", + "db3", + "db4" + ] + }, + "location": "westus" + } + }, + "responses": { + "200": { + "body": { + "properties": { + "migrationId": "d3ceacbb-a5fd-43dc-a9db-6022b5154856", + "migrationDetailsLevel": "Default", + "currentStatus": { + "state": "InProgress", + "error": "", + "currentSubStateDetails": { + "currentSubState": "PerformingPreRequisiteSteps" + } + }, + "sourceDBServerMetadata": { + "location": "westus", + "version": "10", + "storageMB": 1024, + "sku": { + "name": "B_Gen5_2", + "tier": "Basic" + } + }, + "targetDBServerMetadata": { + "location": "westus", + "version": "11", + "storageMB": 2048, + "sku": { + "tier": "GeneralPurpose", + "name": "Standard_D4s_v3" + } + }, + "sourceDBServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource", + "targetDBServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/flexibleServers/testtarget", + "dBsToMigrate": [ + "db1", + "db2", + "db3", + "db4" + ], + "setupLogicalReplicationOnSourceDBIfNeeded": false, + "overwriteDBsInTarget": false, + "migrationWindowStartTimeInUtc": "2021-05-06T16:05:58.895Z", + "startDataMigration": false, + "triggerCutover": false + }, + "tags": { + "key1624": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "location": "westus", + "id": "d3ceacbb-a5fd-43dc-a9db-6022b5154856", + "name": "d3ceacbb-a5fd-43dc-a9db-6022b5154856", + "type": "Microsoft.DBForPostgreSql/flexibleServers/migrations" + } + }, + "201": { + "body": { + "properties": { + "migrationId": "d3ceacbb-a5fd-43dc-a9db-6022b5154856", + "migrationDetailsLevel": "Default", + "currentStatus": { + "state": "InProgress", + "error": "", + "currentSubStateDetails": { + "currentSubState": "PerformingPreRequisiteSteps" + } + }, + "sourceDBServerMetadata": { + "location": "westus", + "version": "10", + "storageMB": 1024, + "sku": { + "name": "B_Gen5_2", + "tier": "Basic" + } + }, + "targetDBServerMetadata": { + "location": "westus", + "version": "11", + "storageMB": 2048, + "sku": { + "tier": "GeneralPurpose", + "name": "Standard_D4s_v3" + } + }, + "sourceDBServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource", + "targetDBServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/flexibleServers/testtarget", + "dBsToMigrate": [ + "db1", + "db2", + "db3", + "db4" + ], + "setupLogicalReplicationOnSourceDBIfNeeded": false, + "overwriteDBsInTarget": false, + "migrationWindowStartTimeInUtc": "2021-05-06T16:05:58.895Z", + "startDataMigration": false, + "triggerCutover": false + }, + "location": "westus", + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/flexibleServers/testtarget/migrations/testmigration", + "name": "testmigration", + "type": "Microsoft.DBForPostgreSql/flexibleServers/migrations" + } + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-05-01-preview/examples/Migrations_Delete.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-05-01-preview/examples/Migrations_Delete.json new file mode 100644 index 000000000000..8b39d409a971 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-05-01-preview/examples/Migrations_Delete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2022-05-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testrg", + "targetDBServerName": "testtarget", + "migrationName": "testmigration", + "migrationMode": "Offline" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-05-01-preview/examples/Migrations_Get.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-05-01-preview/examples/Migrations_Get.json new file mode 100644 index 000000000000..03e66a7a3b8c --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-05-01-preview/examples/Migrations_Get.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2022-05-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testrg", + "targetDBServerName": "testtarget", + "migrationMode": "Offline", + "migrationName": "testmigration" + }, + "responses": { + "200": { + "body": { + "properties": { + "migrationId": "d3ceacbb-a5fd-43dc-a9db-6022b5154856", + "migrationDetailsLevel": "Default", + "currentStatus": { + "state": "InProgress", + "error": "", + "currentSubStateDetails": { + "currentSubState": "PerformingPreRequisiteSteps" + } + }, + "sourceDBServerMetadata": { + "location": "westus", + "version": "10", + "storageMB": 1024, + "sku": { + "name": "B_Gen5_2", + "tier": "Basic" + } + }, + "targetDBServerMetadata": { + "location": "westus", + "version": "11", + "storageMB": 2048, + "sku": { + "tier": "GeneralPurpose", + "name": "Standard_D4s_v3" + } + }, + "sourceDBServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource", + "targetDBServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/flexibleServers/testtarget", + "dBsToMigrate": [ + "db1", + "db2", + "db3", + "db4" + ], + "setupLogicalReplicationOnSourceDBIfNeeded": false, + "overwriteDBsInTarget": false, + "migrationWindowStartTimeInUtc": "2021-05-06T16:05:58.895Z", + "startDataMigration": false, + "triggerCutover": false + }, + "location": "westus", + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/flexibleServers/testtarget/migrations/testmigration", + "name": "testmigration", + "type": "Microsoft.DBForPostgreSql/flexibleServers/migrations" + } + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-05-01-preview/examples/Migrations_ListByTargetServer.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-05-01-preview/examples/Migrations_ListByTargetServer.json new file mode 100644 index 000000000000..cfedd6729c47 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-05-01-preview/examples/Migrations_ListByTargetServer.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "api-version": "2022-05-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testrg", + "targetDBServerName": "testtarget", + "migrationListFilter": "All", + "migrationMode": "Offline" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "migrationId": "d3ceacbb-a5fd-43dc-a9db-6022b5154856", + "migrationDetailsLevel": "Default", + "currentStatus": { + "state": "InProgress", + "error": "", + "currentSubStateDetails": { + "currentSubState": "PerformingPreRequisiteSteps" + } + }, + "sourceDBServerMetadata": { + "location": "westus", + "version": "10", + "storageMB": 1024, + "sku": { + "name": "B_Gen5_2", + "tier": "Basic" + } + }, + "targetDBServerMetadata": { + "location": "westus", + "version": "11", + "storageMB": 2048, + "sku": { + "tier": "GeneralPurpose", + "name": "Standard_D4s_v3" + } + }, + "sourceDBServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource", + "targetDBServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/flexibleServers/testtarget", + "dBsToMigrate": [ + "db1", + "db2", + "db3", + "db4" + ], + "setupLogicalReplicationOnSourceDBIfNeeded": false, + "overwriteDBsInTarget": false, + "migrationWindowStartTimeInUtc": "2021-05-06T16:05:58.895Z", + "startDataMigration": false, + "triggerCutover": false + }, + "location": "westus", + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/flexibleServers/testtarget/migrations/testmigration", + "name": "testmigration", + "type": "Microsoft.DBForPostgreSql/flexibleServers/migrations" + } + ] + } + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-05-01-preview/examples/Migrations_Update.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-05-01-preview/examples/Migrations_Update.json new file mode 100644 index 000000000000..04462cd3e8e2 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-05-01-preview/examples/Migrations_Update.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2022-05-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testrg", + "targetDBServerName": "testtarget", + "migrationName": "testmigration", + "migrationMode": "Offline", + "parameters": { + "properties": { + "setupLogicalReplicationOnSourceDBIfNeeded": true + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "migrationId": "d3ceacbb-a5fd-43dc-a9db-6022b5154856", + "migrationDetailsLevel": "Default", + "currentStatus": { + "state": "InProgress", + "error": "", + "currentSubStateDetails": { + "currentSubState": "PerformingPreRequisiteSteps" + } + }, + "sourceDBServerMetadata": { + "location": "westus", + "version": "10", + "storageMB": 1024, + "sku": { + "name": "B_Gen5_2", + "tier": "Basic" + } + }, + "targetDBServerMetadata": { + "location": "westus", + "version": "11", + "storageMB": 2048, + "sku": { + "tier": "GeneralPurpose", + "name": "Standard_D4s_v3" + } + }, + "sourceDBServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/servers/testsource", + "targetDBServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/flexibleServers/testtarget", + "dBsToMigrate": [ + "db1", + "db2", + "db3", + "db4" + ], + "setupLogicalReplicationOnSourceDBIfNeeded": true, + "overwriteDBsInTarget": false, + "migrationWindowStartTimeInUtc": "2021-05-06T16:05:58.895Z", + "startDataMigration": false, + "triggerCutover": false + }, + "location": "westus", + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSql/flexibleServers/testtarget/migrations/testmigration", + "name": "testmigration", + "type": "Microsoft.DBForPostgreSql/flexibleServers/migrations" + } + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-05-01-preview/examples/OperationList.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-05-01-preview/examples/OperationList.json new file mode 100644 index 000000000000..b2d4063c6f15 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-05-01-preview/examples/OperationList.json @@ -0,0 +1,176 @@ +{ + "parameters": { + "api-version": "2022-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.DBforPostgreSQL/flexibleServers/read", + "display": { + "provider": "Microsoft DB for PostgreSQL", + "resource": "PostgreSQL Server", + "operation": "List/Get PostgreSQL Servers", + "description": "Return the list of servers or gets the properties for the specified server." + } + }, + { + "name": "Microsoft.DBforPostgreSQL/flexibleServers/write", + "display": { + "provider": "Microsoft DB for PostgreSQL", + "resource": "PostgreSQL Server", + "operation": "Create/Update PostgreSQL Server", + "description": "Creates a server with the specified parameters or update the properties or tags for the specified server." + } + }, + { + "name": "Microsoft.DBforPostgreSQL/flexibleServers/delete", + "display": { + "provider": "Microsoft DB for PostgreSQL", + "resource": "PostgreSQL Server", + "operation": "Delete PostgreSQL Server", + "description": "Deletes an existing server." + } + }, + { + "name": "Microsoft.DBforPostgreSQL/flexibleServers/firewallRules/read", + "display": { + "provider": "Microsoft DB for PostgreSQL", + "resource": "Firewall Rules", + "operation": "List/Get Firewall Rules", + "description": "Return the list of firewall rules for a server or gets the properties for the specified firewall rule." + } + }, + { + "name": "Microsoft.DBforPostgreSQL/flexibleServers/firewallRules/write", + "display": { + "provider": "Microsoft DB for PostgreSQL", + "resource": "Firewall Rules", + "operation": "Create/Update Firewall Rule", + "description": "Creates a firewall rule with the specified parameters or update an existing rule." + } + }, + { + "name": "Microsoft.DBforPostgreSQL/flexibleServers/firewallRules/delete", + "display": { + "provider": "Microsoft DB for PostgreSQL", + "resource": "Firewall Rules", + "operation": "Delete Firewall Rule", + "description": "Deletes an existing firewall rule." + } + }, + { + "name": "Microsoft.DBforPostgreSQL/flexibleServers/providers/Microsoft.Insights/metricDefinitions/read", + "display": { + "provider": "Microsoft DB for PostgreSQL", + "resource": "Database Metric Definition", + "operation": "Get database metric definitions", + "description": "Return types of metrics that are available for databases" + }, + "properties": { + "serviceSpecification": { + "metricSpecifications": [ + { + "name": "cpu_percent", + "displayName": "CPU percent", + "displayDescription": "CPU percent", + "unit": "Percent", + "aggregationType": "Average", + "fillGapWithZero": true + }, + { + "name": "compute_limit", + "displayName": "Compute Unit limit", + "displayDescription": "Compute Unit limit", + "unit": "Count", + "aggregationType": "Average" + }, + { + "name": "compute_consumption_percent", + "displayName": "Compute Unit percentage", + "displayDescription": "Compute Unit percentage", + "unit": "Percent", + "aggregationType": "Average", + "fillGapWithZero": true + }, + { + "name": "memory_percent", + "displayName": "Memory percent", + "displayDescription": "Memory percent", + "unit": "Percent", + "aggregationType": "Average", + "fillGapWithZero": true + }, + { + "name": "io_consumption_percent", + "displayName": "IO percent", + "displayDescription": "IO percent", + "unit": "Percent", + "aggregationType": "Average", + "fillGapWithZero": true + }, + { + "name": "storage_percent", + "displayName": "Storage percentage", + "displayDescription": "Storage percentage", + "unit": "Percent", + "aggregationType": "Average" + }, + { + "name": "storage_used", + "displayName": "Storage used", + "displayDescription": "Storage used", + "unit": "Bytes", + "aggregationType": "Average" + }, + { + "name": "storage_limit", + "displayName": "Storage limit", + "displayDescription": "Storage limit", + "unit": "Bytes", + "aggregationType": "Average" + }, + { + "name": "active_connections", + "displayName": "Total active connections", + "displayDescription": "Total active connections", + "unit": "Count", + "aggregationType": "Average", + "fillGapWithZero": true + }, + { + "name": "connections_failed", + "displayName": "Total failed connections", + "displayDescription": "Total failed connections", + "unit": "Count", + "aggregationType": "Average", + "fillGapWithZero": true + } + ] + } + } + }, + { + "name": "Microsoft.DBforPostgreSQL/flexibleServers/providers/Microsoft.Insights/diagnosticSettings/read", + "display": { + "provider": "Microsoft DB for PostgreSQL", + "resource": "Database Metric Definition", + "operation": "Read diagnostic setting", + "description": "Gets the disagnostic setting for the resource" + } + }, + { + "name": "Microsoft.DBforPostgreSQL/flexibleServers/providers/Microsoft.Insights/diagnosticSettings/write", + "display": { + "provider": "Microsoft DB for PostgreSQL", + "resource": "Database Metric Definition", + "operation": "Write diagnostic setting", + "description": "Creates or updates the diagnostic setting for the resource" + } + } + ] + } + } + } +} diff --git a/specification/postgresql/resource-manager/readme.md b/specification/postgresql/resource-manager/readme.md index 29504a8e5542..7fb4b36be3e7 100644 --- a/specification/postgresql/resource-manager/readme.md +++ b/specification/postgresql/resource-manager/readme.md @@ -60,6 +60,17 @@ input-file: - Microsoft.DBforPostgreSQL/stable/2022-12-01/ServerStartStopRestart.json - Microsoft.DBforPostgreSQL/stable/2022-12-01/VirtualNetwork.json ``` + +### Tag: package-flexibleserver-2022-05-01-preview-only + +These settings apply only when `--tag=package-flexibleserver-2022-05-01-preview-only` is specified on the command line. + +```yaml $(tag) == 'package-flexibleserver-2022-05-01-preview-only' +input-file: + - Microsoft.DBforPostgreSQL/preview/2022-05-01-preview/Migrations.json + - Microsoft.DBforPostgreSQL/preview/2022-05-01-preview/Operations.json +``` + ### Tag: package-flexibleserver-2022-03-preview These settings apply only when `--tag=package-flexibleserver-2022-03-preview` is specified on the command line.