Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi
alicloud.dns.getInstances
Explore with Pulumi AI
DEPRECATED: This resource has been renamed to alicloud.dns.getAlidnsInstances from version 1.95.0.
This data source provides a list of DNS instances in an Alibaba Cloud account according to the specified filters.
NOTE: Available in 1.84.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = alicloud.dns.getInstances({
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_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.GetInstances(ctx, &dns.GetInstancesArgs{
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.GetInstances.Invoke(new()
{
Ids = new[]
{
"dns-cn-oew1npk****",
},
});
return new Dictionary<string, object?>
{
["firstInstanceId"] = example.Apply(getInstancesResult => getInstancesResult.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.GetInstancesArgs;
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.getInstances(GetInstancesArgs.builder()
.ids("dns-cn-oew1npk****")
.build());
ctx.export("firstInstanceId", example.applyValue(getInstancesResult -> getInstancesResult.instances()[0].id()));
}
}
variables:
example:
fn::invoke:
Function: alicloud:dns:getInstances
Arguments:
ids:
- dns-cn-oew1npk****
outputs:
firstInstanceId: ${example.instances[0].id}
Using getInstances
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 getInstances(args: GetInstancesArgs, opts?: InvokeOptions): Promise<GetInstancesResult>
function getInstancesOutput(args: GetInstancesOutputArgs, opts?: InvokeOptions): Output<GetInstancesResult>
def get_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) -> GetInstancesResult
def get_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[GetInstancesResult]
func GetInstances(ctx *Context, args *GetInstancesArgs, opts ...InvokeOption) (*GetInstancesResult, error)
func GetInstancesOutput(ctx *Context, args *GetInstancesOutputArgs, opts ...InvokeOption) GetInstancesResultOutput
> Note: This function is named GetInstances
in the Go SDK.
public static class GetInstances
{
public static Task<GetInstancesResult> InvokeAsync(GetInstancesArgs args, InvokeOptions? opts = null)
public static Output<GetInstancesResult> Invoke(GetInstancesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetInstancesResult> getInstances(GetInstancesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:dns/getInstances:getInstances
arguments:
# arguments dictionary
The following arguments are supported:
- Domain
Type string - Ids List<string>
- A list of instance IDs.
- Lang string
- Output
File string - File name where to save data source results (after running
pulumi preview
). - User
Client stringIp
- Domain
Type string - Ids []string
- A list of instance IDs.
- Lang string
- Output
File string - File name where to save data source results (after running
pulumi preview
). - User
Client stringIp
- domain
Type String - ids List<String>
- A list of instance IDs.
- lang String
- output
File String - File name where to save data source results (after running
pulumi preview
). - user
Client StringIp
- domain
Type string - ids string[]
- A list of instance IDs.
- lang string
- output
File string - File name where to save data source results (after running
pulumi preview
). - user
Client stringIp
- domain_
type str - ids Sequence[str]
- A list of instance IDs.
- lang str
- output_
file str - File name where to save data source results (after running
pulumi preview
). - user_
client_ strip
- domain
Type String - ids List<String>
- A list of instance IDs.
- lang String
- output
File String - File name where to save data source results (after running
pulumi preview
). - user
Client StringIp
getInstances 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 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
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
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
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
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
GetInstancesInstance
- Dns
Security string - DNS security level.
- Domain string
- 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 - Version
Code string - Paid package version.
- Version
Name string - Paid package version name.
- Dns
Security string - DNS security level.
- Domain string
- 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 - Version
Code string - Paid package version.
- Version
Name string - Paid package version name.
- dns
Security String - DNS security level.
- domain String
- 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 - version
Code String - Paid package version.
- version
Name String - Paid package version name.
- dns
Security string - DNS security level.
- domain string
- 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 - version
Code string - Paid package version.
- version
Name string - Paid package version name.
- dns_
security str - DNS security level.
- domain str
- 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 - version_
code str - Paid package version.
- version_
name str - Paid package version name.
- dns
Security String - DNS security level.
- domain String
- 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 - 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.