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

vcd.getMultisiteOrgAssociation

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 Org association information.

    Supported in provider v3.13+

    Example Usage

    1

    Retrieving an Org association using the associated Org ID.

    import * as pulumi from "@pulumi/pulumi";
    import * as vcd from "@pulumi/vcd";
    
    const my_org = vcd.getOrg({
        name: "my-org",
    });
    const org1_org2 = my_org.then(my_org => vcd.getMultisiteOrgAssociation({
        orgId: my_org.id,
        associatedOrgId: "urn:vcloud:org:3901d87d-1596-4a5a-a74b-57a7313737cf",
    }));
    
    import pulumi
    import pulumi_vcd as vcd
    
    my_org = vcd.get_org(name="my-org")
    org1_org2 = vcd.get_multisite_org_association(org_id=my_org.id,
        associated_org_id="urn:vcloud:org:3901d87d-1596-4a5a-a74b-57a7313737cf")
    
    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 {
    		my_org, err := vcd.LookupOrg(ctx, &vcd.LookupOrgArgs{
    			Name: "my-org",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = vcd.LookupMultisiteOrgAssociation(ctx, &vcd.LookupMultisiteOrgAssociationArgs{
    			OrgId:           my_org.Id,
    			AssociatedOrgId: pulumi.StringRef("urn:vcloud:org:3901d87d-1596-4a5a-a74b-57a7313737cf"),
    		}, 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 my_org = Vcd.GetOrg.Invoke(new()
        {
            Name = "my-org",
        });
    
        var org1_org2 = Vcd.GetMultisiteOrgAssociation.Invoke(new()
        {
            OrgId = my_org.Apply(getOrgResult => getOrgResult.Id),
            AssociatedOrgId = "urn:vcloud:org:3901d87d-1596-4a5a-a74b-57a7313737cf",
        });
    
    });
    
    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.GetOrgArgs;
    import com.pulumi.vcd.inputs.GetMultisiteOrgAssociationArgs;
    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 my-org = VcdFunctions.getOrg(GetOrgArgs.builder()
                .name("my-org")
                .build());
    
            final var org1-org2 = VcdFunctions.getMultisiteOrgAssociation(GetMultisiteOrgAssociationArgs.builder()
                .orgId(my_org.id())
                .associatedOrgId("urn:vcloud:org:3901d87d-1596-4a5a-a74b-57a7313737cf")
                .build());
    
        }
    }
    
    variables:
      my-org:
        fn::invoke:
          function: vcd:getOrg
          arguments:
            name: my-org
      org1-org2:
        fn::invoke:
          function: vcd:getMultisiteOrgAssociation
          arguments:
            orgId: ${["my-org"].id}
            associatedOrgId: urn:vcloud:org:3901d87d-1596-4a5a-a74b-57a7313737cf
    

    2

    Retrieving an Org association using the association data file.

    import * as pulumi from "@pulumi/pulumi";
    import * as vcd from "@pulumi/vcd";
    
    const my_org = vcd.getOrg({
        name: "my-org",
    });
    const org1_org2 = my_org.then(my_org => vcd.getMultisiteOrgAssociation({
        orgId: my_org.id,
        associationDataFile: "remote-org.xml",
    }));
    
    import pulumi
    import pulumi_vcd as vcd
    
    my_org = vcd.get_org(name="my-org")
    org1_org2 = vcd.get_multisite_org_association(org_id=my_org.id,
        association_data_file="remote-org.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 {
    		my_org, err := vcd.LookupOrg(ctx, &vcd.LookupOrgArgs{
    			Name: "my-org",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = vcd.LookupMultisiteOrgAssociation(ctx, &vcd.LookupMultisiteOrgAssociationArgs{
    			OrgId:               my_org.Id,
    			AssociationDataFile: pulumi.StringRef("remote-org.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 my_org = Vcd.GetOrg.Invoke(new()
        {
            Name = "my-org",
        });
    
        var org1_org2 = Vcd.GetMultisiteOrgAssociation.Invoke(new()
        {
            OrgId = my_org.Apply(getOrgResult => getOrgResult.Id),
            AssociationDataFile = "remote-org.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.GetOrgArgs;
    import com.pulumi.vcd.inputs.GetMultisiteOrgAssociationArgs;
    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 my-org = VcdFunctions.getOrg(GetOrgArgs.builder()
                .name("my-org")
                .build());
    
            final var org1-org2 = VcdFunctions.getMultisiteOrgAssociation(GetMultisiteOrgAssociationArgs.builder()
                .orgId(my_org.id())
                .associationDataFile("remote-org.xml")
                .build());
    
        }
    }
    
    variables:
      my-org:
        fn::invoke:
          function: vcd:getOrg
          arguments:
            name: my-org
      org1-org2:
        fn::invoke:
          function: vcd:getMultisiteOrgAssociation
          arguments:
            orgId: ${["my-org"].id}
            associationDataFile: remote-org.xml
    

    More information

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

    Using getMultisiteOrgAssociation

    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 getMultisiteOrgAssociation(args: GetMultisiteOrgAssociationArgs, opts?: InvokeOptions): Promise<GetMultisiteOrgAssociationResult>
    function getMultisiteOrgAssociationOutput(args: GetMultisiteOrgAssociationOutputArgs, opts?: InvokeOptions): Output<GetMultisiteOrgAssociationResult>
    def get_multisite_org_association(associated_org_id: Optional[str] = None,
                                      association_data_file: Optional[str] = None,
                                      id: Optional[str] = None,
                                      org_id: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetMultisiteOrgAssociationResult
    def get_multisite_org_association_output(associated_org_id: Optional[pulumi.Input[str]] = None,
                                      association_data_file: Optional[pulumi.Input[str]] = None,
                                      id: Optional[pulumi.Input[str]] = None,
                                      org_id: Optional[pulumi.Input[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetMultisiteOrgAssociationResult]
    func LookupMultisiteOrgAssociation(ctx *Context, args *LookupMultisiteOrgAssociationArgs, opts ...InvokeOption) (*LookupMultisiteOrgAssociationResult, error)
    func LookupMultisiteOrgAssociationOutput(ctx *Context, args *LookupMultisiteOrgAssociationOutputArgs, opts ...InvokeOption) LookupMultisiteOrgAssociationResultOutput

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

    public static class GetMultisiteOrgAssociation 
    {
        public static Task<GetMultisiteOrgAssociationResult> InvokeAsync(GetMultisiteOrgAssociationArgs args, InvokeOptions? opts = null)
        public static Output<GetMultisiteOrgAssociationResult> Invoke(GetMultisiteOrgAssociationInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMultisiteOrgAssociationResult> getMultisiteOrgAssociation(GetMultisiteOrgAssociationArgs args, InvokeOptions options)
    public static Output<GetMultisiteOrgAssociationResult> getMultisiteOrgAssociation(GetMultisiteOrgAssociationArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vcd:index/getMultisiteOrgAssociation:getMultisiteOrgAssociation
      arguments:
        # arguments dictionary

    The following arguments are supported:

    OrgId string
    The ID of the organization for which we need to collect the data.
    AssociatedOrgId string
    ID of the remote organization 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 Org to another one. (Used when associated_org_id is not known)
    Id string
    OrgId string
    The ID of the organization for which we need to collect the data.
    AssociatedOrgId string
    ID of the remote organization 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 Org to another one. (Used when associated_org_id is not known)
    Id string
    orgId String
    The ID of the organization for which we need to collect the data.
    associatedOrgId String
    ID of the remote organization 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 Org to another one. (Used when associated_org_id is not known)
    id String
    orgId string
    The ID of the organization for which we need to collect the data.
    associatedOrgId string
    ID of the remote organization 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 Org to another one. (Used when associated_org_id is not known)
    id string
    org_id str
    The ID of the organization for which we need to collect the data.
    associated_org_id str
    ID of the remote organization 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 Org to another one. (Used when associated_org_id is not known)
    id str
    orgId String
    The ID of the organization for which we need to collect the data.
    associatedOrgId String
    ID of the remote organization 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 Org to another one. (Used when associated_org_id is not known)
    id String

    getMultisiteOrgAssociation Result

    The following output properties are available:

    AssociatedOrgName string
    The name of the associated Org.
    AssociatedSiteId string
    The ID of the associated site.
    Id string
    OrgId string
    Status string
    The status of the association (one of ASYMMETRIC, ACTIVE, UNREACHABLE, ERROR)
    AssociatedOrgId string
    AssociationDataFile string
    AssociatedOrgName string
    The name of the associated Org.
    AssociatedSiteId string
    The ID of the associated site.
    Id string
    OrgId string
    Status string
    The status of the association (one of ASYMMETRIC, ACTIVE, UNREACHABLE, ERROR)
    AssociatedOrgId string
    AssociationDataFile string
    associatedOrgName String
    The name of the associated Org.
    associatedSiteId String
    The ID of the associated site.
    id String
    orgId String
    status String
    The status of the association (one of ASYMMETRIC, ACTIVE, UNREACHABLE, ERROR)
    associatedOrgId String
    associationDataFile String
    associatedOrgName string
    The name of the associated Org.
    associatedSiteId string
    The ID of the associated site.
    id string
    orgId string
    status string
    The status of the association (one of ASYMMETRIC, ACTIVE, UNREACHABLE, ERROR)
    associatedOrgId string
    associationDataFile string
    associated_org_name str
    The name of the associated Org.
    associated_site_id str
    The ID of the associated site.
    id str
    org_id str
    status str
    The status of the association (one of ASYMMETRIC, ACTIVE, UNREACHABLE, ERROR)
    associated_org_id str
    association_data_file str
    associatedOrgName String
    The name of the associated Org.
    associatedSiteId String
    The ID of the associated site.
    id String
    orgId String
    status String
    The status of the association (one of ASYMMETRIC, ACTIVE, UNREACHABLE, ERROR)
    associatedOrgId 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