Class MigrationInner
java.lang.Object
com.azure.core.management.ProxyResource
com.azure.core.management.Resource
com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationInner
- All Implemented Interfaces:
com.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>
public final class MigrationInner
extends com.azure.core.management.Resource
Properties of a migration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncancel()Get the cancel property: Indicates if cancel must be triggered for the entire migration.Get the currentStatus property: Current status of a migration.Get the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases set 'triggerCutover' to 'True' and the names of the specific databases in this array.Get the dbsToMigrate property: Names of databases to migrate.Get the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases set 'triggerCutover' to 'True' and the names of the specific databases in this array.static MigrationInnerfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of MigrationInner from the JsonReader.id()Get the id property: Fully qualified resource Id for the resource.Get the migrateRoles property: Indicates if roles and permissions must be migrated.Get the migrationId property: Identifier of a migration.Get the migrationInstanceResourceId property: Identifier of the private endpoint migration instance.Get the migrationMode property: Mode used to perform the migration: Online or Offline.Get the migrationOption property: Supported option for a migration.Get the migrationWindowEndTimeInUtc property: End time (UTC) for migration window.Get the migrationWindowStartTimeInUtc property: Start time (UTC) for migration window.name()Get the name property: The name of the resource.Get the overwriteDbsInTarget property: Indicates if databases on the target server can be overwritten when already present.Get the secretParameters property: Migration secret parameters.Get the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup logical replication on source server, if needed.Get the sourceDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the source server.Get the sourceDbServerMetadata property: Metadata of source database server.Get the sourceDbServerResourceId property: Identifier of the source database server resource, when 'sourceType' is 'PostgreSQLSingleServer'.Get the sourceType property: Source server type used for the migration: 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, or Supabase_PostgreSQL.sslMode()Get the sslMode property: SSL mode used by a migration.Get the startDataMigration property: Indicates if data migration must start right away.com.azure.core.management.SystemDataGet the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.Get the targetDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the target server.Get the targetDbServerMetadata property: Metadata of target database server.Get the targetDbServerResourceId property: Identifier of the target database server resource.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Get the triggerCutover property: Indicates if cutover must be triggered for the entire migration.type()Get the type property: The type of the resource.voidvalidate()Validates the instance.withCancel(Cancel cancel) Set the cancel property: Indicates if cancel must be triggered for the entire migration.withDbsToCancelMigrationOn(List<String> dbsToCancelMigrationOn) Set the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases set 'triggerCutover' to 'True' and the names of the specific databases in this array.withDbsToMigrate(List<String> dbsToMigrate) Set the dbsToMigrate property: Names of databases to migrate.withDbsToTriggerCutoverOn(List<String> dbsToTriggerCutoverOn) Set the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases set 'triggerCutover' to 'True' and the names of the specific databases in this array.withLocation(String location) withMigrateRoles(MigrateRolesAndPermissions migrateRoles) Set the migrateRoles property: Indicates if roles and permissions must be migrated.withMigrationInstanceResourceId(String migrationInstanceResourceId) Set the migrationInstanceResourceId property: Identifier of the private endpoint migration instance.withMigrationMode(MigrationMode migrationMode) Set the migrationMode property: Mode used to perform the migration: Online or Offline.withMigrationOption(MigrationOption migrationOption) Set the migrationOption property: Supported option for a migration.withMigrationWindowEndTimeInUtc(OffsetDateTime migrationWindowEndTimeInUtc) Set the migrationWindowEndTimeInUtc property: End time (UTC) for migration window.withMigrationWindowStartTimeInUtc(OffsetDateTime migrationWindowStartTimeInUtc) Set the migrationWindowStartTimeInUtc property: Start time (UTC) for migration window.withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer overwriteDbsInTarget) Set the overwriteDbsInTarget property: Indicates if databases on the target server can be overwritten when already present.withSecretParameters(MigrationSecretParameters secretParameters) Set the secretParameters property: Migration secret parameters.withSetupLogicalReplicationOnSourceDbIfNeeded(LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded) Set the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup logical replication on source server, if needed.withSourceDbServerFullyQualifiedDomainName(String sourceDbServerFullyQualifiedDomainName) Set the sourceDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the source server.withSourceDbServerResourceId(String sourceDbServerResourceId) Set the sourceDbServerResourceId property: Identifier of the source database server resource, when 'sourceType' is 'PostgreSQLSingleServer'.withSourceType(SourceType sourceType) Set the sourceType property: Source server type used for the migration: 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, or Supabase_PostgreSQL.withSslMode(SslMode sslMode) Set the sslMode property: SSL mode used by a migration.withStartDataMigration(StartDataMigration startDataMigration) Set the startDataMigration property: Indicates if data migration must start right away.withTargetDbServerFullyQualifiedDomainName(String targetDbServerFullyQualifiedDomainName) Set the targetDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the target server.withTriggerCutover(TriggerCutover triggerCutover) Set the triggerCutover property: Indicates if cutover must be triggered for the entire migration.Methods inherited from class com.azure.core.management.Resource
location, tagsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
MigrationInner
public MigrationInner()Creates an instance of MigrationInner class.
-
-
Method Details
-
systemData
public com.azure.core.management.SystemData systemData()Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.- Returns:
- the systemData value.
-
type
Get the type property: The type of the resource.- Overrides:
typein classcom.azure.core.management.ProxyResource- Returns:
- the type value.
-
name
Get the name property: The name of the resource.- Overrides:
namein classcom.azure.core.management.ProxyResource- Returns:
- the name value.
-
id
Get the id property: Fully qualified resource Id for the resource.- Overrides:
idin classcom.azure.core.management.ProxyResource- Returns:
- the id value.
-
withLocation
- Overrides:
withLocationin classcom.azure.core.management.Resource
-
withTags
- Overrides:
withTagsin classcom.azure.core.management.Resource
-
migrationId
Get the migrationId property: Identifier of a migration.- Returns:
- the migrationId value.
-
currentStatus
Get the currentStatus property: Current status of a migration.- Returns:
- the currentStatus value.
-
migrationInstanceResourceId
Get the migrationInstanceResourceId property: Identifier of the private endpoint migration instance.- Returns:
- the migrationInstanceResourceId value.
-
withMigrationInstanceResourceId
Set the migrationInstanceResourceId property: Identifier of the private endpoint migration instance.- Parameters:
migrationInstanceResourceId- the migrationInstanceResourceId value to set.- Returns:
- the MigrationInner object itself.
-
migrationMode
Get the migrationMode property: Mode used to perform the migration: Online or Offline.- Returns:
- the migrationMode value.
-
withMigrationMode
Set the migrationMode property: Mode used to perform the migration: Online or Offline.- Parameters:
migrationMode- the migrationMode value to set.- Returns:
- the MigrationInner object itself.
-
migrationOption
Get the migrationOption property: Supported option for a migration.- Returns:
- the migrationOption value.
-
withMigrationOption
Set the migrationOption property: Supported option for a migration.- Parameters:
migrationOption- the migrationOption value to set.- Returns:
- the MigrationInner object itself.
-
sourceType
Get the sourceType property: Source server type used for the migration: 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, or Supabase_PostgreSQL.- Returns:
- the sourceType value.
-
withSourceType
Set the sourceType property: Source server type used for the migration: 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, or Supabase_PostgreSQL.- Parameters:
sourceType- the sourceType value to set.- Returns:
- the MigrationInner object itself.
-
sslMode
Get the sslMode property: SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is 'VerifyFull'. Default SSL mode for other source types is 'Prefer'.- Returns:
- the sslMode value.
-
withSslMode
Set the sslMode property: SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is 'VerifyFull'. Default SSL mode for other source types is 'Prefer'.- Parameters:
sslMode- the sslMode value to set.- Returns:
- the MigrationInner object itself.
-
sourceDbServerMetadata
Get the sourceDbServerMetadata property: Metadata of source database server.- Returns:
- the sourceDbServerMetadata value.
-
targetDbServerMetadata
Get the targetDbServerMetadata property: Metadata of target database server.- Returns:
- the targetDbServerMetadata value.
-
sourceDbServerResourceId
Get the sourceDbServerResourceId property: Identifier of the source database server resource, when 'sourceType' is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or hostname:port@username.- Returns:
- the sourceDbServerResourceId value.
-
withSourceDbServerResourceId
Set the sourceDbServerResourceId property: Identifier of the source database server resource, when 'sourceType' is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or hostname:port@username.- Parameters:
sourceDbServerResourceId- the sourceDbServerResourceId value to set.- Returns:
- the MigrationInner object itself.
-
sourceDbServerFullyQualifiedDomainName
Get the sourceDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the source server. This property is optional. When provided, the migration service will always use it to connect to the source server.- Returns:
- the sourceDbServerFullyQualifiedDomainName value.
-
withSourceDbServerFullyQualifiedDomainName
public MigrationInner withSourceDbServerFullyQualifiedDomainName(String sourceDbServerFullyQualifiedDomainName) Set the sourceDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the source server. This property is optional. When provided, the migration service will always use it to connect to the source server.- Parameters:
sourceDbServerFullyQualifiedDomainName- the sourceDbServerFullyQualifiedDomainName value to set.- Returns:
- the MigrationInner object itself.
-
targetDbServerResourceId
Get the targetDbServerResourceId property: Identifier of the target database server resource.- Returns:
- the targetDbServerResourceId value.
-
targetDbServerFullyQualifiedDomainName
Get the targetDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the target server. This property is optional. When provided, the migration service will always use it to connect to the target server.- Returns:
- the targetDbServerFullyQualifiedDomainName value.
-
withTargetDbServerFullyQualifiedDomainName
public MigrationInner withTargetDbServerFullyQualifiedDomainName(String targetDbServerFullyQualifiedDomainName) Set the targetDbServerFullyQualifiedDomainName property: Fully qualified domain name (FQDN) or IP address of the target server. This property is optional. When provided, the migration service will always use it to connect to the target server.- Parameters:
targetDbServerFullyQualifiedDomainName- the targetDbServerFullyQualifiedDomainName value to set.- Returns:
- the MigrationInner object itself.
-
secretParameters
Get the secretParameters property: Migration secret parameters.- Returns:
- the secretParameters value.
-
withSecretParameters
Set the secretParameters property: Migration secret parameters.- Parameters:
secretParameters- the secretParameters value to set.- Returns:
- the MigrationInner object itself.
-
dbsToMigrate
-
withDbsToMigrate
Set the dbsToMigrate property: Names of databases to migrate.- Parameters:
dbsToMigrate- the dbsToMigrate value to set.- Returns:
- the MigrationInner object itself.
-
setupLogicalReplicationOnSourceDbIfNeeded
Get the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup logical replication on source server, if needed.- Returns:
- the setupLogicalReplicationOnSourceDbIfNeeded value.
-
withSetupLogicalReplicationOnSourceDbIfNeeded
public MigrationInner withSetupLogicalReplicationOnSourceDbIfNeeded(LogicalReplicationOnSourceServer setupLogicalReplicationOnSourceDbIfNeeded) Set the setupLogicalReplicationOnSourceDbIfNeeded property: Indicates whether to setup logical replication on source server, if needed.- Parameters:
setupLogicalReplicationOnSourceDbIfNeeded- the setupLogicalReplicationOnSourceDbIfNeeded value to set.- Returns:
- the MigrationInner object itself.
-
overwriteDbsInTarget
Get the overwriteDbsInTarget property: Indicates if databases on the target server can be overwritten when already present. If set to 'False', when the migration workflow detects that the database already exists on the target server, it will wait for a confirmation.- Returns:
- the overwriteDbsInTarget value.
-
withOverwriteDbsInTarget
public MigrationInner withOverwriteDbsInTarget(OverwriteDatabasesOnTargetServer overwriteDbsInTarget) Set the overwriteDbsInTarget property: Indicates if databases on the target server can be overwritten when already present. If set to 'False', when the migration workflow detects that the database already exists on the target server, it will wait for a confirmation.- Parameters:
overwriteDbsInTarget- the overwriteDbsInTarget value to set.- Returns:
- the MigrationInner object itself.
-
migrationWindowStartTimeInUtc
Get the migrationWindowStartTimeInUtc property: Start time (UTC) for migration window.- Returns:
- the migrationWindowStartTimeInUtc value.
-
withMigrationWindowStartTimeInUtc
public MigrationInner withMigrationWindowStartTimeInUtc(OffsetDateTime migrationWindowStartTimeInUtc) Set the migrationWindowStartTimeInUtc property: Start time (UTC) for migration window.- Parameters:
migrationWindowStartTimeInUtc- the migrationWindowStartTimeInUtc value to set.- Returns:
- the MigrationInner object itself.
-
migrationWindowEndTimeInUtc
Get the migrationWindowEndTimeInUtc property: End time (UTC) for migration window.- Returns:
- the migrationWindowEndTimeInUtc value.
-
withMigrationWindowEndTimeInUtc
Set the migrationWindowEndTimeInUtc property: End time (UTC) for migration window.- Parameters:
migrationWindowEndTimeInUtc- the migrationWindowEndTimeInUtc value to set.- Returns:
- the MigrationInner object itself.
-
migrateRoles
Get the migrateRoles property: Indicates if roles and permissions must be migrated.- Returns:
- the migrateRoles value.
-
withMigrateRoles
Set the migrateRoles property: Indicates if roles and permissions must be migrated.- Parameters:
migrateRoles- the migrateRoles value to set.- Returns:
- the MigrationInner object itself.
-
startDataMigration
Get the startDataMigration property: Indicates if data migration must start right away.- Returns:
- the startDataMigration value.
-
withStartDataMigration
Set the startDataMigration property: Indicates if data migration must start right away.- Parameters:
startDataMigration- the startDataMigration value to set.- Returns:
- the MigrationInner object itself.
-
triggerCutover
Get the triggerCutover property: Indicates if cutover must be triggered for the entire migration.- Returns:
- the triggerCutover value.
-
withTriggerCutover
Set the triggerCutover property: Indicates if cutover must be triggered for the entire migration.- Parameters:
triggerCutover- the triggerCutover value to set.- Returns:
- the MigrationInner object itself.
-
dbsToTriggerCutoverOn
-
withDbsToTriggerCutoverOn
Set the dbsToTriggerCutoverOn property: When you want to trigger cutover for specific databases set 'triggerCutover' to 'True' and the names of the specific databases in this array.- Parameters:
dbsToTriggerCutoverOn- the dbsToTriggerCutoverOn value to set.- Returns:
- the MigrationInner object itself.
-
cancel
Get the cancel property: Indicates if cancel must be triggered for the entire migration.- Returns:
- the cancel value.
-
withCancel
Set the cancel property: Indicates if cancel must be triggered for the entire migration.- Parameters:
cancel- the cancel value to set.- Returns:
- the MigrationInner object itself.
-
dbsToCancelMigrationOn
-
withDbsToCancelMigrationOn
Set the dbsToCancelMigrationOn property: When you want to trigger cancel for specific databases set 'triggerCutover' to 'True' and the names of the specific databases in this array.- Parameters:
dbsToCancelMigrationOn- the dbsToCancelMigrationOn value to set.- Returns:
- the MigrationInner object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>- Overrides:
toJsonin classcom.azure.core.management.Resource- Throws:
IOException
-
fromJson
Reads an instance of MigrationInner from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of MigrationInner if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the MigrationInner.
-