cloud_services
Creates, updates, deletes, gets or lists a cloud_services
resource.
Overview
Name | cloud_services |
Type | Resource |
Id | azure.compute.cloud_services |
Fields
The following fields are returned by SELECT
queries:
- get
- get_instance_view
- list
- list_all
Name | Datatype | Description |
---|---|---|
id | string | Resource Id. |
name | string | Resource name. |
location | string | Resource location. |
properties | object | Cloud service properties |
systemData | object | The system meta data relating to this resource. |
tags | object | Resource tags. |
type | string | Resource type. |
zones | array | List of logical availability zone of the resource. List should contain only 1 zone where cloud service should be provisioned. This field is optional. |
Name | Datatype | Description |
---|---|---|
privateIds | array | Specifies a list of unique identifiers generated internally for the cloud service. NOTE: If you are using Azure Diagnostics extension, this property can be used as 'DeploymentId' for querying details. |
roleInstance | object | Instance view statuses. |
sdkVersion | string | The version of the SDK that was used to generate the package for the cloud service. |
statuses | array |
Name | Datatype | Description |
---|---|---|
id | string | Resource Id. |
name | string | Resource name. |
location | string | Resource location. |
properties | object | Cloud service properties |
systemData | object | The system meta data relating to this resource. |
tags | object | Resource tags. |
type | string | Resource type. |
zones | array | List of logical availability zone of the resource. List should contain only 1 zone where cloud service should be provisioned. This field is optional. |
Name | Datatype | Description |
---|---|---|
id | string | Resource Id. |
name | string | Resource name. |
location | string | Resource location. |
properties | object | Cloud service properties |
systemData | object | The system meta data relating to this resource. |
tags | object | Resource tags. |
type | string | Resource type. |
zones | array | List of logical availability zone of the resource. List should contain only 1 zone where cloud service should be provisioned. This field is optional. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | resourceGroupName , cloudServiceName , subscriptionId | Display information about a cloud service. | |
get_instance_view | select | resourceGroupName , cloudServiceName , subscriptionId | Gets the status of a cloud service. | |
list | select | resourceGroupName , subscriptionId | Gets a list of all cloud services under a resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services. | |
list_all | select | subscriptionId | Gets a list of all cloud services in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services. | |
create_or_update | insert | resourceGroupName , cloudServiceName , subscriptionId , data__location | Create or update a cloud service. Please note some properties can be set only during cloud service creation. | |
update | update | resourceGroupName , cloudServiceName , subscriptionId | Update a cloud service. | |
delete | delete | resourceGroupName , cloudServiceName , subscriptionId | Deletes a cloud service. | |
start | exec | resourceGroupName , cloudServiceName , subscriptionId | Starts the cloud service. | |
power_off | exec | resourceGroupName , cloudServiceName , subscriptionId | Power off the cloud service. Note that resources are still attached and you are getting charged for the resources. | |
restart | exec | resourceGroupName , cloudServiceName , subscriptionId , roleInstances | Restarts one or more role instances in a cloud service. | |
reimage | exec | resourceGroupName , cloudServiceName , subscriptionId , roleInstances | Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker roles. | |
rebuild | exec | resourceGroupName , cloudServiceName , subscriptionId , roleInstances | Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instances. | |
delete_instances | exec | resourceGroupName , cloudServiceName , subscriptionId , roleInstances | Deletes role instances in a cloud service. |
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 |
---|---|---|
cloudServiceName | string | Name of the cloud service. |
resourceGroupName | string | Name of the resource group. |
subscriptionId | string | Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
SELECT
examples
- get
- get_instance_view
- list
- list_all
Display information about a cloud service.
SELECT
id,
name,
location,
properties,
systemData,
tags,
type,
zones
FROM azure.compute.cloud_services
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND cloudServiceName = '{{ cloudServiceName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
Gets the status of a cloud service.
SELECT
privateIds,
roleInstance,
sdkVersion,
statuses
FROM azure.compute.cloud_services
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND cloudServiceName = '{{ cloudServiceName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
Gets a list of all cloud services under a resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services.
SELECT
id,
name,
location,
properties,
systemData,
tags,
type,
zones
FROM azure.compute.cloud_services
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
Gets a list of all cloud services in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services.
SELECT
id,
name,
location,
properties,
systemData,
tags,
type,
zones
FROM azure.compute.cloud_services
WHERE subscriptionId = '{{ subscriptionId }}' -- required
;
INSERT
examples
- create_or_update
- Manifest
Create or update a cloud service. Please note some properties can be set only during cloud service creation.
INSERT INTO azure.compute.cloud_services (
data__location,
data__tags,
data__properties,
data__systemData,
data__zones,
resourceGroupName,
cloudServiceName,
subscriptionId
)
SELECT
'{{ location }}' /* required */,
'{{ tags }}',
'{{ properties }}',
'{{ systemData }}',
'{{ zones }}',
'{{ resourceGroupName }}',
'{{ cloudServiceName }}',
'{{ subscriptionId }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type,
zones
;
# Description fields are for documentation purposes
- name: cloud_services
props:
- name: resourceGroupName
value: string
description: Required parameter for the cloud_services resource.
- name: cloudServiceName
value: string
description: Required parameter for the cloud_services resource.
- name: subscriptionId
value: string
description: Required parameter for the cloud_services resource.
- name: location
value: string
description: |
Resource location.
- name: tags
value: object
description: |
Resource tags.
- name: properties
value: object
description: |
Cloud service properties
- name: systemData
value: object
description: |
The system meta data relating to this resource.
- name: zones
value: array
description: |
List of logical availability zone of the resource. List should contain only 1 zone where cloud service should be provisioned. This field is optional.
UPDATE
examples
- update
Update a cloud service.
UPDATE azure.compute.cloud_services
SET
data__tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND cloudServiceName = '{{ cloudServiceName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type,
zones;
DELETE
examples
- delete
Deletes a cloud service.
DELETE FROM azure.compute.cloud_services
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND cloudServiceName = '{{ cloudServiceName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;
Lifecycle Methods
- start
- power_off
- restart
- reimage
- rebuild
- delete_instances
Starts the cloud service.
EXEC azure.compute.cloud_services.start
@resourceGroupName='{{ resourceGroupName }}' --required,
@cloudServiceName='{{ cloudServiceName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
;
Power off the cloud service. Note that resources are still attached and you are getting charged for the resources.
EXEC azure.compute.cloud_services.power_off
@resourceGroupName='{{ resourceGroupName }}' --required,
@cloudServiceName='{{ cloudServiceName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
;
Restarts one or more role instances in a cloud service.
EXEC azure.compute.cloud_services.restart
@resourceGroupName='{{ resourceGroupName }}' --required,
@cloudServiceName='{{ cloudServiceName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"roleInstances": "{{ roleInstances }}"
}'
;
Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker roles.
EXEC azure.compute.cloud_services.reimage
@resourceGroupName='{{ resourceGroupName }}' --required,
@cloudServiceName='{{ cloudServiceName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"roleInstances": "{{ roleInstances }}"
}'
;
Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instances.
EXEC azure.compute.cloud_services.rebuild
@resourceGroupName='{{ resourceGroupName }}' --required,
@cloudServiceName='{{ cloudServiceName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"roleInstances": "{{ roleInstances }}"
}'
;
Deletes role instances in a cloud service.
EXEC azure.compute.cloud_services.delete_instances
@resourceGroupName='{{ resourceGroupName }}' --required,
@cloudServiceName='{{ cloudServiceName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"roleInstances": "{{ roleInstances }}"
}'
;