1. Packages
  2. Alicloud Provider
  3. API Docs
  4. dns
  5. getAlidnsDomainGroups
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.dns.getAlidnsDomainGroups

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

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

    NOTE: Available in 1.85.0+.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const example = alicloud.dns.getAlidnsDomainGroups({
        ids: ["c5ef2bc43064445787adf182af2****"],
    });
    export const firstDomainGroupId = example.then(example => example.groups?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.dns.get_alidns_domain_groups(ids=["c5ef2bc43064445787adf182af2****"])
    pulumi.export("firstDomainGroupId", example.groups[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.GetAlidnsDomainGroups(ctx, &dns.GetAlidnsDomainGroupsArgs{
    			Ids: []string{
    				"c5ef2bc43064445787adf182af2****",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstDomainGroupId", example.Groups[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.GetAlidnsDomainGroups.Invoke(new()
        {
            Ids = new[]
            {
                "c5ef2bc43064445787adf182af2****",
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["firstDomainGroupId"] = example.Apply(getAlidnsDomainGroupsResult => getAlidnsDomainGroupsResult.Groups[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.GetAlidnsDomainGroupsArgs;
    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.getAlidnsDomainGroups(GetAlidnsDomainGroupsArgs.builder()
                .ids("c5ef2bc43064445787adf182af2****")
                .build());
    
            ctx.export("firstDomainGroupId", example.applyValue(getAlidnsDomainGroupsResult -> getAlidnsDomainGroupsResult.groups()[0].id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: alicloud:dns:getAlidnsDomainGroups
          Arguments:
            ids:
              - c5ef2bc43064445787adf182af2****
    outputs:
      firstDomainGroupId: ${example.groups[0].id}
    

    Using getAlidnsDomainGroups

    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 getAlidnsDomainGroups(args: GetAlidnsDomainGroupsArgs, opts?: InvokeOptions): Promise<GetAlidnsDomainGroupsResult>
    function getAlidnsDomainGroupsOutput(args: GetAlidnsDomainGroupsOutputArgs, opts?: InvokeOptions): Output<GetAlidnsDomainGroupsResult>
    def get_alidns_domain_groups(ids: Optional[Sequence[str]] = None,
                                 name_regex: Optional[str] = None,
                                 output_file: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetAlidnsDomainGroupsResult
    def get_alidns_domain_groups_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                 name_regex: Optional[pulumi.Input[str]] = None,
                                 output_file: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetAlidnsDomainGroupsResult]
    func GetAlidnsDomainGroups(ctx *Context, args *GetAlidnsDomainGroupsArgs, opts ...InvokeOption) (*GetAlidnsDomainGroupsResult, error)
    func GetAlidnsDomainGroupsOutput(ctx *Context, args *GetAlidnsDomainGroupsOutputArgs, opts ...InvokeOption) GetAlidnsDomainGroupsResultOutput

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

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

    The following arguments are supported:

    Ids List<string>
    A list of instance IDs.
    NameRegex string
    A regex string to filter results by the domain group name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Ids []string
    A list of instance IDs.
    NameRegex string
    A regex string to filter results by the domain group name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ids List<String>
    A list of instance IDs.
    nameRegex String
    A regex string to filter results by the domain group name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    ids string[]
    A list of instance IDs.
    nameRegex string
    A regex string to filter results by the domain group name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    ids Sequence[str]
    A list of instance IDs.
    name_regex str
    A regex string to filter results by the domain group name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    ids List<String>
    A list of instance IDs.
    nameRegex String
    A regex string to filter results by the domain group name.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getAlidnsDomainGroups Result

    The following output properties are available:

    Groups List<Pulumi.AliCloud.Dns.Outputs.GetAlidnsDomainGroupsGroup>
    A list of instances. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of instance IDs.
    Names List<string>
    A list of domain group names.
    NameRegex string
    OutputFile string
    Groups []GetAlidnsDomainGroupsGroup
    A list of instances. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of instance IDs.
    Names []string
    A list of domain group names.
    NameRegex string
    OutputFile string
    groups List<GetAliDomainGroupsGroup>
    A list of instances. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of instance IDs.
    names List<String>
    A list of domain group names.
    nameRegex String
    outputFile String
    groups GetAlidnsDomainGroupsGroup[]
    A list of instances. Each element contains the following attributes:
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of instance IDs.
    names string[]
    A list of domain group names.
    nameRegex string
    outputFile string
    groups Sequence[GetAlidnsDomainGroupsGroup]
    A list of instances. Each element contains the following attributes:
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of instance IDs.
    names Sequence[str]
    A list of domain group names.
    name_regex str
    output_file str
    groups List<Property Map>
    A list of instances. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of instance IDs.
    names List<String>
    A list of domain group names.
    nameRegex String
    outputFile String

    Supporting Types

    GetAlidnsDomainGroupsGroup

    DomainCount int
    Number of domain names in the group.
    GroupId string
    Id of the domain group.
    GroupName string
    The name of the domain group.
    Id string
    Id of the instance.
    DomainCount int
    Number of domain names in the group.
    GroupId string
    Id of the domain group.
    GroupName string
    The name of the domain group.
    Id string
    Id of the instance.
    domainCount Integer
    Number of domain names in the group.
    groupId String
    Id of the domain group.
    groupName String
    The name of the domain group.
    id String
    Id of the instance.
    domainCount number
    Number of domain names in the group.
    groupId string
    Id of the domain group.
    groupName string
    The name of the domain group.
    id string
    Id of the instance.
    domain_count int
    Number of domain names in the group.
    group_id str
    Id of the domain group.
    group_name str
    The name of the domain group.
    id str
    Id of the instance.
    domainCount Number
    Number of domain names in the group.
    groupId String
    Id of the domain group.
    groupName String
    The name of the domain group.
    id String
    Id of the instance.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi