Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi
alicloud.dms.getUserTenants
Explore with Pulumi AI
This data source provides a list of DMS User Tenants in an Alibaba Cloud account according to the specified filters.
NOTE: Available in 1.161.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// Declare the data source
const default = alicloud.dms.getUserTenants({
status: "ACTIVE",
});
export const tid = _default.then(_default => _default.ids?.[0]);
import pulumi
import pulumi_alicloud as alicloud
# Declare the data source
default = alicloud.dms.get_user_tenants(status="ACTIVE")
pulumi.export("tid", default.ids[0])
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dms"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Declare the data source
_default, err := dms.GetUserTenants(ctx, &dms.GetUserTenantsArgs{
Status: pulumi.StringRef("ACTIVE"),
}, nil)
if err != nil {
return err
}
ctx.Export("tid", _default.Ids[0])
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
// Declare the data source
var @default = AliCloud.Dms.GetUserTenants.Invoke(new()
{
Status = "ACTIVE",
});
return new Dictionary<string, object?>
{
["tid"] = @default.Apply(@default => @default.Apply(getUserTenantsResult => getUserTenantsResult.Ids[0])),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.dms.DmsFunctions;
import com.pulumi.alicloud.dms.inputs.GetUserTenantsArgs;
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) {
// Declare the data source
final var default = DmsFunctions.getUserTenants(GetUserTenantsArgs.builder()
.status("ACTIVE")
.build());
ctx.export("tid", default_.ids()[0]);
}
}
variables:
# Declare the data source
default:
fn::invoke:
Function: alicloud:dms:getUserTenants
Arguments:
status: ACTIVE
outputs:
tid: ${default.ids[0]}
Using getUserTenants
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 getUserTenants(args: GetUserTenantsArgs, opts?: InvokeOptions): Promise<GetUserTenantsResult>
function getUserTenantsOutput(args: GetUserTenantsOutputArgs, opts?: InvokeOptions): Output<GetUserTenantsResult>
def get_user_tenants(ids: Optional[Sequence[str]] = None,
output_file: Optional[str] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetUserTenantsResult
def get_user_tenants_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
output_file: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetUserTenantsResult]
func GetUserTenants(ctx *Context, args *GetUserTenantsArgs, opts ...InvokeOption) (*GetUserTenantsResult, error)
func GetUserTenantsOutput(ctx *Context, args *GetUserTenantsOutputArgs, opts ...InvokeOption) GetUserTenantsResultOutput
> Note: This function is named GetUserTenants
in the Go SDK.
public static class GetUserTenants
{
public static Task<GetUserTenantsResult> InvokeAsync(GetUserTenantsArgs args, InvokeOptions? opts = null)
public static Output<GetUserTenantsResult> Invoke(GetUserTenantsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetUserTenantsResult> getUserTenants(GetUserTenantsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:dms/getUserTenants:getUserTenants
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
- A list of DMS User Tenant IDs (TID).
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Status string
- The status of the user tenant.
- Ids []string
- A list of DMS User Tenant IDs (TID).
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Status string
- The status of the user tenant.
- ids List<String>
- A list of DMS User Tenant IDs (TID).
- output
File String - File name where to save data source results (after running
pulumi preview
). - status String
- The status of the user tenant.
- ids string[]
- A list of DMS User Tenant IDs (TID).
- output
File string - File name where to save data source results (after running
pulumi preview
). - status string
- The status of the user tenant.
- ids Sequence[str]
- A list of DMS User Tenant IDs (TID).
- output_
file str - File name where to save data source results (after running
pulumi preview
). - status str
- The status of the user tenant.
- ids List<String>
- A list of DMS User Tenant IDs (TID).
- output
File String - File name where to save data source results (after running
pulumi preview
). - status String
- The status of the user tenant.
getUserTenants Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of DMS User Tenant IDs (UID).
- Names List<string>
- A list of DMS User Tenant names.
- Tenants
List<Pulumi.
Ali Cloud. Dms. Outputs. Get User Tenants Tenant> - A list of DMS User Tenants. Each element contains the following attributes:
- Output
File string - Status string
- The status of the user tenant.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of DMS User Tenant IDs (UID).
- Names []string
- A list of DMS User Tenant names.
- Tenants
[]Get
User Tenants Tenant - A list of DMS User Tenants. Each element contains the following attributes:
- Output
File string - Status string
- The status of the user tenant.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of DMS User Tenant IDs (UID).
- names List<String>
- A list of DMS User Tenant names.
- tenants
List<Get
User Tenants Tenant> - A list of DMS User Tenants. Each element contains the following attributes:
- output
File String - status String
- The status of the user tenant.
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of DMS User Tenant IDs (UID).
- names string[]
- A list of DMS User Tenant names.
- tenants
Get
User Tenants Tenant[] - A list of DMS User Tenants. Each element contains the following attributes:
- output
File string - status string
- The status of the user tenant.
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of DMS User Tenant IDs (UID).
- names Sequence[str]
- A list of DMS User Tenant names.
- tenants
Sequence[Get
User Tenants Tenant] - A list of DMS User Tenants. Each element contains the following attributes:
- output_
file str - status str
- The status of the user tenant.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of DMS User Tenant IDs (UID).
- names List<String>
- A list of DMS User Tenant names.
- tenants List<Property Map>
- A list of DMS User Tenants. Each element contains the following attributes:
- output
File String - status String
- The status of the user tenant.
Supporting Types
GetUserTenantsTenant
- Id string
- The user tenant id.
- Status string
- The status of the user tenant.
- Tenant
Name string - The name of the user tenant.
- Tid string
- The user tenant id. Same as id.
- Id string
- The user tenant id.
- Status string
- The status of the user tenant.
- Tenant
Name string - The name of the user tenant.
- Tid string
- The user tenant id. Same as id.
- id String
- The user tenant id.
- status String
- The status of the user tenant.
- tenant
Name String - The name of the user tenant.
- tid String
- The user tenant id. Same as id.
- id string
- The user tenant id.
- status string
- The status of the user tenant.
- tenant
Name string - The name of the user tenant.
- tid string
- The user tenant id. Same as id.
- id str
- The user tenant id.
- status str
- The status of the user tenant.
- tenant_
name str - The name of the user tenant.
- tid str
- The user tenant id. Same as id.
- id String
- The user tenant id.
- status String
- The status of the user tenant.
- tenant
Name String - The name of the user tenant.
- tid String
- The user tenant id. Same as id.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.