Azure Native

v1.87.0 published on Tuesday, Nov 22, 2022 by Pulumi

AvailabilityGroupListener

A SQL Server availability group listener. API Version: 2017-03-01-preview.

Example Usage

Creates or updates an availability group listener.

using System.Collections.Generic;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var availabilityGroupListener = new AzureNative.SqlVirtualMachine.AvailabilityGroupListener("availabilityGroupListener", new()
    {
        AvailabilityGroupListenerName = "agl-test",
        AvailabilityGroupName = "ag-test",
        LoadBalancerConfigurations = new[]
        {
            new AzureNative.SqlVirtualMachine.Inputs.LoadBalancerConfigurationArgs
            {
                LoadBalancerResourceId = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb-test",
                PrivateIpAddress = new AzureNative.SqlVirtualMachine.Inputs.PrivateIPAddressArgs
                {
                    IpAddress = "10.1.0.112",
                    SubnetResourceId = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default",
                },
                ProbePort = 59983,
                SqlVirtualMachineInstances = new[]
                {
                    "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2",
                    "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm3",
                },
            },
        },
        Port = 1433,
        ResourceGroupName = "testrg",
        SqlVirtualMachineGroupName = "testvmgroup",
    });

});

Coming soon!

package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.sqlvirtualmachine.AvailabilityGroupListener;
import com.pulumi.azurenative.sqlvirtualmachine.AvailabilityGroupListenerArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var availabilityGroupListener = new AvailabilityGroupListener("availabilityGroupListener", AvailabilityGroupListenerArgs.builder()        
            .availabilityGroupListenerName("agl-test")
            .availabilityGroupName("ag-test")
            .loadBalancerConfigurations(Map.ofEntries(
                Map.entry("loadBalancerResourceId", "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb-test"),
                Map.entry("privateIpAddress", Map.ofEntries(
                    Map.entry("ipAddress", "10.1.0.112"),
                    Map.entry("subnetResourceId", "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default")
                )),
                Map.entry("probePort", 59983),
                Map.entry("sqlVirtualMachineInstances",                 
                    "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2",
                    "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm3")
            ))
            .port(1433)
            .resourceGroupName("testrg")
            .sqlVirtualMachineGroupName("testvmgroup")
            .build());

    }
}
import pulumi
import pulumi_azure_native as azure_native

availability_group_listener = azure_native.sqlvirtualmachine.AvailabilityGroupListener("availabilityGroupListener",
    availability_group_listener_name="agl-test",
    availability_group_name="ag-test",
    load_balancer_configurations=[{
        "loadBalancerResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb-test",
        "privateIpAddress": azure_native.sqlvirtualmachine.PrivateIPAddressArgs(
            ip_address="10.1.0.112",
            subnet_resource_id="/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default",
        ),
        "probePort": 59983,
        "sqlVirtualMachineInstances": [
            "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2",
            "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm3",
        ],
    }],
    port=1433,
    resource_group_name="testrg",
    sql_virtual_machine_group_name="testvmgroup")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const availabilityGroupListener = new azure_native.sqlvirtualmachine.AvailabilityGroupListener("availabilityGroupListener", {
    availabilityGroupListenerName: "agl-test",
    availabilityGroupName: "ag-test",
    loadBalancerConfigurations: [{
        loadBalancerResourceId: "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb-test",
        privateIpAddress: {
            ipAddress: "10.1.0.112",
            subnetResourceId: "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default",
        },
        probePort: 59983,
        sqlVirtualMachineInstances: [
            "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2",
            "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm3",
        ],
    }],
    port: 1433,
    resourceGroupName: "testrg",
    sqlVirtualMachineGroupName: "testvmgroup",
});
resources:
  availabilityGroupListener:
    type: azure-native:sqlvirtualmachine:AvailabilityGroupListener
    properties:
      availabilityGroupListenerName: agl-test
      availabilityGroupName: ag-test
      loadBalancerConfigurations:
        - loadBalancerResourceId: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb-test
          privateIpAddress:
            ipAddress: 10.1.0.112
            subnetResourceId: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default
          probePort: 59983
          sqlVirtualMachineInstances:
            - /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2
            - /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm3
      port: 1433
      resourceGroupName: testrg
      sqlVirtualMachineGroupName: testvmgroup

