Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PostgreSQL] New api version 2023-03-01-preview - Migrations API property update, enum values update. Network property changes ported. #24087

Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
],
"description": "storage size in MB capability"
},
"ServerSku": {
"ServerSkuCapability": {
"type": "object",
"properties": {
"name": {
Expand Down Expand Up @@ -386,7 +386,7 @@
"type": "array",
"description": "List of supported server SKUs.",
"items": {
"$ref": "#/definitions/ServerSku"
"$ref": "#/definitions/ServerSkuCapability"
},
"x-ms-identifiers": [
"name"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,11 +462,7 @@
"network": {
"$ref": "#/definitions/Network",
"default": null,
"description": "Network properties of a server.",
"x-ms-mutability": [
"create",
"read"
]
"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",
Expand Down Expand Up @@ -645,6 +641,11 @@
"replicationRole": {
"$ref": "#/definitions/ReplicationRole",
"description": "Replication role of the server"
},
"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."
}
}
},
Expand Down Expand Up @@ -991,12 +992,7 @@
}
]
},
"default": "",
"description": "delegated subnet arm resource id.",
"x-ms-mutability": [
"create",
"read"
]
"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",
Expand All @@ -1007,15 +1003,10 @@
}
]
},
"default": "",
"description": "private dns zone arm resource id.",
"x-ms-mutability": [
"create",
"read"
]
"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"
"description": "Network properties of a server."
},
"HighAvailability": {
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
"x-ms-examples": {
"Migrations_Create": {
"$ref": "./examples/Migrations_Create.json"
},
"Migrations Create by passing user names": {
"$ref": "./examples/Migrations_Create_With_Other_Users.json"
}
},
"description": "Creates a new migration.",
Expand Down Expand Up @@ -144,6 +147,9 @@
"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.",
Expand Down Expand Up @@ -410,8 +416,8 @@
"setupLogicalReplicationOnSourceDbIfNeeded": {
"type": "string",
"enum": [
"Enabled",
"Disabled"
"True",
"False"
],
"x-ms-enum": {
"name": "LogicalReplicationOnSourceDbEnum",
Expand All @@ -422,14 +428,14 @@
"overwriteDbsInTarget": {
"type": "string",
"enum": [
"Enabled",
"Disabled"
"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 Disabled, the migration workflow will wait for a confirmation, if it detects that the database already exists."
"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",
Expand All @@ -444,8 +450,8 @@
"startDataMigration": {
"type": "string",
"enum": [
"Enabled",
"Disabled"
"True",
"False"
],
"x-ms-enum": {
"name": "StartDataMigrationEnum",
Expand All @@ -456,40 +462,40 @@
"triggerCutover": {
"type": "string",
"enum": [
"Enabled",
"Disabled"
"True",
"False"
],
"x-ms-enum": {
"name": "TriggerCutoverEnum",
"modelAsString": true
},
"description": "To trigger cutover for entire migration we need to send this flag as Enabled"
"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 Enabled and database names in this array"
"description": "When you want to trigger cutover for specific databases send triggerCutover flag as True and database names in this array"
},
"cancel": {
"type": "string",
"enum": [
"Enabled",
"Disabled"
"True",
"False"
],
"x-ms-enum": {
"name": "CancelEnum",
"modelAsString": true
},
"description": "To trigger cancel for entire migration we need to send this flag as Enabled"
"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 Enabled and database names in this array"
"description": "When you want to trigger cancel for specific databases send cancel flag as True and database names in this array"
}
},
"description": "Migration resource properties."
Expand Down Expand Up @@ -561,8 +567,8 @@
"setupLogicalReplicationOnSourceDbIfNeeded": {
"type": "string",
"enum": [
"Enabled",
"Disabled"
"True",
"False"
],
"x-ms-enum": {
"name": "LogicalReplicationOnSourceDbEnum",
Expand All @@ -573,14 +579,14 @@
"overwriteDbsInTarget": {
"type": "string",
"enum": [
"Enabled",
"Disabled"
"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 Disabled, the migration workflow will wait for a confirmation, if it detects that the database already exists."
"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",
Expand All @@ -590,8 +596,8 @@
"startDataMigration": {
"type": "string",
"enum": [
"Enabled",
"Disabled"
"True",
"False"
],
"x-ms-enum": {
"name": "StartDataMigrationEnum",
Expand All @@ -602,40 +608,40 @@
"triggerCutover": {
"type": "string",
"enum": [
"Enabled",
"Disabled"
"True",
"False"
],
"x-ms-enum": {
"name": "TriggerCutoverEnum",
"modelAsString": true
},
"description": "To trigger cutover for entire migration we need to send this flag as Enabled"
"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 Enabled and database names in this array"
"description": "When you want to trigger cutover for specific databases send triggerCutover flag as True and database names in this array"
},
"cancel": {
"type": "string",
"enum": [
"Enabled",
"Disabled"
"True",
"False"
],
"x-ms-enum": {
"name": "CancelEnum",
"modelAsString": true
},
"description": "To trigger cancel for entire migration we need to send this flag as Enabled"
"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 Enabled and database names in this array"
"description": "When you want to trigger cancel for specific databases send cancel flag as True and database names in this array"
},
"migrationMode": {
"$ref": "#/definitions/MigrationMode",
Expand All @@ -655,6 +661,22 @@
"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."
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"parameters": {
"api-version": "2023-03-01-preview",
"subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"resourceGroupName": "testrg",
"targetDbServerName": "testtarget",
"migrationName": "testmigration",
"migrationMode": "Online",
"parameters": {
"properties": {
"cancel": "True"
}
}
},
"responses": {
"200": {
"body": {
"properties": {
"migrationId": "d3ceacbb-a5fd-43dc-a9db-6022b5154856",
"currentStatus": {
"state": "Canceled",
"currentSubStateDetails": {
"currentSubState": "Completed"
}
},
"migrationMode": "Online",
"migrationWindowEndTimeInUtc": "2023-05-15T07:23:56.3260822Z",
"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": [
"postgres"
],
"setupLogicalReplicationOnSourceDbIfNeeded": "True",
"overwriteDbsInTarget": "True",
"migrationWindowStartTimeInUtc": "2023-05-15T07:22:57.7001251Z",
"sourceDbServerMetadata": {
"location": "eastasia",
"sku": {
"name": "B_Gen5_2",
"tier": "Basic"
}
},
"targetDbServerMetadata": {
"location": "East Asia",
"sku": {
"name": "Standard_D2ds_v4",
"tier": "Standard_D2ds_v4"
}
}
},
"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"
}
}
}
}
Loading