Skip to content

Commit

Permalink
CodeGen from PR 21523 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
[Hub Generated] Review request for Microsoft.DBforPostgreSQL to add version preview/2022-05-01-privatepreview (#21523)

* Adds base for updating Microsoft.DBforPostgreSQL from version preview/2022-03-08-preview to version 2022-05-01-privatepreview

* Updates readme

* Updates API version in new specs and examples

* copied migration changes

* added new checkMigrationNameAvailability.json

* changed readme file

* change in readme.md

* change in readme.md

* change in readme.md

* removed commontypes.json in readme

* testing readme changes

* changed subscriptionid and resourceGroupName

* changed serviceError

* changed uuid to guid

* changed guid to string

* aded custom words

* renamed migrationName to nameOfMigration

* removed common-types in readme

* copied 2022-03-08-preview merged PR changes

* changed v2 to v3 in migration.json and added password in types.json

* added password

* Added only migration related changes

* Added operations.json

* Added only migration related changes

* testing operation change

* Added operations.json

* checking avocado changes

* removed common-types

* changed -privatepreview to -preview

* resolved conflicts

* changed camelcase errors

* added trigger as custom word

* added trigger as custom word

* Removed MigrationResourceGroup

* changed nameOfMigration to migrationName

* reverted nameOfMigration to migrationName

* changed to preview-only

* checking migrationName param

* reverting migrationname changes

* testing migrationName

* fixed error

---------

Co-authored-by: Purnachandra rao Kota <[email protected]>
  • Loading branch information
SDKAuto and Purnachandra rao Kota committed Mar 2, 2023
1 parent e263b7d commit 4c0b856
Show file tree
Hide file tree
Showing 2 changed files with 254 additions and 0 deletions.
251 changes: 251 additions & 0 deletions schemas/2022-05-01-preview/Microsoft.DBforPostgreSQL.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
{
"id": "https://schema.management.azure.com/schemas/2022-05-01-preview/Microsoft.DBforPostgreSQL.json#",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Microsoft.DBforPostgreSQL",
"description": "Microsoft DBforPostgreSQL Resource Types",
"resourceDefinitions": {
"flexibleServers_migrations": {
"type": "object",
"properties": {
"apiVersion": {
"type": "string",
"enum": [
"2022-05-01-preview"
]
},
"location": {
"type": "string",
"description": "The geo-location where the resource lives"
},
"name": {
"oneOf": [
{
"type": "string",
"pattern": "^[a-z][a-z0-9]*$"
},
{
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
}
],
"description": "The name of the migration."
},
"properties": {
"oneOf": [
{
"$ref": "#/definitions/MigrationResourceProperties"
},
{
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
}
],
"description": "Migration resource properties."
},
"tags": {
"oneOf": [
{
"type": "object",
"additionalProperties": {
"type": "string"
},
"properties": {}
},
{
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
}
],
"description": "Resource tags."
},
"type": {
"type": "string",
"enum": [
"Microsoft.DBforPostgreSQL/flexibleServers/migrations"
]
}
},
"required": [
"apiVersion",
"location",
"name",
"properties",
"type"
],
"description": "Microsoft.DBforPostgreSQL/flexibleServers/migrations"
}
},
"definitions": {
"AdminCredentials": {
"type": "object",
"properties": {
"sourceServerPassword": {
"type": "string"
},
"targetServerPassword": {
"type": "string"
}
},
"required": [
"sourceServerPassword",
"targetServerPassword"
],
"description": "Server admin credentials."
},
"MigrationResourceProperties": {
"type": "object",
"properties": {
"cancel": {
"oneOf": [
{
"type": "boolean"
},
{
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
}
],
"description": "To trigger cancel for entire migration we need to send this flag as true"
},
"dBsToCancelMigrationOn": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
}
],
"description": "When you want to trigger cancel for specific databases send triggerCutover flag as true and database names in this array"
},
"dBsToMigrate": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
}
]
},
"dBsToTiggerCutoverOn": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
}
],
"description": "When you want to trigger cutover for specific databases send triggerCutover flag as true and database names in this array"
},
"migrationMode": {
"oneOf": [
{
"type": "string",
"enum": [
"Offline",
"Online"
]
},
{
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
}
],
"description": "There are two types of migration modes Online and Offline."
},
"migrationWindowStartTimeInUtc": {
"type": "string",
"format": "date-time"
},
"overwriteDBsInTarget": {
"oneOf": [
{
"type": "boolean"
},
{
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
}
]
},
"secretParameters": {
"oneOf": [
{
"$ref": "#/definitions/MigrationSecretParameters"
},
{
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
}
],
"description": "Migration secret parameters."
},
"setupLogicalReplicationOnSourceDBIfNeeded": {
"oneOf": [
{
"type": "boolean"
},
{
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
}
]
},
"sourceDBServerFullyQualifiedDomainName": {
"type": "string"
},
"sourceDBServerResourceId": {
"type": "string"
},
"startDataMigration": {
"oneOf": [
{
"type": "boolean"
},
{
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
}
]
},
"targetDBServerFullyQualifiedDomainName": {
"type": "string"
},
"triggerCutover": {
"oneOf": [
{
"type": "boolean"
},
{
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
}
],
"description": "To trigger cutover for entire migration we need to send this flag as true"
}
},
"description": "Migration resource properties."
},
"MigrationSecretParameters": {
"type": "object",
"properties": {
"adminCredentials": {
"oneOf": [
{
"$ref": "#/definitions/AdminCredentials"
},
{
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
}
],
"description": "Server admin credentials."
}
},
"required": [
"adminCredentials"
],
"description": "Migration secret parameters."
}
}
}
3 changes: 3 additions & 0 deletions schemas/common/autogeneratedResources.json
Original file line number Diff line number Diff line change
Expand Up @@ -8674,6 +8674,9 @@
{
"$ref": "https://schema.management.azure.com/schemas/2022-03-08-preview/Microsoft.DBforPostgreSQL.json#/resourceDefinitions/flexibleServers_firewallRules"
},
{
"$ref": "https://schema.management.azure.com/schemas/2022-05-01-preview/Microsoft.DBforPostgreSQL.json#/resourceDefinitions/flexibleServers_migrations"
},
{
"$ref": "https://schema.management.azure.com/schemas/2022-12-01/Microsoft.DBforPostgreSQL.json#/resourceDefinitions/flexibleServers"
},
Expand Down

0 comments on commit 4c0b856

Please sign in to comment.