Create AvailabilityGroupListener Resource

new AvailabilityGroupListener(name: string, args: AvailabilityGroupListenerArgs, opts?: CustomResourceOptions);
@overload
def AvailabilityGroupListener(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              availability_group_listener_name: Optional[str] = None,
                              availability_group_name: Optional[str] = None,
                              create_default_availability_group_if_not_exist: Optional[bool] = None,
                              load_balancer_configurations: Optional[Sequence[LoadBalancerConfigurationArgs]] = None,
                              port: Optional[int] = None,
                              resource_group_name: Optional[str] = None,
                              sql_virtual_machine_group_name: Optional[str] = None)
@overload
def AvailabilityGroupListener(resource_name: str,
                              args: AvailabilityGroupListenerArgs,
                              opts: Optional[ResourceOptions] = None)
func NewAvailabilityGroupListener(ctx *Context, name string, args AvailabilityGroupListenerArgs, opts ...ResourceOption) (*AvailabilityGroupListener, error)
public AvailabilityGroupListener(string name, AvailabilityGroupListenerArgs args, CustomResourceOptions? opts = null)
public AvailabilityGroupListener(String name, AvailabilityGroupListenerArgs args)
public AvailabilityGroupListener(String name, AvailabilityGroupListenerArgs args, CustomResourceOptions options)
type: azure-native:sqlvirtualmachine:AvailabilityGroupListener
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args AvailabilityGroupListenerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args AvailabilityGroupListenerArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args AvailabilityGroupListenerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AvailabilityGroupListenerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AvailabilityGroupListenerArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

AvailabilityGroupListener Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The AvailabilityGroupListener resource accepts the following input properties:

ResourceGroupName string

Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

SqlVirtualMachineGroupName string

Name of the SQL virtual machine group.

AvailabilityGroupListenerName string

Name of the availability group listener.

AvailabilityGroupName string

Name of the availability group.

CreateDefaultAvailabilityGroupIfNotExist bool

Create a default availability group if it does not exist.

LoadBalancerConfigurations List<Pulumi.AzureNative.SqlVirtualMachine.Inputs.LoadBalancerConfigurationArgs>

List of load balancer configurations for an availability group listener.

Port int

Listener port.

ResourceGroupName string

Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

SqlVirtualMachineGroupName string

Name of the SQL virtual machine group.

AvailabilityGroupListenerName string

Name of the availability group listener.

AvailabilityGroupName string

Name of the availability group.

CreateDefaultAvailabilityGroupIfNotExist bool

Create a default availability group if it does not exist.

LoadBalancerConfigurations []LoadBalancerConfigurationArgs

List of load balancer configurations for an availability group listener.

Port int

Listener port.

resourceGroupName String

Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

sqlVirtualMachineGroupName String

Name of the SQL virtual machine group.

availabilityGroupListenerName String

Name of the availability group listener.

availabilityGroupName String

Name of the availability group.

createDefaultAvailabilityGroupIfNotExist Boolean

Create a default availability group if it does not exist.

loadBalancerConfigurations List<LoadBalancerConfigurationArgs>

List of load balancer configurations for an availability group listener.

port Integer

Listener port.

resourceGroupName string

Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

sqlVirtualMachineGroupName string

Name of the SQL virtual machine group.

availabilityGroupListenerName string

Name of the availability group listener.

availabilityGroupName string

Name of the availability group.

createDefaultAvailabilityGroupIfNotExist boolean

Create a default availability group if it does not exist.

loadBalancerConfigurations LoadBalancerConfigurationArgs[]

List of load balancer configurations for an availability group listener.

