1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. dts
  5. getConsumerChannels
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.dts.getConsumerChannels

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    This data source provides the Dts Consumer Channels of the current Alibaba Cloud user.

    NOTE: Available in v1.146.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const ids = alicloud.dts.getConsumerChannels({});
    export const dtsConsumerChannelId1 = ids.then(ids => ids.channels?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.dts.get_consumer_channels()
    pulumi.export("dtsConsumerChannelId1", ids.channels[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 {
    		ids, err := dts.GetConsumerChannels(ctx, &dts.GetConsumerChannelsArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("dtsConsumerChannelId1", ids.Channels[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var ids = AliCloud.Dts.GetConsumerChannels.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["dtsConsumerChannelId1"] = ids.Apply(getConsumerChannelsResult => getConsumerChannelsResult.Channels[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.GetConsumerChannelsArgs;
    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 ids = DtsFunctions.getConsumerChannels();
    
            ctx.export("dtsConsumerChannelId1", ids.applyValue(getConsumerChannelsResult -> getConsumerChannelsResult.channels()[0].id()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:dts:getConsumerChannels
          Arguments: {}
    outputs:
      dtsConsumerChannelId1: ${ids.channels[0].id}
    

    Using getConsumerChannels

    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 getConsumerChannels(args: GetConsumerChannelsArgs, opts?: InvokeOptions): Promise<GetConsumerChannelsResult>
    function getConsumerChannelsOutput(args: GetConsumerChannelsOutputArgs, opts?: InvokeOptions): Output<GetConsumerChannelsResult>
    def get_consumer_channels(dts_instance_id: Optional[str] = None,
                              ids: Optional[Sequence[str]] = None,
                              output_file: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetConsumerChannelsResult
    def get_consumer_channels_output(dts_instance_id: Optional[pulumi.Input[str]] = None,
                              ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                              output_file: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetConsumerChannelsResult]
    func GetConsumerChannels(ctx *Context, args *GetConsumerChannelsArgs, opts ...InvokeOption) (*GetConsumerChannelsResult, error)
    func GetConsumerChannelsOutput(ctx *Context, args *GetConsumerChannelsOutputArgs, opts ...InvokeOption) GetConsumerChannelsResultOutput

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

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

    The following arguments are supported:

    DtsInstanceId string
    Subscription instance ID.
    Ids List<string>
    A list of Consumer Channel IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    DtsInstanceId string
    Subscription instance ID.
    Ids []string
    A list of Consumer Channel IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    dtsInstanceId String
    Subscription instance ID.
    ids List<String>
    A list of Consumer Channel IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    dtsInstanceId string
    Subscription instance ID.
    ids string[]
    A list of Consumer Channel IDs.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    dts_instance_id str
    Subscription instance ID.
    ids Sequence[str]
    A list of Consumer Channel IDs.
    output_file str
    File name where to save data source results (after running pulumi preview).
    dtsInstanceId String
    Subscription instance ID.
    ids List<String>
    A list of Consumer Channel IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getConsumerChannels Result

    The following output properties are available:

    Channels List<Pulumi.AliCloud.Dts.Outputs.GetConsumerChannelsChannel>
    DtsInstanceId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    OutputFile string
    Channels []GetConsumerChannelsChannel
    DtsInstanceId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    OutputFile string
    channels List<GetConsumerChannelsChannel>
    dtsInstanceId String
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    outputFile String
    channels GetConsumerChannelsChannel[]
    dtsInstanceId string
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    outputFile string
    channels Sequence[GetConsumerChannelsChannel]
    dts_instance_id str
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    output_file str
    channels List<Property Map>
    dtsInstanceId String
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    outputFile String

    Supporting Types

    GetConsumerChannelsChannel

    ConsumerGroupId string
    The ID of the consumer group.
    ConsumerGroupName string
    The name of the consumer group.
    ConsumerGroupUserName string
    The username of the consumer group.
    ConsumptionCheckpoint string
    The time point when the client consumed the last message in the subscription channel.
    Id string
    The ID of the Consumer Channel.
    MessageDelay int
    The message delay time, for the current time data subscription channel in the earliest time of unconsumed messages of the difference, in Unix timestamp format, which is measured in seconds.
    UnconsumedData int
    The total number of unconsumed messages.
    ConsumerGroupId string
    The ID of the consumer group.
    ConsumerGroupName string
    The name of the consumer group.
    ConsumerGroupUserName string
    The username of the consumer group.
    ConsumptionCheckpoint string
    The time point when the client consumed the last message in the subscription channel.
    Id string
    The ID of the Consumer Channel.
    MessageDelay int
    The message delay time, for the current time data subscription channel in the earliest time of unconsumed messages of the difference, in Unix timestamp format, which is measured in seconds.
    UnconsumedData int
    The total number of unconsumed messages.
    consumerGroupId String
    The ID of the consumer group.
    consumerGroupName String
    The name of the consumer group.
    consumerGroupUserName String
    The username of the consumer group.
    consumptionCheckpoint String
    The time point when the client consumed the last message in the subscription channel.
    id String
    The ID of the Consumer Channel.
    messageDelay Integer
    The message delay time, for the current time data subscription channel in the earliest time of unconsumed messages of the difference, in Unix timestamp format, which is measured in seconds.
    unconsumedData Integer
    The total number of unconsumed messages.
    consumerGroupId string
    The ID of the consumer group.
    consumerGroupName string
    The name of the consumer group.
    consumerGroupUserName string
    The username of the consumer group.
    consumptionCheckpoint string
    The time point when the client consumed the last message in the subscription channel.
    id string
    The ID of the Consumer Channel.
    messageDelay number
    The message delay time, for the current time data subscription channel in the earliest time of unconsumed messages of the difference, in Unix timestamp format, which is measured in seconds.
    unconsumedData number
    The total number of unconsumed messages.
    consumer_group_id str
    The ID of the consumer group.
    consumer_group_name str
    The name of the consumer group.
    consumer_group_user_name str
    The username of the consumer group.
    consumption_checkpoint str
    The time point when the client consumed the last message in the subscription channel.
    id str
    The ID of the Consumer Channel.
    message_delay int
    The message delay time, for the current time data subscription channel in the earliest time of unconsumed messages of the difference, in Unix timestamp format, which is measured in seconds.
    unconsumed_data int
    The total number of unconsumed messages.
    consumerGroupId String
    The ID of the consumer group.
    consumerGroupName String
    The name of the consumer group.
    consumerGroupUserName String
    The username of the consumer group.
    consumptionCheckpoint String
    The time point when the client consumed the last message in the subscription channel.
    id String
    The ID of the Consumer Channel.
    messageDelay Number
    The message delay time, for the current time data subscription channel in the earliest time of unconsumed messages of the difference, in Unix timestamp format, which is measured in seconds.
    unconsumedData Number
    The total number of unconsumed messages.

    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.66.0 published on Friday, Nov 15, 2024 by Pulumi