@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api AppServicePlans API Client
@base https://management.azure.com
@version 2018-02-01
@auth OAuth2
@common_fields {subscriptionId: any # Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)., api-version: any # API Version, resourceGroupName: any # Name of the resource group to which the resource belongs.}
@endpoints 29
@hint download_for_search
@toc subscriptions(29)

@endpoint GET /subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms
@desc Get all App Service plans for a subscription.
@optional {detailed: any # 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.}
@returns(200) OK

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms
@desc Get all App Service plans in a resource group.
@returns(200) OK

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}
@desc Get an App Service plan.
@required {name: any # Name of the App Service plan.}
@returns(200) OK.
@errors {404: Not found.}

@endpoint PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}
@desc Creates or updates an App Service Plan.
@required {name: any # Name of the App Service plan., appServicePlan: any # Details of the App Service plan.}
@returns(200) OK.
@returns(201) Created.
@returns(202) Operation is in progress.

@endpoint DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}
@desc Delete an App Service plan.
@required {name: any # Name of the App Service plan.}
@returns(200) OK.
@returns(204) OK.

@endpoint PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}
@desc Creates or updates an App Service Plan.
@required {name: any # Name of the App Service plan., appServicePlan: map # Details of the App Service plan.}
@returns(200) OK.
@returns(202) Operation is in progress.

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities
@desc List all capabilities of an App Service plan.
@required {name: any # Name of the App Service plan.}
@returns(200) OK

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}
@desc Retrieve a Hybrid Connection in use in an App Service plan.
@required {name: any # Name of the App Service plan., namespaceName: any # Name of the Service Bus namespace., relayName: any # Name of the Service Bus relay.}
@returns(200) OK

@endpoint DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}
@desc Delete a Hybrid Connection in use in an App Service plan.
@required {name: any # Name of the App Service plan., namespaceName: any # Name of the Service Bus namespace., relayName: any # Name of the Service Bus relay.}
@returns(200) Successfully deleted hybrid connection
@returns(204) Hybrid connection does not exist

@endpoint POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys
@desc Get the send key name and value of a Hybrid Connection.
@required {name: any # Name of the App Service plan., namespaceName: any # The name of the Service Bus namespace., relayName: any # The name of the Service Bus relay.}
@returns(200) OK

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites
@desc Get all apps that use a Hybrid Connection in an App Service Plan.
@required {name: any # Name of the App Service plan., namespaceName: any # Name of the Hybrid Connection namespace., relayName: any # Name of the Hybrid Connection relay.}
@returns(200) OK

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit
@desc Get the maximum number of Hybrid Connections allowed in an App Service plan.
@required {name: any # Name of the App Service plan.}
@returns(200) OK

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays
@desc Retrieve all Hybrid Connections in use in an App Service plan.
@required {name: any # Name of the App Service plan.}
@returns(200) OK

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metricdefinitions
@desc Get metrics that can be queried for an App Service plan, and their definitions.
@required {name: any # Name of the App Service plan.}
@returns(200) OK

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metrics
@desc Get metrics for an App Service plan.
@required {name: any # Name of the App Service plan.}
@optional {details: any # Specify true to include instance details. The default is false., $filter: any # Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'.}
@returns(200) OK

@endpoint POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites
@desc Restart all apps in an App Service plan.
@required {name: any # Name of the App Service plan.}
@optional {softRestart: any # 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}
@returns(204) No Content

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites
@desc Get all apps associated with an App Service plan.
@required {name: any # Name of the App Service plan.}
@optional {$skipToken: any # 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, $filter: any # Supported filter: $filter=state eq running. Returns only web apps that are currently running, $top: any # List page size. If specified, results are paged.}
@returns(200) OK

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus
@desc Gets all selectable SKUs for a given App Service Plan
@required {name: any # Name of App Service Plan}
@returns(200) OK

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages
@desc Gets server farm usage information
@required {name: any # Name of App Service Plan}
@optional {$filter: any # Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2').}
@returns(200) OK

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections
@desc Get all Virtual Networks associated with an App Service plan.
@required {name: any # Name of the App Service plan.}
@returns(200) OK

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}
@desc Get a Virtual Network associated with an App Service plan.
@required {name: any # Name of the App Service plan., vnetName: any # Name of the Virtual Network.}
@returns(200) OK.
@errors {404: Virtual network could not be found.}

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}
@desc Get a Virtual Network gateway.
@required {name: any # Name of the App Service plan., vnetName: any # Name of the Virtual Network., gatewayName: any # Name of the gateway. Only the 'primary' gateway is supported.}
@returns(200) OK

@endpoint PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}
@desc Update a Virtual Network gateway.
@required {name: any # Name of the App Service plan., vnetName: any # Name of the Virtual Network., gatewayName: any # Name of the gateway. Only the 'primary' gateway is supported., connectionEnvelope: any # Definition of the gateway.}
@returns(200) OK

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes
@desc Get all routes that are associated with a Virtual Network in an App Service plan.
@required {name: any # Name of the App Service plan., vnetName: any # Name of the Virtual Network.}
@returns(200) OK

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}
@desc Get a Virtual Network route in an App Service plan.
@required {name: any # Name of the App Service plan., vnetName: any # Name of the Virtual Network., routeName: any # Name of the Virtual Network route.}
@returns(200) OK.
@errors {404: Specified route does not exist.}

@endpoint PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}
@desc Create or update a Virtual Network route in an App Service plan.
@required {name: any # Name of the App Service plan., vnetName: any # Name of the Virtual Network., routeName: any # Name of the Virtual Network route., route: any # Definition of the Virtual Network route.}
@returns(200) OK.
@errors {400: Invalid request. Ensure that required parameters are given, and that addresses and address spaces are valid., 404: Route not found.}

@endpoint DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}
@desc Delete a Virtual Network route in an App Service plan.
@required {name: any # Name of the App Service plan., vnetName: any # Name of the Virtual Network., routeName: any # Name of the Virtual Network route.}
@returns(200) Successfully deleted Virtual Network route.
@errors {404: Specified Virtual Network route does not exist.}

@endpoint PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}
@desc Create or update a Virtual Network route in an App Service plan.
@required {name: any # Name of the App Service plan., vnetName: any # Name of the Virtual Network., routeName: any # Name of the Virtual Network route., route: any # Definition of the Virtual Network route.}
@returns(200) OK.
@errors {400: Invalid request. Ensure that required parameters are given, and that addresses and address spaces are valid., 404: Route not found.}

@endpoint POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot
@desc Reboot a worker machine in an App Service plan.
@required {name: any # Name of the App Service plan., workerName: any # Name of worker machine, which typically starts with RD.}
@returns(204) No Content

@end