port number

Listener port.

resource_group_name str

Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

sql_virtual_machine_group_name str

Name of the SQL virtual machine group.

availability_group_listener_name str

Name of the availability group listener.

availability_group_name str

Name of the availability group.

create_default_availability_group_if_not_exist bool

Create a default availability group if it does not exist.

load_balancer_configurations Sequence[LoadBalancerConfigurationArgs]

List of load balancer configurations for an availability group listener.

port int

Listener port.

resourceGroupName String

Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

sqlVirtualMachineGroupName String

Name of the SQL virtual machine group.

availabilityGroupListenerName String

Name of the availability group listener.

availabilityGroupName String

Name of the availability group.

createDefaultAvailabilityGroupIfNotExist Boolean

Create a default availability group if it does not exist.

loadBalancerConfigurations List<Property Map>

List of load balancer configurations for an availability group listener.

port Number

Listener port.

Outputs

All input properties are implicitly available as output properties. Additionally, the AvailabilityGroupListener resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Name string

Resource name.

ProvisioningState string

Provisioning state to track the async operation status.

Type string

Resource type.

Id string

The provider-assigned unique ID for this managed resource.

Name string

Resource name.

ProvisioningState string

Provisioning state to track the async operation status.

Type string

Resource type.

id String

The provider-assigned unique ID for this managed resource.

name String

Resource name.

provisioningState String

Provisioning state to track the async operation status.

type String

Resource type.

id string

The provider-assigned unique ID for this managed resource.

name string

Resource name.

provisioningState string

Provisioning state to track the async operation status.

type string

Resource type.

id str

The provider-assigned unique ID for this managed resource.

name str

Resource name.

provisioning_state str

Provisioning state to track the async operation status.

type str

Resource type.

id String

The provider-assigned unique ID for this managed resource.

name String

Resource name.

provisioningState String

Provisioning state to track the async operation status.

type String

Resource type.

Supporting Types

LoadBalancerConfiguration

LoadBalancerResourceId string

Resource id of the load balancer.

PrivateIpAddress Pulumi.AzureNative.SqlVirtualMachine.Inputs.PrivateIPAddress

Private IP address.

ProbePort int

Probe port.

PublicIpAddressResourceId string

Resource id of the public IP.

SqlVirtualMachineInstances List<string>

List of the SQL virtual machine instance resource id's that are enrolled into the availability group listener.

LoadBalancerResourceId string

Resource id of the load balancer.

PrivateIpAddress PrivateIPAddress

Private IP address.

ProbePort int

Probe port.

PublicIpAddressResourceId string

Resource id of the public IP.

SqlVirtualMachineInstances []string

List of the SQL virtual machine instance resource id's that are enrolled into the availability group listener.

loadBalancerResourceId String

Resource id of the load balancer.

privateIpAddress PrivateIPAddress

Private IP address.

probePort Integer

Probe port.

publicIpAddressResourceId String

Resource id of the public IP.

sqlVirtualMachineInstances List<String>

List of the SQL virtual machine instance resource id's that are enrolled into the availability group listener.

loadBalancerResourceId string

Resource id of the load balancer.

privateIpAddress PrivateIPAddress

Private IP address.

probePort number

Probe port.

publicIpAddressResourceId string

Resource id of the public IP.

sqlVirtualMachineInstances string[]

List of the SQL virtual machine instance resource id's that are enrolled into the availability group listener.

load_balancer_resource_id str

Resource id of the load balancer.

private_ip_address PrivateIPAddress

Private IP address.

probe_port int

Probe port.

public_ip_address_resource_id str

Resource id of the public IP.

sql_virtual_machine_instances Sequence[str]

List of the SQL virtual machine instance resource id's that are enrolled into the availability group listener.

loadBalancerResourceId String

Resource id of the load balancer.

privateIpAddress Property Map

Private IP address.

probePort Number

Probe port.

publicIpAddressResourceId String

Resource id of the public IP.

