1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. cen
  5. getTransitRouterMulticastDomains
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.cen.getTransitRouterMulticastDomains

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    This data source provides the Cen Transit Router Multicast Domains of the current Alibaba Cloud user.

    NOTE: Available in v1.195.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const ids = alicloud.cen.getTransitRouterMulticastDomains({
        ids: ["example_id"],
        transitRouterId: "your_transit_router_id",
    });
    export const cenTransitRouterMulticastDomainId0 = ids.then(ids => ids.domains?.[0]?.id);
    const nameRegex = alicloud.cen.getTransitRouterMulticastDomains({
        nameRegex: "^my-name",
        transitRouterId: "your_transit_router_id",
    });
    export const cenTransitRouterMulticastDomainId1 = nameRegex.then(nameRegex => nameRegex.domains?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.cen.get_transit_router_multicast_domains(ids=["example_id"],
        transit_router_id="your_transit_router_id")
    pulumi.export("cenTransitRouterMulticastDomainId0", ids.domains[0].id)
    name_regex = alicloud.cen.get_transit_router_multicast_domains(name_regex="^my-name",
        transit_router_id="your_transit_router_id")
    pulumi.export("cenTransitRouterMulticastDomainId1", name_regex.domains[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cen"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ids, err := cen.GetTransitRouterMulticastDomains(ctx, &cen.GetTransitRouterMulticastDomainsArgs{
    			Ids: []string{
    				"example_id",
    			},
    			TransitRouterId: "your_transit_router_id",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("cenTransitRouterMulticastDomainId0", ids.Domains[0].Id)
    		nameRegex, err := cen.GetTransitRouterMulticastDomains(ctx, &cen.GetTransitRouterMulticastDomainsArgs{
    			NameRegex:       pulumi.StringRef("^my-name"),
    			TransitRouterId: "your_transit_router_id",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("cenTransitRouterMulticastDomainId1", nameRegex.Domains[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var ids = AliCloud.Cen.GetTransitRouterMulticastDomains.Invoke(new()
        {
            Ids = new[]
            {
                "example_id",
            },
            TransitRouterId = "your_transit_router_id",
        });
    
        var nameRegex = AliCloud.Cen.GetTransitRouterMulticastDomains.Invoke(new()
        {
            NameRegex = "^my-name",
            TransitRouterId = "your_transit_router_id",
        });
    
        return new Dictionary<string, object?>
        {
            ["cenTransitRouterMulticastDomainId0"] = ids.Apply(getTransitRouterMulticastDomainsResult => getTransitRouterMulticastDomainsResult.Domains[0]?.Id),
            ["cenTransitRouterMulticastDomainId1"] = nameRegex.Apply(getTransitRouterMulticastDomainsResult => getTransitRouterMulticastDomainsResult.Domains[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.cen.CenFunctions;
    import com.pulumi.alicloud.cen.inputs.GetTransitRouterMulticastDomainsArgs;
    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 ids = CenFunctions.getTransitRouterMulticastDomains(GetTransitRouterMulticastDomainsArgs.builder()
                .ids("example_id")
                .transitRouterId("your_transit_router_id")
                .build());
    
            ctx.export("cenTransitRouterMulticastDomainId0", ids.applyValue(getTransitRouterMulticastDomainsResult -> getTransitRouterMulticastDomainsResult.domains()[0].id()));
            final var nameRegex = CenFunctions.getTransitRouterMulticastDomains(GetTransitRouterMulticastDomainsArgs.builder()
                .nameRegex("^my-name")
                .transitRouterId("your_transit_router_id")
                .build());
    
            ctx.export("cenTransitRouterMulticastDomainId1", nameRegex.applyValue(getTransitRouterMulticastDomainsResult -> getTransitRouterMulticastDomainsResult.domains()[0].id()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:cen:getTransitRouterMulticastDomains
          Arguments:
            ids:
              - example_id
            transitRouterId: your_transit_router_id
      nameRegex:
        fn::invoke:
          Function: alicloud:cen:getTransitRouterMulticastDomains
          Arguments:
            nameRegex: ^my-name
            transitRouterId: your_transit_router_id
    outputs:
      cenTransitRouterMulticastDomainId0: ${ids.domains[0].id}
      cenTransitRouterMulticastDomainId1: ${nameRegex.domains[0].id}
    

    Using getTransitRouterMulticastDomains

    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 getTransitRouterMulticastDomains(args: GetTransitRouterMulticastDomainsArgs, opts?: InvokeOptions): Promise<GetTransitRouterMulticastDomainsResult>
    function getTransitRouterMulticastDomainsOutput(args: GetTransitRouterMulticastDomainsOutputArgs, opts?: InvokeOptions): Output<GetTransitRouterMulticastDomainsResult>
    def get_transit_router_multicast_domains(ids: Optional[Sequence[str]] = None,
                                             name_regex: Optional[str] = None,
                                             output_file: Optional[str] = None,
                                             status: Optional[str] = None,
                                             transit_router_id: Optional[str] = None,
                                             transit_router_multicast_domain_id: Optional[str] = None,
                                             opts: Optional[InvokeOptions] = None) -> GetTransitRouterMulticastDomainsResult
    def get_transit_router_multicast_domains_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                             name_regex: Optional[pulumi.Input[str]] = None,
                                             output_file: Optional[pulumi.Input[str]] = None,
                                             status: Optional[pulumi.Input[str]] = None,
                                             transit_router_id: Optional[pulumi.Input[str]] = None,
                                             transit_router_multicast_domain_id: Optional[pulumi.Input[str]] = None,
                                             opts: Optional[InvokeOptions] = None) -> Output[GetTransitRouterMulticastDomainsResult]
    func GetTransitRouterMulticastDomains(ctx *Context, args *GetTransitRouterMulticastDomainsArgs, opts ...InvokeOption) (*GetTransitRouterMulticastDomainsResult, error)
    func GetTransitRouterMulticastDomainsOutput(ctx *Context, args *GetTransitRouterMulticastDomainsOutputArgs, opts ...InvokeOption) GetTransitRouterMulticastDomainsResultOutput

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

    public static class GetTransitRouterMulticastDomains 
    {
        public static Task<GetTransitRouterMulticastDomainsResult> InvokeAsync(GetTransitRouterMulticastDomainsArgs args, InvokeOptions? opts = null)
        public static Output<GetTransitRouterMulticastDomainsResult> Invoke(GetTransitRouterMulticastDomainsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTransitRouterMulticastDomainsResult> getTransitRouterMulticastDomains(GetTransitRouterMulticastDomainsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:cen/getTransitRouterMulticastDomains:getTransitRouterMulticastDomains
      arguments:
        # arguments dictionary

    The following arguments are supported:

    TransitRouterId string
    The ID of the transit router.
    Ids List<string>
    A list of Transit Router Multicast Domain IDs.
    NameRegex string
    A regex string to filter results by Transit Router Multicast Domain name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of the multicast domain. Valid Value: Active.
    TransitRouterMulticastDomainId string
    The ID of the multicast domain.
    TransitRouterId string
    The ID of the transit router.
    Ids []string
    A list of Transit Router Multicast Domain IDs.
    NameRegex string
    A regex string to filter results by Transit Router Multicast Domain name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of the multicast domain. Valid Value: Active.
    TransitRouterMulticastDomainId string
    The ID of the multicast domain.
    transitRouterId String
    The ID of the transit router.
    ids List<String>
    A list of Transit Router Multicast Domain IDs.
    nameRegex String
    A regex string to filter results by Transit Router Multicast Domain name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of the multicast domain. Valid Value: Active.
    transitRouterMulticastDomainId String
    The ID of the multicast domain.
    transitRouterId string
    The ID of the transit router.
    ids string[]
    A list of Transit Router Multicast Domain IDs.
    nameRegex string
    A regex string to filter results by Transit Router Multicast Domain name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    status string
    The status of the multicast domain. Valid Value: Active.
    transitRouterMulticastDomainId string
    The ID of the multicast domain.
    transit_router_id str
    The ID of the transit router.
    ids Sequence[str]
    A list of Transit Router Multicast Domain IDs.
    name_regex str
    A regex string to filter results by Transit Router Multicast Domain name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    status str
    The status of the multicast domain. Valid Value: Active.
    transit_router_multicast_domain_id str
    The ID of the multicast domain.
    transitRouterId String
    The ID of the transit router.
    ids List<String>
    A list of Transit Router Multicast Domain IDs.
    nameRegex String
    A regex string to filter results by Transit Router Multicast Domain name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of the multicast domain. Valid Value: Active.
    transitRouterMulticastDomainId String
    The ID of the multicast domain.

    getTransitRouterMulticastDomains Result

    The following output properties are available:

    Domains List<Pulumi.AliCloud.Cen.Outputs.GetTransitRouterMulticastDomainsDomain>
    A list of Cen Transit Router Multicast Domains. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Names List<string>
    A list of Transit Router Multicast Domain names.
    TransitRouterId string
    The ID of the transit router.
    NameRegex string
    OutputFile string
    Status string
    The status of the Transit Router Multicast Domain.
    TransitRouterMulticastDomainId string
    The ID of the Transit Router Multicast Domain.
    Domains []GetTransitRouterMulticastDomainsDomain
    A list of Cen Transit Router Multicast Domains. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    A list of Transit Router Multicast Domain names.
    TransitRouterId string
    The ID of the transit router.
    NameRegex string
    OutputFile string
    Status string
    The status of the Transit Router Multicast Domain.
    TransitRouterMulticastDomainId string
    The ID of the Transit Router Multicast Domain.
    domains List<GetTransitRouterMulticastDomainsDomain>
    A list of Cen Transit Router Multicast Domains. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    A list of Transit Router Multicast Domain names.
    transitRouterId String
    The ID of the transit router.
    nameRegex String
    outputFile String
    status String
    The status of the Transit Router Multicast Domain.
    transitRouterMulticastDomainId String
    The ID of the Transit Router Multicast Domain.
    domains GetTransitRouterMulticastDomainsDomain[]
    A list of Cen Transit Router Multicast Domains. Each element contains the following attributes:
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    A list of Transit Router Multicast Domain names.
    transitRouterId string
    The ID of the transit router.
    nameRegex string
    outputFile string
    status string
    The status of the Transit Router Multicast Domain.
    transitRouterMulticastDomainId string
    The ID of the Transit Router Multicast Domain.
    domains Sequence[GetTransitRouterMulticastDomainsDomain]
    A list of Cen Transit Router Multicast Domains. Each element contains the following attributes:
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    names Sequence[str]
    A list of Transit Router Multicast Domain names.
    transit_router_id str
    The ID of the transit router.
    name_regex str
    output_file str
    status str
    The status of the Transit Router Multicast Domain.
    transit_router_multicast_domain_id str
    The ID of the Transit Router Multicast Domain.
    domains List<Property Map>
    A list of Cen Transit Router Multicast Domains. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    A list of Transit Router Multicast Domain names.
    transitRouterId String
    The ID of the transit router.
    nameRegex String
    outputFile String
    status String
    The status of the Transit Router Multicast Domain.
    transitRouterMulticastDomainId String
    The ID of the Transit Router Multicast Domain.

    Supporting Types

    GetTransitRouterMulticastDomainsDomain

    Id string
    The ID of the Transit Router Multicast Domain.
    Status string
    The status of the multicast domain. Valid Value: Active.
    TransitRouterId string
    The ID of the transit router.
    TransitRouterMulticastDomainDescription string
    The description of the Transit Router Multicast Domain.
    TransitRouterMulticastDomainId string
    The ID of the multicast domain.
    TransitRouterMulticastDomainName string
    The name of the Transit Router Multicast Domain.
    Id string
    The ID of the Transit Router Multicast Domain.
    Status string
    The status of the multicast domain. Valid Value: Active.
    TransitRouterId string
    The ID of the transit router.
    TransitRouterMulticastDomainDescription string
    The description of the Transit Router Multicast Domain.
    TransitRouterMulticastDomainId string
    The ID of the multicast domain.
    TransitRouterMulticastDomainName string
    The name of the Transit Router Multicast Domain.
    id String
    The ID of the Transit Router Multicast Domain.
    status String
    The status of the multicast domain. Valid Value: Active.
    transitRouterId String
    The ID of the transit router.
    transitRouterMulticastDomainDescription String
    The description of the Transit Router Multicast Domain.
    transitRouterMulticastDomainId String
    The ID of the multicast domain.
    transitRouterMulticastDomainName String
    The name of the Transit Router Multicast Domain.
    id string
    The ID of the Transit Router Multicast Domain.
    status string
    The status of the multicast domain. Valid Value: Active.
    transitRouterId string
    The ID of the transit router.
    transitRouterMulticastDomainDescription string
    The description of the Transit Router Multicast Domain.
    transitRouterMulticastDomainId string
    The ID of the multicast domain.
    transitRouterMulticastDomainName string
    The name of the Transit Router Multicast Domain.
    id str
    The ID of the Transit Router Multicast Domain.
    status str
    The status of the multicast domain. Valid Value: Active.
    transit_router_id str
    The ID of the transit router.
    transit_router_multicast_domain_description str
    The description of the Transit Router Multicast Domain.
    transit_router_multicast_domain_id str
    The ID of the multicast domain.
    transit_router_multicast_domain_name str
    The name of the Transit Router Multicast Domain.
    id String
    The ID of the Transit Router Multicast Domain.
    status String
    The status of the multicast domain. Valid Value: Active.
    transitRouterId String
    The ID of the transit router.
    transitRouterMulticastDomainDescription String
    The description of the Transit Router Multicast Domain.
    transitRouterMulticastDomainId String
    The ID of the multicast domain.
    transitRouterMulticastDomainName String
    The name of the Transit Router Multicast Domain.

    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.57.1 published on Wednesday, Jun 26, 2024 by Pulumi