1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. dts
  5. getInstances
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

alicloud.dts.getInstances

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

    This data source provides Dts Instance available to the user.What is Instance

    NOTE: Available in 1.198.0+

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const default = alicloud.dts.getInstances({
        ids: [defaultAlicloudDtsInstance.id],
        resourceGroupId: "example_value",
    });
    export const alicloudDtsInstanceExampleId = _default.then(_default => _default.instances?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.dts.get_instances(ids=[default_alicloud_dts_instance["id"]],
        resource_group_id="example_value")
    pulumi.export("alicloudDtsInstanceExampleId", default.instances[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dts"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    _default, err := dts.GetInstances(ctx, &dts.GetInstancesArgs{
    Ids: interface{}{
    defaultAlicloudDtsInstance.Id,
    },
    ResourceGroupId: pulumi.StringRef("example_value"),
    }, nil);
    if err != nil {
    return err
    }
    ctx.Export("alicloudDtsInstanceExampleId", _default.Instances[0].Id)
    return nil
    })
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = AliCloud.Dts.GetInstances.Invoke(new()
        {
            Ids = new[]
            {
                defaultAlicloudDtsInstance.Id,
            },
            ResourceGroupId = "example_value",
        });
    
        return new Dictionary<string, object?>
        {
            ["alicloudDtsInstanceExampleId"] = @default.Apply(@default => @default.Apply(getInstancesResult => getInstancesResult.Instances[0]?.Id)),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.dts.DtsFunctions;
    import com.pulumi.alicloud.dts.inputs.GetInstancesArgs;
    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 default = DtsFunctions.getInstances(GetInstancesArgs.builder()
                .ids(defaultAlicloudDtsInstance.id())
                .resourceGroupId("example_value")
                .build());
    
            ctx.export("alicloudDtsInstanceExampleId", default_.instances()[0].id());
        }
    }
    
    variables:
      default:
        fn::invoke:
          Function: alicloud:dts:getInstances
          Arguments:
            ids:
              - ${defaultAlicloudDtsInstance.id}
            resourceGroupId: example_value
    outputs:
      alicloudDtsInstanceExampleId: ${default.instances[0].id}
    

    Using getInstances

    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 getInstances(args: GetInstancesArgs, opts?: InvokeOptions): Promise<GetInstancesResult>
    function getInstancesOutput(args: GetInstancesOutputArgs, opts?: InvokeOptions): Output<GetInstancesResult>
    def get_instances(ids: Optional[Sequence[str]] = None,
                      name_regex: Optional[str] = None,
                      output_file: Optional[str] = None,
                      page_number: Optional[int] = None,
                      page_size: Optional[int] = None,
                      resource_group_id: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetInstancesResult
    def get_instances_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                      name_regex: Optional[pulumi.Input[str]] = None,
                      output_file: Optional[pulumi.Input[str]] = None,
                      page_number: Optional[pulumi.Input[int]] = None,
                      page_size: Optional[pulumi.Input[int]] = None,
                      resource_group_id: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetInstancesResult]
    func GetInstances(ctx *Context, args *GetInstancesArgs, opts ...InvokeOption) (*GetInstancesResult, error)
    func GetInstancesOutput(ctx *Context, args *GetInstancesOutputArgs, opts ...InvokeOption) GetInstancesResultOutput

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

    public static class GetInstances 
    {
        public static Task<GetInstancesResult> InvokeAsync(GetInstancesArgs args, InvokeOptions? opts = null)
        public static Output<GetInstancesResult> Invoke(GetInstancesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetInstancesResult> getInstances(GetInstancesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:dts/getInstances:getInstances
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of Instance IDs.
    NameRegex string
    A regex string to filter results by trail name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    PageNumber int
    PageSize int
    ResourceGroupId string
    Resource Group ID
    Ids []string
    A list of Instance IDs.
    NameRegex string
    A regex string to filter results by trail name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    PageNumber int
    PageSize int
    ResourceGroupId string
    Resource Group ID
    ids List<String>
    A list of Instance IDs.
    nameRegex String
    A regex string to filter results by trail name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    pageNumber Integer
    pageSize Integer
    resourceGroupId String
    Resource Group ID
    ids string[]
    A list of Instance IDs.
    nameRegex string
    A regex string to filter results by trail name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    pageNumber number
    pageSize number
    resourceGroupId string
    Resource Group ID
    ids Sequence[str]
    A list of Instance IDs.
    name_regex str
    A regex string to filter results by trail name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    page_number int
    page_size int
    resource_group_id str
    Resource Group ID
    ids List<String>
    A list of Instance IDs.
    nameRegex String
    A regex string to filter results by trail name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    pageNumber Number
    pageSize Number
    resourceGroupId String
    Resource Group ID

    getInstances Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of Instance IDs.
    Instances List<Pulumi.AliCloud.Dts.Outputs.GetInstancesInstance>
    A list of Instance Entries. Each element contains the following attributes:
    Names List<string>
    A list of Instance names.
    NameRegex string
    OutputFile string
    PageNumber int
    PageSize int
    ResourceGroupId string
    Resource Group ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of Instance IDs.
    Instances []GetInstancesInstance
    A list of Instance Entries. Each element contains the following attributes:
    Names []string
    A list of Instance names.
    NameRegex string
    OutputFile string
    PageNumber int
    PageSize int
    ResourceGroupId string
    Resource Group ID.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of Instance IDs.
    instances List<GetInstancesInstance>
    A list of Instance Entries. Each element contains the following attributes:
    names List<String>
    A list of Instance names.
    nameRegex String
    outputFile String
    pageNumber Integer
    pageSize Integer
    resourceGroupId String
    Resource Group ID.
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of Instance IDs.
    instances GetInstancesInstance[]
    A list of Instance Entries. Each element contains the following attributes:
    names string[]
    A list of Instance names.
    nameRegex string
    outputFile string
    pageNumber number
    pageSize number
    resourceGroupId string
    Resource Group ID.
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of Instance IDs.
    instances Sequence[GetInstancesInstance]
    A list of Instance Entries. Each element contains the following attributes:
    names Sequence[str]
    A list of Instance names.
    name_regex str
    output_file str
    page_number int
    page_size int
    resource_group_id str
    Resource Group ID.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of Instance IDs.
    instances List<Property Map>
    A list of Instance Entries. Each element contains the following attributes:
    names List<String>
    A list of Instance names.
    nameRegex String
    outputFile String
    pageNumber Number
    pageSize Number
    resourceGroupId String
    Resource Group ID.

    Supporting Types

    GetInstancesInstance

    CreateTime string
    Instance creation time
    DestinationEndpointEngineName string
    The target database engine type.
    DestinationRegion string
    The destination instance region.
    DtsInstanceId string
    The ID of the subscription instance.
    Id string
    The ID of the instance.
    InstanceClass string
    The type of the migration or synchronization instance.- The specifications of the migration instance: xxlarge, xlarge, large, medium, small.- The types of synchronization instances: large, medium, small, micro.
    InstanceName string
    PaymentType string
    The payment type of the resource.
    ResourceGroupId string
    Resource Group ID
    SourceEndpointEngineName string
    Source instance database engine type.
    SourceRegion string
    The source instance region.
    Status string
    Instance status.
    Type string
    The instance type. Valid values: -MIGRATION: MIGRATION.-SYNC: synchronization.-SUBSCRIBE: SUBSCRIBE.
    Tags Dictionary<string, object>
    The tag value corresponding to the tag key.
    CreateTime string
    Instance creation time
    DestinationEndpointEngineName string
    The target database engine type.
    DestinationRegion string
    The destination instance region.
    DtsInstanceId string
    The ID of the subscription instance.
    Id string
    The ID of the instance.
    InstanceClass string
    The type of the migration or synchronization instance.- The specifications of the migration instance: xxlarge, xlarge, large, medium, small.- The types of synchronization instances: large, medium, small, micro.
    InstanceName string
    PaymentType string
    The payment type of the resource.
    ResourceGroupId string
    Resource Group ID
    SourceEndpointEngineName string
    Source instance database engine type.
    SourceRegion string
    The source instance region.
    Status string
    Instance status.
    Type string
    The instance type. Valid values: -MIGRATION: MIGRATION.-SYNC: synchronization.-SUBSCRIBE: SUBSCRIBE.
    Tags map[string]interface{}
    The tag value corresponding to the tag key.
    createTime String
    Instance creation time
    destinationEndpointEngineName String
    The target database engine type.
    destinationRegion String
    The destination instance region.
    dtsInstanceId String
    The ID of the subscription instance.
    id String
    The ID of the instance.
    instanceClass String
    The type of the migration or synchronization instance.- The specifications of the migration instance: xxlarge, xlarge, large, medium, small.- The types of synchronization instances: large, medium, small, micro.
    instanceName String
    paymentType String
    The payment type of the resource.
    resourceGroupId String
    Resource Group ID
    sourceEndpointEngineName String
    Source instance database engine type.
    sourceRegion String
    The source instance region.
    status String
    Instance status.
    type String
    The instance type. Valid values: -MIGRATION: MIGRATION.-SYNC: synchronization.-SUBSCRIBE: SUBSCRIBE.
    tags Map<String,Object>
    The tag value corresponding to the tag key.
    createTime string
    Instance creation time
    destinationEndpointEngineName string
    The target database engine type.
    destinationRegion string
    The destination instance region.
    dtsInstanceId string
    The ID of the subscription instance.
    id string
    The ID of the instance.
    instanceClass string
    The type of the migration or synchronization instance.- The specifications of the migration instance: xxlarge, xlarge, large, medium, small.- The types of synchronization instances: large, medium, small, micro.
    instanceName string
    paymentType string
    The payment type of the resource.
    resourceGroupId string
    Resource Group ID
    sourceEndpointEngineName string
    Source instance database engine type.
    sourceRegion string
    The source instance region.
    status string
    Instance status.
    type string
    The instance type. Valid values: -MIGRATION: MIGRATION.-SYNC: synchronization.-SUBSCRIBE: SUBSCRIBE.
    tags {[key: string]: any}
    The tag value corresponding to the tag key.
    create_time str
    Instance creation time
    destination_endpoint_engine_name str
    The target database engine type.
    destination_region str
    The destination instance region.
    dts_instance_id str
    The ID of the subscription instance.
    id str
    The ID of the instance.
    instance_class str
    The type of the migration or synchronization instance.- The specifications of the migration instance: xxlarge, xlarge, large, medium, small.- The types of synchronization instances: large, medium, small, micro.
    instance_name str
    payment_type str
    The payment type of the resource.
    resource_group_id str
    Resource Group ID
    source_endpoint_engine_name str
    Source instance database engine type.
    source_region str
    The source instance region.
    status str
    Instance status.
    type str
    The instance type. Valid values: -MIGRATION: MIGRATION.-SYNC: synchronization.-SUBSCRIBE: SUBSCRIBE.
    tags Mapping[str, Any]
    The tag value corresponding to the tag key.
    createTime String
    Instance creation time
    destinationEndpointEngineName String
    The target database engine type.
    destinationRegion String
    The destination instance region.
    dtsInstanceId String
    The ID of the subscription instance.
    id String
    The ID of the instance.
    instanceClass String
    The type of the migration or synchronization instance.- The specifications of the migration instance: xxlarge, xlarge, large, medium, small.- The types of synchronization instances: large, medium, small, micro.
    instanceName String
    paymentType String
    The payment type of the resource.
    resourceGroupId String
    Resource Group ID
    sourceEndpointEngineName String
    Source instance database engine type.
    sourceRegion String
    The source instance region.
    status String
    Instance status.
    type String
    The instance type. Valid values: -MIGRATION: MIGRATION.-SYNC: synchronization.-SUBSCRIBE: SUBSCRIBE.
    tags Map<Any>
    The tag value corresponding to the tag key.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi