Skip to main content

services

Creates, updates, deletes, gets or lists a services resource.

Overview

Nameservices
TypeResource
Idazure.data_migration.services

Fields

NameDatatypeDescription
idtextfield from the properties object
nametextfield from the properties object
auto_stop_delaytextfield from the properties object
delete_resources_on_stoptextfield from the properties object
etagtextHTTP strong entity tag value. Ignored if submitted
groupNametextfield from the properties object
kindtextThe resource kind. Only 'vm' (the default) is supported.
locationtextfield from the properties object
provisioning_statetextfield from the properties object
public_keytextfield from the properties object
serviceNametextfield from the properties object
skutextAn Azure SKU instance
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
tagstextfield from the properties object
typetextfield from the properties object
virtual_nic_idtextfield from the properties object
virtual_subnet_idtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTgroupName, serviceName, subscriptionIdThe services resource is the top-level resource that represents the Azure Database Migration Service (classic). The GET method retrieves information about a service instance.
listSELECTsubscriptionIdThe services resource is the top-level resource that represents the Azure Database Migration Service (classic). This method returns a list of service resources in a subscription.
list_by_resource_groupSELECTgroupName, subscriptionIdThe Services resource is the top-level resource that represents the Azure Database Migration Service (classic). This method returns a list of service resources in a resource group.
create_or_updateINSERTgroupName, serviceName, subscriptionIdThe services resource is the top-level resource that represents the Azure Database Migration Service (classic). The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property.
deleteDELETEgroupName, serviceName, subscriptionIdThe services resource is the top-level resource that represents the Azure Database Migration Service (classic). The DELETE method deletes a service. Any running tasks will be canceled.
updateUPDATEgroupName, serviceName, subscriptionIdThe services resource is the top-level resource that represents the Azure Database Migration Service (classic). The PATCH method updates an existing service. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy").
check_children_name_availabilityEXECgroupName, serviceName, subscriptionIdThis method checks whether a proposed nested resource name is valid and available.
check_name_availabilityEXEClocation, subscriptionIdThis method checks whether a proposed top-level resource name is valid and available.
check_statusEXECgroupName, serviceName, subscriptionIdThe services resource is the top-level resource that represents the Azure Database Migration Service (classic). This action performs a health check and returns the status of the service and virtual machine size.
startEXECgroupName, serviceName, subscriptionIdThe services resource is the top-level resource that represents the Azure Database Migration Service (classic). This action starts the service and the service can be used for data migration.
stopEXECgroupName, serviceName, subscriptionIdThe services resource is the top-level resource that represents the Azure Database Migration Service (classic). This action stops the service and the service cannot be used for data migration. The service owner won't be billed when the service is stopped.

SELECT examples

The services resource is the top-level resource that represents the Azure Database Migration Service (classic). This method returns a list of service resources in a subscription.

SELECT
id,
name,
auto_stop_delay,
delete_resources_on_stop,
etag,
groupName,
kind,
location,
provisioning_state,
public_key,
serviceName,
sku,
subscriptionId,
system_data,
tags,
type,
virtual_nic_id,
virtual_subnet_id
FROM azure.data_migration.vw_services
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new services resource.

/*+ create */
INSERT INTO azure.data_migration.services (
groupName,
serviceName,
subscriptionId,
etag,
kind,
properties,
sku,
location,
tags
)
SELECT
'{{ groupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ etag }}',
'{{ kind }}',
'{{ properties }}',
'{{ sku }}',
'{{ location }}',
'{{ tags }}'
;

UPDATE example

Updates a services resource.

/*+ update */
UPDATE azure.data_migration.services
SET
etag = '{{ etag }}',
kind = '{{ kind }}',
properties = '{{ properties }}',
sku = '{{ sku }}',
location = '{{ location }}',
tags = '{{ tags }}'
WHERE
groupName = '{{ groupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified services resource.

/*+ delete */
DELETE FROM azure.data_migration.services
WHERE groupName = '{{ groupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';