AppServicePlansOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

WebSiteManagementClient's

<xref:app_service_plans> attribute.

Constructor

AppServicePlansOperations(*args, **kwargs)

Methods

begin_create_or_update

Creates or updates an App Service Plan.

Description for Creates or updates an App Service Plan.

create_or_update_vnet_route

Create or update a Virtual Network route in an App Service plan.

Description for Create or update a Virtual Network route in an App Service plan.

delete

Delete an App Service plan.

Description for Delete an App Service plan.

delete_hybrid_connection

Delete a Hybrid Connection in use in an App Service plan.

Description for Delete a Hybrid Connection in use in an App Service plan.

delete_vnet_route

Delete a Virtual Network route in an App Service plan.

Description for Delete a Virtual Network route in an App Service plan.

get

Get an App Service plan.

Description for Get an App Service plan.

get_hybrid_connection

Retrieve a Hybrid Connection in use in an App Service plan.

Description for Retrieve a Hybrid Connection in use in an App Service plan.

get_hybrid_connection_plan_limit

Get the maximum number of Hybrid Connections allowed in an App Service plan.

Description for Get the maximum number of Hybrid Connections allowed in an App Service plan.

get_route_for_vnet

Get a Virtual Network route in an App Service plan.

Description for Get a Virtual Network route in an App Service plan.

get_server_farm_instance_details

Get the instance details for an app service plan.

Description for Get the instance details for an app service plan.

get_server_farm_rdp_password

Get the RDP password for an IsCustomMode ServerFarm.

Description for Get the RDP password for an IsCustomMode ServerFarm.

get_server_farm_skus

Gets all selectable SKUs for a given App Service Plan.

Description for Gets all selectable SKUs for a given App Service Plan.

get_vnet_from_server_farm

Get a Virtual Network associated with an App Service plan.

Description for Get a Virtual Network associated with an App Service plan.

get_vnet_gateway

Get a Virtual Network gateway.

Description for Get a Virtual Network gateway.

list

Get all App Service plans for a subscription.

Description for Get all App Service plans for a subscription.

list_by_resource_group

Get all App Service plans in a resource group.

Description for Get all App Service plans in a resource group.

list_capabilities

List all capabilities of an App Service plan.

Description for List all capabilities of an App Service plan.

list_hybrid_connection_keys

Get the send key name and value of a Hybrid Connection.

Description for Get the send key name and value of a Hybrid Connection.

list_hybrid_connections

Retrieve all Hybrid Connections in use in an App Service plan.

Description for Retrieve all Hybrid Connections in use in an App Service plan.

list_routes_for_vnet

Get all routes that are associated with a Virtual Network in an App Service plan.

Description for Get all routes that are associated with a Virtual Network in an App Service plan.

list_usages

Gets server farm usage information.

Description for Gets server farm usage information.

list_vnets

Get all Virtual Networks associated with an App Service plan.

Description for Get all Virtual Networks associated with an App Service plan.

list_web_apps

Get all apps associated with an App Service plan.

Description for Get all apps associated with an App Service plan.

list_web_apps_by_hybrid_connection

Get all apps that use a Hybrid Connection in an App Service Plan.

Description for Get all apps that use a Hybrid Connection in an App Service Plan.

reboot_worker

Reboot a worker machine in an App Service plan.

Description for Reboot a worker machine in an App Service plan.

recycle_managed_instance_worker

Recycles a managed instance worker machine.

Description for Recycles a managed instance worker machine.

restart_web_apps

Restart all apps in an App Service plan.

Description for Restart all apps in an App Service plan.

update

Creates or updates an App Service Plan.

Description for Creates or updates an App Service Plan.

update_vnet_gateway

Update a Virtual Network gateway.

Description for Update a Virtual Network gateway.

update_vnet_route

Create or update a Virtual Network route in an App Service plan.

Description for Create or update a Virtual Network route in an App Service plan.

