Class FunctionAppDraft
- java.lang.Object
-
- com.microsoft.azure.toolkit.lib.common.model.AbstractAzResource<T,P,com.azure.resourcemanager.appservice.models.WebSiteBase>
-
- com.microsoft.azure.toolkit.lib.appservice.AppServiceAppBase<T,P,F>
-
- com.microsoft.azure.toolkit.lib.appservice.function.FunctionAppBase<FunctionApp,AppServiceServiceSubscription,com.azure.resourcemanager.appservice.models.FunctionApp>
-
- com.microsoft.azure.toolkit.lib.appservice.function.FunctionApp
-
- com.microsoft.azure.toolkit.lib.appservice.function.FunctionAppDraft
-
- All Implemented Interfaces:
com.microsoft.azure.toolkit.lib.common.model.AzResource,com.microsoft.azure.toolkit.lib.common.model.AzResource.Draft<FunctionApp,com.azure.resourcemanager.appservice.models.WebSiteBase>,com.microsoft.azure.toolkit.lib.common.model.AzResourceBase,com.microsoft.azure.toolkit.lib.common.model.Deletable,com.microsoft.azure.toolkit.lib.common.model.Refreshable,com.microsoft.azure.toolkit.lib.common.model.Startable
public class FunctionAppDraft extends FunctionApp implements com.microsoft.azure.toolkit.lib.common.model.AzResource.Draft<FunctionApp,com.azure.resourcemanager.appservice.models.WebSiteBase>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classFunctionAppDraft.Confignullmeans not modified for properties-
Nested classes/interfaces inherited from interface com.microsoft.azure.toolkit.lib.common.model.AzResource
com.microsoft.azure.toolkit.lib.common.model.AzResource.Draft<T extends com.microsoft.azure.toolkit.lib.common.model.AzResource,R extends Object>, com.microsoft.azure.toolkit.lib.common.model.AzResource.None, com.microsoft.azure.toolkit.lib.common.model.AzResource.Status
-
-
Field Summary
Fields Modifier and Type Field Description static StringAPP_SETTING_DISABLE_WEBSITES_APP_SERVICE_STORAGEstatic StringAPP_SETTING_FUNCTION_APP_EDIT_MODEstatic StringAPP_SETTING_FUNCTION_APP_EDIT_MODE_READONLYstatic StringAPP_SETTING_MACHINEKEY_DECRYPTION_KEYstatic StringAPP_SETTING_WEBSITES_ENABLE_APP_SERVICE_STORAGEstatic StringCAN_NOT_UPDATE_EXISTING_APP_SERVICE_OSprivate FunctionAppDraft.Configconfigprivate static StringCREATE_NEW_FUNCTION_APPstatic JavaVersionDEFAULT_JAVA_VERSIONstatic StringFUNCTIONS_EXTENSION_VERSIONprivate FunctionApporiginstatic StringUNSUPPORTED_OPERATING_SYSTEM-
Fields inherited from class com.microsoft.azure.toolkit.lib.appservice.function.FunctionAppBase
DEFAULT_REMOTE_DEBUG_JAVA_OPTS, DEFAULT_REMOTE_DEBUG_PORT, HTTP_PLATFORM_DEBUG_PORT, JAVA_OPTS, PREFER_IPV_4_STACK_TRUE, XDEBUG, XRUNJDWP
-
Fields inherited from class com.microsoft.azure.toolkit.lib.appservice.AppServiceAppBase
kuduManager
-
-
Constructor Summary
Constructors Constructor Description FunctionAppDraft(FunctionApp origin)FunctionAppDraft(String name, String resourceGroupName, FunctionAppModule module)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) com.azure.resourcemanager.appservice.models.FunctionApp.DefinitionStages.WithCreatecreateDockerApp(com.azure.resourcemanager.appservice.models.FunctionApp.DefinitionStages.Blank blank, AppServicePlan plan)com.azure.resourcemanager.appservice.models.FunctionAppcreateResourceInAzure()private FunctionAppDraft.ConfigensureConfig()protected StringgenerateDecryptionKey()AppServicePlangetAppServicePlan()Map<String,String>getAppSettings()Set<String>getAppSettingsToRemove()DiagnosticConfiggetDiagnosticConfig()DockerConfigurationgetDockerConfiguration()RuntimegetRuntime()booleanisModified()voidremoveAppSetting(String key)voidremoveAppSettings(Set<String> keys)voidreset()voidsetAppServicePlan(AppServicePlan plan)voidsetAppSetting(String key, String value)voidsetAppSettings(Map<String,String> appSettings)voidsetDiagnosticConfig(DiagnosticConfig config)voidsetDockerConfiguration(DockerConfiguration dockerConfiguration)voidsetRuntime(Runtime runtime)private voidupdateAppServicePlan(com.azure.resourcemanager.appservice.models.FunctionApp.Update update, AppServicePlan newPlan)private voidupdateDockerConfiguration(com.azure.resourcemanager.appservice.models.FunctionApp.Update update, DockerConfiguration newConfig)com.azure.resourcemanager.appservice.models.FunctionAppupdateResourceInAzure(com.azure.resourcemanager.appservice.models.WebSiteBase base)private voidupdateRuntime(com.azure.resourcemanager.appservice.models.FunctionApp.Update update, Runtime newRuntime, String funcExtVersion)-
Methods inherited from class com.microsoft.azure.toolkit.lib.appservice.function.FunctionApp
disableRemoteDebug, enableRemoteDebug, getMasterKey, getSubModules, listFunctionKeys, listFunctions, slots, swap, syncTriggers, triggerFunction
-
Methods inherited from class com.microsoft.azure.toolkit.lib.appservice.function.FunctionAppBase
deploy, deploy, getAdminClient, getDefaultDeployType, getDeployHandlerByType, getFileClient, getJavaOptsWithRemoteDebugDisabled, getJavaOptsWithRemoteDebugEnabled, getRemoteDebugPort, isRemoteDebugEnabled, ping, updateAdditionalProperties
-
Methods inherited from class com.microsoft.azure.toolkit.lib.appservice.AppServiceAppBase
createDirectory, deleteFile, execute, getAppServiceTunnelStatus, getFileByPath, getFileContent, getFilesInDirectory, getFullRemote, getHostName, getKuduHostName, getKuduManager, getLinuxFxVersion, getProcessClient, getPublishingProfile, getRegion, listProcess, listPublishingProfileXmlWithSecrets, loadStatus, refreshRemoteFromAzure, restart, start, stop, streamAllLogsAsync, uploadFileToPath
-
Methods inherited from class com.microsoft.azure.toolkit.lib.common.model.AbstractAzResource
canEqual, delete, deleteFromCache, doModify, doModify, equals, exists, getId, getModule, getName, getParent, getRemote, getResourceGroup, getResourceGroupName, getStatus, getSubModule, hashCode, invalidateCache, isDraft, isDraftForCreating, isDraftForUpdating, loadRemote, refresh, reloadStatus, remoteOptional, setRemote, setStatus, toString, update
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.microsoft.azure.toolkit.lib.common.model.AzResource
getFullResourceType, getPortalUrl, getResourceTypeName, getSubscription, getSubscriptionId, id, name
-
Methods inherited from interface com.microsoft.azure.toolkit.lib.common.model.AzResource.Draft
asResource, commit, createIfNotExist, getModule, getName, getOrigin, getResourceGroupName, updateIfExist
-
-
-
-
Field Detail
-
CREATE_NEW_FUNCTION_APP
private static final String CREATE_NEW_FUNCTION_APP
- See Also:
- Constant Field Values
-
FUNCTIONS_EXTENSION_VERSION
public static final String FUNCTIONS_EXTENSION_VERSION
- See Also:
- Constant Field Values
-
DEFAULT_JAVA_VERSION
public static final JavaVersion DEFAULT_JAVA_VERSION
-
UNSUPPORTED_OPERATING_SYSTEM
public static final String UNSUPPORTED_OPERATING_SYSTEM
- See Also:
- Constant Field Values
-
CAN_NOT_UPDATE_EXISTING_APP_SERVICE_OS
public static final String CAN_NOT_UPDATE_EXISTING_APP_SERVICE_OS
- See Also:
- Constant Field Values
-
APP_SETTING_MACHINEKEY_DECRYPTION_KEY
public static final String APP_SETTING_MACHINEKEY_DECRYPTION_KEY
- See Also:
- Constant Field Values
-
APP_SETTING_WEBSITES_ENABLE_APP_SERVICE_STORAGE
public static final String APP_SETTING_WEBSITES_ENABLE_APP_SERVICE_STORAGE
- See Also:
- Constant Field Values
-
APP_SETTING_DISABLE_WEBSITES_APP_SERVICE_STORAGE
public static final String APP_SETTING_DISABLE_WEBSITES_APP_SERVICE_STORAGE
- See Also:
- Constant Field Values
-
APP_SETTING_FUNCTION_APP_EDIT_MODE
public static final String APP_SETTING_FUNCTION_APP_EDIT_MODE
- See Also:
- Constant Field Values
-
APP_SETTING_FUNCTION_APP_EDIT_MODE_READONLY
public static final String APP_SETTING_FUNCTION_APP_EDIT_MODE_READONLY
- See Also:
- Constant Field Values
-
origin
@Nullable private final FunctionApp origin
-
config
@Nullable private FunctionAppDraft.Config config
-
-
Constructor Detail
-
FunctionAppDraft
FunctionAppDraft(@Nonnull String name, @Nonnull String resourceGroupName, @Nonnull FunctionAppModule module)
-
FunctionAppDraft
FunctionAppDraft(@Nonnull FunctionApp origin)
-
-
Method Detail
-
reset
public void reset()
- Specified by:
resetin interfacecom.microsoft.azure.toolkit.lib.common.model.AzResource.Draft<FunctionApp,com.azure.resourcemanager.appservice.models.WebSiteBase>
-
ensureConfig
@Nonnull private FunctionAppDraft.Config ensureConfig()
-
createResourceInAzure
@Nonnull public com.azure.resourcemanager.appservice.models.FunctionApp createResourceInAzure()
- Specified by:
createResourceInAzurein interfacecom.microsoft.azure.toolkit.lib.common.model.AzResource.Draft<FunctionApp,com.azure.resourcemanager.appservice.models.WebSiteBase>
-
createDockerApp
com.azure.resourcemanager.appservice.models.FunctionApp.DefinitionStages.WithCreate createDockerApp(@Nonnull com.azure.resourcemanager.appservice.models.FunctionApp.DefinitionStages.Blank blank, @Nonnull AppServicePlan plan)
-
generateDecryptionKey
protected String generateDecryptionKey()
-
updateResourceInAzure
@Nonnull public com.azure.resourcemanager.appservice.models.FunctionApp updateResourceInAzure(@Nonnull com.azure.resourcemanager.appservice.models.WebSiteBase base)
- Specified by:
updateResourceInAzurein interfacecom.microsoft.azure.toolkit.lib.common.model.AzResource.Draft<FunctionApp,com.azure.resourcemanager.appservice.models.WebSiteBase>
-
updateAppServicePlan
private void updateAppServicePlan(@Nonnull com.azure.resourcemanager.appservice.models.FunctionApp.Update update, @Nonnull AppServicePlan newPlan)
-
updateRuntime
private void updateRuntime(@Nonnull com.azure.resourcemanager.appservice.models.FunctionApp.Update update, @Nonnull Runtime newRuntime, String funcExtVersion)
-
updateDockerConfiguration
private void updateDockerConfiguration(@Nonnull com.azure.resourcemanager.appservice.models.FunctionApp.Update update, @Nonnull DockerConfiguration newConfig)
-
setRuntime
public void setRuntime(Runtime runtime)
-
getRuntime
@Nullable public Runtime getRuntime()
- Overrides:
getRuntimein classAppServiceAppBase<FunctionApp,AppServiceServiceSubscription,com.azure.resourcemanager.appservice.models.FunctionApp>
-
setAppServicePlan
public void setAppServicePlan(AppServicePlan plan)
-
getAppServicePlan
@Nullable public AppServicePlan getAppServicePlan()
- Overrides:
getAppServicePlanin classAppServiceAppBase<FunctionApp,AppServiceServiceSubscription,com.azure.resourcemanager.appservice.models.FunctionApp>
-
setDiagnosticConfig
public void setDiagnosticConfig(DiagnosticConfig config)
-
getDiagnosticConfig
@Nullable public DiagnosticConfig getDiagnosticConfig()
- Overrides:
getDiagnosticConfigin classAppServiceAppBase<FunctionApp,AppServiceServiceSubscription,com.azure.resourcemanager.appservice.models.FunctionApp>
-
getAppSettings
@Nullable public Map<String,String> getAppSettings()
- Overrides:
getAppSettingsin classAppServiceAppBase<FunctionApp,AppServiceServiceSubscription,com.azure.resourcemanager.appservice.models.FunctionApp>
-
removeAppSetting
public void removeAppSetting(String key)
-
setDockerConfiguration
public void setDockerConfiguration(DockerConfiguration dockerConfiguration)
-
getDockerConfiguration
@Nullable public DockerConfiguration getDockerConfiguration()
-
isModified
public boolean isModified()
- Specified by:
isModifiedin interfacecom.microsoft.azure.toolkit.lib.common.model.AzResource.Draft<FunctionApp,com.azure.resourcemanager.appservice.models.WebSiteBase>
-
-