public abstract class AbstractFunctionMojo extends AbstractAppServiceMojo
AbstractAzureMojo.DefaultUncaughtExceptionHandler, AbstractAzureMojo.RunnableWithException| Modifier and Type | Field and Description |
|---|---|
protected Integer |
alwaysReadyInstances |
protected String |
appInsightsInstance
Name of the application insight instance, must be in the same resource group with function app.
|
protected String |
appInsightsKey
Instrumentation key of the application insights instance
|
protected String |
artifactPath
Path for the artifact to package and deploy
|
protected static String |
AZURE_FUNCTIONS_JAVA_LIBRARY |
protected static String |
CAN_NOT_FIND_ARTIFACT |
private static String |
DISABLE_APP_INSIGHTS_KEY |
protected Boolean |
disableAppInsights
Boolean flag to monitor the Function App with application insights
|
protected Boolean |
enableDistributedTracing
Boolean flag to control whether to enable distributed tracing for function app
|
protected String |
environment
Name of the container app environment.
|
protected String |
finalName |
private static String |
FUNCTION_DEPLOY_TO_SLOT_KEY |
protected static Map<FunctionExtensionVersion,Set<Integer>> |
FUNCTION_EXTENSION_LIBRARY_MAP |
private static String |
FUNCTION_IS_DOCKER_KEY |
private static String |
FUNCTION_JAVA_VERSION_KEY |
private static String |
FUNCTION_PRICING_KEY |
private static String |
FUNCTION_REGION_KEY |
private static String |
FUNCTION_RUNTIME_KEY |
protected static String |
HOST_JSON |
protected String |
hostJson
Path for host.json file
|
protected Integer |
instanceSize |
protected static String |
LOCAL_SETTINGS_JSON |
protected String |
localSettingsJson
Path for local.settings.json file
|
protected Integer |
maximumInstances |
protected Integer |
maxReplicas
The maximum number of replicas when create function app on container app.
|
protected Integer |
minReplicas
The minimum number of replicas when create function app on container app.
|
protected File |
outputDirectory |
protected ConfigParser |
parser |
protected String |
pricingTier
Pricing for function app
|
protected String |
region
Region for function app
Supported values: westus, westus2, eastus, eastus2, northcentralus, southcentralus, westcentralus, canadacentral, canadaeast, brazilsouth, northeurope,
westeurope, uksouth, eastasia, southeastasia, japaneast, japanwest, australiaeast, australiasoutheast, centralindia, southindia ...
|
protected RuntimeConfiguration |
runtime
Runtime environment of function app
|
protected Boolean |
skip
Boolean flag to skip the execution of maven plugin for azure functions
|
protected String |
storageAccountName
Name of the storage account.
|
protected String |
storageAccountResourceGroup
Resource group of storage account.
|
protected static String |
TRIGGER_TYPE |
appName, appServiceClient, appServicePlanName, appServicePlanResourceGroup, appSettings, deploymentSlotSetting, MAVEN_PLUGIN_POSTFIX, resourceGroupallowTelemetry, auth, authType, buildDirectory, COMPILE_LEVEL_NOT_SUPPORTED, FAILED_TO_GET_VALID_RUNTIMES, failsOnError, failsOnRuntimeValidationError, INSTALLATION_ID_KEY, mavenResourcesFiltering, plugin, PLUGIN_NAME_KEY, PLUGIN_VERSION_KEY, project, session, SESSION_ID_KEY, settings, settingsDecrypter, SUBSCRIPTION_ID_KEY, SUBSCRIPTION_NOT_FOUND, SUBSCRIPTION_TEMPLATE, subscriptionId, telemetries, telemetryProxy, USING_AZURE_ENVIRONMENT| Constructor and Description |
|---|
AbstractFunctionMojo() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAppInsightsInstance() |
String |
getAppInsightsKey() |
protected File |
getArtifact() |
protected FunctionExtensionVersion |
getBundleVersion() |
String |
getFinalName() |
protected String |
getFunctionLibraryVersion() |
protected File |
getHostJsonFile() |
protected File |
getLocalSettingsJsonFile() |
String |
getRegion() |
RuntimeConfiguration |
getRuntimeConfiguration() |
Map<String,String> |
getTelemetryProperties() |
boolean |
isDisableAppInsights() |
protected boolean |
isSkipMojo() |
protected com.fasterxml.jackson.databind.JsonNode |
readHostJson() |
protected void |
validateAppName() |
protected void |
validateFunctionCompatibility() |
getAppName, getAppServicePlanName, getAppServicePlanResourceGroup, getAppSettings, getDeploymentSlotSetting, getDeploymentStagingDirectoryPath, getResourceGroup, getResources, initAzureAppServiceClient, printCurrentSubscriptionafterMojoExecution, beforeMojoExecution, checkSubscription, doExecute, execute, executeWithTimeRecorder, getActualAuthType, getAllowTelemetry, getBuildDirectoryAbsolutePath, getCompileLevel, getFailsOnError, getFailsOnRuntimeValidationError, getInstallationId, getMavenResourcesFiltering, getPluginName, getPluginVersion, getProject, getSession, getSessionId, getSettings, getSubscriptionId, getTargetSubscriptionId, getTelemetries, getTelemetryProxy, getUserAgent, getValidRuntimes, highlightDefaultValue, infoWithMultipleLines, initTelemetryProxy, loginAzure, loginAzure, onMojoError, onSkipped, printCredentialDescription, selectSubscription, selectSubscription, trackMojoFailure, updateTelemetryProperties, validateArtifactCompileVersionprotected static final String HOST_JSON
protected static final String LOCAL_SETTINGS_JSON
protected static final String TRIGGER_TYPE
protected static final String AZURE_FUNCTIONS_JAVA_LIBRARY
protected static final String CAN_NOT_FIND_ARTIFACT
protected static final Map<FunctionExtensionVersion,Set<Integer>> FUNCTION_EXTENSION_LIBRARY_MAP
private static final String FUNCTION_JAVA_VERSION_KEY
private static final String DISABLE_APP_INSIGHTS_KEY
private static final String FUNCTION_RUNTIME_KEY
private static final String FUNCTION_IS_DOCKER_KEY
private static final String FUNCTION_REGION_KEY
private static final String FUNCTION_PRICING_KEY
private static final String FUNCTION_DEPLOY_TO_SLOT_KEY
@Parameter(defaultValue="${project.build.finalName}",
readonly=true,
required=true)
protected String finalName
@Parameter(defaultValue="${project.build.outputDirectory}",
readonly=true,
required=true)
protected File outputDirectory
@Parameter(property="functions.pricingTier") protected String pricingTier
Supported values : CONSUMPTION, B1, B2, B3, S1, S2, S3, P1V2, P2V2, P3V2, P1V3, P2V3, P3V3, EP1, EP2, EP3
@Parameter(property="functions.skip",
defaultValue="false")
protected Boolean skip
@Parameter(property="functions.region") protected String region
@Parameter(property="functions.runtime") protected RuntimeConfiguration runtime
Properties for Windows/Linux function app
<runtime>
<os>windows</os>
<javaVersion>Java 17</javaVersion>
</runtime>
Properties for Docker function app
<runtime>
<os>docker</os>
<image>[hub-user/]repo-name[:tag]</image>
<serverId></serverId>
<registryUrl></registryUrl> <!- could be omitted for docker hub images -->
</runtime>
@Parameter(property="functions.appInsightsInstance") protected String appInsightsInstance
@Parameter(property="functions.appInsightsKey") protected String appInsightsKey
@Parameter(property="functions.disableAppInsights",
defaultValue="false")
protected Boolean disableAppInsights
@Parameter(property="functions.enableDistributedTracing") protected Boolean enableDistributedTracing
@Parameter(property="functions.hostJson",
defaultValue="host.json")
protected String hostJson
@Parameter(property="functions.localSettingsJson",
defaultValue="local.settings.json")
protected String localSettingsJson
@Parameter(property="functions.artifact") protected String artifactPath
@Parameter protected Integer alwaysReadyInstances
@Parameter protected Integer instanceSize
@Parameter protected Integer maximumInstances
@Parameter protected String storageAccountName
@Parameter protected String storageAccountResourceGroup
@Parameter protected String environment
@Parameter protected Integer minReplicas
@Parameter protected Integer maxReplicas
protected final ConfigParser parser
public String getRegion()
protected boolean isSkipMojo()
isSkipMojo in class AbstractAzureMojopublic String getFinalName()
public String getAppInsightsInstance()
public String getAppInsightsKey()
public boolean isDisableAppInsights()
public RuntimeConfiguration getRuntimeConfiguration()
@Nonnull protected File getArtifact() throws com.microsoft.azure.toolkit.lib.common.exception.AzureToolkitRuntimeException
com.microsoft.azure.toolkit.lib.common.exception.AzureToolkitRuntimeExceptionprotected File getHostJsonFile()
protected File getLocalSettingsJsonFile()
protected void validateAppName()
protected void validateFunctionCompatibility()
@Nullable protected com.fasterxml.jackson.databind.JsonNode readHostJson()
@Nullable protected FunctionExtensionVersion getBundleVersion()
public Map<String,String> getTelemetryProperties()
getTelemetryProperties in class AbstractAzureMojoCopyright © 2024. All rights reserved.