vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware
vcd.getMultisiteOrgAssociation
Explore with Pulumi AI
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:
- Org
Id string - The ID of the organization for which we need to collect the data.
- Associated
Org stringId - ID of the remote organization associated with the current one. (Used in alternative to
associated_data_file
) - Association
Data stringFile - 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 string - The ID of the organization for which we need to collect the data.
- Associated
Org stringId - ID of the remote organization associated with the current one. (Used in alternative to
associated_data_file
) - Association
Data stringFile - 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 String - The ID of the organization for which we need to collect the data.
- associated
Org StringId - ID of the remote organization associated with the current one. (Used in alternative to
associated_data_file
) - association
Data StringFile - 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 string - The ID of the organization for which we need to collect the data.
- associated
Org stringId - ID of the remote organization associated with the current one. (Used in alternative to
associated_data_file
) - association
Data stringFile - 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_ strid - ID of the remote organization associated with the current one. (Used in alternative to
associated_data_file
) - association_
data_ strfile - 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
- org
Id String - The ID of the organization for which we need to collect the data.
- associated
Org StringId - ID of the remote organization associated with the current one. (Used in alternative to
associated_data_file
) - association
Data StringFile - 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:
- Associated
Org stringName - The name of the associated Org.
- Associated
Site stringId - The ID of the associated site.
- Id string
- Org
Id string - Status string
- The status of the association (one of
ASYMMETRIC
,ACTIVE
,UNREACHABLE
,ERROR
) - Associated
Org stringId - Association
Data stringFile
- Associated
Org stringName - The name of the associated Org.
- Associated
Site stringId - The ID of the associated site.
- Id string
- Org
Id string - Status string
- The status of the association (one of
ASYMMETRIC
,ACTIVE
,UNREACHABLE
,ERROR
) - Associated
Org stringId - Association
Data stringFile
- associated
Org StringName - The name of the associated Org.
- associated
Site StringId - The ID of the associated site.
- id String
- org
Id String - status String
- The status of the association (one of
ASYMMETRIC
,ACTIVE
,UNREACHABLE
,ERROR
) - associated
Org StringId - association
Data StringFile
- associated
Org stringName - The name of the associated Org.
- associated
Site stringId - The ID of the associated site.
- id string
- org
Id string - status string
- The status of the association (one of
ASYMMETRIC
,ACTIVE
,UNREACHABLE
,ERROR
) - associated
Org stringId - association
Data stringFile
- associated_
org_ strname - The name of the associated Org.
- associated_
site_ strid - 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_ strid - association_
data_ strfile
- associated
Org StringName - The name of the associated Org.
- associated
Site StringId - The ID of the associated site.
- id String
- org
Id String - status String
- The status of the association (one of
ASYMMETRIC
,ACTIVE
,UNREACHABLE
,ERROR
) - associated
Org StringId - association
Data StringFile
Package Details
- Repository
- vcd vmware/terraform-provider-vcd
- License
- Notes
- This Pulumi package is based on the
vcd
Terraform Provider.