Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.dns.getAlidnsInstances
Explore with Pulumi AI
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
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = alicloud.dns.getAlidnsInstances({
ids: ["dns-cn-oew1npk****"],
});
export const firstInstanceId = example.then(example => example.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)
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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = AliCloud.Dns.GetAlidnsInstances.Invoke(new()
{
Ids = new[]
{
"dns-cn-oew1npk****",
},
});
return new Dictionary<string, object?>
{
["firstInstanceId"] = example.Apply(getAlidnsInstancesResult => getAlidnsInstancesResult.Instances[0]?.Id),
};
});
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()));
}
}
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:
- Domain
Type string - The type of domain.
- Ids List<string>
- A list of instance IDs.
- Lang string
- Language.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - User
Client stringIp - The IP address of the client.
- Domain
Type string - The type of domain.
- Ids []string
- A list of instance IDs.
- Lang string
- Language.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - User
Client stringIp - The IP address of the client.
- domain
Type String - The type of domain.
- ids List<String>
- A list of instance IDs.
- lang String
- Language.
- output
File String - File name where to save data source results (after running
pulumi preview
). - user
Client StringIp - The IP address of the client.
- domain
Type string - The type of domain.
- ids string[]
- A list of instance IDs.
- lang string
- Language.
- output
File string - File name where to save data source results (after running
pulumi preview
). - user
Client stringIp - 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 - File name where to save data source results (after running
pulumi preview
). - user_
client_ strip - The IP address of the client.
- domain
Type String - The type of domain.
- ids List<String>
- A list of instance IDs.
- lang String
- Language.
- output
File String - File name where to save data source results (after running
pulumi preview
). - user
Client StringIp - 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.
Ali Cloud. Dns. Outputs. Get Alidns Instances Instance> - A list of instances. Each element contains the following attributes:
- Domain
Type string - Lang string
- Output
File string - User
Client stringIp
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of instance IDs.
- Instances
[]Get
Alidns Instances Instance - A list of instances. Each element contains the following attributes:
- Domain
Type string - Lang string
- Output
File string - User
Client stringIp
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of instance IDs.
- instances
List<Get
Ali Instances Instance> - A list of instances. Each element contains the following attributes:
- domain
Type String - lang String
- output
File String - user
Client StringIp
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of instance IDs.
- instances
Get
Alidns Instances Instance[] - A list of instances. Each element contains the following attributes:
- domain
Type string - lang string
- output
File string - user
Client stringIp
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of instance IDs.
- instances
Sequence[Get
Alidns Instances Instance] - A list of instances. Each element contains the following attributes:
- domain_
type str - lang str
- output_
file str - user_
client_ strip
- 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:
- domain
Type String - lang String
- output
File String - user
Client StringIp
Supporting Types
GetAlidnsInstancesInstance
- Dns
Security string - DNS security level.
- Domain string
- (Available in 1.124.1+) The domain name.
- Domain
Numbers string - Number of domain names bound.
- Id string
- Id of the instance.
- Instance
Id string - Id of the instance resource.
- Payment
Type string - (Available in 1.124.1+) The payment type of alidns instance.
- Version
Code string - Paid package version.
- Version
Name string - Paid package version name.
- Dns
Security string - DNS security level.
- Domain string
- (Available in 1.124.1+) The domain name.
- Domain
Numbers string - Number of domain names bound.
- Id string
- Id of the instance.
- Instance
Id string - Id of the instance resource.
- Payment
Type string - (Available in 1.124.1+) The payment type of alidns instance.
- Version
Code string - Paid package version.
- Version
Name string - Paid package version name.
- dns
Security String - DNS security level.
- domain String
- (Available in 1.124.1+) The domain name.
- domain
Numbers String - Number of domain names bound.
- id String
- Id of the instance.
- instance
Id String - Id of the instance resource.
- payment
Type String - (Available in 1.124.1+) The payment type of alidns instance.
- version
Code String - Paid package version.
- version
Name String - Paid package version name.
- dns
Security string - DNS security level.
- domain string
- (Available in 1.124.1+) The domain name.
- domain
Numbers string - Number of domain names bound.
- id string
- Id of the instance.
- instance
Id string - Id of the instance resource.
- payment
Type string - (Available in 1.124.1+) The payment type of alidns instance.
- version
Code string - Paid package version.
- version
Name 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.
- dns
Security String - DNS security level.
- domain String
- (Available in 1.124.1+) The domain name.
- domain
Numbers String - Number of domain names bound.
- id String
- Id of the instance.
- instance
Id String - Id of the instance resource.
- payment
Type String - (Available in 1.124.1+) The payment type of alidns instance.
- version
Code String - Paid package version.
- version
Name String - Paid package version name.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.