共用方式為


StaticSiteBuildUserProvidedFunctionAppCollection.CreateOrUpdateAsync Method

Definition

Description for Register a user provided function app with a static site build

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}
  • Operation Id: StaticSites_RegisterUserProvidedFunctionAppWithStaticSiteBuild
  • Default Api Version: 2024-04-01
  • Resource: StaticSiteBuildUserProvidedFunctionAppResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.AppService.StaticSiteBuildUserProvidedFunctionAppResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string functionAppName, Azure.ResourceManager.AppService.StaticSiteUserProvidedFunctionAppData data, bool? isForced = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.AppService.StaticSiteUserProvidedFunctionAppData * Nullable<bool> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.AppService.StaticSiteBuildUserProvidedFunctionAppResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.AppService.StaticSiteUserProvidedFunctionAppData * Nullable<bool> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.AppService.StaticSiteBuildUserProvidedFunctionAppResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, functionAppName As String, data As StaticSiteUserProvidedFunctionAppData, Optional isForced As Nullable(Of Boolean) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of StaticSiteBuildUserProvidedFunctionAppResource))

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

functionAppName
String

Name of the function app to register with the static site build.

data
StaticSiteUserProvidedFunctionAppData

A JSON representation of the user provided function app properties. See example.

isForced
Nullable<Boolean>

Specify <code>true</code> to force the update of the auth configuration on the function app even if an AzureStaticWebApps provider is already configured on the function app. The default is <code>false</code>.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

functionAppName is an empty string, and was expected to be non-empty.

functionAppName or data is null.

Applies to