Ruft Informationen zu einer Migration ab.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}?api-version=2025-08-01
URI-Parameter
| Name |
In |
Erforderlich |
Typ |
Beschreibung |
|
migrationName
|
path |
True
|
string
pattern: ^[a-z][a-z0-9]*$
|
Name der Migration.
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
Der Name der Ressourcengruppe. Bei dem Namen wird die Groß-/Kleinschreibung nicht beachtet.
|
|
serverName
|
path |
True
|
string
minLength: 3 maxLength: 63 pattern: ^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*
|
Name des Servers
|
|
subscriptionId
|
path |
True
|
string
(uuid)
|
Die ID des Zielabonnements. Der Wert muss eine UUID sein.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
Hierbei handelt es sich um die für diesen Vorgang zu verwendende API-Version.
|
Antworten
| Name |
Typ |
Beschreibung |
|
200 OK
|
Migration
|
Azure-Operation erfolgreich abgeschlossen.
|
|
Other Status Codes
|
ErrorResponse
|
Unerwartete Fehlerantwort.
|
Sicherheit
azure_auth
Azure Active Directory OAuth2 Flow.
Typ:
oauth2
Ablauf:
implicit
Autorisierungs-URL:
https://login.microsoftonline.com/common/oauth2/authorize
Bereiche
| Name |
Beschreibung |
|
user_impersonation
|
Identitätswechsel ihres Benutzerkontos
|
Beispiele
Beispielanforderung
GET https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampleserver/migrations/examplemigration?api-version=2025-08-01
/**
* Samples for Migrations Get.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/
* MigrationsGetMigrationWithSuccessfulValidationAndMigration.json
*/
/**
* Sample code: Get information about a migration with successful validation and successful migration.
*
* @param manager Entry point to PostgreSqlManager.
*/
public static void getInformationAboutAMigrationWithSuccessfulValidationAndSuccessfulMigration(
com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
manager.migrations().getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration",
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.postgresqlflexibleservers import PostgreSQLManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-postgresqlflexibleservers
# USAGE
python migrations_get_migration_with_successful_validation_and_migration.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = PostgreSQLManagementClient(
credential=DefaultAzureCredential(),
subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff",
)
response = client.migrations.get(
resource_group_name="exampleresourcegroup",
server_name="exampleserver",
migration_name="examplemigration",
)
print(response)
# x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGetMigrationWithSuccessfulValidationAndMigration.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armpostgresqlflexibleservers_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/v5"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e96c24570a484cff13d153fb472f812878866a39/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGetMigrationWithSuccessfulValidationAndMigration.json
func ExampleMigrationsClient_Get_getInformationAboutAMigrationWithSuccessfulValidationAndSuccessfulMigration() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewMigrationsClient().Get(ctx, "exampleresourcegroup", "exampleserver", "examplemigration", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Migration = armpostgresqlflexibleservers.Migration{
// Name: to.Ptr("examplemigration"),
// Type: to.Ptr("Microsoft.DBForPostgreSql/flexibleServers/migrations"),
// ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/flexibleServers/exampletarget/migrations/examplemigration"),
// Location: to.Ptr("eastus"),
// Properties: &armpostgresqlflexibleservers.MigrationProperties{
// CurrentStatus: &armpostgresqlflexibleservers.MigrationStatus{
// CurrentSubStateDetails: &armpostgresqlflexibleservers.MigrationSubstateDetails{
// CurrentSubState: to.Ptr(armpostgresqlflexibleservers.MigrationSubstateCompleted),
// DbDetails: map[string]*armpostgresqlflexibleservers.DatabaseMigrationState{
// "exampledatabase": &armpostgresqlflexibleservers.DatabaseMigrationState{
// AppliedChanges: to.Ptr[int32](0),
// CdcDeleteCounter: to.Ptr[int32](0),
// CdcInsertCounter: to.Ptr[int32](0),
// CdcUpdateCounter: to.Ptr[int32](0),
// DatabaseName: to.Ptr("exampledatabase"),
// EndedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T20:30:22.123Z"); return t}()),
// FullLoadCompletedTables: to.Ptr[int32](10),
// FullLoadErroredTables: to.Ptr[int32](0),
// FullLoadLoadingTables: to.Ptr[int32](0),
// FullLoadQueuedTables: to.Ptr[int32](0),
// IncomingChanges: to.Ptr[int32](0),
// Latency: to.Ptr[int32](0),
// MigrationState: to.Ptr(armpostgresqlflexibleservers.MigrationDatabaseStateSucceeded),
// StartedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T18:30:22.123Z"); return t}()),
// },
// },
// ValidationDetails: &armpostgresqlflexibleservers.ValidationDetails{
// DbLevelValidationDetails: []*armpostgresqlflexibleservers.DbLevelValidationStatus{
// {
// DatabaseName: to.Ptr("exampledatabase"),
// EndedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T20:30:22.123Z"); return t}()),
// StartedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T18:30:22.123Z"); return t}()),
// Summary: []*armpostgresqlflexibleservers.ValidationSummaryItem{
// {
// Type: to.Ptr("SchemaValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// },
// {
// Type: to.Ptr("ExtensionsValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// },
// {
// Type: to.Ptr("CollationsValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// }},
// }},
// ServerLevelValidationDetails: []*armpostgresqlflexibleservers.ValidationSummaryItem{
// {
// Type: to.Ptr("AuthenticationAndConnectivityValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// },
// {
// Type: to.Ptr("SourceVersionValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// },
// {
// Type: to.Ptr("ServerParametersValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// }},
// Status: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// ValidationEndTimeInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T20:30:22.123Z"); return t}()),
// ValidationStartTimeInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T18:30:22.123Z"); return t}()),
// },
// },
// State: to.Ptr(armpostgresqlflexibleservers.MigrationStateSucceeded),
// },
// DbsToMigrate: []*string{
// to.Ptr("exampledatabase")},
// MigrateRoles: to.Ptr(armpostgresqlflexibleservers.MigrateRolesAndPermissionsFalse),
// MigrationID: to.Ptr("f2354e72-2828-4a19-ad20-b4cd9e2673c1"),
// MigrationMode: to.Ptr(armpostgresqlflexibleservers.MigrationModeOffline),
// MigrationOption: to.Ptr(armpostgresqlflexibleservers.MigrationOptionValidateAndMigrate),
// MigrationWindowEndTimeInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T20:30:22.123Z"); return t}()),
// MigrationWindowStartTimeInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T18:30:22.123Z"); return t}()),
// OverwriteDbsInTarget: to.Ptr(armpostgresqlflexibleservers.OverwriteDatabasesOnTargetServerTrue),
// SetupLogicalReplicationOnSourceDbIfNeeded: to.Ptr(armpostgresqlflexibleservers.LogicalReplicationOnSourceServerTrue),
// SourceDbServerResourceID: to.Ptr("20.228.214.65:5432@postgres"),
// TargetDbServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/flexibleServers/exampletarget"),
// TriggerCutover: to.Ptr(armpostgresqlflexibleservers.TriggerCutoverTrue),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { PostgreSQLManagementFlexibleServerClient } = require("@azure/arm-postgresql-flexible");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv/config");
/**
* This sample demonstrates how to Gets information about a migration.
*
* @summary Gets information about a migration.
* x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGetMigrationWithSuccessfulValidationAndMigration.json
*/
async function getInformationAboutAMigrationWithSuccessfulValidationAndSuccessfulMigration() {
const subscriptionId =
process.env["POSTGRESQL_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff";
const resourceGroupName = process.env["POSTGRESQL_RESOURCE_GROUP"] || "exampleresourcegroup";
const serverName = "exampleserver";
const migrationName = "examplemigration";
const credential = new DefaultAzureCredential();
const client = new PostgreSQLManagementFlexibleServerClient(credential, subscriptionId);
const result = await client.migrations.get(resourceGroupName, serverName, migrationName);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.PostgreSql.FlexibleServers.Models;
using Azure.ResourceManager.PostgreSql.FlexibleServers;
// Generated from example definition: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGetMigrationWithSuccessfulValidationAndMigration.json
// this example is just showing the usage of "Migrations_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://dotnet.territoriali.olinfo.it/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this PostgreSqlMigrationResource created on azure
// for more information of creating PostgreSqlMigrationResource, please refer to the document of PostgreSqlMigrationResource
string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff";
string resourceGroupName = "exampleresourcegroup";
string serverName = "exampleserver";
string migrationName = "examplemigration";
ResourceIdentifier postgreSqlMigrationResourceId = PostgreSqlMigrationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, migrationName);
PostgreSqlMigrationResource postgreSqlMigration = client.GetPostgreSqlMigrationResource(postgreSqlMigrationResourceId);
// invoke the operation
PostgreSqlMigrationResource result = await postgreSqlMigration.GetAsync();
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
PostgreSqlMigrationData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Beispiel für eine Antwort
{
"name": "examplemigration",
"type": "Microsoft.DBForPostgreSql/flexibleServers/migrations",
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/flexibleServers/exampletarget/migrations/examplemigration",
"location": "eastus",
"properties": {
"currentStatus": {
"currentSubStateDetails": {
"currentSubState": "Completed",
"dbDetails": {
"exampledatabase": {
"appliedChanges": 0,
"cdcDeleteCounter": 0,
"cdcInsertCounter": 0,
"cdcUpdateCounter": 0,
"databaseName": "exampledatabase",
"endedOn": "2025-06-01T20:30:22.123456Z",
"fullLoadCompletedTables": 10,
"fullLoadErroredTables": 0,
"fullLoadLoadingTables": 0,
"fullLoadQueuedTables": 0,
"incomingChanges": 0,
"latency": 0,
"migrationState": "Succeeded",
"startedOn": "2025-06-01T18:30:22.123456Z"
}
},
"validationDetails": {
"dbLevelValidationDetails": [
{
"databaseName": "exampledatabase",
"endedOn": "2025-06-01T20:30:22.123456Z",
"startedOn": "2025-06-01T18:30:22.123456Z",
"summary": [
{
"type": "SchemaValidation",
"state": "Succeeded"
},
{
"type": "ExtensionsValidation",
"state": "Succeeded"
},
{
"type": "CollationsValidation",
"state": "Succeeded"
}
]
}
],
"serverLevelValidationDetails": [
{
"type": "AuthenticationAndConnectivityValidation",
"state": "Succeeded"
},
{
"type": "SourceVersionValidation",
"state": "Succeeded"
},
{
"type": "ServerParametersValidation",
"state": "Succeeded"
}
],
"status": "Succeeded",
"validationEndTimeInUtc": "2025-06-01T20:30:22.123456Z",
"validationStartTimeInUtc": "2025-06-01T18:30:22.123456Z"
}
},
"state": "Succeeded"
},
"dbsToMigrate": [
"exampledatabase"
],
"migrateRoles": "False",
"migrationId": "f2354e72-2828-4a19-ad20-b4cd9e2673c1",
"migrationMode": "Offline",
"migrationOption": "ValidateAndMigrate",
"migrationWindowEndTimeInUtc": "2025-06-01T20:30:22.123456Z",
"migrationWindowStartTimeInUtc": "2025-06-01T18:30:22.123456Z",
"overwriteDbsInTarget": "True",
"setupLogicalReplicationOnSourceDbIfNeeded": "True",
"sourceDbServerResourceId": "20.228.214.65:5432@postgres",
"targetDbServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/flexibleServers/exampletarget",
"triggerCutover": "True"
}
}
Beispielanforderung
GET https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampleserver/migrations/examplemigration?api-version=2025-08-01
/**
* Samples for Migrations Get.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/
* MigrationsGetMigrationWithSuccessfulValidationButMigrationFailure.json
*/
/**
* Sample code: Get information about a migration with successful validation but failed migration.
*
* @param manager Entry point to PostgreSqlManager.
*/
public static void getInformationAboutAMigrationWithSuccessfulValidationButFailedMigration(
com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
manager.migrations().getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration",
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.postgresqlflexibleservers import PostgreSQLManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-postgresqlflexibleservers
# USAGE
python migrations_get_migration_with_successful_validation_but_migration_failure.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = PostgreSQLManagementClient(
credential=DefaultAzureCredential(),
subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff",
)
response = client.migrations.get(
resource_group_name="exampleresourcegroup",
server_name="exampleserver",
migration_name="examplemigration",
)
print(response)
# x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGetMigrationWithSuccessfulValidationButMigrationFailure.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armpostgresqlflexibleservers_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/v5"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e96c24570a484cff13d153fb472f812878866a39/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGetMigrationWithSuccessfulValidationButMigrationFailure.json
func ExampleMigrationsClient_Get_getInformationAboutAMigrationWithSuccessfulValidationButFailedMigration() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewMigrationsClient().Get(ctx, "exampleresourcegroup", "exampleserver", "examplemigration", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Migration = armpostgresqlflexibleservers.Migration{
// Name: to.Ptr("examplemigration"),
// Type: to.Ptr("Microsoft.DBForPostgreSql/flexibleServers/migrations"),
// ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/flexibleServers/exampletarget/migrations/examplemigration"),
// Location: to.Ptr("eastus"),
// Properties: &armpostgresqlflexibleservers.MigrationProperties{
// CurrentStatus: &armpostgresqlflexibleservers.MigrationStatus{
// CurrentSubStateDetails: &armpostgresqlflexibleservers.MigrationSubstateDetails{
// CurrentSubState: to.Ptr(armpostgresqlflexibleservers.MigrationSubstateCompleted),
// DbDetails: map[string]*armpostgresqlflexibleservers.DatabaseMigrationState{
// "exampledatabase": &armpostgresqlflexibleservers.DatabaseMigrationState{
// AppliedChanges: to.Ptr[int32](0),
// CdcDeleteCounter: to.Ptr[int32](0),
// CdcInsertCounter: to.Ptr[int32](0),
// CdcUpdateCounter: to.Ptr[int32](0),
// DatabaseName: to.Ptr("exampledatabase"),
// EndedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T20:30:22.123Z"); return t}()),
// FullLoadCompletedTables: to.Ptr[int32](0),
// FullLoadErroredTables: to.Ptr[int32](0),
// FullLoadLoadingTables: to.Ptr[int32](0),
// FullLoadQueuedTables: to.Ptr[int32](0),
// IncomingChanges: to.Ptr[int32](0),
// Latency: to.Ptr[int32](0),
// Message: to.Ptr("Collation/Encoding not Supported Error: User defined Collations are present in the source database. Please drop them before retrying the migration."),
// MigrationState: to.Ptr(armpostgresqlflexibleservers.MigrationDatabaseStateFailed),
// StartedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T18:30:22.123Z"); return t}()),
// },
// },
// ValidationDetails: &armpostgresqlflexibleservers.ValidationDetails{
// DbLevelValidationDetails: []*armpostgresqlflexibleservers.DbLevelValidationStatus{
// {
// DatabaseName: to.Ptr("address_standardizer"),
// EndedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T20:30:22.123Z"); return t}()),
// StartedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T18:30:22.123Z"); return t}()),
// Summary: []*armpostgresqlflexibleservers.ValidationSummaryItem{
// {
// Type: to.Ptr("ExtensionsValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// }},
// }},
// ServerLevelValidationDetails: []*armpostgresqlflexibleservers.ValidationSummaryItem{
// {
// Type: to.Ptr("AuthenticationAndConnectivityValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// }},
// Status: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// ValidationEndTimeInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T20:30:22.123Z"); return t}()),
// ValidationStartTimeInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T18:30:22.123Z"); return t}()),
// },
// },
// Error: to.Ptr("exampledatabase: Collation/Encoding not Supported Error: User defined Collations are present in the source database. Please drop them before retrying the migration."),
// State: to.Ptr(armpostgresqlflexibleservers.MigrationStateFailed),
// },
// DbsToMigrate: []*string{
// to.Ptr("exampledatabase")},
// MigrateRoles: to.Ptr(armpostgresqlflexibleservers.MigrateRolesAndPermissionsFalse),
// MigrationID: to.Ptr("da52db29-cfeb-4670-a1ad-683edb14c621"),
// MigrationMode: to.Ptr(armpostgresqlflexibleservers.MigrationModeOffline),
// MigrationOption: to.Ptr(armpostgresqlflexibleservers.MigrationOptionValidateAndMigrate),
// MigrationWindowEndTimeInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T20:30:22.123Z"); return t}()),
// MigrationWindowStartTimeInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T18:30:22.123Z"); return t}()),
// OverwriteDbsInTarget: to.Ptr(armpostgresqlflexibleservers.OverwriteDatabasesOnTargetServerTrue),
// SetupLogicalReplicationOnSourceDbIfNeeded: to.Ptr(armpostgresqlflexibleservers.LogicalReplicationOnSourceServerTrue),
// SourceDbServerMetadata: &armpostgresqlflexibleservers.DbServerMetadata{
// Location: to.Ptr("eastus"),
// SKU: &armpostgresqlflexibleservers.ServerSKU{
// },
// StorageMb: to.Ptr[int32](102400),
// },
// SourceDbServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/servers/examplesource"),
// TargetDbServerMetadata: &armpostgresqlflexibleservers.DbServerMetadata{
// Location: to.Ptr("eastus"),
// SKU: &armpostgresqlflexibleservers.ServerSKU{
// Name: to.Ptr("Standard_D2ds_v4"),
// Tier: to.Ptr(armpostgresqlflexibleservers.SKUTier("Standard_D2ds_v4")),
// },
// StorageMb: to.Ptr[int32](131072),
// },
// TargetDbServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampletarget"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { PostgreSQLManagementFlexibleServerClient } = require("@azure/arm-postgresql-flexible");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv/config");
/**
* This sample demonstrates how to Gets information about a migration.
*
* @summary Gets information about a migration.
* x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGetMigrationWithSuccessfulValidationButMigrationFailure.json
*/
async function getInformationAboutAMigrationWithSuccessfulValidationButFailedMigration() {
const subscriptionId =
process.env["POSTGRESQL_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff";
const resourceGroupName = process.env["POSTGRESQL_RESOURCE_GROUP"] || "exampleresourcegroup";
const serverName = "exampleserver";
const migrationName = "examplemigration";
const credential = new DefaultAzureCredential();
const client = new PostgreSQLManagementFlexibleServerClient(credential, subscriptionId);
const result = await client.migrations.get(resourceGroupName, serverName, migrationName);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.PostgreSql.FlexibleServers.Models;
using Azure.ResourceManager.PostgreSql.FlexibleServers;
// Generated from example definition: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGetMigrationWithSuccessfulValidationButMigrationFailure.json
// this example is just showing the usage of "Migrations_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://dotnet.territoriali.olinfo.it/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this PostgreSqlMigrationResource created on azure
// for more information of creating PostgreSqlMigrationResource, please refer to the document of PostgreSqlMigrationResource
string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff";
string resourceGroupName = "exampleresourcegroup";
string serverName = "exampleserver";
string migrationName = "examplemigration";
ResourceIdentifier postgreSqlMigrationResourceId = PostgreSqlMigrationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, migrationName);
PostgreSqlMigrationResource postgreSqlMigration = client.GetPostgreSqlMigrationResource(postgreSqlMigrationResourceId);
// invoke the operation
PostgreSqlMigrationResource result = await postgreSqlMigration.GetAsync();
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
PostgreSqlMigrationData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Beispiel für eine Antwort
{
"name": "examplemigration",
"type": "Microsoft.DBForPostgreSql/flexibleServers/migrations",
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/flexibleServers/exampletarget/migrations/examplemigration",
"location": "eastus",
"properties": {
"currentStatus": {
"currentSubStateDetails": {
"currentSubState": "Completed",
"dbDetails": {
"exampledatabase": {
"appliedChanges": 0,
"cdcDeleteCounter": 0,
"cdcInsertCounter": 0,
"cdcUpdateCounter": 0,
"databaseName": "exampledatabase",
"endedOn": "2025-06-01T20:30:22.123456Z",
"fullLoadCompletedTables": 0,
"fullLoadErroredTables": 0,
"fullLoadLoadingTables": 0,
"fullLoadQueuedTables": 0,
"incomingChanges": 0,
"latency": 0,
"message": "Collation/Encoding not Supported Error: User defined Collations are present in the source database. Please drop them before retrying the migration.",
"migrationState": "Failed",
"startedOn": "2025-06-01T18:30:22.123456Z"
}
},
"validationDetails": {
"dbLevelValidationDetails": [
{
"databaseName": "address_standardizer",
"endedOn": "2025-06-01T20:30:22.123456Z",
"startedOn": "2025-06-01T18:30:22.123456Z",
"summary": [
{
"type": "ExtensionsValidation",
"state": "Succeeded"
}
]
}
],
"serverLevelValidationDetails": [
{
"type": "AuthenticationAndConnectivityValidation",
"state": "Succeeded"
}
],
"status": "Succeeded",
"validationEndTimeInUtc": "2025-06-01T20:30:22.123456Z",
"validationStartTimeInUtc": "2025-06-01T18:30:22.123456Z"
}
},
"error": "exampledatabase: Collation/Encoding not Supported Error: User defined Collations are present in the source database. Please drop them before retrying the migration.",
"state": "Failed"
},
"dbsToMigrate": [
"exampledatabase"
],
"migrateRoles": "False",
"migrationId": "da52db29-cfeb-4670-a1ad-683edb14c621",
"migrationMode": "Offline",
"migrationOption": "ValidateAndMigrate",
"migrationWindowEndTimeInUtc": "2025-06-01T20:30:22.123456Z",
"migrationWindowStartTimeInUtc": "2025-06-01T18:30:22.123456Z",
"overwriteDbsInTarget": "True",
"setupLogicalReplicationOnSourceDbIfNeeded": "True",
"sourceDbServerMetadata": {
"location": "eastus",
"sku": {},
"storageMb": 102400
},
"sourceDbServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/servers/examplesource",
"targetDbServerMetadata": {
"location": "eastus",
"sku": {
"name": "Standard_D2ds_v4",
"tier": "Standard_D2ds_v4"
},
"storageMb": 131072
},
"targetDbServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampletarget"
}
}
Beispielanforderung
GET https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampleserver/migrations/examplemigration?api-version=2025-08-01
/**
* Samples for Migrations Get.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/
* MigrationsGetMigrationWithSuccessfulValidationOnly.json
*/
/**
* Sample code: Get information about a migration with successful validation only.
*
* @param manager Entry point to PostgreSqlManager.
*/
public static void getInformationAboutAMigrationWithSuccessfulValidationOnly(
com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
manager.migrations().getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration",
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.postgresqlflexibleservers import PostgreSQLManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-postgresqlflexibleservers
# USAGE
python migrations_get_migration_with_successful_validation_only.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = PostgreSQLManagementClient(
credential=DefaultAzureCredential(),
subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff",
)
response = client.migrations.get(
resource_group_name="exampleresourcegroup",
server_name="exampleserver",
migration_name="examplemigration",
)
print(response)
# x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGetMigrationWithSuccessfulValidationOnly.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armpostgresqlflexibleservers_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/v5"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e96c24570a484cff13d153fb472f812878866a39/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGetMigrationWithSuccessfulValidationOnly.json
func ExampleMigrationsClient_Get_getInformationAboutAMigrationWithSuccessfulValidationOnly() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewMigrationsClient().Get(ctx, "exampleresourcegroup", "exampleserver", "examplemigration", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Migration = armpostgresqlflexibleservers.Migration{
// Name: to.Ptr("examplemigration"),
// Type: to.Ptr("Microsoft.DBForPostgreSql/flexibleServers/migrations"),
// ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/flexibleServers/exampletarget/migrations/examplemigration"),
// Location: to.Ptr("eastus"),
// Properties: &armpostgresqlflexibleservers.MigrationProperties{
// CurrentStatus: &armpostgresqlflexibleservers.MigrationStatus{
// CurrentSubStateDetails: &armpostgresqlflexibleservers.MigrationSubstateDetails{
// CurrentSubState: to.Ptr(armpostgresqlflexibleservers.MigrationSubstateCompleted),
// DbDetails: map[string]*armpostgresqlflexibleservers.DatabaseMigrationState{
// },
// ValidationDetails: &armpostgresqlflexibleservers.ValidationDetails{
// DbLevelValidationDetails: []*armpostgresqlflexibleservers.DbLevelValidationStatus{
// {
// DatabaseName: to.Ptr("UnknownCollationTest"),
// EndedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T20:30:22.123Z"); return t}()),
// StartedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T18:30:22.123Z"); return t}()),
// Summary: []*armpostgresqlflexibleservers.ValidationSummaryItem{
// {
// Type: to.Ptr("SchemaValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// },
// {
// Type: to.Ptr("ExtensionsValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// },
// {
// Type: to.Ptr("CollationsValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// }},
// }},
// ServerLevelValidationDetails: []*armpostgresqlflexibleservers.ValidationSummaryItem{
// {
// Type: to.Ptr("AuthenticationAndConnectivityValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// },
// {
// Type: to.Ptr("SourceVersionValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// },
// {
// Type: to.Ptr("ServerParametersValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// }},
// Status: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// ValidationEndTimeInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T20:30:22.123Z"); return t}()),
// ValidationStartTimeInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T18:30:22.123Z"); return t}()),
// },
// },
// State: to.Ptr(armpostgresqlflexibleservers.MigrationStateSucceeded),
// },
// DbsToMigrate: []*string{
// to.Ptr("UnknownCollationTest")},
// MigrateRoles: to.Ptr(armpostgresqlflexibleservers.MigrateRolesAndPermissionsFalse),
// MigrationID: to.Ptr("77840327-7be8-44b8-adc0-af0ccccfeb36"),
// MigrationMode: to.Ptr(armpostgresqlflexibleservers.MigrationModeOffline),
// MigrationOption: to.Ptr(armpostgresqlflexibleservers.MigrationOptionValidate),
// MigrationWindowEndTimeInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T20:30:22.123Z"); return t}()),
// MigrationWindowStartTimeInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T18:30:22.123Z"); return t}()),
// OverwriteDbsInTarget: to.Ptr(armpostgresqlflexibleservers.OverwriteDatabasesOnTargetServerTrue),
// SetupLogicalReplicationOnSourceDbIfNeeded: to.Ptr(armpostgresqlflexibleservers.LogicalReplicationOnSourceServerTrue),
// SourceDbServerResourceID: to.Ptr("20.228.214.65:5432@postgres"),
// TargetDbServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/flexibleServers/exampletarget"),
// TriggerCutover: to.Ptr(armpostgresqlflexibleservers.TriggerCutoverTrue),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { PostgreSQLManagementFlexibleServerClient } = require("@azure/arm-postgresql-flexible");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv/config");
/**
* This sample demonstrates how to Gets information about a migration.
*
* @summary Gets information about a migration.
* x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGetMigrationWithSuccessfulValidationOnly.json
*/
async function getInformationAboutAMigrationWithSuccessfulValidationOnly() {
const subscriptionId =
process.env["POSTGRESQL_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff";
const resourceGroupName = process.env["POSTGRESQL_RESOURCE_GROUP"] || "exampleresourcegroup";
const serverName = "exampleserver";
const migrationName = "examplemigration";
const credential = new DefaultAzureCredential();
const client = new PostgreSQLManagementFlexibleServerClient(credential, subscriptionId);
const result = await client.migrations.get(resourceGroupName, serverName, migrationName);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.PostgreSql.FlexibleServers.Models;
using Azure.ResourceManager.PostgreSql.FlexibleServers;
// Generated from example definition: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGetMigrationWithSuccessfulValidationOnly.json
// this example is just showing the usage of "Migrations_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://dotnet.territoriali.olinfo.it/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this PostgreSqlMigrationResource created on azure
// for more information of creating PostgreSqlMigrationResource, please refer to the document of PostgreSqlMigrationResource
string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff";
string resourceGroupName = "exampleresourcegroup";
string serverName = "exampleserver";
string migrationName = "examplemigration";
ResourceIdentifier postgreSqlMigrationResourceId = PostgreSqlMigrationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, migrationName);
PostgreSqlMigrationResource postgreSqlMigration = client.GetPostgreSqlMigrationResource(postgreSqlMigrationResourceId);
// invoke the operation
PostgreSqlMigrationResource result = await postgreSqlMigration.GetAsync();
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
PostgreSqlMigrationData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Beispiel für eine Antwort
{
"name": "examplemigration",
"type": "Microsoft.DBForPostgreSql/flexibleServers/migrations",
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/flexibleServers/exampletarget/migrations/examplemigration",
"location": "eastus",
"properties": {
"currentStatus": {
"currentSubStateDetails": {
"currentSubState": "Completed",
"dbDetails": {},
"validationDetails": {
"dbLevelValidationDetails": [
{
"databaseName": "UnknownCollationTest",
"endedOn": "2025-06-01T20:30:22.123456Z",
"startedOn": "2025-06-01T18:30:22.123456Z",
"summary": [
{
"type": "SchemaValidation",
"state": "Succeeded"
},
{
"type": "ExtensionsValidation",
"state": "Succeeded"
},
{
"type": "CollationsValidation",
"state": "Succeeded"
}
]
}
],
"serverLevelValidationDetails": [
{
"type": "AuthenticationAndConnectivityValidation",
"state": "Succeeded"
},
{
"type": "SourceVersionValidation",
"state": "Succeeded"
},
{
"type": "ServerParametersValidation",
"state": "Succeeded"
}
],
"status": "Succeeded",
"validationEndTimeInUtc": "2025-06-01T20:30:22.123456Z",
"validationStartTimeInUtc": "2025-06-01T18:30:22.123456Z"
}
},
"state": "Succeeded"
},
"dbsToMigrate": [
"UnknownCollationTest"
],
"migrateRoles": "False",
"migrationId": "77840327-7be8-44b8-adc0-af0ccccfeb36",
"migrationMode": "Offline",
"migrationOption": "Validate",
"migrationWindowEndTimeInUtc": "2025-06-01T20:30:22.123456Z",
"migrationWindowStartTimeInUtc": "2025-06-01T18:30:22.123456Z",
"overwriteDbsInTarget": "True",
"setupLogicalReplicationOnSourceDbIfNeeded": "True",
"sourceDbServerResourceId": "20.228.214.65:5432@postgres",
"targetDbServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/flexibleServers/exampletarget",
"triggerCutover": "True"
}
}
Beispielanforderung
GET https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampleserver/migrations/examplemigration?api-version=2025-08-01
/**
* Samples for Migrations Get.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/
* MigrationsGetMigrationWithValidationFailures.json
*/
/**
* Sample code: Get information about a migration with validation failures.
*
* @param manager Entry point to PostgreSqlManager.
*/
public static void getInformationAboutAMigrationWithValidationFailures(
com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
manager.migrations().getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration",
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.postgresqlflexibleservers import PostgreSQLManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-postgresqlflexibleservers
# USAGE
python migrations_get_migration_with_validation_failures.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = PostgreSQLManagementClient(
credential=DefaultAzureCredential(),
subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff",
)
response = client.migrations.get(
resource_group_name="exampleresourcegroup",
server_name="exampleserver",
migration_name="examplemigration",
)
print(response)
# x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGetMigrationWithValidationFailures.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armpostgresqlflexibleservers_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/v5"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e96c24570a484cff13d153fb472f812878866a39/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGetMigrationWithValidationFailures.json
func ExampleMigrationsClient_Get_getInformationAboutAMigrationWithValidationFailures() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewMigrationsClient().Get(ctx, "exampleresourcegroup", "exampleserver", "examplemigration", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Migration = armpostgresqlflexibleservers.Migration{
// Name: to.Ptr("examplemigration"),
// Type: to.Ptr("Microsoft.DBforPostgreSQL/flexibleServers/migrations"),
// ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampletarget/migrations/examplemigration"),
// Location: to.Ptr("eastus"),
// Properties: &armpostgresqlflexibleservers.MigrationProperties{
// CurrentStatus: &armpostgresqlflexibleservers.MigrationStatus{
// CurrentSubStateDetails: &armpostgresqlflexibleservers.MigrationSubstateDetails{
// CurrentSubState: to.Ptr(armpostgresqlflexibleservers.MigrationSubstateCompleted),
// DbDetails: map[string]*armpostgresqlflexibleservers.DatabaseMigrationState{
// },
// ValidationDetails: &armpostgresqlflexibleservers.ValidationDetails{
// DbLevelValidationDetails: []*armpostgresqlflexibleservers.DbLevelValidationStatus{
// {
// DatabaseName: to.Ptr("exampledatabase1"),
// EndedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T20:30:22.123Z"); return t}()),
// StartedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T18:30:22.123Z"); return t}()),
// Summary: []*armpostgresqlflexibleservers.ValidationSummaryItem{
// {
// Type: to.Ptr("SchemaValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// },
// {
// Type: to.Ptr("ExtensionsValidation"),
// Messages: []*armpostgresqlflexibleservers.ValidationMessage{
// {
// Message: to.Ptr("Unsupported Extension. Single to Flex migration tool does not support migration of databases having postgres_fdw extension. Consider performing the migration through other migration tools such as pg_dump/pg_restore (https://aka.ms/migrate-using-pgdump-restore)"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateFailed),
// }},
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateFailed),
// },
// {
// Type: to.Ptr("CollationsValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// }},
// },
// {
// DatabaseName: to.Ptr("exampledatabase2"),
// EndedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T20:30:22.123Z"); return t}()),
// StartedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T18:30:22.123Z"); return t}()),
// Summary: []*armpostgresqlflexibleservers.ValidationSummaryItem{
// {
// Type: to.Ptr("SchemaValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// },
// {
// Type: to.Ptr("ExtensionsValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// },
// {
// Type: to.Ptr("CollationsValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// }},
// },
// {
// DatabaseName: to.Ptr("exampledatabase3"),
// EndedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T20:30:22.123Z"); return t}()),
// StartedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T18:30:22.123Z"); return t}()),
// Summary: []*armpostgresqlflexibleservers.ValidationSummaryItem{
// {
// Type: to.Ptr("SchemaValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// },
// {
// Type: to.Ptr("ExtensionsValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// },
// {
// Type: to.Ptr("CollationsValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// }},
// },
// {
// DatabaseName: to.Ptr("exampledatabase4"),
// EndedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T20:30:22.123Z"); return t}()),
// StartedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T18:30:22.123Z"); return t}()),
// Summary: []*armpostgresqlflexibleservers.ValidationSummaryItem{
// {
// Type: to.Ptr("SchemaValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// },
// {
// Type: to.Ptr("ExtensionsValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// }},
// },
// {
// DatabaseName: to.Ptr("exampledatabase5"),
// EndedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T20:30:22.123Z"); return t}()),
// StartedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T18:30:22.123Z"); return t}()),
// Summary: []*armpostgresqlflexibleservers.ValidationSummaryItem{
// {
// Type: to.Ptr("SchemaValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// },
// {
// Type: to.Ptr("ExtensionsValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// }},
// },
// {
// DatabaseName: to.Ptr("exampledatabase6"),
// EndedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T20:30:22.123Z"); return t}()),
// StartedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T18:30:22.123Z"); return t}()),
// Summary: []*armpostgresqlflexibleservers.ValidationSummaryItem{
// {
// Type: to.Ptr("SchemaValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// },
// {
// Type: to.Ptr("ExtensionsValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// }},
// },
// {
// DatabaseName: to.Ptr("exampledatabase7"),
// EndedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T20:30:22.123Z"); return t}()),
// StartedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T18:30:22.123Z"); return t}()),
// Summary: []*armpostgresqlflexibleservers.ValidationSummaryItem{
// {
// Type: to.Ptr("SchemaValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// },
// {
// Type: to.Ptr("ExtensionsValidation"),
// Messages: []*armpostgresqlflexibleservers.ValidationMessage{
// {
// Message: to.Ptr("Unsupported Extension. Single to Flex migration tool does not support migration of databases having postgres_fdw extension. Consider performing the migration through other migration tools such as pg_dump/pg_restore (https://aka.ms/migrate-using-pgdump-restore)"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateFailed),
// }},
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateFailed),
// }},
// }},
// ServerLevelValidationDetails: []*armpostgresqlflexibleservers.ValidationSummaryItem{
// {
// Type: to.Ptr("AuthenticationAndConnectivityValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// },
// {
// Type: to.Ptr("SourceVersionValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// },
// {
// Type: to.Ptr("ServerParametersValidation"),
// State: to.Ptr(armpostgresqlflexibleservers.ValidationStateSucceeded),
// }},
// Status: to.Ptr(armpostgresqlflexibleservers.ValidationStateFailed),
// ValidationEndTimeInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T20:30:22.123Z"); return t}()),
// ValidationStartTimeInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T18:30:22.123Z"); return t}()),
// },
// },
// State: to.Ptr(armpostgresqlflexibleservers.MigrationStateValidationFailed),
// },
// DbsToMigrate: []*string{
// to.Ptr("exampledatabase1"),
// to.Ptr("exampledatabase2"),
// to.Ptr("exampledatabase3"),
// to.Ptr("exampledatabase4"),
// to.Ptr("exampledatabase5"),
// to.Ptr("exampledatabase6"),
// to.Ptr("exampledatabase7")},
// MigrateRoles: to.Ptr(armpostgresqlflexibleservers.MigrateRolesAndPermissionsFalse),
// MigrationID: to.Ptr("a3e2d3cc-b139-4201-9431-e4f3003140fd"),
// MigrationMode: to.Ptr(armpostgresqlflexibleservers.MigrationModeOffline),
// MigrationOption: to.Ptr(armpostgresqlflexibleservers.MigrationOptionValidate),
// MigrationWindowEndTimeInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T20:30:22.123Z"); return t}()),
// MigrationWindowStartTimeInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T18:30:22.123Z"); return t}()),
// OverwriteDbsInTarget: to.Ptr(armpostgresqlflexibleservers.OverwriteDatabasesOnTargetServerTrue),
// SetupLogicalReplicationOnSourceDbIfNeeded: to.Ptr(armpostgresqlflexibleservers.LogicalReplicationOnSourceServerTrue),
// SourceDbServerResourceID: to.Ptr("20.228.214.65:5432@postgres"),
// TargetDbServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampletarget"),
// TriggerCutover: to.Ptr(armpostgresqlflexibleservers.TriggerCutoverTrue),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { PostgreSQLManagementFlexibleServerClient } = require("@azure/arm-postgresql-flexible");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv/config");
/**
* This sample demonstrates how to Gets information about a migration.
*
* @summary Gets information about a migration.
* x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGetMigrationWithValidationFailures.json
*/
async function getInformationAboutAMigrationWithValidationFailures() {
const subscriptionId =
process.env["POSTGRESQL_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff";
const resourceGroupName = process.env["POSTGRESQL_RESOURCE_GROUP"] || "exampleresourcegroup";
const serverName = "exampleserver";
const migrationName = "examplemigration";
const credential = new DefaultAzureCredential();
const client = new PostgreSQLManagementFlexibleServerClient(credential, subscriptionId);
const result = await client.migrations.get(resourceGroupName, serverName, migrationName);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.PostgreSql.FlexibleServers.Models;
using Azure.ResourceManager.PostgreSql.FlexibleServers;
// Generated from example definition: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGetMigrationWithValidationFailures.json
// this example is just showing the usage of "Migrations_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://dotnet.territoriali.olinfo.it/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this PostgreSqlMigrationResource created on azure
// for more information of creating PostgreSqlMigrationResource, please refer to the document of PostgreSqlMigrationResource
string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff";
string resourceGroupName = "exampleresourcegroup";
string serverName = "exampleserver";
string migrationName = "examplemigration";
ResourceIdentifier postgreSqlMigrationResourceId = PostgreSqlMigrationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, migrationName);
PostgreSqlMigrationResource postgreSqlMigration = client.GetPostgreSqlMigrationResource(postgreSqlMigrationResourceId);
// invoke the operation
PostgreSqlMigrationResource result = await postgreSqlMigration.GetAsync();
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
PostgreSqlMigrationData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Beispiel für eine Antwort
{
"name": "examplemigration",
"type": "Microsoft.DBforPostgreSQL/flexibleServers/migrations",
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampletarget/migrations/examplemigration",
"location": "eastus",
"properties": {
"currentStatus": {
"currentSubStateDetails": {
"currentSubState": "Completed",
"dbDetails": {},
"validationDetails": {
"dbLevelValidationDetails": [
{
"databaseName": "exampledatabase1",
"endedOn": "2025-06-01T20:30:22.123456Z",
"startedOn": "2025-06-01T18:30:22.123456Z",
"summary": [
{
"type": "SchemaValidation",
"state": "Succeeded"
},
{
"type": "ExtensionsValidation",
"messages": [
{
"message": "Unsupported Extension. Single to Flex migration tool does not support migration of databases having postgres_fdw extension. Consider performing the migration through other migration tools such as pg_dump/pg_restore (https://aka.ms/migrate-using-pgdump-restore)",
"state": "Failed"
}
],
"state": "Failed"
},
{
"type": "CollationsValidation",
"state": "Succeeded"
}
]
},
{
"databaseName": "exampledatabase2",
"endedOn": "2025-06-01T20:30:22.123456Z",
"startedOn": "2025-06-01T18:30:22.123456Z",
"summary": [
{
"type": "SchemaValidation",
"state": "Succeeded"
},
{
"type": "ExtensionsValidation",
"state": "Succeeded"
},
{
"type": "CollationsValidation",
"state": "Succeeded"
}
]
},
{
"databaseName": "exampledatabase3",
"endedOn": "2025-06-01T20:30:22.123456Z",
"startedOn": "2025-06-01T18:30:22.123456Z",
"summary": [
{
"type": "SchemaValidation",
"state": "Succeeded"
},
{
"type": "ExtensionsValidation",
"state": "Succeeded"
},
{
"type": "CollationsValidation",
"state": "Succeeded"
}
]
},
{
"databaseName": "exampledatabase4",
"endedOn": "2025-06-01T20:30:22.123456Z",
"startedOn": "2025-06-01T18:30:22.123456Z",
"summary": [
{
"type": "SchemaValidation",
"state": "Succeeded"
},
{
"type": "ExtensionsValidation",
"state": "Succeeded"
}
]
},
{
"databaseName": "exampledatabase5",
"endedOn": "2025-06-01T20:30:22.123456Z",
"startedOn": "2025-06-01T18:30:22.123456Z",
"summary": [
{
"type": "SchemaValidation",
"state": "Succeeded"
},
{
"type": "ExtensionsValidation",
"state": "Succeeded"
}
]
},
{
"databaseName": "exampledatabase6",
"endedOn": "2025-06-01T20:30:22.123456Z",
"startedOn": "2025-06-01T18:30:22.123456Z",
"summary": [
{
"type": "SchemaValidation",
"state": "Succeeded"
},
{
"type": "ExtensionsValidation",
"state": "Succeeded"
}
]
},
{
"databaseName": "exampledatabase7",
"endedOn": "2025-06-01T20:30:22.123456Z",
"startedOn": "2025-06-01T18:30:22.123456Z",
"summary": [
{
"type": "SchemaValidation",
"state": "Succeeded"
},
{
"type": "ExtensionsValidation",
"messages": [
{
"message": "Unsupported Extension. Single to Flex migration tool does not support migration of databases having postgres_fdw extension. Consider performing the migration through other migration tools such as pg_dump/pg_restore (https://aka.ms/migrate-using-pgdump-restore)",
"state": "Failed"
}
],
"state": "Failed"
}
]
}
],
"serverLevelValidationDetails": [
{
"type": "AuthenticationAndConnectivityValidation",
"state": "Succeeded"
},
{
"type": "SourceVersionValidation",
"state": "Succeeded"
},
{
"type": "ServerParametersValidation",
"state": "Succeeded"
}
],
"status": "Failed",
"validationEndTimeInUtc": "2025-06-01T20:30:22.123456Z",
"validationStartTimeInUtc": "2025-06-01T18:30:22.123456Z"
}
},
"state": "ValidationFailed"
},
"dbsToMigrate": [
"exampledatabase1",
"exampledatabase2",
"exampledatabase3",
"exampledatabase4",
"exampledatabase5",
"exampledatabase6",
"exampledatabase7"
],
"migrateRoles": "False",
"migrationId": "a3e2d3cc-b139-4201-9431-e4f3003140fd",
"migrationMode": "Offline",
"migrationOption": "Validate",
"migrationWindowEndTimeInUtc": "2025-06-01T20:30:22.123456Z",
"migrationWindowStartTimeInUtc": "2025-06-01T18:30:22.123456Z",
"overwriteDbsInTarget": "True",
"setupLogicalReplicationOnSourceDbIfNeeded": "True",
"sourceDbServerResourceId": "20.228.214.65:5432@postgres",
"targetDbServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampletarget",
"triggerCutover": "True"
}
}
Beispielanforderung
GET https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampleserver/migrations/examplemigration?api-version=2025-08-01
/**
* Samples for Migrations Get.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGet.json
*/
/**
* Sample code: Get information about a migration.
*
* @param manager Entry point to PostgreSqlManager.
*/
public static void
getInformationAboutAMigration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
manager.migrations().getWithResponse("exampleresourcegroup", "exampleserver", "examplemigration",
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.postgresqlflexibleservers import PostgreSQLManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-postgresqlflexibleservers
# USAGE
python migrations_get.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = PostgreSQLManagementClient(
credential=DefaultAzureCredential(),
subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff",
)
response = client.migrations.get(
resource_group_name="exampleresourcegroup",
server_name="exampleserver",
migration_name="examplemigration",
)
print(response)
# x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGet.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armpostgresqlflexibleservers_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresqlflexibleservers/v5"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e96c24570a484cff13d153fb472f812878866a39/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGet.json
func ExampleMigrationsClient_Get_getInformationAboutAMigration() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armpostgresqlflexibleservers.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewMigrationsClient().Get(ctx, "exampleresourcegroup", "exampleserver", "examplemigration", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Migration = armpostgresqlflexibleservers.Migration{
// Name: to.Ptr("examplemigration"),
// Type: to.Ptr("Microsoft.DBForPostgreSql/flexibleServers/migrations"),
// ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/flexibleServers/exampletarget/migrations/examplemigration"),
// Location: to.Ptr("eastus"),
// Properties: &armpostgresqlflexibleservers.MigrationProperties{
// CurrentStatus: &armpostgresqlflexibleservers.MigrationStatus{
// CurrentSubStateDetails: &armpostgresqlflexibleservers.MigrationSubstateDetails{
// CurrentSubState: to.Ptr(armpostgresqlflexibleservers.MigrationSubstatePerformingPreRequisiteSteps),
// },
// Error: to.Ptr(""),
// State: to.Ptr(armpostgresqlflexibleservers.MigrationStateInProgress),
// },
// DbsToMigrate: []*string{
// to.Ptr("exampledatabase1"),
// to.Ptr("exampledatabase2"),
// to.Ptr("exampledatabase3"),
// to.Ptr("exampledatabase4")},
// MigrateRoles: to.Ptr(armpostgresqlflexibleservers.MigrateRolesAndPermissionsFalse),
// MigrationID: to.Ptr("d3ceacbb-a5fd-43dc-a9db-6022b5154856"),
// MigrationWindowStartTimeInUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-01T18:30:22.123Z"); return t}()),
// OverwriteDbsInTarget: to.Ptr(armpostgresqlflexibleservers.OverwriteDatabasesOnTargetServerFalse),
// SetupLogicalReplicationOnSourceDbIfNeeded: to.Ptr(armpostgresqlflexibleservers.LogicalReplicationOnSourceServerFalse),
// SourceDbServerMetadata: &armpostgresqlflexibleservers.DbServerMetadata{
// Location: to.Ptr("eastus"),
// SKU: &armpostgresqlflexibleservers.ServerSKU{
// Name: to.Ptr("B_Gen5_2"),
// Tier: to.Ptr(armpostgresqlflexibleservers.SKUTier("Basic")),
// },
// StorageMb: to.Ptr[int32](1024),
// Version: to.Ptr("10"),
// },
// SourceDbServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource"),
// StartDataMigration: to.Ptr(armpostgresqlflexibleservers.StartDataMigrationFalse),
// TargetDbServerMetadata: &armpostgresqlflexibleservers.DbServerMetadata{
// Location: to.Ptr("eastus"),
// SKU: &armpostgresqlflexibleservers.ServerSKU{
// Name: to.Ptr("Standard_D4ds_v5"),
// Tier: to.Ptr(armpostgresqlflexibleservers.SKUTierGeneralPurpose),
// },
// StorageMb: to.Ptr[int32](2048),
// Version: to.Ptr("17"),
// },
// TargetDbServerResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/flexibleServers/exampletarget"),
// TriggerCutover: to.Ptr(armpostgresqlflexibleservers.TriggerCutoverFalse),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { PostgreSQLManagementFlexibleServerClient } = require("@azure/arm-postgresql-flexible");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv/config");
/**
* This sample demonstrates how to Gets information about a migration.
*
* @summary Gets information about a migration.
* x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGet.json
*/
async function getInformationAboutAMigration() {
const subscriptionId =
process.env["POSTGRESQL_SUBSCRIPTION_ID"] || "ffffffff-ffff-ffff-ffff-ffffffffffff";
const resourceGroupName = process.env["POSTGRESQL_RESOURCE_GROUP"] || "exampleresourcegroup";
const serverName = "exampleserver";
const migrationName = "examplemigration";
const credential = new DefaultAzureCredential();
const client = new PostgreSQLManagementFlexibleServerClient(credential, subscriptionId);
const result = await client.migrations.get(resourceGroupName, serverName, migrationName);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.PostgreSql.FlexibleServers.Models;
using Azure.ResourceManager.PostgreSql.FlexibleServers;
// Generated from example definition: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGet.json
// this example is just showing the usage of "Migrations_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://dotnet.territoriali.olinfo.it/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this PostgreSqlMigrationResource created on azure
// for more information of creating PostgreSqlMigrationResource, please refer to the document of PostgreSqlMigrationResource
string subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff";
string resourceGroupName = "exampleresourcegroup";
string serverName = "exampleserver";
string migrationName = "examplemigration";
ResourceIdentifier postgreSqlMigrationResourceId = PostgreSqlMigrationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, migrationName);
PostgreSqlMigrationResource postgreSqlMigration = client.GetPostgreSqlMigrationResource(postgreSqlMigrationResourceId);
// invoke the operation
PostgreSqlMigrationResource result = await postgreSqlMigration.GetAsync();
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
PostgreSqlMigrationData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Beispiel für eine Antwort
{
"name": "examplemigration",
"type": "Microsoft.DBForPostgreSql/flexibleServers/migrations",
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/flexibleServers/exampletarget/migrations/examplemigration",
"location": "eastus",
"properties": {
"currentStatus": {
"currentSubStateDetails": {
"currentSubState": "PerformingPreRequisiteSteps"
},
"error": "",
"state": "InProgress"
},
"dbsToMigrate": [
"exampledatabase1",
"exampledatabase2",
"exampledatabase3",
"exampledatabase4"
],
"migrateRoles": "False",
"migrationId": "d3ceacbb-a5fd-43dc-a9db-6022b5154856",
"migrationWindowStartTimeInUtc": "2025-06-01T18:30:22.123456Z",
"overwriteDbsInTarget": "False",
"setupLogicalReplicationOnSourceDbIfNeeded": "False",
"sourceDbServerMetadata": {
"location": "eastus",
"sku": {
"name": "B_Gen5_2",
"tier": "Basic"
},
"storageMb": 1024,
"version": "10"
},
"sourceDbServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource",
"startDataMigration": "False",
"targetDbServerMetadata": {
"location": "eastus",
"sku": {
"name": "Standard_D4ds_v5",
"tier": "GeneralPurpose"
},
"storageMb": 2048,
"version": "17"
},
"targetDbServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/flexibleServers/exampletarget",
"triggerCutover": "False"
}
}
Definitionen
| Name |
Beschreibung |
|
AdminCredentials
|
Anmeldeinformationen von Administratorbenutzern für Quell- und Zielserver.
|
|
Cancel
|
Gibt an, ob der Abbruch für die gesamte Migration ausgelöst werden muss.
|
|
createdByType
|
Der Identitätstyp, der die Ressource erstellt hat.
|
|
DatabaseMigrationState
|
Migrationsstatus einer Datenbank.
|
|
DbLevelValidationStatus
|
Zusammenfassung des Validierungsstatus für eine Datenbank.
|
|
DbServerMetadata
|
Datenbankservermetadaten.
|
|
ErrorAdditionalInfo
|
Der Ressourcenverwaltungsfehler zusätzliche Informationen.
|
|
ErrorDetail
|
Das Fehlerdetails.
|
|
ErrorResponse
|
Fehlerantwort
|
|
LogicalReplicationOnSourceServer
|
Gibt an, ob bei Bedarf die logische Replikation auf dem Quellserver eingerichtet werden soll.
|
|
MigrateRolesAndPermissions
|
Gibt an, ob Rollen und Berechtigungen migriert werden müssen.
|
|
Migration
|
Eigenschaften einer Migration.
|
|
MigrationDatabaseState
|
Migrationsstatus einer Datenbank.
|
|
MigrationMode
|
Modus, der zur Durchführung der Migration verwendet wird.
|
|
MigrationOption
|
Unterstützte Option für eine Migration.
|
|
MigrationSecretParameters
|
Parameter des Migrationsgeheimnisses.
|
|
MigrationState
|
Stand der Migration.
|
|
MigrationStatus
|
Stand der Migration.
|
|
MigrationSubstate
|
Teilstaat der Migration.
|
|
MigrationSubstateDetails
|
Details zum Unterzustand der Migration.
|
|
OverwriteDatabasesOnTargetServer
|
Gibt an, ob Datenbanken auf dem Zielserver überschrieben werden können, wenn sie bereits vorhanden sind.
|
|
ServerSku
|
Berechnen von Informationen eines Servers.
|
|
SkuTier
|
Ebene der Compute, die einem Server zugewiesen ist.
|
|
SourceType
|
Quellservertyp, der für die Migration verwendet wird.
|
|
SslMode
|
SSL-Modus, der von einer Migration verwendet wird. Der Standard-SSL-Modus für 'PostgreSQLSingleServer' ist 'VerifyFull'. Der Standard-SSL-Modus für andere Quelltypen ist "Bevorzugen".
|
|
StartDataMigration
|
Gibt an, ob die Datenmigration sofort gestartet werden muss.
|
|
systemData
|
Metadaten zur Erstellung und letzten Änderung der Ressource.
|
|
TriggerCutover
|
Gibt an, ob die Übernahme für die gesamte Migration ausgelöst werden muss.
|
|
ValidationDetails
|
Details zur Validierung für die Migration.
|
|
ValidationMessage
|
Objekt der Validierungsnachricht.
|
|
ValidationState
|
Validierungsstaat für die Migration.
|
|
ValidationSummaryItem
|
Validierungszusammenfassungsobjekt.
|
AdminCredentials
Objekt
Anmeldeinformationen von Administratorbenutzern für Quell- und Zielserver.
| Name |
Typ |
Beschreibung |
|
sourceServerPassword
|
string
(password)
|
Kennwort für den Benutzer des Quellservers.
|
|
targetServerPassword
|
string
(password)
|
Kennwort für den Benutzer des Zielservers.
|
Cancel
Enumeration
Gibt an, ob der Abbruch für die gesamte Migration ausgelöst werden muss.
| Wert |
Beschreibung |
|
True
|
Der Abbruch muss für die gesamte Migration ausgelöst werden.
|
|
False
|
Der Abbruch darf nicht für die gesamte Migration ausgelöst werden.
|
createdByType
Enumeration
Der Identitätstyp, der die Ressource erstellt hat.
| Wert |
Beschreibung |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
DatabaseMigrationState
Objekt
Migrationsstatus einer Datenbank.
| Name |
Typ |
Beschreibung |
|
appliedChanges
|
integer
(int32)
|
Zähler für angewendete Change Data Capture-Änderungen.
|
|
cdcDeleteCounter
|
integer
(int32)
|
Ändern des Data Capture-Löschindikators.
|
|
cdcInsertCounter
|
integer
(int32)
|
Ändern des Data Capture-Einfügeindikators.
|
|
cdcUpdateCounter
|
integer
(int32)
|
Ändern des Data Capture-Aktualisierungsindikators.
|
|
databaseName
|
string
|
Name der Datenbank
|
|
endedOn
|
string
(date-time)
|
Endzeit eines Migrationsstatus.
|
|
fullLoadCompletedTables
|
integer
(int32)
|
Anzahl der Tabellen, die während der Migration einer Datenbank geladen wurden.
|
|
fullLoadErroredTables
|
integer
(int32)
|
Anzahl der Tabellen, bei denen während der Migration einer Datenbank Fehler aufgetreten sind.
|
|
fullLoadLoadingTables
|
integer
(int32)
|
Anzahl der Tabellen, die während der Migration einer Datenbank geladen werden.
|
|
fullLoadQueuedTables
|
integer
(int32)
|
Anzahl der Tabellen, die für die Migration einer Datenbank in die Warteschlange eingereiht werden.
|
|
incomingChanges
|
integer
(int32)
|
Zähler für eingehende Änderungen von Change Data Capture.
|
|
latency
|
integer
(int32)
|
Verzögerung in Sekunden zwischen Quelle und Ziel während der Online-Phase.
|
|
message
|
string
|
Fehlermeldung, falls vorhanden, für den Migrationsstatus.
|
|
migrationOperation
|
string
|
Migrationsvorgang einer Datenbank.
|
|
migrationState
|
MigrationDatabaseState
|
Migrationsstatus einer Datenbank.
|
|
startedOn
|
string
(date-time)
|
Startzeit eines Migrationszustands.
|
DbLevelValidationStatus
Objekt
Zusammenfassung des Validierungsstatus für eine Datenbank.
| Name |
Typ |
Beschreibung |
|
databaseName
|
string
|
Name der Datenbank
|
|
endedOn
|
string
(date-time)
|
Endzeit einer Validierung auf Datenbankebene.
|
|
startedOn
|
string
(date-time)
|
Startzeit einer Validierung auf Datenbankebene.
|
|
summary
|
ValidationSummaryItem[]
|
Zusammenfassung der Validierungen auf Datenbankebene.
|
Objekt
Datenbankservermetadaten.
| Name |
Typ |
Beschreibung |
|
location
|
string
|
Standort des Datenbankservers.
|
|
sku
|
ServerSku
|
Computeebene und Größe des Datenbankservers. Dieses Objekt ist für einen Azure Database for PostgreSQL Single Server leer.
|
|
storageMb
|
integer
(int32)
|
Speichergröße (in MB) für den Datenbankserver.
|
|
version
|
string
|
Hauptversion der PostgreSQL-Datenbank-Engine.
|
ErrorAdditionalInfo
Objekt
Der Ressourcenverwaltungsfehler zusätzliche Informationen.
| Name |
Typ |
Beschreibung |
|
info
|
object
|
Die zusätzlichen Informationen.
|
|
type
|
string
|
Der zusätzliche Informationstyp.
|
ErrorDetail
Objekt
Das Fehlerdetails.
| Name |
Typ |
Beschreibung |
|
additionalInfo
|
ErrorAdditionalInfo[]
|
Die zusätzlichen Informationen des Fehlers.
|
|
code
|
string
|
Der Fehlercode.
|
|
details
|
ErrorDetail[]
|
Die Fehlerdetails.
|
|
message
|
string
|
Die Fehlermeldung.
|
|
target
|
string
|
Das Fehlerziel.
|
ErrorResponse
Objekt
Fehlerantwort
| Name |
Typ |
Beschreibung |
|
error
|
ErrorDetail
|
Das Fehlerobjekt.
|
LogicalReplicationOnSourceServer
Enumeration
Gibt an, ob bei Bedarf die logische Replikation auf dem Quellserver eingerichtet werden soll.
| Wert |
Beschreibung |
|
True
|
Die logische Replikation wird auf dem Quellserver eingerichtet.
|
|
False
|
Die logische Replikation wird auf dem Quellserver nicht eingerichtet.
|
MigrateRolesAndPermissions
Enumeration
Gibt an, ob Rollen und Berechtigungen migriert werden müssen.
| Wert |
Beschreibung |
|
True
|
Rollen und Berechtigungen werden migriert.
|
|
False
|
Rollen und Berechtigungen werden nicht migriert.
|
Migration
Objekt
Eigenschaften einer Migration.
| Name |
Typ |
Beschreibung |
|
id
|
string
(arm-id)
|
Vollqualifizierte Ressourcen-ID für die Ressource. Z. B. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
location
|
string
|
Der geografische Standort, an dem sich die Ressource befindet
|
|
name
|
string
|
Der Name der Ressource
|
|
properties.cancel
|
Cancel
|
Gibt an, ob der Abbruch für die gesamte Migration ausgelöst werden muss.
|
|
properties.currentStatus
|
MigrationStatus
|
Aktueller Status einer Migration.
|
|
properties.dbsToCancelMigrationOn
|
string[]
|
Wenn Sie einen Abbruch für bestimmte Datenbanken auslösen möchten, legen Sie 'triggerCutover' auf 'True' und die Namen der spezifischen Datenbanken in diesem Array fest.
|
|
properties.dbsToMigrate
|
string[]
|
Namen der zu migrierenden Datenbanken.
|
|
properties.dbsToTriggerCutoverOn
|
string[]
|
Wenn Sie eine Übernahme für bestimmte Datenbanken auslösen möchten, legen Sie 'triggerCutover' auf 'True' und die Namen der spezifischen Datenbanken in diesem Array fest.
|
|
properties.migrateRoles
|
MigrateRolesAndPermissions
|
Gibt an, ob Rollen und Berechtigungen migriert werden müssen.
|
|
properties.migrationId
|
string
|
Kennung einer Migration.
|
|
properties.migrationInstanceResourceId
|
string
(arm-id)
|
Bezeichner der Migrationsinstanz für private Endpunkte.
|
|
properties.migrationMode
|
MigrationMode
|
Modus, der zum Ausführen der Migration verwendet wird: Online oder Offline.
|
|
properties.migrationOption
|
MigrationOption
|
Unterstützte Option für eine Migration.
|
|
properties.migrationWindowEndTimeInUtc
|
string
(date-time)
|
Endzeit (UTC) für das Migrationsfenster.
|
|
properties.migrationWindowStartTimeInUtc
|
string
(date-time)
|
Startzeit (UTC) für das Migrationsfenster.
|
|
properties.overwriteDbsInTarget
|
OverwriteDatabasesOnTargetServer
|
Gibt an, ob Datenbanken auf dem Zielserver überschrieben werden können, wenn sie bereits vorhanden sind. Wenn der Wert auf "False" festgelegt ist, wartet der Migrationsworkflow auf eine Bestätigung, wenn er erkennt, dass die Datenbank bereits auf dem Zielserver vorhanden ist.
|
|
properties.secretParameters
|
MigrationSecretParameters
|
Parameter des Migrationsgeheimnisses.
|
|
properties.setupLogicalReplicationOnSourceDbIfNeeded
|
LogicalReplicationOnSourceServer
|
Gibt an, ob bei Bedarf die logische Replikation auf dem Quellserver eingerichtet werden soll.
|
|
properties.sourceDbServerFullyQualifiedDomainName
|
string
|
Vollqualifizierter Domänenname (FQDN) oder IP-Adresse des Quellservers. Diese Eigenschaft ist optional. Wenn angegeben, wird sie vom Migrationsdienst immer verwendet, um eine Verbindung mit dem Quellserver herzustellen.
|
|
properties.sourceDbServerMetadata
|
DbServerMetadata
|
Metadaten des Quelldatenbankservers.
|
|
properties.sourceDbServerResourceId
|
string
|
Kennung der Quelldatenbankserverressource, wenn 'sourceType' 'PostgreSQLSingleServer' ist. Für andere Quelltypen muss dies auf ipaddress:port@username oder hostname:port@username gesetzt werden.
|
|
properties.sourceType
|
SourceType
|
Für die Migration verwendeter Quellservertyp: ApsaraDB_RDS, AWS, AWS_AURORA, AWS_EC2, AWS_RDS, AzureVM, Crunchy_PostgreSQL, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, EDB, EDB_Oracle_Server, EDB_PostgreSQL, GCP, GCP_AlloyDB, GCP_CloudSQL, GCP_Compute, Heroku_PostgreSQL, Huawei_Compute, Huawei_RDS, OnPremises, PostgreSQLCosmosDB, PostgreSQLFlexibleServer, PostgreSQLSingleServer oder Supabase_PostgreSQL
|
|
properties.sslMode
|
SslMode
|
SSL-Modus, der von einer Migration verwendet wird. Der Standard-SSL-Modus für 'PostgreSQLSingleServer' ist 'VerifyFull'. Der Standard-SSL-Modus für andere Quelltypen ist "Bevorzugen".
|
|
properties.startDataMigration
|
StartDataMigration
|
Gibt an, ob die Datenmigration sofort gestartet werden muss.
|
|
properties.targetDbServerFullyQualifiedDomainName
|
string
|
Vollqualifizierter Domänenname (FQDN) oder IP-Adresse des Zielservers. Diese Eigenschaft ist optional. Wenn angegeben, wird sie vom Migrationsdienst immer verwendet, um eine Verbindung mit dem Zielserver herzustellen.
|
|
properties.targetDbServerMetadata
|
DbServerMetadata
|
Metadaten des Zieldatenbankservers.
|
|
properties.targetDbServerResourceId
|
string
|
Kennung der Serverressource der Zieldatenbank.
|
|
properties.triggerCutover
|
TriggerCutover
|
Gibt an, ob die Übernahme für die gesamte Migration ausgelöst werden muss.
|
|
systemData
|
systemData
|
Azure Resource Manager-Metadaten, die createdBy und modifiedBy-Informationen enthalten.
|
|
tags
|
object
|
Ressourcentags.
|
|
type
|
string
|
Der Typ der Ressource. Zum Beispiel "Microsoft. Compute/virtualMachines" oder "Microsoft. Speicher/Speicherkonten"
|
MigrationDatabaseState
Enumeration
Migrationsstatus einer Datenbank.
| Wert |
Beschreibung |
|
InProgress
|
Die Migration für die Datenbank wird ausgeführt.
|
|
WaitingForCutoverTrigger
|
Die Migration wartet auf den Übernahmetrigger für die Datenbank.
|
|
Failed
|
Die Migration für die Datenbank ist fehlgeschlagen.
|
|
Canceled
|
Die Migration für die Datenbank wurde abgebrochen.
|
|
Succeeded
|
Die Migration für die Datenbank war erfolgreich.
|
|
Canceling
|
Die Migration für die Datenbank wird abgebrochen.
|
MigrationMode
Enumeration
Modus, der zur Durchführung der Migration verwendet wird.
| Wert |
Beschreibung |
|
Offline
|
Offline-Migrationsmodus.
|
|
Online
|
Online-Migrationsmodus.
|
MigrationOption
Enumeration
Unterstützte Option für eine Migration.
| Wert |
Beschreibung |
|
Validate
|
Überprüfen Sie die Migration, ohne sie durchzuführen.
|
|
Migrate
|
Führen Sie die Migration aus.
|
|
ValidateAndMigrate
|
Überprüfen und führen Sie die Migration durch.
|
MigrationSecretParameters
Objekt
Parameter des Migrationsgeheimnisses.
| Name |
Typ |
Beschreibung |
|
adminCredentials
|
AdminCredentials
(password)
|
Anmeldeinformationen von Administratorbenutzern für Quell- und Zielserver.
|
|
sourceServerUsername
|
string
|
Ruft den Namen des Benutzers für den Quellserver ab oder legt diesen fest. Dieser Benutzer muss kein Administrator sein.
|
|
targetServerUsername
|
string
|
Ruft den Namen des Benutzers für den Zielserver ab oder legt diesen fest. Dieser Benutzer muss kein Administrator sein.
|
MigrationState
Enumeration
Stand der Migration.
| Wert |
Beschreibung |
|
InProgress
|
Die Migration ist im Gange.
|
|
WaitingForUserAction
|
Die Migration wartet auf eine Benutzeraktion.
|
|
Canceled
|
Die Migration wurde abgebrochen.
|
|
Failed
|
Die Migration ist fehlgeschlagen.
|
|
Succeeded
|
Die Migration ist erfolgreich.
|
|
ValidationFailed
|
Die Überprüfung für die Migration ist fehlgeschlagen.
|
|
CleaningUp
|
Migration bedeutet, Ressourcen zu bereinigen.
|
MigrationStatus
Objekt
Stand der Migration.
| Name |
Typ |
Beschreibung |
|
currentSubStateDetails
|
MigrationSubstateDetails
|
Details zum aktuellen Migrationsunterstatus.
|
|
error
|
string
|
Fehlermeldung, falls vorhanden, für den Migrationsstatus.
|
|
state
|
MigrationState
|
Stand der Migration.
|
MigrationSubstate
Enumeration
Teilstaat der Migration.
| Wert |
Beschreibung |
|
PerformingPreRequisiteSteps
|
Ausführen der erforderlichen Schritte für die Migration.
|
|
WaitingForLogicalReplicationSetupRequestOnSourceDB
|
Warten auf die Setupanforderung für die logische Replikation in der Quelldatenbank.
|
|
WaitingForDBsToMigrateSpecification
|
Warten auf die Migration der Spezifikation durch Datenbanken.
|
|
WaitingForTargetDBOverwriteConfirmation
|
Warten auf die Bestätigung des Überschreibens der Zieldatenbank.
|
|
WaitingForDataMigrationScheduling
|
Warten auf die Planung der Datenmigration.
|
|
WaitingForDataMigrationWindow
|
Warten auf Datenmigrationsfenster.
|
|
MigratingData
|
Migrieren von Daten.
|
|
WaitingForCutoverTrigger
|
Warten auf Cutover-Trigger.
|
|
CompletingMigration
|
Migration wird abgeschlossen.
|
|
Completed
|
Migration abgeschlossen.
|
|
CancelingRequestedDBMigrations
|
Abbrechen der angeforderten Datenbankmigrationen.
|
|
ValidationInProgress
|
Die Validierung wird durchgeführt.
|
MigrationSubstateDetails
Objekt
Details zum Unterzustand der Migration.
OverwriteDatabasesOnTargetServer
Enumeration
Gibt an, ob Datenbanken auf dem Zielserver überschrieben werden können, wenn sie bereits vorhanden sind.
| Wert |
Beschreibung |
|
True
|
Datenbanken auf dem Zielserver können überschrieben werden, wenn sie bereits vorhanden sind.
|
|
False
|
Datenbanken auf dem Zielserver können nicht überschrieben werden, wenn sie bereits vorhanden sind. Wenn der Migrationsworkflow erkennt, dass die Datenbank bereits auf dem Zielserver existiert, wartet er auf eine Bestätigung.
|
ServerSku
Objekt
Berechnen von Informationen eines Servers.
| Name |
Typ |
Beschreibung |
|
name
|
string
|
Computeebene und Größe des Datenbankservers. Dieses Objekt ist für einen Azure Database for PostgreSQL Single Server leer.
|
|
tier
|
SkuTier
|
Ebene der Compute, die einem Server zugewiesen ist.
|
SkuTier
Enumeration
Ebene der Compute, die einem Server zugewiesen ist.
| Wert |
Beschreibung |
|
Burstable
|
Kostengünstiger Tarif für seltene CPU-Auslastung, ideal für Entwicklungs- und Test-Workloads mit geringen Leistungsanforderungen.
|
|
GeneralPurpose
|
Ausgewogene Rechenleistung und ausgewogener Arbeitsspeicher für die meisten Workloads mit skalierbarer Leistung und E/A-Durchsatz.
|
|
MemoryOptimized
|
Hohes Memory-to-Core-Verhältnis für anspruchsvolle Workloads, die eine schnelle In-Memory-Verarbeitung und hohe Parallelität erfordern.
|
SourceType
Enumeration
Quellservertyp, der für die Migration verwendet wird.
| Wert |
Beschreibung |
|
OnPremises
|
Lokaler PostgreSQL-Server.
|
|
AWS
|
PostgreSQL-Server für Amazon Web Services.
|
|
GCP
|
Google Cloud Platform PostgreSQL-Server.
|
|
AzureVM
|
Azure Virtual Machine PostgreSQL server.
|
|
PostgreSQLSingleServer
|
Azure Database for PostgreSQL Single Server.
|
|
AWS_RDS
|
Amazon RDS für PostgreSQL.
|
|
AWS_AURORA
|
Amazon Aurora für PostgreSQL.
|
|
AWS_EC2
|
Amazon EC2 für PostgreSQL.
|
|
GCP_CloudSQL
|
Google Cloud SQL für PostgreSQL.
|
|
GCP_AlloyDB
|
Google Cloud AlloyDB für PostgreSQL.
|
|
GCP_Compute
|
Google Compute Engine für PostgreSQL.
|
|
EDB
|
EnterpriseDB PostgreSQL-Server.
|
|
EDB_Oracle_Server
|
EnterpriseDB Oracle-Server.
|
|
EDB_PostgreSQL
|
EnterpriseDB PostgreSQL-Server.
|
|
PostgreSQLFlexibleServer
|
Azure Database for PostgreSQL flexible Server.
|
|
PostgreSQLCosmosDB
|
.NET Cosmos DB für PostgreSQL
|
|
Huawei_RDS
|
Huawei RDS für PostgreSQL
|
|
Huawei_Compute
|
Huawei Compute für PostgreSQL
|
|
Heroku_PostgreSQL
|
Heroku PostgreSQL
|
|
Crunchy_PostgreSQL
|
Knackiges PostgreSQL
|
|
ApsaraDB_RDS
|
ApsaraDB RDS für PostgreSQL
|
|
Digital_Ocean_Droplets
|
Digitale Ozeantröpfchen für PostgreSQL
|
|
Digital_Ocean_PostgreSQL
|
Digitaler Ozean PostgreSQL
|
|
Supabase_PostgreSQL
|
Supabase PostgreSQL
|
SslMode
Enumeration
SSL-Modus, der von einer Migration verwendet wird. Der Standard-SSL-Modus für 'PostgreSQLSingleServer' ist 'VerifyFull'. Der Standard-SSL-Modus für andere Quelltypen ist "Bevorzugen".
| Wert |
Beschreibung |
|
Prefer
|
Bevorzugen Sie eine SSL-Verbindung. Wenn der Server SSL nicht unterstützt, wird die Verbindung ohne SSL hergestellt.
|
|
Require
|
SSL-Verbindung erforderlich. Wenn der Server SSL nicht unterstützt, schlägt die Verbindung fehl.
|
|
VerifyCA
|
SSL-Verbindung erforderlich, und überprüfen Sie das Serverzertifikat anhand des Zertifizierungsstellenzertifikats.
|
|
VerifyFull
|
SSL-Verbindung erforderlich, überprüfen Sie das Serverzertifikat anhand des Zertifizierungsstellenzertifikats, und stellen Sie sicher, dass der Hostname des Servers mit dem Zertifikat übereinstimmt.
|
StartDataMigration
Enumeration
Gibt an, ob die Datenmigration sofort gestartet werden muss.
| Wert |
Beschreibung |
|
True
|
Die Datenmigration muss sofort beginnen.
|
|
False
|
Die Datenmigration darf nicht sofort beginnen.
|
systemData
Objekt
Metadaten zur Erstellung und letzten Änderung der Ressource.
| Name |
Typ |
Beschreibung |
|
createdAt
|
string
(date-time)
|
Der Zeitstempel der Ressourcenerstellung (UTC).
|
|
createdBy
|
string
|
Die Identität, die die Ressource erstellt hat.
|
|
createdByType
|
createdByType
|
Der Identitätstyp, der die Ressource erstellt hat.
|
|
lastModifiedAt
|
string
(date-time)
|
Der Zeitstempel der letzten Änderung der Ressource (UTC)
|
|
lastModifiedBy
|
string
|
Die Identität, die die Ressource zuletzt geändert hat.
|
|
lastModifiedByType
|
createdByType
|
Der Identitätstyp, der die Ressource zuletzt geändert hat.
|
TriggerCutover
Enumeration
Gibt an, ob die Übernahme für die gesamte Migration ausgelöst werden muss.
| Wert |
Beschreibung |
|
True
|
Die Übernahme muss für die gesamte Migration ausgelöst werden.
|
|
False
|
Die Übernahme darf nicht für die gesamte Migration ausgelöst werden.
|
ValidationDetails
Objekt
Details zur Validierung für die Migration.
| Name |
Typ |
Beschreibung |
|
dbLevelValidationDetails
|
DbLevelValidationStatus[]
|
Details zu Validierungen auf Serverebene.
|
|
serverLevelValidationDetails
|
ValidationSummaryItem[]
|
Details zu Validierungen auf Serverebene.
|
|
status
|
ValidationState
|
Validierungsstatus für die Migration.
|
|
validationEndTimeInUtc
|
string
(date-time)
|
Endzeit (UTC) für die Validierung.
|
|
validationStartTimeInUtc
|
string
(date-time)
|
Startzeit (UTC) für die Validierung.
|
ValidationMessage
Objekt
Objekt der Validierungsnachricht.
| Name |
Typ |
Beschreibung |
|
message
|
string
|
Zeichenfolge der Validierungsmeldung.
|
|
state
|
ValidationState
|
Schweregrad der Validierungsmeldung.
|
ValidationState
Enumeration
Validierungsstaat für die Migration.
| Wert |
Beschreibung |
|
Failed
|
Fehler bei der Überprüfung.
|
|
Succeeded
|
Die Validierung war erfolgreich.
|
|
Warning
|
Die Validierung mit Warnungen war erfolgreich.
|
ValidationSummaryItem
Objekt
Validierungszusammenfassungsobjekt.
| Name |
Typ |
Beschreibung |
|
messages
|
ValidationMessage[]
|
Validierungsmeldungen.
|
|
state
|
ValidationState
|
Validierungsstatus für die Migration.
|
|
type
|
string
|
Typ der Validierung.
|