begin_create_or_update

Creates or updates an App Service Plan.

Description for Creates or updates an App Service Plan.

begin_create_or_update(resource_group_name: str, name: str, app_service_plan: _models.AppServicePlan, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.AppServicePlan]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

Name of the App Service plan. Required.

app_service_plan
Required
AppServicePlan or <xref:JSON> or IO[bytes]

Details of the App Service plan. Is one of the following types: AppServicePlan, JSON, IO[bytes] Required.

Returns

Type Description

An instance of LROPoller that returns AppServicePlan. The AppServicePlan is compatible with MutableMapping

Exceptions

Type Description

create_or_update_vnet_route

Create or update a Virtual Network route in an App Service plan.

Description for Create or update a Virtual Network route in an App Service plan.

create_or_update_vnet_route(resource_group_name: str, name: str, vnet_name: str, route_name: str, route: _models.VnetRoute, *, content_type: str = 'application/json', **kwargs: Any) -> _models.VnetRoute

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

Name of the App Service plan. Required.

vnet_name
Required
str

Name of the Virtual Network. Required.

route_name
Required
str

Name of the Virtual Network route. Required.

route
Required
VnetRoute or <xref:JSON> or IO[bytes]

Definition of the Virtual Network route. Is one of the following types: VnetRoute, JSON, IO[bytes] Required.

Returns

Type Description

VnetRoute. The VnetRoute is compatible with MutableMapping

Exceptions

Type Description

delete

Delete an App Service plan.

Description for Delete an App Service plan.

delete(resource_group_name: str, name: str, **kwargs: Any) -> None

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

Name of the App Service plan. Required.

Returns

Type Description

None

Exceptions

Type Description

delete_hybrid_connection

Delete a Hybrid Connection in use in an App Service plan.

Description for Delete a Hybrid Connection in use in an App Service plan.

delete_hybrid_connection(resource_group_name: str, name: str, namespace_name: str, relay_name: str, **kwargs: Any) -> None

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

Name of the App Service plan. Required.

namespace_name
Required
str

Name of the Service Bus namespace. Required.

relay_name
Required
str

Name of the Service Bus relay. Required.

Returns

Type Description

None

Exceptions

Type Description

delete_vnet_route

Delete a Virtual Network route in an App Service plan.

Description for Delete a Virtual Network route in an App Service plan.

delete_vnet_route(resource_group_name: str, name: str, vnet_name: str, route_name: str, **kwargs: Any) -> None

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

Name of the App Service plan. Required.

vnet_name
Required
str

Name of the Virtual Network. Required.

route_name
Required
str

Name of the Virtual Network route. Required.

Returns

Type Description

None

Exceptions

Type Description

get

Get an App Service plan.

Description for Get an App Service plan.

get(resource_group_name: str, name: str, **kwargs: Any) -> AppServicePlan

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

Name of the App Service plan. Required.

Returns

Type Description

AppServicePlan. The AppServicePlan is compatible with MutableMapping

Exceptions

Type Description

get_hybrid_connection

Retrieve a Hybrid Connection in use in an App Service plan.

Description for Retrieve a Hybrid Connection in use in an App Service plan.

get_hybrid_connection(resource_group_name: str, name: str, namespace_name: str, relay_name: str, **kwargs: Any) -> HybridConnection

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

Name of the App Service plan. Required.

namespace_name
Required
str

Name of the Service Bus namespace. Required.

relay_name
Required
str

Name of the Service Bus relay. Required.

Returns

Type Description

HybridConnection. The HybridConnection is compatible with MutableMapping

Exceptions

Type Description

get_hybrid_connection_plan_limit

Get the maximum number of Hybrid Connections allowed in an App Service plan.

Description for Get the maximum number of Hybrid Connections allowed in an App Service plan.

get_hybrid_connection_plan_limit(resource_group_name: str, name: str, **kwargs: Any) -> HybridConnectionLimits

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

