Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
This data source provides the Rdc Organizations of the current Alibaba Cloud user.
NOTE: Available since v1.137.0.
DEPRECATED: This data source has been deprecated from version
1.238.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "tf-testAccOrganizations-Organizations";
const _default = new alicloud.rdc.Organization("default", {
organizationName: name,
source: name,
});
const ids = alicloud.rdc.getOrganizationsOutput({
ids: [_default.id],
});
export const rdcOrganizationId1 = ids.apply(ids => ids.id);
const nameRegex = alicloud.rdc.getOrganizations({
nameRegex: "^my-Organization",
});
export const rdcOrganizationId2 = nameRegex.then(nameRegex => nameRegex.id);
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf-testAccOrganizations-Organizations"
default = alicloud.rdc.Organization("default",
organization_name=name,
source=name)
ids = alicloud.rdc.get_organizations_output(ids=[default.id])
pulumi.export("rdcOrganizationId1", ids.id)
name_regex = alicloud.rdc.get_organizations(name_regex="^my-Organization")
pulumi.export("rdcOrganizationId2", name_regex.id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/rdc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "tf-testAccOrganizations-Organizations"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := rdc.NewOrganization(ctx, "default", &rdc.OrganizationArgs{
OrganizationName: pulumi.String(name),
Source: pulumi.String(name),
})
if err != nil {
return err
}
ids := rdc.GetOrganizationsOutput(ctx, rdc.GetOrganizationsOutputArgs{
Ids: pulumi.StringArray{
_default.ID(),
},
}, nil)
ctx.Export("rdcOrganizationId1", ids.ApplyT(func(ids rdc.GetOrganizationsResult) (*string, error) {
return &ids.Id, nil
}).(pulumi.StringPtrOutput))
nameRegex, err := rdc.GetOrganizations(ctx, &rdc.GetOrganizationsArgs{
NameRegex: pulumi.StringRef("^my-Organization"),
}, nil)
if err != nil {
return err
}
ctx.Export("rdcOrganizationId2", nameRegex.Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "tf-testAccOrganizations-Organizations";
var @default = new AliCloud.Rdc.Organization("default", new()
{
OrganizationName = name,
Source = name,
});
var ids = AliCloud.Rdc.GetOrganizations.Invoke(new()
{
Ids = new[]
{
@default.Id,
},
});
var nameRegex = AliCloud.Rdc.GetOrganizations.Invoke(new()
{
NameRegex = "^my-Organization",
});
return new Dictionary<string, object?>
{
["rdcOrganizationId1"] = ids.Apply(getOrganizationsResult => getOrganizationsResult.Id),
["rdcOrganizationId2"] = nameRegex.Apply(getOrganizationsResult => getOrganizationsResult.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.rdc.Organization;
import com.pulumi.alicloud.rdc.OrganizationArgs;
import com.pulumi.alicloud.rdc.RdcFunctions;
import com.pulumi.alicloud.rdc.inputs.GetOrganizationsArgs;
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 config = ctx.config();
final var name = config.get("name").orElse("tf-testAccOrganizations-Organizations");
var default_ = new Organization("default", OrganizationArgs.builder()
.organizationName(name)
.source(name)
.build());
final var ids = RdcFunctions.getOrganizations(GetOrganizationsArgs.builder()
.ids(default_.id())
.build());
ctx.export("rdcOrganizationId1", ids.applyValue(_ids -> _ids.id()));
final var nameRegex = RdcFunctions.getOrganizations(GetOrganizationsArgs.builder()
.nameRegex("^my-Organization")
.build());
ctx.export("rdcOrganizationId2", nameRegex.id());
}
}
configuration:
name:
type: string
default: tf-testAccOrganizations-Organizations
resources:
default:
type: alicloud:rdc:Organization
properties:
organizationName: ${name}
source: ${name}
variables:
ids:
fn::invoke:
function: alicloud:rdc:getOrganizations
arguments:
ids:
- ${default.id}
nameRegex:
fn::invoke:
function: alicloud:rdc:getOrganizations
arguments:
nameRegex: ^my-Organization
outputs:
rdcOrganizationId1: ${ids.id}
rdcOrganizationId2: ${nameRegex.id}
Using getOrganizations
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 getOrganizations(args: GetOrganizationsArgs, opts?: InvokeOptions): Promise<GetOrganizationsResult>
function getOrganizationsOutput(args: GetOrganizationsOutputArgs, opts?: InvokeOptions): Output<GetOrganizationsResult>def get_organizations(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
real_pk: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetOrganizationsResult
def get_organizations_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
real_pk: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetOrganizationsResult]func GetOrganizations(ctx *Context, args *GetOrganizationsArgs, opts ...InvokeOption) (*GetOrganizationsResult, error)
func GetOrganizationsOutput(ctx *Context, args *GetOrganizationsOutputArgs, opts ...InvokeOption) GetOrganizationsResultOutput> Note: This function is named GetOrganizations in the Go SDK.
public static class GetOrganizations
{
public static Task<GetOrganizationsResult> InvokeAsync(GetOrganizationsArgs args, InvokeOptions? opts = null)
public static Output<GetOrganizationsResult> Invoke(GetOrganizationsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetOrganizationsResult> getOrganizations(GetOrganizationsArgs args, InvokeOptions options)
public static Output<GetOrganizationsResult> getOrganizations(GetOrganizationsArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:rdc/getOrganizations:getOrganizations
arguments:
# arguments dictionaryThe following arguments are supported:
- Ids List<string>
- A list of Organization IDs.
- Name
Regex string - A regex string to filter results by Organization name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Real
Pk string - User pk, not required, only required when the ak used by the calling interface is inconsistent with the user pk
- Ids []string
- A list of Organization IDs.
- Name
Regex string - A regex string to filter results by Organization name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Real
Pk string - User pk, not required, only required when the ak used by the calling interface is inconsistent with the user pk
- ids List<String>
- A list of Organization IDs.
- name
Regex String - A regex string to filter results by Organization name.
- output
File String - File name where to save data source results (after running
pulumi preview). - real
Pk String - User pk, not required, only required when the ak used by the calling interface is inconsistent with the user pk
- ids string[]
- A list of Organization IDs.
- name
Regex string - A regex string to filter results by Organization name.
- output
File string - File name where to save data source results (after running
pulumi preview). - real
Pk string - User pk, not required, only required when the ak used by the calling interface is inconsistent with the user pk
- ids Sequence[str]
- A list of Organization IDs.
- name_
regex str - A regex string to filter results by Organization name.
- output_
file str - File name where to save data source results (after running
pulumi preview). - real_
pk str - User pk, not required, only required when the ak used by the calling interface is inconsistent with the user pk
- ids List<String>
- A list of Organization IDs.
- name
Regex String - A regex string to filter results by Organization name.
- output
File String - File name where to save data source results (after running
pulumi preview). - real
Pk String - User pk, not required, only required when the ak used by the calling interface is inconsistent with the user pk
getOrganizations Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- A list of Organization names.
- Organizations
List<Pulumi.
Ali Cloud. Rdc. Outputs. Get Organizations Organization> - A list of Rdc Organizations. Each element contains the following attributes:
- Name
Regex string - Output
File string - Real
Pk string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- A list of Organization names.
- Organizations
[]Get
Organizations Organization - A list of Rdc Organizations. Each element contains the following attributes:
- Name
Regex string - Output
File string - Real
Pk string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- A list of Organization names.
- organizations
List<Get
Organizations Organization> - A list of Rdc Organizations. Each element contains the following attributes:
- name
Regex String - output
File String - real
Pk String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- A list of Organization names.
- organizations
Get
Organizations Organization[] - A list of Rdc Organizations. Each element contains the following attributes:
- name
Regex string - output
File string - real
Pk string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- A list of Organization names.
- organizations
Sequence[Get
Organizations Organization] - A list of Rdc Organizations. Each element contains the following attributes:
- name_
regex str - output_
file str - real_
pk str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- A list of Organization names.
- organizations List<Property Map>
- A list of Rdc Organizations. Each element contains the following attributes:
- name
Regex String - output
File String - real
Pk String
Supporting Types
GetOrganizationsOrganization
- Id string
- The ID of the Organization.
- Organization
Id string - The first ID of the resource.
- Organization
Name string - Company name.
- Id string
- The ID of the Organization.
- Organization
Id string - The first ID of the resource.
- Organization
Name string - Company name.
- id String
- The ID of the Organization.
- organization
Id String - The first ID of the resource.
- organization
Name String - Company name.
- id string
- The ID of the Organization.
- organization
Id string - The first ID of the resource.
- organization
Name string - Company name.
- id str
- The ID of the Organization.
- organization_
id str - The first ID of the resource.
- organization_
name str - Company name.
- id String
- The ID of the Organization.
- organization
Id String - The first ID of the resource.
- organization
Name String - Company name.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
