or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

app-service-environments.mdapp-service-plans.mdapplication-configuration.mdcertificates-domains.mddeployment-management.mddiagnostics-monitoring.mdindex.mdkubernetes-environments.mdstatic-sites.mdweb-applications.mdworkflow-management.md

app-service-plans.mddocs/

0

# App Service Plans Management

1

2

Management of Azure App Service Plans that define the computing resources, scaling options, pricing tiers, and hosting environment for web applications. App Service Plans serve as the foundation for hosting web apps, providing the underlying infrastructure and resource allocation.

3

4

## Capabilities

5

6

### App Service Plan Lifecycle

7

8

Create, configure, update, and delete App Service Plans with various pricing tiers and resource specifications.

9

10

```python { .api }

11

def begin_create_or_update(

12

resource_group_name: str,

13

name: str,

14

app_service_plan: AppServicePlan,

15

**kwargs

16

) -> LROPoller[AppServicePlan]:

17

"""

18

Creates or updates an App Service Plan.

19

20

Parameters:

21

- resource_group_name (str): Name of the resource group

22

- name (str): Name of the App Service Plan

23

- app_service_plan (AppServicePlan): Plan configuration and properties

24

25

Returns:

26

LROPoller[AppServicePlan]: Long-running operation poller for the plan

27

"""

28

29

def get(

30

resource_group_name: str,

31

name: str,

32

**kwargs

33

) -> AppServicePlan:

34

"""

35

Gets details of a specific App Service Plan.

36

37

Parameters:

38

- resource_group_name (str): Name of the resource group

39

- name (str): Name of the App Service Plan

40

41

Returns:

42

AppServicePlan: App Service Plan details and configuration

43

"""

44

45

def delete(

46

resource_group_name: str,

47

name: str,

48

**kwargs

49

) -> None:

50

"""

51

Deletes an App Service Plan.

52

53

Parameters:

54

- resource_group_name (str): Name of the resource group

55

- name (str): Name of the App Service Plan

56

"""

57

58

def list(

59

detailed: Optional[bool] = None,

60

**kwargs

61

) -> List[AppServicePlan]:

62

"""

63

Lists all App Service Plans in the subscription.

64

65

Parameters:

66

- detailed (bool, optional): Include detailed information if true

67

68

Returns:

69

List[AppServicePlan]: List of all App Service Plans

70

"""

71

72

def list_by_resource_group(

73

resource_group_name: str,

74

**kwargs

75

) -> List[AppServicePlan]:

76

"""

77

Lists App Service Plans in a specific resource group.

78

79

Parameters:

80

- resource_group_name (str): Name of the resource group

81

82

Returns:

83

List[AppServicePlan]: List of App Service Plans in the resource group

84

"""

85

86

def update(

87

resource_group_name: str,

88

name: str,

89

app_service_plan: AppServicePlanPatchResource,

90

**kwargs

91

) -> AppServicePlan:

92

"""

93

Updates an existing App Service Plan.

94

95

Parameters:

96

- resource_group_name (str): Name of the resource group

97

- name (str): Name of the App Service Plan

98

- app_service_plan (AppServicePlanPatchResource): Properties to update

99

100

Returns:

101

AppServicePlan: Updated App Service Plan

102

"""

103

```

104

105

### Web Apps Management

106

107

Manage web applications within an App Service Plan including listing, restarting, and resource operations.

108

109

```python { .api }

110

def list_web_apps(

111

resource_group_name: str,

112

name: str,

113

skip_token: Optional[str] = None,

114

filter: Optional[str] = None,

115

top: Optional[str] = None,

116

**kwargs

117

) -> List[Site]:

118

"""

119

Lists web apps in an App Service Plan.

120

121

Parameters:

122

- resource_group_name (str): Name of the resource group

123

- name (str): Name of the App Service Plan

124

- skip_token (str, optional): Continuation token for paging

125

- filter (str, optional): OData filter expression

126

- top (str, optional): Maximum number of results to return

127

128

Returns:

129

List[Site]: List of web apps in the plan

130

"""

131

132

def restart_web_apps(

133

resource_group_name: str,

134

name: str,

135

soft_restart: Optional[bool] = None,

136

**kwargs

137

) -> None:

138

"""

139

Restarts all web apps in an App Service Plan.

140

141

Parameters:

142

- resource_group_name (str): Name of the resource group

143

- name (str): Name of the App Service Plan

144

- soft_restart (bool, optional): Perform soft restart if true

145

"""

146

```

