Class ServerProperties

java.lang.Object
com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerProperties
All Implemented Interfaces:
com.azure.json.JsonSerializable<ServerProperties>

public final class ServerProperties extends Object implements com.azure.json.JsonSerializable<ServerProperties>
Properties of a server.
  • Constructor Details

    • ServerProperties

      public ServerProperties()
      Creates an instance of ServerProperties class.
  • Method Details

    • administratorLogin

      public String administratorLogin()
      Get the administratorLogin property: Name of the login designated as the first password based administrator assigned to your instance of PostgreSQL. Must be specified the first time that you enable password based authentication on a server. Once set to a given value, it cannot be changed for the rest of the life of a server. If you disable password based authentication on a server which had it enabled, this password based role isn't deleted.
      Returns:
      the administratorLogin value.
    • withAdministratorLogin

      public ServerProperties withAdministratorLogin(String administratorLogin)
      Set the administratorLogin property: Name of the login designated as the first password based administrator assigned to your instance of PostgreSQL. Must be specified the first time that you enable password based authentication on a server. Once set to a given value, it cannot be changed for the rest of the life of a server. If you disable password based authentication on a server which had it enabled, this password based role isn't deleted.
      Parameters:
      administratorLogin - the administratorLogin value to set.
      Returns:
      the ServerProperties object itself.
    • administratorLoginPassword

      public String administratorLoginPassword()
      Get the administratorLoginPassword property: Password assigned to the administrator login. As long as password authentication is enabled, this password can be changed at any time.
      Returns:
      the administratorLoginPassword value.
    • withAdministratorLoginPassword

      public ServerProperties withAdministratorLoginPassword(String administratorLoginPassword)
      Set the administratorLoginPassword property: Password assigned to the administrator login. As long as password authentication is enabled, this password can be changed at any time.
      Parameters:
      administratorLoginPassword - the administratorLoginPassword value to set.
      Returns:
      the ServerProperties object itself.
    • version

      public PostgresMajorVersion version()
      Get the version property: Major version of PostgreSQL database engine.
      Returns:
      the version value.
    • withVersion

      public ServerProperties withVersion(PostgresMajorVersion version)
      Set the version property: Major version of PostgreSQL database engine.
      Parameters:
      version - the version value to set.
      Returns:
      the ServerProperties object itself.
    • minorVersion

      public String minorVersion()
      Get the minorVersion property: Minor version of PostgreSQL database engine.
      Returns:
      the minorVersion value.
    • state

      public ServerState state()
      Get the state property: Possible states of a server.
      Returns:
      the state value.
    • fullyQualifiedDomainName

      public String fullyQualifiedDomainName()
      Get the fullyQualifiedDomainName property: Fully qualified domain name of a server.
      Returns:
      the fullyQualifiedDomainName value.
    • storage

      public Storage storage()
      Get the storage property: Storage properties of a server.
      Returns:
      the storage value.
    • withStorage

      public ServerProperties withStorage(Storage storage)
      Set the storage property: Storage properties of a server.
      Parameters:
      storage - the storage value to set.
      Returns:
      the ServerProperties object itself.
    • authConfig

      public AuthConfig authConfig()
      Get the authConfig property: Authentication configuration properties of a server.
      Returns:
      the authConfig value.
    • withAuthConfig

      public ServerProperties withAuthConfig(AuthConfig authConfig)
      Set the authConfig property: Authentication configuration properties of a server.
      Parameters:
      authConfig - the authConfig value to set.
      Returns:
      the ServerProperties object itself.
    • dataEncryption

      public DataEncryption dataEncryption()
      Get the dataEncryption property: Data encryption properties of a server.
      Returns:
      the dataEncryption value.
    • withDataEncryption

      public ServerProperties withDataEncryption(DataEncryption dataEncryption)
      Set the dataEncryption property: Data encryption properties of a server.
      Parameters:
      dataEncryption - the dataEncryption value to set.
      Returns:
      the ServerProperties object itself.
    • backup

      public Backup backup()
      Get the backup property: Backup properties of a server.
      Returns:
      the backup value.
    • withBackup

      public ServerProperties withBackup(Backup backup)
      Set the backup property: Backup properties of a server.
      Parameters:
      backup - the backup value to set.
      Returns:
      the ServerProperties object itself.
    • network

      public Network network()
      Get the network property: Network properties of a server. Only required if you want your server to be integrated into a virtual network provided by customer.
      Returns:
      the network value.
    • withNetwork

      public ServerProperties withNetwork(Network network)
      Set the network property: Network properties of a server. Only required if you want your server to be integrated into a virtual network provided by customer.
      Parameters:
      network - the network value to set.
      Returns:
      the ServerProperties object itself.
    • highAvailability

      public HighAvailability highAvailability()
      Get the highAvailability property: High availability properties of a server.
      Returns:
      the highAvailability value.
    • withHighAvailability

      public ServerProperties withHighAvailability(HighAvailability highAvailability)
      Set the highAvailability property: High availability properties of a server.
      Parameters:
      highAvailability - the highAvailability value to set.
      Returns:
      the ServerProperties object itself.
    • maintenanceWindow

      public MaintenanceWindow maintenanceWindow()
      Get the maintenanceWindow property: Maintenance window properties of a server.
      Returns:
      the maintenanceWindow value.
    • withMaintenanceWindow

      public ServerProperties withMaintenanceWindow(MaintenanceWindow maintenanceWindow)
      Set the maintenanceWindow property: Maintenance window properties of a server.
      Parameters:
      maintenanceWindow - the maintenanceWindow value to set.
      Returns:
      the ServerProperties object itself.
    • sourceServerResourceId

      public String sourceServerResourceId()
      Get the sourceServerResourceId property: Identifier of the server to be used as the source of the new server. Required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', 'Replica', or 'ReviveDropped'. This property is returned only when the target server is a read replica.
      Returns:
      the sourceServerResourceId value.
    • withSourceServerResourceId

      public ServerProperties withSourceServerResourceId(String sourceServerResourceId)
      Set the sourceServerResourceId property: Identifier of the server to be used as the source of the new server. Required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', 'Replica', or 'ReviveDropped'. This property is returned only when the target server is a read replica.
      Parameters:
      sourceServerResourceId - the sourceServerResourceId value to set.
      Returns:
      the ServerProperties object itself.
    • pointInTimeUtc

      public OffsetDateTime pointInTimeUtc()
      Get the pointInTimeUtc property: Creation time (in ISO8601 format) of the backup which you want to restore in the new server. It's required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', or 'ReviveDropped'.
      Returns:
      the pointInTimeUtc value.
    • withPointInTimeUtc

      public ServerProperties withPointInTimeUtc(OffsetDateTime pointInTimeUtc)
      Set the pointInTimeUtc property: Creation time (in ISO8601 format) of the backup which you want to restore in the new server. It's required when 'createMode' is 'PointInTimeRestore', 'GeoRestore', or 'ReviveDropped'.
      Parameters:
      pointInTimeUtc - the pointInTimeUtc value to set.
      Returns:
      the ServerProperties object itself.
    • availabilityZone

      public String availabilityZone()
      Get the availabilityZone property: Availability zone of a server.
      Returns:
      the availabilityZone value.
    • withAvailabilityZone

      public ServerProperties withAvailabilityZone(String availabilityZone)
      Set the availabilityZone property: Availability zone of a server.
      Parameters:
      availabilityZone - the availabilityZone value to set.
      Returns:
      the ServerProperties object itself.
    • replicationRole

      public ReplicationRole replicationRole()
      Get the replicationRole property: Role of the server in a replication set.
      Returns:
      the replicationRole value.
    • withReplicationRole

      public ServerProperties withReplicationRole(ReplicationRole replicationRole)
      Set the replicationRole property: Role of the server in a replication set.
      Parameters:
      replicationRole - the replicationRole value to set.
      Returns:
      the ServerProperties object itself.
    • replicaCapacity

      public Integer replicaCapacity()
      Get the replicaCapacity property: Maximum number of read replicas allowed for a server.
      Returns:
      the replicaCapacity value.
    • replica

      public Replica replica()
      Get the replica property: Read replica properties of a server. Required only in case that you want to promote a server.
      Returns:
      the replica value.
    • withReplica

      public ServerProperties withReplica(Replica replica)
      Set the replica property: Read replica properties of a server. Required only in case that you want to promote a server.
      Parameters:
      replica - the replica value to set.
      Returns:
      the ServerProperties object itself.
    • createMode

      public CreateMode createMode()
      Get the createMode property: Creation mode of a new server.
      Returns:
      the createMode value.
    • withCreateMode

      public ServerProperties withCreateMode(CreateMode createMode)
      Set the createMode property: Creation mode of a new server.
      Parameters:
      createMode - the createMode value to set.
      Returns:
      the ServerProperties object itself.
    • privateEndpointConnections

      public List<PrivateEndpointConnectionInner> privateEndpointConnections()
      Get the privateEndpointConnections property: List of private endpoint connections associated with the specified server.
      Returns:
      the privateEndpointConnections value.
    • cluster

      public Cluster cluster()
      Get the cluster property: Cluster properties of a server.
      Returns:
      the cluster value.
    • withCluster

      public ServerProperties withCluster(Cluster cluster)
      Set the cluster property: Cluster properties of a server.
      Parameters:
      cluster - the cluster value to set.
      Returns:
      the ServerProperties object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ServerProperties>
      Throws:
      IOException
    • fromJson

      public static ServerProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ServerProperties from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ServerProperties if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the ServerProperties.