azure.mgmt.compute.v2022_09_04.operations module

class azure.mgmt.compute.v2022_09_04.operations.CloudServiceOperatingSystemsOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s cloud_service_operating_systems attribute.

get_os_family(location: str, os_family_name: str, **kwargs: Any) OSFamily[source]

Gets properties of a guest operating system family that can be specified in the XML service configuration (.cscfg) for a cloud service.

Parameters:
  • location (str) – Name of the location that the OS family pertains to. Required.

  • os_family_name (str) – Name of the OS family. Required.

Returns:

OSFamily or the result of cls(response)

Return type:

OSFamily

Raises:

HttpResponseError

get_os_version(location: str, os_version_name: str, **kwargs: Any) OSVersion[source]

Gets properties of a guest operating system version that can be specified in the XML service configuration (.cscfg) for a cloud service.

Parameters:
  • location (str) – Name of the location that the OS version pertains to. Required.

  • os_version_name (str) – Name of the OS version. Required.

Returns:

OSVersion or the result of cls(response)

Return type:

OSVersion

Raises:

HttpResponseError

list_os_families(location: str, **kwargs: Any) Iterable[OSFamily][source]

Gets a list of all guest operating system families available to be specified in the XML service configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS Families. Do this till nextLink is null to fetch all the OS Families.

Parameters:

location (str) – Name of the location that the OS families pertain to. Required.

Returns:

An iterator like instance of either OSFamily or the result of cls(response)

Return type:

ItemPaged[OSFamily]

Raises:

HttpResponseError

list_os_versions(location: str, **kwargs: Any) Iterable[OSVersion][source]

Gets a list of all guest operating system versions available to be specified in the XML service configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS versions. Do this till nextLink is null to fetch all the OS versions.

Parameters:

location (str) – Name of the location that the OS versions pertain to. Required.

Returns:

An iterator like instance of either OSVersion or the result of cls(response)

Return type:

ItemPaged[OSVersion]

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2022_09_04.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2022_09_04/models/__init__.py'>
class azure.mgmt.compute.v2022_09_04.operations.CloudServiceRoleInstancesOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s cloud_service_role_instances attribute.

begin_delete(role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any) LROPoller[None][source]

Deletes a role instance from a cloud service.

Parameters:
  • role_instance_name (str) – Name of the role instance. Required.

  • resource_group_name (str) – Name of the resource group. Required.

  • cloud_service_name (str) – Name of the cloud service. Required.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_rebuild(role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any) LROPoller[None][source]

The Rebuild Role Instance asynchronous operation 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 Instance.

Parameters:
  • role_instance_name (str) – Name of the role instance. Required.

  • resource_group_name (str) – Name of the resource group. Required.

  • cloud_service_name (str) – Name of the cloud service. Required.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_reimage(role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any) LROPoller[None][source]

The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles.

Parameters:
  • role_instance_name (str) – Name of the role instance. Required.

  • resource_group_name (str) – Name of the resource group. Required.

  • cloud_service_name (str) – Name of the cloud service. Required.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_restart(role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any) LROPoller[None][source]

The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service.

Parameters:
  • role_instance_name (str) – Name of the role instance. Required.

  • resource_group_name (str) – Name of the resource group. Required.

  • cloud_service_name (str) – Name of the cloud service. Required.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

get(role_instance_name: str, resource_group_name: str, cloud_service_name: str, *, expand: str | InstanceViewTypes | None = None, **kwargs: Any) RoleInstance[source]

Gets a role instance from a cloud service.

Parameters:
  • role_instance_name (str) – Name of the role instance. Required.

  • resource_group_name (str) – Name of the resource group. Required.

  • cloud_service_name (str) – Name of the cloud service. Required.

Keyword Arguments:

expand (str or InstanceViewTypes) – The expand expression to apply to the operation. ‘UserData’ is not supported for cloud services. Known values are: “instanceView” and “userData”. Default value is None.

Returns:

RoleInstance or the result of cls(response)

Return type:

RoleInstance

Raises:

HttpResponseError

get_instance_view(role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any) RoleInstanceView[source]

Retrieves information about the run-time state of a role instance in a cloud service.

Parameters:
  • role_instance_name (str) – Name of the role instance. Required.

  • resource_group_name (str) – Name of the resource group. Required.

  • cloud_service_name (str) – Name of the cloud service. Required.

Returns:

RoleInstanceView or the result of cls(response)

Return type:

RoleInstanceView

Raises:

HttpResponseError

get_remote_desktop_file(role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any) Iterator[bytes][source]

Gets a remote desktop file for a role instance in a cloud service.

Parameters:
  • role_instance_name (str) – Name of the role instance. Required.

  • resource_group_name (str) – Name of the resource group. Required.

  • cloud_service_name (str) – Name of the cloud service. Required.

Returns:

Iterator[bytes] or the result of cls(response)

Return type:

Iterator[bytes]

Raises:

HttpResponseError

list(resource_group_name: str, cloud_service_name: str, *, expand: str | InstanceViewTypes | None = None, **kwargs: Any) Iterable[RoleInstance][source]

