FunctionApp.DefinitionStages.WithCredentials Interface

public static interface FunctionApp.DefinitionStages.WithCredentials

A function app definition allowing docker registry credentials to be set.

Method Summary

Modifier and Type Method and Description
abstract WithCreate withCredentials(String username, String password)

Specifies the username and password for Docker Hub.

default WithCreate withManagedIdentityCredentials()

Specifies that the function app's system-assigned managed identity is used to authenticate (pull) the image from the container registry, instead of a username and password.

default WithCreate withManagedIdentityCredentials(String userAssignedManagedIdentityClientId)

Specifies that the given user-assigned managed identity is used to authenticate (pull) the image from the container registry, instead of a username and password.

Method Details

withCredentials

public abstract FunctionApp.DefinitionStages.WithCreate withCredentials(String username, String password)

Specifies the username and password for Docker Hub.

Parameters:

username - the username for Docker Hub
password - the password for Docker Hub

Returns:

the next stage of the web app update

withManagedIdentityCredentials

public default FunctionApp.DefinitionStages.WithCreate withManagedIdentityCredentials()

Specifies that the function app's system-assigned managed identity is used to authenticate (pull) the image from the container registry, instead of a username and password. This is the recommended, passwordless way to pull from Azure Container Registry: enable the app's system-assigned managed identity and grant it the AcrPull role on the registry.

Returns:

the next stage of the definition

withManagedIdentityCredentials

public default FunctionApp.DefinitionStages.WithCreate withManagedIdentityCredentials(String userAssignedManagedIdentityClientId)

Specifies that the given user-assigned managed identity is used to authenticate (pull) the image from the container registry, instead of a username and password. This is the recommended, passwordless way to pull from Azure Container Registry: assign the user-assigned managed identity to the app and grant it the AcrPull role on the registry.

Parameters:

userAssignedManagedIdentityClientId - the client ID of the user-assigned managed identity

Returns:

the next stage of the definition

Applies to