Skip to main content

cloud_services

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

Overview

Namecloud_services
TypeResource
Idazure.compute.cloud_services

Fields

NameDatatypeDescription
idtextResource Id.
nametextResource name.
allow_model_overridetextfield from the properties object
cloudServiceNametextfield from the properties object
configurationtextfield from the properties object
configuration_urltextfield from the properties object
extension_profiletextfield from the properties object
locationtextResource location.
network_profiletextfield from the properties object
os_profiletextfield from the properties object
package_urltextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
role_profiletextfield from the properties object
start_cloud_servicetextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
tagstextResource tags.
typetextResource type.
unique_idtextfield from the properties object
upgrade_modetextfield from the properties object
zonestextList of logical availability zone of the resource. List should contain only 1 zone where cloud service should be provisioned. This field is optional.

Methods

NameAccessible byRequired ParamsDescription
getSELECTcloudServiceName, resourceGroupName, subscriptionIdDisplay information about a cloud service.
get_instance_viewSELECTcloudServiceName, resourceGroupName, subscriptionIdGets the status of a cloud service.
listSELECTresourceGroupName, subscriptionIdGets 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_allSELECTsubscriptionIdGets 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_updateINSERTcloudServiceName, resourceGroupName, subscriptionId, data__locationCreate or update a cloud service. Please note some properties can be set only during cloud service creation.
deleteDELETEcloudServiceName, resourceGroupName, subscriptionIdDeletes a cloud service.
updateUPDATEcloudServiceName, resourceGroupName, subscriptionIdUpdate a cloud service.
delete_instancesEXECcloudServiceName, resourceGroupName, subscriptionId, data__roleInstancesDeletes role instances in a cloud service.
power_offEXECcloudServiceName, resourceGroupName, subscriptionIdPower off the cloud service. Note that resources are still attached and you are getting charged for the resources.
rebuildEXECcloudServiceName, resourceGroupName, subscriptionId, data__roleInstancesRebuild 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.
reimageEXECcloudServiceName, resourceGroupName, subscriptionId, data__roleInstancesReimage asynchronous operation reinstalls the operating system on instances of web roles or worker roles.
restartEXECcloudServiceName, resourceGroupName, subscriptionId, data__roleInstancesRestarts one or more role instances in a cloud service.
startEXECcloudServiceName, resourceGroupName, subscriptionIdStarts the cloud service.

SELECT examples

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,
allow_model_override,
cloudServiceName,
configuration,
configuration_url,
extension_profile,
location,
network_profile,
os_profile,
package_url,
provisioning_state,
resourceGroupName,
role_profile,
start_cloud_service,
subscriptionId,
system_data,
tags,
type,
unique_id,
upgrade_mode,
zones
FROM azure.compute.vw_cloud_services
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.compute.cloud_services (
cloudServiceName,
resourceGroupName,
subscriptionId,
data__location,
location,
tags,
properties,
systemData,
zones
)
SELECT
'{{ cloudServiceName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__location }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}',
'{{ systemData }}',
'{{ zones }}'
;

UPDATE example

Updates a cloud_services resource.

/*+ update */
UPDATE azure.compute.cloud_services
SET
tags = '{{ tags }}'
WHERE
cloudServiceName = '{{ cloudServiceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified cloud_services resource.

/*+ delete */
DELETE FROM azure.compute.cloud_services
WHERE cloudServiceName = '{{ cloudServiceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';