Show / Hide Table of Contents

Class Server

Manages a PostgreSQL Server.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
public MyStack()
{
    var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
    {
        Location = "West Europe",
    });
    var exampleServer = new Azure.PostgreSql.Server("exampleServer", new Azure.PostgreSql.ServerArgs
    {
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
        AdministratorLogin = "psqladminun",
        AdministratorLoginPassword = "H@Sh1CoR3!",
        SkuName = "GP_Gen5_4",
        Version = "9.6",
        StorageMb = 640000,
        BackupRetentionDays = 7,
        GeoRedundantBackupEnabled = true,
        AutoGrowEnabled = true,
        PublicNetworkAccessEnabled = false,
        SslEnforcementEnabled = true,
        SslMinimalTlsVersionEnforced = "TLS1_2",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Server
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Azure.PostgreSql
Assembly: Pulumi.Azure.dll
Syntax
public class Server : CustomResource

Constructors

View Source

Server(String, ServerArgs, CustomResourceOptions)

Create a Server resource with the given unique name, arguments, and options.

Declaration
public Server(string name, ServerArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

ServerArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

AdministratorLogin

The Administrator Login for the PostgreSQL Server. Required when create_mode is Default. Changing this forces a new resource to be created.

Declaration
public Output<string> AdministratorLogin { get; }
Property Value
Type Description
Output<System.String>
View Source

AdministratorLoginPassword

The Password associated with the administrator_login for the PostgreSQL Server. Required when create_mode is Default.

Declaration
public Output<string> AdministratorLoginPassword { get; }
Property Value
Type Description
Output<System.String>
View Source

AutoGrowEnabled

Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true.

Declaration
public Output<bool> AutoGrowEnabled { get; }
Property Value
Type Description
Output<System.Boolean>
View Source

BackupRetentionDays

Backup retention days for the server, supported values are between 7 and 35 days.

Declaration
public Output<int> BackupRetentionDays { get; }
Property Value
Type Description
Output<System.Int32>
View Source

CreateMode

The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default.

Declaration
public Output<string> CreateMode { get; }
Property Value
Type Description
Output<System.String>
View Source

CreationSourceServerId

For creation modes other then default the source server ID to use.

Declaration
public Output<string> CreationSourceServerId { get; }
Property Value
Type Description
Output<System.String>
View Source

Fqdn

The FQDN of the PostgreSQL Server.

Declaration
public Output<string> Fqdn { get; }
Property Value
Type Description
Output<System.String>
View Source

GeoRedundantBackupEnabled

Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier.

Declaration
public Output<bool> GeoRedundantBackupEnabled { get; }
Property Value
Type Description
Output<System.Boolean>
View Source

InfrastructureEncryptionEnabled

Whether or not infrastructure is encrypted for this server. Defaults to false. Changing this forces a new resource to be created.

Declaration
public Output<bool?> InfrastructureEncryptionEnabled { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

Location

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

Declaration
public Output<string> Location { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

PublicNetworkAccessEnabled

Whether or not public network access is allowed for this server. Defaults to true.

Declaration
public Output<bool?> PublicNetworkAccessEnabled { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

ResourceGroupName

The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created.

Declaration
public Output<string> ResourceGroupName { get; }
Property Value
Type Description
Output<System.String>
View Source

RestorePointInTime

When create_mode is PointInTimeRestore the point in time to restore from creation_source_server_id.

Declaration
public Output<string> RestorePointInTime { get; }
Property Value
Type Description
Output<System.String>
View Source

SkuName

Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation.

Declaration
public Output<string> SkuName { get; }
Property Value
Type Description
Output<System.String>
View Source

SslEnforcement

Declaration
public Output<string> SslEnforcement { get; }
Property Value
Type Description
Output<System.String>
View Source

SslEnforcementEnabled

Specifies if SSL should be enforced on connections. Possible values are true and false.

Declaration
public Output<bool> SslEnforcementEnabled { get; }
Property Value
Type Description
Output<System.Boolean>
View Source

SslMinimalTlsVersionEnforced

The mimimun TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLSEnforcementDisabled.

Declaration
public Output<string> SslMinimalTlsVersionEnforced { get; }
Property Value
Type Description
Output<System.String>
View Source

StorageMb

Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 4194304 MB(4TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.

Declaration
public Output<int> StorageMb { get; }
Property Value
Type Description
Output<System.Int32>
View Source

StorageProfile

Declaration
public Output<ServerStorageProfile> StorageProfile { get; }
Property Value
Type Description
Output<ServerStorageProfile>
View Source

Tags

A mapping of tags to assign to the resource.

Declaration
public Output<ImmutableDictionary<string, string>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>>
View Source

ThreatDetectionPolicy

Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below.

Declaration
public Output<ServerThreatDetectionPolicy> ThreatDetectionPolicy { get; }
Property Value
Type Description
Output<ServerThreatDetectionPolicy>
View Source

Version

Specifies the version of PostgreSQL to use. Valid values are 9.5, 9.6, 10, 10.0, and 11. Changing this forces a new resource to be created.

Declaration
public Output<string> Version { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, ServerState, CustomResourceOptions)

Get an existing Server resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Server Get(string name, Input<string> id, ServerState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

ServerState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Server
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.