Class MySqlServer
- java.lang.Object
-
- com.microsoft.azure.toolkit.lib.common.model.AbstractAzResource<MySqlServer,MySqlServiceSubscription,com.azure.resourcemanager.mysql.models.Server>
-
- com.microsoft.azure.toolkit.lib.mysql.single.MySqlServer
-
- All Implemented Interfaces:
com.microsoft.azure.toolkit.lib.common.model.AzComponent,com.microsoft.azure.toolkit.lib.common.model.AzResource,com.microsoft.azure.toolkit.lib.common.model.Deletable,com.microsoft.azure.toolkit.lib.common.model.Refreshable,com.microsoft.azure.toolkit.lib.common.model.Startable,com.microsoft.azure.toolkit.lib.database.entity.IDatabaseServer<MySqlDatabase>
- Direct Known Subclasses:
MySqlServerDraft
public class MySqlServer extends com.microsoft.azure.toolkit.lib.common.model.AbstractAzResource<MySqlServer,MySqlServiceSubscription,com.azure.resourcemanager.mysql.models.Server> implements com.microsoft.azure.toolkit.lib.common.model.Deletable, com.microsoft.azure.toolkit.lib.common.model.Startable, com.microsoft.azure.toolkit.lib.database.entity.IDatabaseServer<MySqlDatabase>
-
-
Nested Class Summary
-
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.FormalStatus, 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 private MySqlDatabaseModuledatabaseModuleprivate MySqlFirewallRuleModulefirewallRuleModule
-
Constructor Summary
Constructors Modifier Constructor Description protectedMySqlServer(com.azure.resourcemanager.mysql.models.Server remote, MySqlServerModule module)protectedMySqlServer(MySqlServer origin)copy constructorprotectedMySqlServer(String name, String resourceGroup, MySqlServerModule module)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MySqlDatabaseModuledatabases()MySqlFirewallRuleModulefirewallRules()StringgetAdminName()StringgetFullyQualifiedDomainName()com.microsoft.azure.toolkit.lib.database.JdbcUrlgetJdbcUrl()StringgetLocalMachinePublicIp()com.microsoft.azure.toolkit.lib.common.model.RegiongetRegion()StringgetSkuTier()StringgetSslEnforceStatus()intgetStorageInMB()List<com.microsoft.azure.toolkit.lib.common.model.AbstractAzResourceModule<?,?,?>>getSubModules()StringgetType()intgetVCore()StringgetVersion()booleanisAzureServiceAccessAllowed()booleanisLocalMachineAccessAllowed()booleanisStartable()booleanisStoppable()List<MySqlDatabase>listDatabases()protected StringloadStatus(com.azure.resourcemanager.mysql.models.Server remote)voidrestart()voidstart()voidstop()-
Methods inherited from class com.microsoft.azure.toolkit.lib.common.model.AbstractAzResource
canEqual, delete, doModify, doModify, equals, exists, getCachedSubModules, getId, getModule, getName, getParent, getRemote, getResourceGroup, getResourceGroupName, getStatus, getSubModule, hashCode, invalidateCache, isAuthRequired, isDraft, isDraftForCreating, isDraftForUpdating, isNotFoundException, loadRemoteFromAzure, onRemoteUpdated, refresh, remoteOptional, setRemote, setStatus, toString, update, updateAdditionalProperties
-
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.AzComponent
getId, getName
-
Methods inherited from interface com.microsoft.azure.toolkit.lib.common.model.AzResource
delete, exists, getFormalStatus, getFullResourceType, getModule, getPortalUrl, getResourceGroupName, getResourceTypeName, getStatus, getSubscription, getSubscriptionId, id, name, refresh
-
-
-
-
Field Detail
-
databaseModule
private final MySqlDatabaseModule databaseModule
-
firewallRuleModule
private final MySqlFirewallRuleModule firewallRuleModule
-
-
Constructor Detail
-
MySqlServer
protected MySqlServer(@Nonnull String name, @Nonnull String resourceGroup, @Nonnull MySqlServerModule module)
-
MySqlServer
protected MySqlServer(@Nonnull MySqlServer origin)
copy constructor
-
MySqlServer
protected MySqlServer(@Nonnull com.azure.resourcemanager.mysql.models.Server remote, @Nonnull MySqlServerModule module)
-
-
Method Detail
-
getSubModules
@Nonnull public List<com.microsoft.azure.toolkit.lib.common.model.AbstractAzResourceModule<?,?,?>> getSubModules()
- Specified by:
getSubModulesin classcom.microsoft.azure.toolkit.lib.common.model.AbstractAzResource<MySqlServer,MySqlServiceSubscription,com.azure.resourcemanager.mysql.models.Server>
-
firewallRules
@Nonnull public MySqlFirewallRuleModule firewallRules()
-
databases
@Nonnull public MySqlDatabaseModule databases()
-
loadStatus
@Nonnull protected String loadStatus(@Nonnull com.azure.resourcemanager.mysql.models.Server remote)
- Specified by:
loadStatusin classcom.microsoft.azure.toolkit.lib.common.model.AbstractAzResource<MySqlServer,MySqlServiceSubscription,com.azure.resourcemanager.mysql.models.Server>
-
start
public void start()
- Specified by:
startin interfacecom.microsoft.azure.toolkit.lib.common.model.Startable
-
stop
public void stop()
- Specified by:
stopin interfacecom.microsoft.azure.toolkit.lib.common.model.Startable
-
restart
public void restart()
- Specified by:
restartin interfacecom.microsoft.azure.toolkit.lib.common.model.Startable
-
getRegion
@Nullable public com.microsoft.azure.toolkit.lib.common.model.Region getRegion()
- Specified by:
getRegionin interfacecom.microsoft.azure.toolkit.lib.database.entity.IDatabaseServer<MySqlDatabase>
-
getAdminName
@Nullable public String getAdminName()
- Specified by:
getAdminNamein interfacecom.microsoft.azure.toolkit.lib.database.entity.IDatabaseServer<MySqlDatabase>
-
getFullyQualifiedDomainName
@Nullable public String getFullyQualifiedDomainName()
- Specified by:
getFullyQualifiedDomainNamein interfacecom.microsoft.azure.toolkit.lib.database.entity.IDatabaseServer<MySqlDatabase>
-
isAzureServiceAccessAllowed
public boolean isAzureServiceAccessAllowed()
- Specified by:
isAzureServiceAccessAllowedin interfacecom.microsoft.azure.toolkit.lib.database.entity.IDatabaseServer<MySqlDatabase>
-
isLocalMachineAccessAllowed
public boolean isLocalMachineAccessAllowed()
- Specified by:
isLocalMachineAccessAllowedin interfacecom.microsoft.azure.toolkit.lib.database.entity.IDatabaseServer<MySqlDatabase>
-
getVersion
@Nullable public String getVersion()
- Specified by:
getVersionin interfacecom.microsoft.azure.toolkit.lib.database.entity.IDatabaseServer<MySqlDatabase>
-
getType
@Nullable public String getType()
- Specified by:
getTypein interfacecom.microsoft.azure.toolkit.lib.database.entity.IDatabaseServer<MySqlDatabase>
-
getVCore
public int getVCore()
-
getStorageInMB
public int getStorageInMB()
-
getLocalMachinePublicIp
@Nonnull public String getLocalMachinePublicIp()
- Specified by:
getLocalMachinePublicIpin interfacecom.microsoft.azure.toolkit.lib.database.entity.IDatabaseServer<MySqlDatabase>
-
getJdbcUrl
@Nonnull public com.microsoft.azure.toolkit.lib.database.JdbcUrl getJdbcUrl()
- Specified by:
getJdbcUrlin interfacecom.microsoft.azure.toolkit.lib.database.entity.IDatabaseServer<MySqlDatabase>
-
listDatabases
@Nonnull public List<MySqlDatabase> listDatabases()
- Specified by:
listDatabasesin interfacecom.microsoft.azure.toolkit.lib.database.entity.IDatabaseServer<MySqlDatabase>
-
isStoppable
public boolean isStoppable()
- Specified by:
isStoppablein interfacecom.microsoft.azure.toolkit.lib.common.model.Startable
-
isStartable
public boolean isStartable()
- Specified by:
isStartablein interfacecom.microsoft.azure.toolkit.lib.common.model.Startable
-
-