1. Packages
  2. Azure Classic
  3. API Docs
  4. privatedns
  5. getSrvRecord

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

azure.privatedns.getSrvRecord

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.privatedns.SRVRecord("example", {
        name: "test",
        zoneName: "test-zone",
        resourceGroupName: "test-rg",
    });
    export const privateDnsSrvRecordId = exampleAzurermPrivateDnsSrvRecord.id;
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.privatedns.SRVRecord("example",
        name="test",
        zone_name="test-zone",
        resource_group_name="test-rg")
    pulumi.export("privateDnsSrvRecordId", example_azurerm_private_dns_srv_record["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/privatedns"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := privatedns.NewSRVRecord(ctx, "example", &privatedns.SRVRecordArgs{
    			Name:              pulumi.String("test"),
    			ZoneName:          pulumi.String("test-zone"),
    			ResourceGroupName: pulumi.String("test-rg"),
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("privateDnsSrvRecordId", exampleAzurermPrivateDnsSrvRecord.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.PrivateDns.SRVRecord("example", new()
        {
            Name = "test",
            ZoneName = "test-zone",
            ResourceGroupName = "test-rg",
        });
    
        return new Dictionary<string, object?>
        {
            ["privateDnsSrvRecordId"] = exampleAzurermPrivateDnsSrvRecord.Id,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.privatedns.SRVRecord;
    import com.pulumi.azure.privatedns.SRVRecordArgs;
    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 example = new SRVRecord("example", SRVRecordArgs.builder()
                .name("test")
                .zoneName("test-zone")
                .resourceGroupName("test-rg")
                .build());
    
            ctx.export("privateDnsSrvRecordId", exampleAzurermPrivateDnsSrvRecord.id());
        }
    }
    
    resources:
      example:
        type: azure:privatedns:SRVRecord
        properties:
          name: test
          zoneName: test-zone
          resourceGroupName: test-rg
    outputs:
      privateDnsSrvRecordId: ${exampleAzurermPrivateDnsSrvRecord.id}
    

    Using getSrvRecord

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getSrvRecord(args: GetSrvRecordArgs, opts?: InvokeOptions): Promise<GetSrvRecordResult>
    function getSrvRecordOutput(args: GetSrvRecordOutputArgs, opts?: InvokeOptions): Output<GetSrvRecordResult>
    def get_srv_record(name: Optional[str] = None,
                       resource_group_name: Optional[str] = None,
                       zone_name: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetSrvRecordResult
    def get_srv_record_output(name: Optional[pulumi.Input[str]] = None,
                       resource_group_name: Optional[pulumi.Input[str]] = None,
                       zone_name: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetSrvRecordResult]
    func GetSrvRecord(ctx *Context, args *GetSrvRecordArgs, opts ...InvokeOption) (*GetSrvRecordResult, error)
    func GetSrvRecordOutput(ctx *Context, args *GetSrvRecordOutputArgs, opts ...InvokeOption) GetSrvRecordResultOutput

    > Note: This function is named GetSrvRecord in the Go SDK.

    public static class GetSrvRecord 
    {
        public static Task<GetSrvRecordResult> InvokeAsync(GetSrvRecordArgs args, InvokeOptions? opts = null)
        public static Output<GetSrvRecordResult> Invoke(GetSrvRecordInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSrvRecordResult> getSrvRecord(GetSrvRecordArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:privatedns/getSrvRecord:getSrvRecord
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the Private DNS SRV Record.
    ResourceGroupName string
    Specifies the resource group where the Private DNS Zone (parent resource) exists.
    ZoneName string
    Specifies the Private DNS Zone where the resource exists.
    Name string
    The name of the Private DNS SRV Record.
    ResourceGroupName string
    Specifies the resource group where the Private DNS Zone (parent resource) exists.
    ZoneName string
    Specifies the Private DNS Zone where the resource exists.
    name String
    The name of the Private DNS SRV Record.
    resourceGroupName String
    Specifies the resource group where the Private DNS Zone (parent resource) exists.
    zoneName String
    Specifies the Private DNS Zone where the resource exists.
    name string
    The name of the Private DNS SRV Record.
    resourceGroupName string
    Specifies the resource group where the Private DNS Zone (parent resource) exists.
    zoneName string
    Specifies the Private DNS Zone where the resource exists.
    name str
    The name of the Private DNS SRV Record.
    resource_group_name str
    Specifies the resource group where the Private DNS Zone (parent resource) exists.
    zone_name str
    Specifies the Private DNS Zone where the resource exists.
    name String
    The name of the Private DNS SRV Record.
    resourceGroupName String
    Specifies the resource group where the Private DNS Zone (parent resource) exists.
    zoneName String
    Specifies the Private DNS Zone where the resource exists.

    getSrvRecord Result

    The following output properties are available:

    Fqdn string
    The FQDN of the Private DNS SRV Record.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Records List<GetSrvRecordRecord>
    A list of values that make up the SRV record. Each record block supports fields documented below.
    ResourceGroupName string
    Tags Dictionary<string, string>
    A mapping of tags assigned to the resource.
    Ttl int
    The Time To Live (TTL) of the Private DNS record in seconds.
    ZoneName string
    Fqdn string
    The FQDN of the Private DNS SRV Record.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Records []GetSrvRecordRecord
    A list of values that make up the SRV record. Each record block supports fields documented below.
    ResourceGroupName string
    Tags map[string]string
    A mapping of tags assigned to the resource.
    Ttl int
    The Time To Live (TTL) of the Private DNS record in seconds.
    ZoneName string
    fqdn String
    The FQDN of the Private DNS SRV Record.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    records List<GetSrvRecordRecord>
    A list of values that make up the SRV record. Each record block supports fields documented below.
    resourceGroupName String
    tags Map<String,String>
    A mapping of tags assigned to the resource.
    ttl Integer
    The Time To Live (TTL) of the Private DNS record in seconds.
    zoneName String
    fqdn string
    The FQDN of the Private DNS SRV Record.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    records GetSrvRecordRecord[]
    A list of values that make up the SRV record. Each record block supports fields documented below.
    resourceGroupName string
    tags {[key: string]: string}
    A mapping of tags assigned to the resource.
    ttl number
    The Time To Live (TTL) of the Private DNS record in seconds.
    zoneName string
    fqdn str
    The FQDN of the Private DNS SRV Record.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    records Sequence[GetSrvRecordRecord]
    A list of values that make up the SRV record. Each record block supports fields documented below.
    resource_group_name str
    tags Mapping[str, str]
    A mapping of tags assigned to the resource.
    ttl int
    The Time To Live (TTL) of the Private DNS record in seconds.
    zone_name str
    fqdn String
    The FQDN of the Private DNS SRV Record.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    records List<Property Map>
    A list of values that make up the SRV record. Each record block supports fields documented below.
    resourceGroupName String
    tags Map<String>
    A mapping of tags assigned to the resource.
    ttl Number
    The Time To Live (TTL) of the Private DNS record in seconds.
    zoneName String

    Supporting Types

    GetSrvRecordRecord

    Port int
    Port the service is listening on.
    Priority int
    Priority of the SRV record.
    Target string
    FQDN of the service.
    Weight int
    Weight of the SRV record.
    Port int
    Port the service is listening on.
    Priority int
    Priority of the SRV record.
    Target string
    FQDN of the service.
    Weight int
    Weight of the SRV record.
    port Integer
    Port the service is listening on.
    priority Integer
    Priority of the SRV record.
    target String
    FQDN of the service.
    weight Integer
    Weight of the SRV record.
    port number
    Port the service is listening on.
    priority number
    Priority of the SRV record.
    target string
    FQDN of the service.
    weight number
    Weight of the SRV record.
    port int
    Port the service is listening on.
    priority int
    Priority of the SRV record.
    target str
    FQDN of the service.
    weight int
    Weight of the SRV record.
    port Number
    Port the service is listening on.
    priority Number
    Priority of the SRV record.
    target String
    FQDN of the service.
    weight Number
    Weight of the SRV record.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi