Class PostgreSqlServer
- java.lang.Object
-
- com.microsoft.azure.toolkit.lib.common.model.AbstractAzResource<PostgreSqlServer,PostgreSqlServiceSubscription,com.azure.resourcemanager.postgresql.models.Server>
-
- com.microsoft.azure.toolkit.lib.postgre.PostgreSqlServer
-
- All Implemented Interfaces:
com.microsoft.azure.toolkit.lib.common.model.AzResource,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,com.microsoft.azure.toolkit.lib.database.entity.IDatabaseServer<PostgreSqlDatabase>
- Direct Known Subclasses:
PostgreSqlServerDraft
public class PostgreSqlServer extends com.microsoft.azure.toolkit.lib.common.model.AbstractAzResource<PostgreSqlServer,PostgreSqlServiceSubscription,com.azure.resourcemanager.postgresql.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<PostgreSqlDatabase>
-
-
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.None, com.microsoft.azure.toolkit.lib.common.model.AzResource.Status
-
-
Field Summary
Fields Modifier and Type Field Description private PostgreSqlDatabaseModuledatabaseModuleprivate PostgreSqlFirewallRuleModulefirewallRuleModule
-
Constructor Summary
Constructors Modifier Constructor Description protectedPostgreSqlServer(com.azure.resourcemanager.postgresql.models.Server remote, PostgreSqlServerModule module)PostgreSqlServer(PostgreSqlServer origin)copy constructorprotectedPostgreSqlServer(String name, String resourceGroupName, PostgreSqlServerModule module)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PostgreSqlDatabaseModuledatabases()PostgreSqlFirewallRuleModulefirewallRules()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()booleanisStoppable()List<PostgreSqlDatabase>listDatabases()StringloadStatus(com.azure.resourcemanager.postgresql.models.Server remote)protected com.azure.resourcemanager.postgresql.models.ServerrefreshRemoteFromAzure(com.azure.resourcemanager.postgresql.models.Server remote)voidrestart()voidstart()voidstop()-
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, 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.AzResource
getFullResourceType, getPortalUrl, getResourceTypeName, getSubscription, getSubscriptionId, id, name
-
Methods inherited from interface com.microsoft.azure.toolkit.lib.common.model.AzResourceBase
getFormalStatus, getFormalStatus, getStatus, getStatus
-
-
-
-
Field Detail
-
databaseModule
private final PostgreSqlDatabaseModule databaseModule
-
firewallRuleModule
private final PostgreSqlFirewallRuleModule firewallRuleModule
-
-
Constructor Detail
-
PostgreSqlServer
protected PostgreSqlServer(@Nonnull String name, @Nonnull String resourceGroupName, @Nonnull PostgreSqlServerModule module)
-
PostgreSqlServer
public PostgreSqlServer(@Nonnull PostgreSqlServer origin)
copy constructor
-
PostgreSqlServer
protected PostgreSqlServer(@Nonnull com.azure.resourcemanager.postgresql.models.Server remote, @Nonnull PostgreSqlServerModule module)
-
-
Method Detail
-
refreshRemoteFromAzure
@Nullable protected com.azure.resourcemanager.postgresql.models.Server refreshRemoteFromAzure(@Nonnull com.azure.resourcemanager.postgresql.models.Server remote)
- Overrides:
refreshRemoteFromAzurein classcom.microsoft.azure.toolkit.lib.common.model.AbstractAzResource<PostgreSqlServer,PostgreSqlServiceSubscription,com.azure.resourcemanager.postgresql.models.Server>
-
getSubModules
@Nonnull public List<com.microsoft.azure.toolkit.lib.common.model.AbstractAzResourceModule<?,?,?>> getSubModules()
- Specified by:
getSubModulesin classcom.microsoft.azure.toolkit.lib.common.model.AbstractAzResource<PostgreSqlServer,PostgreSqlServiceSubscription,com.azure.resourcemanager.postgresql.models.Server>
-
firewallRules
@Nonnull public PostgreSqlFirewallRuleModule firewallRules()
-
databases
@Nonnull public PostgreSqlDatabaseModule databases()
-
loadStatus
@Nonnull public String loadStatus(@Nonnull com.azure.resourcemanager.postgresql.models.Server remote)
- Specified by:
loadStatusin classcom.microsoft.azure.toolkit.lib.common.model.AbstractAzResource<PostgreSqlServer,PostgreSqlServiceSubscription,com.azure.resourcemanager.postgresql.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<PostgreSqlDatabase>
-
getAdminName
@Nullable public String getAdminName()
- Specified by:
getAdminNamein interfacecom.microsoft.azure.toolkit.lib.database.entity.IDatabaseServer<PostgreSqlDatabase>
-
getFullyQualifiedDomainName
@Nullable public String getFullyQualifiedDomainName()
- Specified by:
getFullyQualifiedDomainNamein interfacecom.microsoft.azure.toolkit.lib.database.entity.IDatabaseServer<PostgreSqlDatabase>
-
isAzureServiceAccessAllowed
public boolean isAzureServiceAccessAllowed()
- Specified by:
isAzureServiceAccessAllowedin interfacecom.microsoft.azure.toolkit.lib.database.entity.IDatabaseServer<PostgreSqlDatabase>
-
isLocalMachineAccessAllowed
public boolean isLocalMachineAccessAllowed()
- Specified by:
isLocalMachineAccessAllowedin interfacecom.microsoft.azure.toolkit.lib.database.entity.IDatabaseServer<PostgreSqlDatabase>
-
getVersion
@Nullable public String getVersion()
- Specified by:
getVersionin interfacecom.microsoft.azure.toolkit.lib.database.entity.IDatabaseServer<PostgreSqlDatabase>
-
getType
@Nullable public String getType()
- Specified by:
getTypein interfacecom.microsoft.azure.toolkit.lib.database.entity.IDatabaseServer<PostgreSqlDatabase>
-
getVCore
public int getVCore()
-
getStorageInMB
public int getStorageInMB()
-
getLocalMachinePublicIp
@Nonnull public String getLocalMachinePublicIp()
- Specified by:
getLocalMachinePublicIpin interfacecom.microsoft.azure.toolkit.lib.database.entity.IDatabaseServer<PostgreSqlDatabase>
-
getJdbcUrl
@Nonnull public com.microsoft.azure.toolkit.lib.database.JdbcUrl getJdbcUrl()
- Specified by:
getJdbcUrlin interfacecom.microsoft.azure.toolkit.lib.database.entity.IDatabaseServer<PostgreSqlDatabase>
-
listDatabases
@Nonnull public List<PostgreSqlDatabase> listDatabases()
- Specified by:
listDatabasesin interfacecom.microsoft.azure.toolkit.lib.database.entity.IDatabaseServer<PostgreSqlDatabase>
-
isStoppable
public boolean isStoppable()
- Specified by:
isStoppablein interfacecom.microsoft.azure.toolkit.lib.common.model.Startable
-
-