147

148

### Plan Capabilities and Resources

149

150

Query available capabilities, SKUs, and resource utilization for App Service Plans.

151

152

```python { .api }

153

def list_capabilities(

154

resource_group_name: str,

155

name: str,

156

**kwargs

157

) -> List[Capability]:

158

"""

159

Lists capabilities available for an App Service Plan.

160

161

Parameters:

162

- resource_group_name (str): Name of the resource group

163

- name (str): Name of the App Service Plan

164

165

Returns:

166

List[Capability]: Available capabilities and features

167

"""

168

169

def list_usages(

170

resource_group_name: str,

171

name: str,

172

filter: Optional[str] = None,

173

**kwargs

174

) -> List[CsmUsageQuota]:

175

"""

176

Lists usage metrics for an App Service Plan.

177

178

Parameters:

179

- resource_group_name (str): Name of the resource group

180

- name (str): Name of the App Service Plan

181

- filter (str, optional): OData filter for specific metrics

182

183

Returns:

184

List[CsmUsageQuota]: Usage metrics and quotas

185

"""

186

187

def get_server_farm_skus(

188

resource_group_name: str,

189

name: str,

190

**kwargs

191

) -> List[Object]:

192

"""

193

Gets available SKUs for upgrading an App Service Plan.

194

195

Parameters:

196

- resource_group_name (str): Name of the resource group

197

- name (str): Name of the App Service Plan

198

199

Returns:

200

List[Object]: Available SKUs for the plan

201

"""

202

```

203

204

### Worker Management

205

206

Manage worker instances within an App Service Plan including rebooting and scaling operations.

207

208

```python { .api }

209

def reboot_worker(

210

resource_group_name: str,

211

name: str,

212

worker_name: str,

213

**kwargs

214

) -> None:

215

"""

216

Reboots a worker instance in an App Service Plan.

217

218

Parameters:

219

- resource_group_name (str): Name of the resource group

220

- name (str): Name of the App Service Plan

221

- worker_name (str): Name of the worker instance to reboot

222

"""

223

224

def list_workers(

225

resource_group_name: str,

226

name: str,

227

**kwargs

228

) -> List[WorkerPool]:

229

"""

230

Lists worker pools for an App Service Plan.

231

232

Parameters:

233

- resource_group_name (str): Name of the resource group

234

- name (str): Name of the App Service Plan

235

236

Returns:

237

List[WorkerPool]: Worker pools in the plan

238

"""

239

```

240

241

### Virtual Network Integration

242

243

Manage virtual network integration and hybrid connections for App Service Plans.

244

245

```python { .api }

246

def list_vnet_connections(

247

resource_group_name: str,

248

name: str,

249

**kwargs

250

) -> List[VnetInfo]:

251

"""

252

Lists virtual network connections for an App Service Plan.

253

254

Parameters:

255

- resource_group_name (str): Name of the resource group

256

- name (str): Name of the App Service Plan

257

258

Returns:

259

List[VnetInfo]: Virtual network connections

260

"""

261

262

def get_vnet_from_server_farm(

263

resource_group_name: str,

264

name: str,

265

vnet_name: str,

266

**kwargs

267

) -> VnetInfo:

268

"""

269

Gets virtual network connection details for an App Service Plan.

270

271

Parameters:

272

- resource_group_name (str): Name of the resource group

273

- name (str): Name of the App Service Plan

274

- vnet_name (str): Name of the virtual network

275

276

Returns:

277

VnetInfo: Virtual network connection details

278

"""

279

280

def list_hybrid_connections(

281

resource_group_name: str,

282

name: str,

283

**kwargs

284

) -> List[HybridConnection]:

285

"""

286

Lists hybrid connections for an App Service Plan.

287

288

Parameters:

289

- resource_group_name (str): Name of the resource group

290

- name (str): Name of the App Service Plan

291

292

Returns:

293

List[HybridConnection]: Hybrid connections configuration

294

"""

295

```

