migrations
Creates, updates, deletes, gets or lists a migrations
resource.
Overview
Name | migrations |
Type | Resource |
Id | azure.postgresql.migrations |
Fields
The following fields are returned by SELECT
queries:
- get
- list_by_target_server
Name | Datatype | Description |
---|---|---|
location | string | The geo-location where the resource lives |
properties | object | Migration resource properties. |
tags | object | Resource tags. |
Name | Datatype | Description |
---|---|---|
location | string | The geo-location where the resource lives |
properties | object | Migration resource properties. |
tags | object | Resource tags. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | subscriptionId , resourceGroupName , targetDbServerName , migrationName | Gets details of a migration. | |
list_by_target_server | select | subscriptionId , resourceGroupName , targetDbServerName | migrationListFilter | List all the migrations on a given target server. |
create | insert | subscriptionId , resourceGroupName , targetDbServerName , migrationName | Creates a new migration. | |
update | update | subscriptionId , resourceGroupName , targetDbServerName , migrationName | 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. | |
delete | delete | subscriptionId , resourceGroupName , targetDbServerName , migrationName | Deletes a migration. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
migrationName | string | The name of the migration. |
resourceGroupName | string | The resource group name of the target database server. |
subscriptionId | string | The subscription ID of the target database server. |
targetDbServerName | string | The name of the target database server. |
migrationListFilter | string | Migration list filter. Retrieves either active migrations or all migrations. |
SELECT
examples
- get
- list_by_target_server
Gets details of a migration.
SELECT
location,
properties,
tags
FROM azure.postgresql.migrations
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND targetDbServerName = '{{ targetDbServerName }}' -- required
AND migrationName = '{{ migrationName }}' -- required
;
List all the migrations on a given target server.
SELECT
location,
properties,
tags
FROM azure.postgresql.migrations
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND targetDbServerName = '{{ targetDbServerName }}' -- required
AND migrationListFilter = '{{ migrationListFilter }}'
;
INSERT
examples
- create
- Manifest
Creates a new migration.
INSERT INTO azure.postgresql.migrations (
data__properties,
data__tags,
data__location,
subscriptionId,
resourceGroupName,
targetDbServerName,
migrationName
)
SELECT
'{{ properties }}',
'{{ tags }}',
'{{ location }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ targetDbServerName }}',
'{{ migrationName }}'
RETURNING
location,
properties,
tags
;
# Description fields are for documentation purposes
- name: migrations
props:
- name: subscriptionId
value: string
description: Required parameter for the migrations resource.
- name: resourceGroupName
value: string
description: Required parameter for the migrations resource.
- name: targetDbServerName
value: string
description: Required parameter for the migrations resource.
- name: migrationName
value: string
description: Required parameter for the migrations resource.
- name: properties
value: object
description: |
Migration resource properties.
- name: tags
value: object
description: |
Resource tags.
- name: location
value: string
description: |
The geo-location where the resource lives
UPDATE
examples
- update
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.
UPDATE azure.postgresql.migrations
SET
data__properties = '{{ properties }}',
data__tags = '{{ tags }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND targetDbServerName = '{{ targetDbServerName }}' --required
AND migrationName = '{{ migrationName }}' --required
RETURNING
location,
properties,
tags;
DELETE
examples
- delete
Deletes a migration.
DELETE FROM azure.postgresql.migrations
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND targetDbServerName = '{{ targetDbServerName }}' --required
AND migrationName = '{{ migrationName }}' --required
;