Name of the App Service plan. Required.

Returns

Type Description

HybridConnectionLimits. The HybridConnectionLimits is compatible with MutableMapping

Exceptions

Type Description

get_route_for_vnet

Get a Virtual Network route in an App Service plan.

Description for Get a Virtual Network route in an App Service plan.

get_route_for_vnet(resource_group_name: str, name: str, vnet_name: str, route_name: str, **kwargs: Any) -> list[azure.mgmt.web.models._models.VnetRoute]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

Name of the App Service plan. Required.

vnet_name
Required
str

Name of the Virtual Network. Required.

route_name
Required
str

Name of the Virtual Network route. Required.

Returns

Type Description

list of VnetRoute

Exceptions

Type Description

get_server_farm_instance_details

Get the instance details for an app service plan.

Description for Get the instance details for an app service plan.

get_server_farm_instance_details(resource_group_name: str, name: str, **kwargs: Any) -> ServerFarmInstanceDetails

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

Name of the App Service plan. Required.

Returns

Type Description

ServerFarmInstanceDetails. The ServerFarmInstanceDetails is compatible with MutableMapping

Exceptions

Type Description

get_server_farm_rdp_password

Get the RDP password for an IsCustomMode ServerFarm.

Description for Get the RDP password for an IsCustomMode ServerFarm.

get_server_farm_rdp_password(resource_group_name: str, name: str, **kwargs: Any) -> ServerFarmRdpDetails

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

Name of the App Service plan. Required.

Returns

Type Description

ServerFarmRdpDetails. The ServerFarmRdpDetails is compatible with MutableMapping

Exceptions

Type Description

get_server_farm_skus

Gets all selectable SKUs for a given App Service Plan.

Description for Gets all selectable SKUs for a given App Service Plan.

get_server_farm_skus(resource_group_name: str, name: str, **kwargs: Any) -> Any

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

Name of the App Service plan. Required.

Returns

Type Description
any

any

Exceptions

Type Description

get_vnet_from_server_farm

Get a Virtual Network associated with an App Service plan.

Description for Get a Virtual Network associated with an App Service plan.

get_vnet_from_server_farm(resource_group_name: str, name: str, vnet_name: str, **kwargs: Any) -> VnetInfoResource

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

Name of the App Service plan. Required.

vnet_name
Required
str

Name of the Virtual Network. Required.

Returns

Type Description

VnetInfoResource. The VnetInfoResource is compatible with MutableMapping

Exceptions

Type Description

get_vnet_gateway

Get a Virtual Network gateway.

Description for Get a Virtual Network gateway.

get_vnet_gateway(resource_group_name: str, name: str, vnet_name: str, gateway_name: str, **kwargs: Any) -> VnetGateway

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

Name of the App Service plan. Required.

vnet_name
Required
str

Name of the Virtual Network. Required.

gateway_name
Required
str

Name of the gateway. Only the 'primary' gateway is supported. Required.

Returns

Type Description

VnetGateway. The VnetGateway is compatible with MutableMapping

Exceptions

Type Description

list

Get all App Service plans for a subscription.

Description for Get all App Service plans for a subscription.

list(*, detailed: bool | None = None, **kwargs: Any) -> ItemPaged[AppServicePlan]

Keyword-Only Parameters

Name Description
detailed

Specify true to return all App Service plan properties. The default is false, which returns a subset of the properties. Retrieval of all properties may increase the API latency. Default value is None.

Default value: None

Returns

Type Description

An iterator like instance of AppServicePlan

Exceptions

Type Description

list_by_resource_group

Get all App Service plans in a resource group.

Description for Get all App Service plans in a resource group.

list_by_resource_group(resource_group_name: str, **kwargs: Any) -> ItemPaged[AppServicePlan]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

Returns

Type Description

An iterator like instance of AppServicePlan

Exceptions

Type Description

list_capabilities

List all capabilities of an App Service plan.

