migrations
Creates, updates, deletes, gets or lists a migrations
resource.
Overview
Name | migrations |
Type | Resource |
Id | azure.postgresql.migrations |
Fields
- vw_migrations
- migrations
Name | Datatype | Description |
---|---|---|
cancel | text | field from the properties object |
current_status | text | field from the properties object |
dbs_to_cancel_migration_on | text | field from the properties object |
dbs_to_migrate | text | field from the properties object |
dbs_to_trigger_cutover_on | text | field from the properties object |
location | text | The geo-location where the resource lives |
migrate_roles | text | field from the properties object |
migrationName | text | field from the properties object |
migration_id | text | field from the properties object |
migration_instance_resource_id | text | field from the properties object |
migration_mode | text | field from the properties object |
migration_option | text | field from the properties object |
migration_window_end_time_in_utc | text | field from the properties object |
migration_window_start_time_in_utc | text | field from the properties object |
overwrite_dbs_in_target | text | field from the properties object |
resourceGroupName | text | field from the properties object |
secret_parameters | text | field from the properties object |
setup_logical_replication_on_source_db_if_needed | text | field from the properties object |
source_db_server_fully_qualified_domain_name | text | field from the properties object |
source_db_server_metadata | text | field from the properties object |
source_db_server_resource_id | text | field from the properties object |
source_type | text | field from the properties object |
ssl_mode | text | field from the properties object |
start_data_migration | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | Resource tags. |
targetDbServerName | text | field from the properties object |
target_db_server_fully_qualified_domain_name | text | field from the properties object |
target_db_server_metadata | text | field from the properties object |
target_db_server_resource_id | text | field from the properties object |
trigger_cutover | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
location | string | The geo-location where the resource lives |
properties | object | Migration resource properties. |
tags | object | Resource tags. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | migrationName, resourceGroupName, subscriptionId, targetDbServerName | Gets details of a migration. |
list_by_target_server | SELECT | resourceGroupName, subscriptionId, targetDbServerName | List all the migrations on a given target server. |
create | INSERT | migrationName, resourceGroupName, subscriptionId, targetDbServerName | Creates a new migration. |
delete | DELETE | migrationName, resourceGroupName, subscriptionId, targetDbServerName | Deletes a migration. |
update | UPDATE | migrationName, resourceGroupName, subscriptionId, targetDbServerName | Updates an existing migration. The request body can contain one to many of the mutable properties present in the migration definition. Certain property updates initiate migration state transitions. |
SELECT
examples
List all the migrations on a given target server.
- vw_migrations
- migrations
SELECT
cancel,
current_status,
dbs_to_cancel_migration_on,
dbs_to_migrate,
dbs_to_trigger_cutover_on,
location,
migrate_roles,
migrationName,
migration_id,
migration_instance_resource_id,
migration_mode,
migration_option,
migration_window_end_time_in_utc,
migration_window_start_time_in_utc,
overwrite_dbs_in_target,
resourceGroupName,
secret_parameters,
setup_logical_replication_on_source_db_if_needed,
source_db_server_fully_qualified_domain_name,
source_db_server_metadata,
source_db_server_resource_id,
source_type,
ssl_mode,
start_data_migration,
subscriptionId,
tags,
targetDbServerName,
target_db_server_fully_qualified_domain_name,
target_db_server_metadata,
target_db_server_resource_id,
trigger_cutover
FROM azure.postgresql.vw_migrations
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND targetDbServerName = '{{ targetDbServerName }}';
SELECT
location,
properties,
tags
FROM azure.postgresql.migrations
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND targetDbServerName = '{{ targetDbServerName }}';
INSERT
example
Use the following StackQL query and manifest file to create a new migrations
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.postgresql.migrations (
migrationName,
resourceGroupName,
subscriptionId,
targetDbServerName,
properties,
tags,
location
)
SELECT
'{{ migrationName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ targetDbServerName }}',
'{{ properties }}',
'{{ tags }}',
'{{ location }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: migrationId
value: string
- name: currentStatus
value:
- name: state
value: []
- name: error
value: string
- name: currentSubStateDetails
value:
- name: currentSubState
value: []
- name: dbDetails
value: object
- name: validationDetails
value:
- name: status
value: []
- name: validationStartTimeInUtc
value: string
- name: validationEndTimeInUtc
value: string
- name: serverLevelValidationDetails
value:
- - name: type
value: string
- name: messages
value:
- - name: message
value: string
- name: dbLevelValidationDetails
value:
- - name: databaseName
value: string
- name: startedOn
value: string
- name: endedOn
value: string
- name: summary
value:
- - name: type
value: string
- name: messages
value:
- - name: message
value: string
- name: migrationInstanceResourceId
value: string
- name: migrationMode
value: []
- name: migrationOption
value: []
- name: sourceType
value: []
- name: sslMode
value: []
- name: sourceDbServerMetadata
value:
- name: location
value: string
- name: version
value: string
- name: storageMb
value: integer
- name: sku
value:
- name: name
value: string
- name: tier
value: string
- name: sourceDbServerResourceId
value: string
- name: sourceDbServerFullyQualifiedDomainName
value: string
- name: targetDbServerResourceId
value: string
- name: targetDbServerFullyQualifiedDomainName
value: string
- name: secretParameters
value:
- name: adminCredentials
value:
- name: sourceServerPassword
value: string
- name: targetServerPassword
value: string
- name: sourceServerUsername
value: string
- name: targetServerUsername
value: string
- name: dbsToMigrate
value:
- string
- name: setupLogicalReplicationOnSourceDbIfNeeded
value: string
- name: overwriteDbsInTarget
value: string
- name: migrationWindowStartTimeInUtc
value: string
- name: migrationWindowEndTimeInUtc
value: string
- name: migrateRoles
value: string
- name: startDataMigration
value: string
- name: triggerCutover
value: string
- name: dbsToTriggerCutoverOn
value:
- string
- name: cancel
value: string
- name: dbsToCancelMigrationOn
value:
- string
- name: tags
value: object
- name: location
value: string
UPDATE
example
Updates a migrations
resource.
/*+ update */
UPDATE azure.postgresql.migrations
SET
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
migrationName = '{{ migrationName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND targetDbServerName = '{{ targetDbServerName }}';
DELETE
example
Deletes the specified migrations
resource.
/*+ delete */
DELETE FROM azure.postgresql.migrations
WHERE migrationName = '{{ migrationName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND targetDbServerName = '{{ targetDbServerName }}';