services
Creates, updates, deletes, gets or lists a services
resource.
Overview
Name | services |
Type | Resource |
Id | azure.data_migration.services |
Fields
- vw_services
- services
Name | Datatype | Description |
---|---|---|
id | text | field from the properties object |
name | text | field from the properties object |
auto_stop_delay | text | field from the properties object |
delete_resources_on_stop | text | field from the properties object |
etag | text | HTTP strong entity tag value. Ignored if submitted |
groupName | text | field from the properties object |
kind | text | The resource kind. Only 'vm' (the default) is supported. |
location | text | field from the properties object |
provisioning_state | text | field from the properties object |
public_key | text | field from the properties object |
serviceName | text | field from the properties object |
sku | text | An Azure SKU instance |
subscriptionId | text | field from the properties object |
system_data | text | field from the properties object |
tags | text | field from the properties object |
type | text | field from the properties object |
virtual_nic_id | text | field from the properties object |
virtual_subnet_id | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
id | string | |
name | string | |
etag | string | HTTP strong entity tag value. Ignored if submitted |
kind | string | The resource kind. Only 'vm' (the default) is supported. |
location | string | |
properties | object | Properties of the Azure Database Migration Service (classic) instance |
sku | object | An Azure SKU instance |
systemData | object | |
tags | object | |
type | string |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | groupName, serviceName, subscriptionId | The services resource is the top-level resource that represents the Azure Database Migration Service (classic). The GET method retrieves information about a service instance. |
list | SELECT | subscriptionId | 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. |
list_by_resource_group | SELECT | groupName, subscriptionId | 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 resource group. |
create_or_update | INSERT | groupName, serviceName, subscriptionId | The 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. |
delete | DELETE | groupName, serviceName, subscriptionId | The 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. |
update | UPDATE | groupName, serviceName, subscriptionId | The 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_availability | EXEC | groupName, serviceName, subscriptionId | This method checks whether a proposed nested resource name is valid and available. |
check_name_availability | EXEC | location, subscriptionId | This method checks whether a proposed top-level resource name is valid and available. |
check_status | EXEC | groupName, serviceName, subscriptionId | The 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. |
start | EXEC | groupName, serviceName, subscriptionId | The 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. |
stop | EXEC | groupName, serviceName, subscriptionId | The 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.
- vw_services
- services
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 }}';
SELECT
id,
name,
etag,
kind,
location,
properties,
sku,
systemData,
tags,
type
FROM azure.data_migration.services
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new services
resource.
- All Properties
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: etag
value: string
- name: kind
value: string
- name: properties
value:
- name: provisioningState
value: string
- name: publicKey
value: string
- name: virtualSubnetId
value: string
- name: virtualNicId
value: string
- name: autoStopDelay
value: string
- name: deleteResourcesOnStop
value: boolean
- name: sku
value:
- name: name
value: string
- name: tier
value: string
- name: family
value: string
- name: size
value: string
- name: capacity
value: integer
- name: systemData
value:
- name: createdBy
value: string
- name: createdByType
value: string
- name: createdAt
value: string
- name: lastModifiedBy
value: string
- name: lastModifiedByType
value: string
- name: lastModifiedAt
value: string
- name: location
value: string
- name: tags
value: object
- name: id
value: string
- name: name
value: string
- name: type
value: string
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 }}';