Description for List all capabilities of an App Service plan.

list_capabilities(resource_group_name: str, name: str, **kwargs: Any) -> list[azure.mgmt.web.models._models.Capability]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

Name of the App Service plan. Required.

Returns

Type Description

list of Capability

Exceptions

Type Description

list_hybrid_connection_keys

Get the send key name and value of a Hybrid Connection.

Description for Get the send key name and value of a Hybrid Connection.

list_hybrid_connection_keys(resource_group_name: str, name: str, namespace_name: str, relay_name: str, **kwargs: Any) -> HybridConnectionKey

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

Name of the App Service plan. Required.

namespace_name
Required
str

Name of the Service Bus namespace. Required.

relay_name
Required
str

Name of the Service Bus relay. Required.

Returns

Type Description

HybridConnectionKey. The HybridConnectionKey is compatible with MutableMapping

Exceptions

Type Description

list_hybrid_connections

Retrieve all Hybrid Connections in use in an App Service plan.

Description for Retrieve all Hybrid Connections in use in an App Service plan.

list_hybrid_connections(resource_group_name: str, name: str, **kwargs: Any) -> ItemPaged[HybridConnection]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

Name of the App Service plan. Required.

Returns

Type Description

An iterator like instance of HybridConnection

Exceptions

Type Description

list_routes_for_vnet

Get all routes that are associated with a Virtual Network in an App Service plan.

Description for Get all routes that are associated with a Virtual Network in an App Service plan.

list_routes_for_vnet(resource_group_name: str, name: str, vnet_name: str, **kwargs: Any) -> list[azure.mgmt.web.models._models.VnetRoute]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

Name of the App Service plan. Required.

vnet_name
Required
str

Name of the Virtual Network. Required.

Returns

Type Description

list of VnetRoute

Exceptions

Type Description

list_usages

Gets server farm usage information.

Description for Gets server farm usage information.

list_usages(resource_group_name: str, name: str, *, filter: str | None = None, **kwargs: Any) -> ItemPaged[CsmUsageQuota]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

Name of the App Service plan. Required.

Keyword-Only Parameters

Name Description
filter
str

Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). Default value is None.

Default value: None

Returns

Type Description

An iterator like instance of CsmUsageQuota

Exceptions

Type Description

list_vnets

Get all Virtual Networks associated with an App Service plan.

Description for Get all Virtual Networks associated with an App Service plan.

list_vnets(resource_group_name: str, name: str, **kwargs: Any) -> list[azure.mgmt.web.models._models.VnetInfoResource]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

Name of the App Service plan. Required.

Returns

Type Description

list of VnetInfoResource

Exceptions

Type Description

list_web_apps

Get all apps associated with an App Service plan.

Description for Get all apps associated with an App Service plan.

list_web_apps(resource_group_name: str, name: str, *, skip_token: str | None = None, filter: str | None = None, top: str | None = None, **kwargs: Any) -> ItemPaged[Site]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

Name of the App Service plan. Required.

Keyword-Only Parameters

Name Description
skip_token
str

Skip to a web app in the list of webapps associated with app service plan. If specified, the resulting list will contain web apps starting from (including) the skipToken. Otherwise, the resulting list contains web apps from the start of the list. Default value is None.

Default value: None
filter
str

Supported filter: $filter=state eq running. Returns only web apps that are currently running. Default value is None.

Default value: None
top
str

List page size. If specified, results are paged. Default value is None.

Default value: None

Returns

Type Description

An iterator like instance of Site

Exceptions

Type Description

list_web_apps_by_hybrid_connection

Get all apps that use a Hybrid Connection in an App Service Plan.

Description for Get all apps that use a Hybrid Connection in an App Service Plan.

list_web_apps_by_hybrid_connection(resource_group_name: str, name: str, namespace_name: str, relay_name: str, **kwargs: Any) -> ItemPaged[str]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

Name of the App Service plan. Required.

