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-04-01

URI Parameters

Name In Required Type Description
containerName
path True

string

Site Container Name

Regex pattern: (^[a-zA-Z0-9]$)|(^[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]$)

name
path True

string

Name of the app.

resourceGroupName
path True

string

Name of the resource group to which the resource belongs.

Regex pattern: ^[-\w\._\(\)]+[^\.]$

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.

subscriptionId
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

true if the container is the main site container; false otherwise.

kind

string

Kind of resource.

properties.authType

AuthType

Auth Type

properties.environmentVariables

EnvironmentVariable[]

List of environment variables

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

VolumeMount[]

List of volume mounts

Responses

Name Type Description
200 OK

SiteContainer

Site container was updated.

201 Created

SiteContainer

Site container was created.

Other Status Codes

DefaultErrorResponse

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
AuthType

Auth Type

DefaultErrorResponse

App Service error response.

Details
EnvironmentVariable
Error

Error model.

SiteContainer

Container of a site

VolumeMount

AuthType

Auth Type

Name Type Description
Anonymous

string

SystemIdentity

string

UserAssigned

string

UserCredentials

string

DefaultErrorResponse

App Service error response.

Name Type Description
error

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

Environment variable value

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

AuthType

Auth Type

properties.createdTime

string

Created Time

properties.environmentVariables

EnvironmentVariable[]

List of environment variables

properties.image

string

Image Name

properties.isMain

boolean

true if the container is the main site container; false otherwise.

properties.lastModifiedTime

string

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

VolumeMount[]

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.