CloudServiceRoleInstancesOperations Class

CloudServiceRoleInstancesOperations async operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Inheritance
builtins.object
CloudServiceRoleInstancesOperations

Constructor

CloudServiceRoleInstancesOperations(client, config, serializer, deserializer)

Parameters

client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

models

Alias to model classes used in this operation group.

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) -> azure.core.polling._async_poller.AsyncLROPoller[None]

Parameters

role_instance_name
str
Required

Name of the role instance.

resource_group_name
str
Required
cloud_service_name
str
Required
cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or AsyncPollingMethod

By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

Exceptions

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) -> azure.core.polling._async_poller.AsyncLROPoller[None]

Parameters

role_instance_name
str
Required

Name of the role instance.

resource_group_name
str
Required
cloud_service_name
str
Required
cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or AsyncPollingMethod

By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

Exceptions

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) -> azure.core.polling._async_poller.AsyncLROPoller[None]

Parameters

role_instance_name
str
Required

Name of the role instance.

resource_group_name
str
Required
cloud_service_name
str
Required
cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or AsyncPollingMethod

By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

Exceptions

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) -> azure.core.polling._async_poller.AsyncLROPoller[None]

Parameters

role_instance_name
str
Required

Name of the role instance.

resource_group_name
str
Required
cloud_service_name
str
Required
cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or AsyncPollingMethod

By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

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

Return type

Exceptions

get

Gets a role instance from a cloud service.

async get(role_instance_name: str, resource_group_name: str, cloud_service_name: str, expand: Optional[Union[str, azure.mgmt.compute.v2021_03_01.models._compute_management_client_enums.InstanceViewTypes]] = None, **kwargs: Any) -> azure.mgmt.compute.v2021_03_01.models._models_py3.RoleInstance

Parameters

role_instance_name
str
Required

Name of the role instance.

resource_group_name
str
Required
cloud_service_name
str
Required
expand
str or InstanceViewTypes
default value: None

The expand expression to apply to the operation. 'UserData' is not supported for cloud services.

cls
callable

A custom type or function that will be passed the direct response

Returns

RoleInstance, or the result of cls(response)

Return type

Exceptions

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) -> azure.mgmt.compute.v2021_03_01.models._models_py3.RoleInstanceView

Parameters

role_instance_name
str
Required

Name of the role instance.

resource_group_name
str
Required
cloud_service_name
str
Required
cls
callable

A custom type or function that will be passed the direct response

Returns

RoleInstanceView, or the result of cls(response)

Return type

Exceptions

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) -> IO

Parameters

role_instance_name
str
Required

Name of the role instance.

resource_group_name
str
Required
cloud_service_name
str
Required
cls
callable

A custom type or function that will be passed the direct response

Returns

IO, or the result of cls(response)

Return type

<xref:IO>

Exceptions

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: Optional[Union[str, azure.mgmt.compute.v2021_03_01.models._compute_management_client_enums.InstanceViewTypes]] = None, **kwargs: Any) -> AsyncIterable[azure.mgmt.compute.v2021_03_01.models._models_py3.RoleInstanceListResult]

Parameters

resource_group_name
str
Required
cloud_service_name
str
Required
expand
str or InstanceViewTypes
default value: None

The expand expression to apply to the operation. 'UserData' is not supported for cloud services.

cls
callable

A custom type or function that will be passed the direct response

Returns

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

Return type

Exceptions

Attributes

models

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