296

297

## Types

298

299

```python { .api }

300

class AppServicePlan:

301

"""Represents an App Service plan resource."""

302

id: Optional[str]

303

name: Optional[str]

304

type: Optional[str]

305

location: str

306

tags: Optional[Dict[str, str]]

307

sku: Optional[SkuDescription]

308

worker_tier_name: Optional[str]

309

status: Optional[StatusOptions]

310

subscription: Optional[str]

311

hosting_environment_profile: Optional[HostingEnvironmentProfile]

312

maximum_number_of_workers: Optional[int]

313

geo_region: Optional[str]

314

per_site_scaling: Optional[bool]

315

maximum_elastic_worker_count: Optional[int]

316

number_of_sites: Optional[int]

317

is_spot: Optional[bool]

318

spot_expiration_time: Optional[datetime]

319

free_offer_expiration_time: Optional[datetime]

320

resource_group: Optional[str]

321

reserved: Optional[bool]

322

is_xenon: Optional[bool]

323

hyper_v: Optional[bool]

324

target_worker_count: Optional[int]

325

target_worker_size_id: Optional[int]

326

327

class SkuDescription:

328

"""SKU description for App Service Plan."""

329

name: Optional[str]

330

tier: Optional[str]

331

size: Optional[str]

332

family: Optional[str]

333

capacity: Optional[int]

334

sku_capacity: Optional[SkuCapacity]

335

locations: Optional[List[str]]

336

location_info: Optional[List[ResourceSkuLocationInfo]]

337

capabilities: Optional[List[Capability]]

338

339

class SkuCapacity:

340

"""SKU capacity information."""

341

minimum: Optional[int]

342

maximum: Optional[int]

343

elastic_maximum: Optional[int]

344

default: Optional[int]

345

scale_type: Optional[str]

346

347

class HostingEnvironmentProfile:

348

"""App Service Environment profile."""

349

id: Optional[str]

350

name: Optional[str]

351

type: Optional[str]

352

353

class AppServicePlanPatchResource:

354

"""Properties for updating an App Service Plan."""

355

sku: Optional[SkuDescription]

356

worker_tier_name: Optional[str]

357

per_site_scaling: Optional[bool]

358

maximum_elastic_worker_count: Optional[int]

359

is_spot: Optional[bool]

360

spot_expiration_time: Optional[datetime]

361

free_offer_expiration_time: Optional[datetime]

362

reserved: Optional[bool]

363

is_xenon: Optional[bool]

364

hyper_v: Optional[bool]

365

target_worker_count: Optional[int]

366

target_worker_size_id: Optional[int]

367

368

class Capability:

369

"""Capability information."""

370

name: Optional[str]

371

value: Optional[str]

372

reason: Optional[str]

373

374

class CsmUsageQuota:

375

"""Usage quota information."""

376

unit: Optional[str]

377

next_reset_time: Optional[datetime]

378

current_value: Optional[int]

379

limit: Optional[int]

380

name: Optional[LocalizableString]

381

382

class LocalizableString:

383

"""Localizable string."""

384

value: Optional[str]

385

localized_value: Optional[str]

386

387

class WorkerPool:

388

"""Worker pool information."""

389

worker_size_code: Optional[int]

390

worker_size: Optional[str]

391

worker_count: Optional[int]

392

instance_names: Optional[List[str]]

393

394

class VnetInfo:

395

"""Virtual network information."""

396

vnet_resource_id: Optional[str]

397

cert_blob: Optional[str]

398

dns_servers: Optional[str]

399

is_swift: Optional[bool]

400

401

class HybridConnection:

402

"""Hybrid connection information."""

403

entity_name: Optional[str]

404

entity_connection_string: Optional[str]

405

resource_type: Optional[str]

406

resource_connection_string: Optional[str]

407

hostname: Optional[str]

408

port: Optional[int]

409

biztalk_uri: Optional[str]

410

```