CloudServiceRoleInstancesOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

ComputeManagementClient's

<xref:cloud_service_role_instances> attribute.

Inheritance
builtins.object
CloudServiceRoleInstancesOperations

Constructor

CloudServiceRoleInstancesOperations(*args, **kwargs)

Methods

begin_delete

Deletes a role instance from a cloud service.

begin_rebuild

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.

begin_reimage

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

begin_restart

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

get

Gets a role instance from a cloud service.

get_instance_view

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

get_remote_desktop_file

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

list

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.

begin_delete

Deletes a role instance from a cloud service.

async begin_delete(role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any) -> AsyncLROPoller[None]

Parameters

Name Description
role_instance_name
Required
str

Name of the role instance. Required.

resource_group_name
Required
str

Required.

cloud_service_name
Required
str

Required.

Returns

Type Description

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

Exceptions

Type Description

begin_rebuild

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.

async begin_rebuild(role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any) -> AsyncLROPoller[None]

Parameters

Name Description
role_instance_name
Required
str

Name of the role instance. Required.

resource_group_name
Required
str

Required.

cloud_service_name
Required
str

Required.

Returns

Type Description

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

Exceptions

Type Description

begin_reimage

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

async begin_reimage(role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any) -> AsyncLROPoller[None]

Parameters

Name Description
role_instance_name
Required
str

Name of the role instance. Required.

resource_group_name
Required
str

Required.

cloud_service_name
Required
str

Required.

Returns

Type Description

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

Exceptions

Type Description

begin_restart

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

async begin_restart(role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any) -> AsyncLROPoller[None]

Parameters

Name Description
role_instance_name
Required
str

Name of the role instance. Required.

resource_group_name
Required
str

Required.

cloud_service_name
Required
str

Required.

Returns

Type Description

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

Exceptions

Type Description

get

Gets a role instance from a cloud service.

async get(role_instance_name: str, resource_group_name: str, cloud_service_name: str, *, expand: str | InstanceViewTypes | None = None, **kwargs: Any) -> RoleInstance

Parameters

Name Description
role_instance_name
Required
str

Name of the role instance. Required.

resource_group_name
Required
str

Required.

cloud_service_name
Required
str

Required.

Keyword-Only Parameters

Name Description
expand

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

Type Description

RoleInstance or the result of cls(response)

Exceptions

Type Description

get_instance_view

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

async get_instance_view(role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any) -> RoleInstanceView

Parameters

Name Description
role_instance_name
Required
str

Name of the role instance. Required.

resource_group_name
Required
str

Required.

cloud_service_name
Required
str

Required.

Returns

Type Description

RoleInstanceView or the result of cls(response)

Exceptions

Type Description

get_remote_desktop_file

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

async get_remote_desktop_file(role_instance_name: str, resource_group_name: str, cloud_service_name: str, **kwargs: Any) -> AsyncIterator[bytes]

Parameters

Name Description
role_instance_name
Required
str

Name of the role instance. Required.

resource_group_name
Required
str

Required.

cloud_service_name
Required
str

Required.

Returns

Type Description

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

Exceptions

Type Description

list

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.

list(resource_group_name: str, cloud_service_name: str, *, expand: str | InstanceViewTypes | None = None, **kwargs: Any) -> AsyncIterable[RoleInstance]

Parameters

Name Description
resource_group_name
Required
str

Required.

cloud_service_name
Required
str

Required.

Keyword-Only Parameters

Name Description
expand

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

Type Description

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

Exceptions

Type Description

Attributes

models

models = <module 'azure.mgmt.compute.v2021_03_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\compute\\v2021_03_01\\models\\__init__.py'>