getAlidnsInstances

This data source provides a list of Alidns instances in an Alibaba Cloud account according to the specified filters.

NOTE: Available in 1.95.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(AliCloud.Dns.GetAlidnsInstances.InvokeAsync(new AliCloud.Dns.GetAlidnsInstancesArgs
        {
            Ids = 
            {
                "dns-cn-oew1npk****",
            },
        }));
        this.FirstInstanceId = example.Apply(example => example.Instances?[0]?.Id);
    }

    [Output("firstInstanceId")]
    public Output<string> FirstInstanceId { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dns"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := dns.GetAlidnsInstances(ctx, &dns.GetAlidnsInstancesArgs{
			Ids: []string{
				"dns-cn-oew1npk****",
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstInstanceId", example.Instances[0].Id)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.dns.DnsFunctions;
import com.pulumi.alicloud.dns.inputs.GetAlidnsInstancesArgs;
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) {
        final var example = DnsFunctions.getAlidnsInstances(GetAlidnsInstancesArgs.builder()
            .ids("dns-cn-oew1npk****")
            .build());

        ctx.export("firstInstanceId", example.applyValue(getAlidnsInstancesResult -> getAlidnsInstancesResult.instances()[0].id()));
    }
}
import pulumi
import pulumi_alicloud as alicloud