sqlVirtualMachineInstances List<String>

List of the SQL virtual machine instance resource id's that are enrolled into the availability group listener.

LoadBalancerConfigurationResponse

LoadBalancerResourceId string

Resource id of the load balancer.

PrivateIpAddress Pulumi.AzureNative.SqlVirtualMachine.Inputs.PrivateIPAddressResponse

Private IP address.

ProbePort int

Probe port.

PublicIpAddressResourceId string

Resource id of the public IP.

SqlVirtualMachineInstances List<string>

List of the SQL virtual machine instance resource id's that are enrolled into the availability group listener.

LoadBalancerResourceId string

Resource id of the load balancer.

PrivateIpAddress PrivateIPAddressResponse

Private IP address.

ProbePort int

Probe port.

PublicIpAddressResourceId string

Resource id of the public IP.

SqlVirtualMachineInstances []string

List of the SQL virtual machine instance resource id's that are enrolled into the availability group listener.

loadBalancerResourceId String

Resource id of the load balancer.

privateIpAddress PrivateIPAddressResponse

Private IP address.

probePort Integer

Probe port.

publicIpAddressResourceId String

Resource id of the public IP.

sqlVirtualMachineInstances List<String>

List of the SQL virtual machine instance resource id's that are enrolled into the availability group listener.

loadBalancerResourceId string

Resource id of the load balancer.

privateIpAddress PrivateIPAddressResponse

Private IP address.

probePort number

Probe port.

publicIpAddressResourceId string

Resource id of the public IP.

sqlVirtualMachineInstances string[]

List of the SQL virtual machine instance resource id's that are enrolled into the availability group listener.

load_balancer_resource_id str

Resource id of the load balancer.

private_ip_address PrivateIPAddressResponse

Private IP address.

probe_port int

Probe port.

public_ip_address_resource_id str

Resource id of the public IP.

sql_virtual_machine_instances Sequence[str]

List of the SQL virtual machine instance resource id's that are enrolled into the availability group listener.

loadBalancerResourceId String

Resource id of the load balancer.

privateIpAddress Property Map

Private IP address.

probePort Number

Probe port.

publicIpAddressResourceId String

Resource id of the public IP.

sqlVirtualMachineInstances List<String>

List of the SQL virtual machine instance resource id's that are enrolled into the availability group listener.

PrivateIPAddress

IpAddress string

Private IP address bound to the availability group listener.

SubnetResourceId string

Subnet used to include private IP.

IpAddress string

Private IP address bound to the availability group listener.

SubnetResourceId string

Subnet used to include private IP.

ipAddress String

Private IP address bound to the availability group listener.

subnetResourceId String

Subnet used to include private IP.

ipAddress string

Private IP address bound to the availability group listener.

subnetResourceId string

Subnet used to include private IP.

ip_address str

Private IP address bound to the availability group listener.

subnet_resource_id str

Subnet used to include private IP.

ipAddress String

Private IP address bound to the availability group listener.

subnetResourceId String

Subnet used to include private IP.

PrivateIPAddressResponse

IpAddress string

Private IP address bound to the availability group listener.

SubnetResourceId string

Subnet used to include private IP.

IpAddress string

Private IP address bound to the availability group listener.

SubnetResourceId string

Subnet used to include private IP.

ipAddress String

Private IP address bound to the availability group listener.

subnetResourceId String

Subnet used to include private IP.

ipAddress string

Private IP address bound to the availability group listener.

subnetResourceId string

Subnet used to include private IP.

ip_address str

Private IP address bound to the availability group listener.

subnet_resource_id str

Subnet used to include private IP.

ipAddress String

Private IP address bound to the availability group listener.

subnetResourceId String

Subnet used to include private IP.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:sqlvirtualmachine:AvailabilityGroupListener agl-test /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup/availabilityGroupListeners/agl-test 

Package Details

Repository
https://github.com/pulumi/pulumi-azure-native
License
Apache-2.0