namespace_name
Required
str

Name of the Service Bus namespace. Required.

relay_name
Required
str

Name of the Service Bus relay. Required.

Returns

Type Description

An iterator like instance of str

Exceptions

Type Description

reboot_worker

Reboot a worker machine in an App Service plan.

Description for Reboot a worker machine in an App Service plan.

reboot_worker(resource_group_name: str, name: str, worker_name: str, **kwargs: Any) -> None

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

App Service plan. Required.

worker_name
Required
str

Name of worker machine, which typically starts with RD. Required.

Returns

Type Description

None

Exceptions

Type Description

recycle_managed_instance_worker

Recycles a managed instance worker machine.

Description for Recycles a managed instance worker machine.

recycle_managed_instance_worker(resource_group_name: str, name: str, worker_name: str, **kwargs: Any) -> Operation

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

App Service plan. Required.

worker_name
Required
str

Name of worker machine, which typically starts with RD. Required.

Returns

Type Description

Operation. The Operation is compatible with MutableMapping

Exceptions

Type Description

restart_web_apps

Restart all apps in an App Service plan.

Description for Restart all apps in an App Service plan.

restart_web_apps(resource_group_name: str, name: str, *, soft_restart: bool | None = None, **kwargs: Any) -> None

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

Name of the App Service plan. Required.

Keyword-Only Parameters

Name Description
soft_restart

Specify true to perform a soft restart, applies the configuration settings and restarts the apps if necessary. The default is false, which always restarts and reprovisions the apps. Default value is None.

Default value: None

Returns

Type Description

None

Exceptions

Type Description

update

Creates or updates an App Service Plan.

Description for Creates or updates an App Service Plan.

update(resource_group_name: str, name: str, app_service_plan: _models.AppServicePlanPatchResource, *, content_type: str = 'application/json', **kwargs: Any) -> _models.AppServicePlan

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

Name of the App Service plan. Required.

app_service_plan
Required
AppServicePlanPatchResource or <xref:JSON> or IO[bytes]

Details of the App Service plan. Is one of the following types: AppServicePlanPatchResource, JSON, IO[bytes] Required.

Returns

Type Description

AppServicePlan. The AppServicePlan is compatible with MutableMapping

Exceptions

Type Description

update_vnet_gateway

Update a Virtual Network gateway.

Description for Update a Virtual Network gateway.

update_vnet_gateway(resource_group_name: str, name: str, vnet_name: str, gateway_name: str, connection_envelope: _models.VnetGateway, *, content_type: str = 'application/json', **kwargs: Any) -> _models.VnetGateway

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

Name of the App Service plan. Required.

vnet_name
Required
str

Name of the Virtual Network. Required.

gateway_name
Required
str

Name of the gateway. Only the 'primary' gateway is supported. Required.

connection_envelope
Required
VnetGateway or <xref:JSON> or IO[bytes]

Definition of the gateway. Is one of the following types: VnetGateway, JSON, IO[bytes] Required.

Returns

Type Description

VnetGateway. The VnetGateway is compatible with MutableMapping

Exceptions

Type Description

update_vnet_route

Create or update a Virtual Network route in an App Service plan.

Description for Create or update a Virtual Network route in an App Service plan.

update_vnet_route(resource_group_name: str, name: str, vnet_name: str, route_name: str, route: _models.VnetRoute, *, content_type: str = 'application/json', **kwargs: Any) -> _models.VnetRoute

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

name
Required
str

Name of the App Service plan. Required.

vnet_name
Required
str

Name of the Virtual Network. Required.

route_name
Required
str

Name of the Virtual Network route. Required.

route
Required
VnetRoute or <xref:JSON> or IO[bytes]

Definition of the Virtual Network route. Is one of the following types: VnetRoute, JSON, IO[bytes] Required.

Returns

Type Description

VnetRoute. The VnetRoute is compatible with MutableMapping

Exceptions

Type Description