Gets the list of all role instances in a cloud service. Use nextLink property in the response to get the next page of role instances. Do this till nextLink is null to fetch all the role instances.

Parameters:
  • resource_group_name (str) – Name of the resource group. Required.

  • cloud_service_name (str) – Name of the cloud service. Required.

Keyword Arguments:

expand (str or InstanceViewTypes) – The expand expression to apply to the operation. ‘UserData’ is not supported for cloud services. Known values are: “instanceView” and “userData”. Default value is None.

Returns:

An iterator like instance of either RoleInstance or the result of cls(response)

Return type:

ItemPaged[RoleInstance]

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2022_09_04.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2022_09_04/models/__init__.py'>
class azure.mgmt.compute.v2022_09_04.operations.CloudServiceRolesOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s cloud_service_roles attribute.

get(role_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any) CloudServiceRole[source]

Gets a role from a cloud service.

Parameters:
  • role_name (str) – Name of the role. Required.

  • resource_group_name (str) – Name of the resource group. Required.

  • cloud_service_name (str) – Name of the cloud service. Required.

Returns:

CloudServiceRole or the result of cls(response)

Return type:

CloudServiceRole

Raises:

HttpResponseError

list(resource_group_name: str, cloud_service_name: str, **kwargs: Any) Iterable[CloudServiceRole][source]

Gets a list of all roles in a cloud service. Use nextLink property in the response to get the next page of roles. Do this till nextLink is null to fetch all the roles.

Parameters:
  • resource_group_name (str) – Name of the resource group. Required.

  • cloud_service_name (str) – Name of the cloud service. Required.

Returns:

An iterator like instance of either CloudServiceRole or the result of cls(response)

Return type:

ItemPaged[CloudServiceRole]

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2022_09_04.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2022_09_04/models/__init__.py'>
class azure.mgmt.compute.v2022_09_04.operations.CloudServicesOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s cloud_services attribute.

begin_create_or_update(resource_group_name: str, cloud_service_name: str, parameters: _models.CloudService | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.CloudService][source]
begin_create_or_update(resource_group_name: str, cloud_service_name: str, parameters: IO[bytes] | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.CloudService]

Create or update a cloud service. Please note some properties can be set only during cloud service creation.

Parameters:
  • resource_group_name (str) – Name of the resource group. Required.

  • cloud_service_name (str) – Name of the cloud service. Required.

  • parameters (CloudService or IO[bytes]) – The cloud service object. Is either a CloudService type or a IO[bytes] type. Default value is None.

Returns:

An instance of LROPoller that returns either CloudService or the result of cls(response)

Return type:

LROPoller[CloudService]

Raises:

HttpResponseError

begin_delete(resource_group_name: str, cloud_service_name: str, **kwargs: Any) LROPoller[None][source]

Deletes a cloud service.

