1. Packages
  2. Vcd Provider
  3. API Docs
  4. getMultisiteSiteAssociation
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

vcd.getMultisiteSiteAssociation

Explore with Pulumi AI

vcd logo
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

    Provides a data source to read a VMware Cloud Director site association information.

    Note: this data source requires System Administrator privileges

    Supported in provider v3.13+

    Example Usage

    1

    Retrieving a site association using the associated site ID.

    import * as pulumi from "@pulumi/pulumi";
    import * as vcd from "@pulumi/vcd";
    
    const site1_site2 = vcd.getMultisiteSiteAssociation({
        associatedSiteId: "urn:vcloud:site:dca02216-fcf3-414a-be95-a3e26cf1296b",
    });
    
    import pulumi
    import pulumi_vcd as vcd
    
    site1_site2 = vcd.get_multisite_site_association(associated_site_id="urn:vcloud:site:dca02216-fcf3-414a-be95-a3e26cf1296b")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vcd/v3/vcd"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vcd.LookupMultisiteSiteAssociation(ctx, &vcd.LookupMultisiteSiteAssociationArgs{
    			AssociatedSiteId: pulumi.StringRef("urn:vcloud:site:dca02216-fcf3-414a-be95-a3e26cf1296b"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vcd = Pulumi.Vcd;
    
    return await Deployment.RunAsync(() => 
    {
        var site1_site2 = Vcd.GetMultisiteSiteAssociation.Invoke(new()
        {
            AssociatedSiteId = "urn:vcloud:site:dca02216-fcf3-414a-be95-a3e26cf1296b",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vcd.VcdFunctions;
    import com.pulumi.vcd.inputs.GetMultisiteSiteAssociationArgs;
    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 site1-site2 = VcdFunctions.getMultisiteSiteAssociation(GetMultisiteSiteAssociationArgs.builder()
                .associatedSiteId("urn:vcloud:site:dca02216-fcf3-414a-be95-a3e26cf1296b")
                .build());
    
        }
    }
    
    variables:
      site1-site2:
        fn::invoke:
          function: vcd:getMultisiteSiteAssociation
          arguments:
            associatedSiteId: urn:vcloud:site:dca02216-fcf3-414a-be95-a3e26cf1296b
    

    2

    Retrieving a site association using the association data file.

    import * as pulumi from "@pulumi/pulumi";
    import * as vcd from "@pulumi/vcd";
    
    const site1_site2 = vcd.getMultisiteSiteAssociation({
        associationDataFile: "remote-site.xml",
    });
    
    import pulumi
    import pulumi_vcd as vcd
    
    site1_site2 = vcd.get_multisite_site_association(association_data_file="remote-site.xml")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vcd/v3/vcd"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vcd.LookupMultisiteSiteAssociation(ctx, &vcd.LookupMultisiteSiteAssociationArgs{
    			AssociationDataFile: pulumi.StringRef("remote-site.xml"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vcd = Pulumi.Vcd;
    
    return await Deployment.RunAsync(() => 
    {
        var site1_site2 = Vcd.GetMultisiteSiteAssociation.Invoke(new()
        {
            AssociationDataFile = "remote-site.xml",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vcd.VcdFunctions;
    import com.pulumi.vcd.inputs.GetMultisiteSiteAssociationArgs;
    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 site1-site2 = VcdFunctions.getMultisiteSiteAssociation(GetMultisiteSiteAssociationArgs.builder()
                .associationDataFile("remote-site.xml")
                .build());
    
        }
    }
    
    variables:
      site1-site2:
        fn::invoke:
          function: vcd:getMultisiteSiteAssociation
          arguments:
            associationDataFile: remote-site.xml
    

    More information

    See Site and Org association for a broader description of association workflows.

    Using getMultisiteSiteAssociation

    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 getMultisiteSiteAssociation(args: GetMultisiteSiteAssociationArgs, opts?: InvokeOptions): Promise<GetMultisiteSiteAssociationResult>
    function getMultisiteSiteAssociationOutput(args: GetMultisiteSiteAssociationOutputArgs, opts?: InvokeOptions): Output<GetMultisiteSiteAssociationResult>
    def get_multisite_site_association(associated_site_id: Optional[str] = None,
                                       association_data_file: Optional[str] = None,
                                       id: Optional[str] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetMultisiteSiteAssociationResult
    def get_multisite_site_association_output(associated_site_id: Optional[pulumi.Input[str]] = None,
                                       association_data_file: Optional[pulumi.Input[str]] = None,
                                       id: Optional[pulumi.Input[str]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetMultisiteSiteAssociationResult]
    func LookupMultisiteSiteAssociation(ctx *Context, args *LookupMultisiteSiteAssociationArgs, opts ...InvokeOption) (*LookupMultisiteSiteAssociationResult, error)
    func LookupMultisiteSiteAssociationOutput(ctx *Context, args *LookupMultisiteSiteAssociationOutputArgs, opts ...InvokeOption) LookupMultisiteSiteAssociationResultOutput

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

    public static class GetMultisiteSiteAssociation 
    {
        public static Task<GetMultisiteSiteAssociationResult> InvokeAsync(GetMultisiteSiteAssociationArgs args, InvokeOptions? opts = null)
        public static Output<GetMultisiteSiteAssociationResult> Invoke(GetMultisiteSiteAssociationInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMultisiteSiteAssociationResult> getMultisiteSiteAssociation(GetMultisiteSiteAssociationArgs args, InvokeOptions options)
    public static Output<GetMultisiteSiteAssociationResult> getMultisiteSiteAssociation(GetMultisiteSiteAssociationArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vcd:index/getMultisiteSiteAssociation:getMultisiteSiteAssociation
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AssociatedSiteId string
    ID of the remote site associated with the current one. (Used in alternative to associated_data_file)
    AssociationDataFile string
    Name of the file containing the data used to associate this site to another one. (Used when associated_site_id is not known)
    Id string
    AssociatedSiteId string
    ID of the remote site associated with the current one. (Used in alternative to associated_data_file)
    AssociationDataFile string
    Name of the file containing the data used to associate this site to another one. (Used when associated_site_id is not known)
    Id string
    associatedSiteId String
    ID of the remote site associated with the current one. (Used in alternative to associated_data_file)
    associationDataFile String
    Name of the file containing the data used to associate this site to another one. (Used when associated_site_id is not known)
    id String
    associatedSiteId string
    ID of the remote site associated with the current one. (Used in alternative to associated_data_file)
    associationDataFile string
    Name of the file containing the data used to associate this site to another one. (Used when associated_site_id is not known)
    id string
    associated_site_id str
    ID of the remote site associated with the current one. (Used in alternative to associated_data_file)
    association_data_file str
    Name of the file containing the data used to associate this site to another one. (Used when associated_site_id is not known)
    id str
    associatedSiteId String
    ID of the remote site associated with the current one. (Used in alternative to associated_data_file)
    associationDataFile String
    Name of the file containing the data used to associate this site to another one. (Used when associated_site_id is not known)
    id String

    getMultisiteSiteAssociation Result

    The following output properties are available:

    AssociatedSiteHref string
    The URL of the associated site.
    AssociatedSiteName string
    The name of the associated site.
    Id string
    Status string
    The status of the association (one of ASYMMETRIC, ACTIVE, UNREACHABLE, ERROR)
    AssociatedSiteId string
    AssociationDataFile string
    AssociatedSiteHref string
    The URL of the associated site.
    AssociatedSiteName string
    The name of the associated site.
    Id string
    Status string
    The status of the association (one of ASYMMETRIC, ACTIVE, UNREACHABLE, ERROR)
    AssociatedSiteId string
    AssociationDataFile string
    associatedSiteHref String
    The URL of the associated site.
    associatedSiteName String
    The name of the associated site.
    id String
    status String
    The status of the association (one of ASYMMETRIC, ACTIVE, UNREACHABLE, ERROR)
    associatedSiteId String
    associationDataFile String
    associatedSiteHref string
    The URL of the associated site.
    associatedSiteName string
    The name of the associated site.
    id string
    status string
    The status of the association (one of ASYMMETRIC, ACTIVE, UNREACHABLE, ERROR)
    associatedSiteId string
    associationDataFile string
    associated_site_href str
    The URL of the associated site.
    associated_site_name str
    The name of the associated site.
    id str
    status str
    The status of the association (one of ASYMMETRIC, ACTIVE, UNREACHABLE, ERROR)
    associated_site_id str
    association_data_file str
    associatedSiteHref String
    The URL of the associated site.
    associatedSiteName String
    The name of the associated site.
    id String
    status String
    The status of the association (one of ASYMMETRIC, ACTIVE, UNREACHABLE, ERROR)
    associatedSiteId String
    associationDataFile String

    Package Details

    Repository
    vcd vmware/terraform-provider-vcd
    License
    Notes
    This Pulumi package is based on the vcd Terraform Provider.
    vcd logo
    vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware