Web Apps - Create Or Update Site Container Slot
Creates or Updates a site container for a site, or a deployment slot.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName}?api-version=2024-11-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
container
|
path | True |
string pattern: (^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]$) |
Site Container Name |
name
|
path | True |
string |
Name of the app. |
resource
|
path | True |
string minLength: 1maxLength: 90 pattern: ^[-\w\._\(\)]+[^\.]$ |
Name of the resource group to which the resource belongs. |
slot
|
path | True |
string |
Name of the deployment slot. If a slot is not specified, the API will create the container for the production slot. |
subscription
|
path | True |
string |
Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). |
api-version
|
query | True |
string |
API Version |
Request Body
Name | Required | Type | Description |
---|---|---|---|
properties.image | True |
string |
Image Name |
properties.isMain | True |
boolean |
|
kind |
string |
Kind of resource. |
|
properties.authType |
Auth Type |
||
properties.environmentVariables |
List of environment variables |
||
properties.inheritAppSettingsAndConnectionStrings |
boolean |
|
|
properties.passwordSecret |
string |
Password Secret |
|
properties.startUpCommand |
string |
StartUp Command |
|
properties.targetPort |
string |
Target Port |
|
properties.userManagedIdentityClientId |
string |
UserManagedIdentity ClientId |
|
properties.userName |
string |
User Name |
|
properties.volumeMounts |
List of volume mounts |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Site container was updated. |
|
201 Created |
Site container was created. |
|
Other Status Codes |
App Service error response. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Definitions
Name | Description |
---|---|
Auth |
Auth Type |
Default |
App Service error response. |
Details | |
Environment |
|
Error |
Error model. |
Site |
Container of a site |
Volume |
AuthType
Auth Type
Value | Description |
---|---|
Anonymous | |
SystemIdentity | |
UserAssigned | |
UserCredentials |
DefaultErrorResponse
App Service error response.
Name | Type | Description |
---|---|---|
error |
Error model. |
Details
Name | Type | Description |
---|---|---|
code |
string |
Standardized string to programmatically identify the error. |
message |
string |
Detailed error description and debugging information. |
target |
string |
Detailed error description and debugging information. |
EnvironmentVariable
Name | Type | Description |
---|---|---|
name |
string |
Environment variable name |
value |
string |
The value of this environment variable must be the name of an AppSetting. The actual value of the environment variable in container will be retrieved from the specified AppSetting at runtime. If the AppSetting is not found, the value will be set to an empty string in the container at runtime. |
Error
Error model.
Name | Type | Description |
---|---|---|
code |
string |
Standardized string to programmatically identify the error. |
details |
Details[] |
Detailed errors. |
innererror |
string |
More information to debug error. |
message |
string |
Detailed error description and debugging information. |
target |
string |
Detailed error description and debugging information. |
SiteContainer
Container of a site
Name | Type | Description |
---|---|---|
id |
string |
Resource Id. |
kind |
string |
Kind of resource. |
name |
string |
Resource Name. |
properties.authType |
Auth Type |
|
properties.createdTime |
string (date-time) |
Created Time |
properties.environmentVariables |
List of environment variables |
|
properties.image |
string |
Image Name |
properties.inheritAppSettingsAndConnectionStrings |
boolean |
|
properties.isMain |
boolean |
|
properties.lastModifiedTime |
string (date-time) |
Last Modified Time |
properties.passwordSecret |
string |
Password Secret |
properties.startUpCommand |
string |
StartUp Command |
properties.targetPort |
string |
Target Port |
properties.userManagedIdentityClientId |
string |
UserManagedIdentity ClientId |
properties.userName |
string |
User Name |
properties.volumeMounts |
List of volume mounts |
|
type |
string |
Resource type. |
VolumeMount
Name | Type | Description |
---|---|---|
containerMountPath |
string |
Target path on the container where volume is mounted on |
data |
string |
Config Data to be mounted on the volume |
readOnly |
boolean |
Boolean to specify if the mount is read only on the container |
volumeSubPath |
string |
Sub path in the volume where volume is mounted from. |