Parameters:
  • resource_group_name (str) – Name of the resource group. Required.

  • cloud_service_name (str) – Name of the cloud service. Required.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_delete_instances(resource_group_name: str, cloud_service_name: str, parameters: _models.RoleInstances | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_delete_instances(resource_group_name: str, cloud_service_name: str, parameters: IO[bytes] | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

Deletes role instances in a cloud service.

Parameters:
  • resource_group_name (str) – Name of the resource group. Required.

  • cloud_service_name (str) – Name of the cloud service. Required.

  • parameters (RoleInstances or IO[bytes]) – List of cloud service role instance names. Is either a RoleInstances type or a IO[bytes] type. Default value is None.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_power_off(resource_group_name: str, cloud_service_name: str, **kwargs: Any) LROPoller[None][source]

Power off the cloud service. Note that resources are still attached and you are getting charged for the resources.

Parameters:
  • resource_group_name (str) – Name of the resource group. Required.

  • cloud_service_name (str) – Name of the cloud service. Required.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_rebuild(resource_group_name: str, cloud_service_name: str, parameters: _models.RoleInstances | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_rebuild(resource_group_name: str, cloud_service_name: str, parameters: IO[bytes] | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

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.

Parameters:
  • resource_group_name (str) – Name of the resource group. Required.

  • cloud_service_name (str) – Name of the cloud service. Required.

  • parameters (RoleInstances or IO[bytes]) – List of cloud service role instance names. Is either a RoleInstances type or a IO[bytes] type. Default value is None.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_reimage(resource_group_name: str, cloud_service_name: str, parameters: _models.RoleInstances | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_reimage(resource_group_name: str, cloud_service_name: str, parameters: IO[bytes] | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker roles.

Parameters:
  • resource_group_name (str) – Name of the resource group. Required.

  • cloud_service_name (str) – Name of the cloud service. Required.

  • parameters (RoleInstances or IO[bytes]) – List of cloud service role instance names. Is either a RoleInstances type or a IO[bytes] type. Default value is None.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_restart(resource_group_name: str, cloud_service_name: str, parameters: _models.RoleInstances | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_restart(resource_group_name: str, cloud_service_name: str, parameters: IO[bytes] | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

Restarts one or more role instances in a cloud service.

Parameters:
  • resource_group_name (str) – Name of the resource group. Required.

  • cloud_service_name (str) – Name of the cloud service. Required.

  • parameters (RoleInstances or IO[bytes]) – List of cloud service role instance names. Is either a RoleInstances type or a IO[bytes] type. Default value is None.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_start(resource_group_name: str, cloud_service_name: str, **kwargs: Any) LROPoller[None][source]

Starts the cloud service.

Parameters:
  • resource_group_name (str) – Name of the resource group. Required.

  • cloud_service_name (str) – Name of the cloud service. Required.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

begin_update(resource_group_name: str, cloud_service_name: str, parameters: _models.CloudServiceUpdate | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.CloudService][source]
begin_update(resource_group_name: str, cloud_service_name: str, parameters: IO[bytes] | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[_models.CloudService]

Update a cloud service.

Parameters:
  • resource_group_name (str) – Name of the resource group. Required.

  • cloud_service_name (str) – Name of the cloud service. Required.

  • parameters (CloudServiceUpdate or IO[bytes]) – The cloud service object. Is either a CloudServiceUpdate type or a IO[bytes] type. Default value is None.

Returns:

An instance of LROPoller that returns either CloudService or the result of cls(response)

Return type:

LROPoller[CloudService]

Raises:

HttpResponseError

get(resource_group_name: str, cloud_service_name: str, **kwargs: Any) CloudService[source]

Display information about a cloud service.

Parameters:
  • resource_group_name (str) – Name of the resource group. Required.

  • cloud_service_name (str) – Name of the cloud service. Required.

Returns:

CloudService or the result of cls(response)

Return type:

CloudService

Raises:

HttpResponseError

get_instance_view(resource_group_name: str, cloud_service_name: str, **kwargs: Any) CloudServiceInstanceView[source]

Gets the status of a cloud service.

Parameters:
  • resource_group_name (str) – Name of the resource group. Required.

  • cloud_service_name (str) – Name of the cloud service. Required.

Returns:

CloudServiceInstanceView or the result of cls(response)

Return type:

CloudServiceInstanceView

Raises:

HttpResponseError

list(resource_group_name: str, **kwargs: Any) Iterable[CloudService][source]

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.

Parameters:

resource_group_name (str) – Name of the resource group. Required.

Returns:

An iterator like instance of either CloudService or the result of cls(response)

Return type:

ItemPaged[CloudService]

Raises:

HttpResponseError

list_all(**kwargs: Any) Iterable[CloudService][source]

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.

Returns:

An iterator like instance of either CloudService or the result of cls(response)

Return type:

ItemPaged[CloudService]

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2022_09_04.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2022_09_04/models/__init__.py'>
class azure.mgmt.compute.v2022_09_04.operations.CloudServicesUpdateDomainOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through ComputeManagementClient’s cloud_services_update_domain attribute.

begin_walk_update_domain(resource_group_name: str, cloud_service_name: str, update_domain: int, parameters: _models.UpdateDomain | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None][source]
begin_walk_update_domain(resource_group_name: str, cloud_service_name: str, update_domain: int, parameters: IO[bytes] | None = None, *, content_type: str = 'application/json', **kwargs: Any) LROPoller[None]

Updates the role instances in the specified update domain.

Parameters:
  • resource_group_name (str) – Name of the resource group. Required.

  • cloud_service_name (str) – Name of the cloud service. Required.

  • update_domain (int) – Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. Required.

  • parameters (UpdateDomain or IO[bytes]) – The update domain object. Is either a UpdateDomain type or a IO[bytes] type. Default value is None.

Returns:

An instance of LROPoller that returns either None or the result of cls(response)

Return type:

LROPoller[None]

Raises:

HttpResponseError

get_update_domain(resource_group_name: str, cloud_service_name: str, update_domain: int, **kwargs: Any) UpdateDomain[source]

Gets the specified update domain of a cloud service. Use nextLink property in the response to get the next page of update domains. Do this till nextLink is null to fetch all the update domains.

Parameters:
  • resource_group_name (str) – Name of the resource group. Required.

  • cloud_service_name (str) – Name of the cloud service. Required.

  • update_domain (int) – Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. Required.

Returns:

UpdateDomain or the result of cls(response)

Return type:

UpdateDomain

Raises:

HttpResponseError

list_update_domains(resource_group_name: str, cloud_service_name: str, **kwargs: Any) Iterable[UpdateDomain][source]

Gets a list of all update domains in a cloud service.

Parameters:
  • resource_group_name (str) – Name of the resource group. Required.

  • cloud_service_name (str) – Name of the cloud service. Required.

Returns:

An iterator like instance of either UpdateDomain or the result of cls(response)

Return type:

ItemPaged[UpdateDomain]

Raises:

HttpResponseError

models = <module 'azure.mgmt.compute.v2022_09_04.models' from '/mnt/vss/_work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.11/site-packages/azure/mgmt/compute/v2022_09_04/models/__init__.py'>