example = alicloud.dns.get_alidns_instances(ids=["dns-cn-oew1npk****"])
pulumi.export("firstInstanceId", example.instances[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const example = pulumi.output(alicloud.dns.getAlidnsInstances({
    ids: ["dns-cn-oew1npk****"],
}));

export const firstInstanceId = example.instances[0].id;
variables:
  example:
    Fn::Invoke:
      Function: alicloud:dns:getAlidnsInstances
      Arguments:
        ids:
          - dns-cn-oew1npk****
outputs:
  firstInstanceId: ${example.instances[0].id}

Using getAlidnsInstances

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 getAlidnsInstances(args: GetAlidnsInstancesArgs, opts?: InvokeOptions): Promise<GetAlidnsInstancesResult>
function getAlidnsInstancesOutput(args: GetAlidnsInstancesOutputArgs, opts?: InvokeOptions): Output<GetAlidnsInstancesResult>
def get_alidns_instances(domain_type: Optional[str] = None,
                         ids: Optional[Sequence[str]] = None,
                         lang: Optional[str] = None,
                         output_file: Optional[str] = None,
                         user_client_ip: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetAlidnsInstancesResult
def get_alidns_instances_output(domain_type: Optional[pulumi.Input[str]] = None,
                         ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                         lang: Optional[pulumi.Input[str]] = None,
                         output_file: Optional[pulumi.Input[str]] = None,
                         user_client_ip: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetAlidnsInstancesResult]
func GetAlidnsInstances(ctx *Context, args *GetAlidnsInstancesArgs, opts ...InvokeOption) (*GetAlidnsInstancesResult, error)
func GetAlidnsInstancesOutput(ctx *Context, args *GetAlidnsInstancesOutputArgs, opts ...InvokeOption) GetAlidnsInstancesResultOutput

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

public static class GetAlidnsInstances 
{
    public static Task<GetAlidnsInstancesResult> InvokeAsync(GetAlidnsInstancesArgs args, InvokeOptions? opts = null)
    public static Output<GetAlidnsInstancesResult> Invoke(GetAlidnsInstancesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAlidnsInstancesResult> getAlidnsInstances(GetAlidnsInstancesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:dns/getAlidnsInstances:getAlidnsInstances
  arguments:
    # arguments dictionary

The following arguments are supported:

DomainType string

The type of domain.

Ids List<string>

A list of instance IDs.

Lang string

Language.

OutputFile string
UserClientIp string

The IP address of the client.

DomainType string

The type of domain.

Ids []string

A list of instance IDs.

Lang string

Language.

OutputFile string
UserClientIp string

The IP address of the client.

domainType String

The type of domain.

ids List<String>

A list of instance IDs.

lang String

Language.

outputFile String
userClientIp String

The IP address of the client.

domainType string

The type of domain.

ids string[]

A list of instance IDs.

lang string

Language.

outputFile string
userClientIp string

The IP address of the client.

domain_type str

The type of domain.

ids Sequence[str]

A list of instance IDs.

lang str

Language.

output_file str
user_client_ip str

The IP address of the client.

domainType String

The type of domain.

ids List<String>

A list of instance IDs.

lang String

Language.

outputFile String
userClientIp String

The IP address of the client.

getAlidnsInstances Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>

A list of instance IDs.

Instances List<Pulumi.AliCloud.Dns.Outputs.GetAlidnsInstancesInstance>

A list of instances. Each element contains the following attributes:

DomainType string
Lang string
OutputFile string
UserClientIp string
Id string

The provider-assigned unique ID for this managed resource.

Ids []string

A list of instance IDs.

Instances []GetAlidnsInstancesInstance

A list of instances. Each element contains the following attributes:

DomainType string
Lang string
OutputFile string
UserClientIp string
id String

The provider-assigned unique ID for this managed resource.

ids List<String>

A list of instance IDs.

instances List<GetAliInstancesInstance>

A list of instances. Each element contains the following attributes:

domainType String
lang String
outputFile String
userClientIp String
id string

The provider-assigned unique ID for this managed resource.

ids string[]

A list of instance IDs.

instances GetAlidnsInstancesInstance[]

A list of instances. Each element contains the following attributes:

domainType string
lang string
outputFile string
userClientIp string
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]

A list of instance IDs.

instances Sequence[GetAlidnsInstancesInstance]

A list of instances. Each element contains the following attributes:

domain_type str
lang str
output_file str
user_client_ip str
id String

The provider-assigned unique ID for this managed resource.

ids List<String>

A list of instance IDs.

instances List<Property Map>

A list of instances. Each element contains the following attributes:

domainType String
lang String
outputFile String
userClientIp String

Supporting Types

GetAlidnsInstancesInstance

DnsSecurity string

DNS security level.

Domain string

(Available in 1.124.1+) The domain name.

DomainNumbers string

Number of domain names bound.

Id string

Id of the instance.

InstanceId string

Id of the instance resource.

PaymentType string

(Available in 1.124.1+) The payment type of alidns instance.

VersionCode string

Paid package version.

VersionName string

Paid package version name.

DnsSecurity string

DNS security level.

Domain string

(Available in 1.124.1+) The domain name.

DomainNumbers string

Number of domain names bound.

Id string

Id of the instance.

InstanceId string

Id of the instance resource.

PaymentType string

(Available in 1.124.1+) The payment type of alidns instance.

VersionCode string

Paid package version.

VersionName string

Paid package version name.

dnsSecurity String

DNS security level.

domain String

(Available in 1.124.1+) The domain name.

domainNumbers String

Number of domain names bound.

id String

Id of the instance.

instanceId String

Id of the instance resource.

paymentType String

(Available in 1.124.1+) The payment type of alidns instance.

versionCode String

Paid package version.

versionName String

Paid package version name.

dnsSecurity string

DNS security level.

domain string

(Available in 1.124.1+) The domain name.

domainNumbers string

Number of domain names bound.

id string

Id of the instance.

instanceId string

Id of the instance resource.

paymentType string

(Available in 1.124.1+) The payment type of alidns instance.

versionCode string

Paid package version.

versionName string

Paid package version name.

dns_security str

DNS security level.

domain str

(Available in 1.124.1+) The domain name.

domain_numbers str

Number of domain names bound.

id str

Id of the instance.

instance_id str

Id of the instance resource.

payment_type str

(Available in 1.124.1+) The payment type of alidns instance.

version_code str

Paid package version.

version_name str

Paid package version name.

dnsSecurity String

DNS security level.

domain String

(Available in 1.124.1+) The domain name.

domainNumbers String

Number of domain names bound.

id String

Id of the instance.

instanceId String

Id of the instance resource.

paymentType String

(Available in 1.124.1+) The payment type of alidns instance.

versionCode String

Paid package version.

versionName String

Paid package version name.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.