Class CreateOrUpdateFunctionAppTask
- java.lang.Object
-
- com.microsoft.azure.toolkit.lib.common.operation.OperationBase
-
- com.microsoft.azure.toolkit.lib.common.task.AzureTask<FunctionAppBase<?,?,?>>
-
- com.microsoft.azure.toolkit.lib.appservice.task.CreateOrUpdateFunctionAppTask
-
- All Implemented Interfaces:
com.microsoft.azure.toolkit.lib.common.operation.Operation
public class CreateOrUpdateFunctionAppTask extends com.microsoft.azure.toolkit.lib.common.task.AzureTask<FunctionAppBase<?,?,?>>
-
-
Field Summary
Fields Modifier and Type Field Description static StringAPPINSIGHTS_INSTRUMENTATION_KEYprivate static StringAPPLICATION_INSIGHTS_CREATE_FAILEDprivate AppServicePlanappServicePlanprivate static StringCUSTOMIZED_FUNCTIONS_WORKER_RUNTIME_WARNINGstatic JavaVersionDEFAULT_FUNCTION_JAVA_VERSIONprivate static StringFUNCTION_APP_NOT_EXIST_FOR_SLOTprivate FunctionAppBase<?,?,?>functionAppprivate FunctionAppConfigfunctionAppConfigprivate static StringFUNCTIONS_EXTENSION_VERSION_NAMEprivate static StringFUNCTIONS_EXTENSION_VERSION_VALUEprivate static StringFUNCTIONS_WORKER_RUNTIME_NAMEprivate static StringFUNCTIONS_WORKER_RUNTIME_VALUEprivate StringinstrumentationKeyprivate com.microsoft.azure.toolkit.lib.resource.ResourceGroupresourceGroupprivate static StringSET_FUNCTIONS_EXTENSION_VERSIONprivate static StringSET_FUNCTIONS_WORKER_RUNTIMEprivate List<com.microsoft.azure.toolkit.lib.common.task.AzureTask<?>>tasks
-
Constructor Summary
Constructors Constructor Description CreateOrUpdateFunctionAppTask(FunctionAppConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FunctionAppBase<?,?,?>doExecute()private com.microsoft.azure.toolkit.lib.common.task.AzureTask<com.microsoft.azure.toolkit.lib.applicationinsights.ApplicationInsight>getApplicationInsightsTask()private com.microsoft.azure.toolkit.lib.common.task.AzureTask<FunctionApp>getCreateFunctionAppTask(FunctionAppDraft draft)private com.microsoft.azure.toolkit.lib.common.task.AzureTask<FunctionAppDeploymentSlot>getCreateFunctionSlotTask(FunctionAppDeploymentSlotDraft draft)private DockerConfigurationgetDockerConfiguration(RuntimeConfig runtime)private FunctionAppDeploymentSlotDraftgetFunctionDeploymentSlot(FunctionApp functionApp)private com.microsoft.azure.toolkit.lib.resource.task.CreateResourceGroupTaskgetResourceGroupTask()private RuntimegetRuntime(RuntimeConfig runtime)private com.microsoft.azure.toolkit.lib.common.task.AzureTask<AppServicePlan>getServicePlanTask()private com.microsoft.azure.toolkit.lib.common.task.AzureTask<FunctionApp>getUpdateFunctionAppTask(FunctionAppDraft draft)private com.microsoft.azure.toolkit.lib.common.task.AzureTask<FunctionAppDeploymentSlot>getUpdateFunctionSlotTask(FunctionAppDeploymentSlotDraft draft)private voidinitTasks()private Map<String,String>processAppSettingsWithDefaultValue()private <T> voidregisterSubTask(com.microsoft.azure.toolkit.lib.common.task.AzureTask<T> task, java.util.function.Consumer<T> consumer)private voidsetDefaultAppSetting(Map<String,String> result, String settingName, String settingIsEmptyMessage, String defaultValue, String warningMessage)-
Methods inherited from class com.microsoft.azure.toolkit.lib.common.task.AzureTask
execute, getBackgrounded, getBody, getDescription, getExecutionId, getId, getModality, getMonitor, getProject, getType, isBackgroundable, isCancellable, setBackgroundable, setBackgrounded, setMonitor, setType, toString
-
Methods inherited from class com.microsoft.azure.toolkit.lib.common.operation.OperationBase
getContext, getParent, setParent
-
-
-
-
Field Detail
-
APPINSIGHTS_INSTRUMENTATION_KEY
public static final String APPINSIGHTS_INSTRUMENTATION_KEY
- See Also:
- Constant Field Values
-
APPLICATION_INSIGHTS_CREATE_FAILED
private static final String APPLICATION_INSIGHTS_CREATE_FAILED
- See Also:
- Constant Field Values
-
FUNCTIONS_WORKER_RUNTIME_NAME
private static final String FUNCTIONS_WORKER_RUNTIME_NAME
- See Also:
- Constant Field Values
-
FUNCTIONS_WORKER_RUNTIME_VALUE
private static final String FUNCTIONS_WORKER_RUNTIME_VALUE
- See Also:
- Constant Field Values
-
SET_FUNCTIONS_WORKER_RUNTIME
private static final String SET_FUNCTIONS_WORKER_RUNTIME
- See Also:
- Constant Field Values
-
CUSTOMIZED_FUNCTIONS_WORKER_RUNTIME_WARNING
private static final String CUSTOMIZED_FUNCTIONS_WORKER_RUNTIME_WARNING
- See Also:
- Constant Field Values
-
FUNCTIONS_EXTENSION_VERSION_NAME
private static final String FUNCTIONS_EXTENSION_VERSION_NAME
- See Also:
- Constant Field Values
-
FUNCTIONS_EXTENSION_VERSION_VALUE
private static final String FUNCTIONS_EXTENSION_VERSION_VALUE
- See Also:
- Constant Field Values
-
SET_FUNCTIONS_EXTENSION_VERSION
private static final String SET_FUNCTIONS_EXTENSION_VERSION
- See Also:
- Constant Field Values
-
FUNCTION_APP_NOT_EXIST_FOR_SLOT
private static final String FUNCTION_APP_NOT_EXIST_FOR_SLOT
- See Also:
- Constant Field Values
-
DEFAULT_FUNCTION_JAVA_VERSION
public static final JavaVersion DEFAULT_FUNCTION_JAVA_VERSION
-
functionAppConfig
private final FunctionAppConfig functionAppConfig
-
tasks
private final List<com.microsoft.azure.toolkit.lib.common.task.AzureTask<?>> tasks
-
resourceGroup
private com.microsoft.azure.toolkit.lib.resource.ResourceGroup resourceGroup
-
appServicePlan
private AppServicePlan appServicePlan
-
instrumentationKey
private String instrumentationKey
-
functionApp
private FunctionAppBase<?,?,?> functionApp
-
-
Constructor Detail
-
CreateOrUpdateFunctionAppTask
public CreateOrUpdateFunctionAppTask(@Nonnull FunctionAppConfig config)
-
-
Method Detail
-
initTasks
private void initTasks()
-
registerSubTask
private <T> void registerSubTask(com.microsoft.azure.toolkit.lib.common.task.AzureTask<T> task, java.util.function.Consumer<T> consumer)
-
getCreateFunctionAppTask
private com.microsoft.azure.toolkit.lib.common.task.AzureTask<FunctionApp> getCreateFunctionAppTask(FunctionAppDraft draft)
-
setDefaultAppSetting
private void setDefaultAppSetting(Map<String,String> result, String settingName, String settingIsEmptyMessage, String defaultValue, String warningMessage)
-
getUpdateFunctionAppTask
private com.microsoft.azure.toolkit.lib.common.task.AzureTask<FunctionApp> getUpdateFunctionAppTask(FunctionAppDraft draft)
-
getCreateFunctionSlotTask
private com.microsoft.azure.toolkit.lib.common.task.AzureTask<FunctionAppDeploymentSlot> getCreateFunctionSlotTask(FunctionAppDeploymentSlotDraft draft)
-
getUpdateFunctionSlotTask
private com.microsoft.azure.toolkit.lib.common.task.AzureTask<FunctionAppDeploymentSlot> getUpdateFunctionSlotTask(FunctionAppDeploymentSlotDraft draft)
-
getFunctionDeploymentSlot
private FunctionAppDeploymentSlotDraft getFunctionDeploymentSlot(FunctionApp functionApp)
-
getApplicationInsightsTask
private com.microsoft.azure.toolkit.lib.common.task.AzureTask<com.microsoft.azure.toolkit.lib.applicationinsights.ApplicationInsight> getApplicationInsightsTask()
-
getResourceGroupTask
private com.microsoft.azure.toolkit.lib.resource.task.CreateResourceGroupTask getResourceGroupTask()
-
getServicePlanTask
private com.microsoft.azure.toolkit.lib.common.task.AzureTask<AppServicePlan> getServicePlanTask()
-
getRuntime
private Runtime getRuntime(RuntimeConfig runtime)
-
getDockerConfiguration
private DockerConfiguration getDockerConfiguration(RuntimeConfig runtime)
-
doExecute
public FunctionAppBase<?,?,?> doExecute() throws Exception
- Overrides:
doExecutein classcom.microsoft.azure.toolkit.lib.common.task.AzureTask<FunctionAppBase<?,?,?>>- Throws:
Exception
-
-