1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. getMscSubWebhooks
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.getMscSubWebhooks

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    This data source provides the Msc Sub Webhooks of the current Alibaba Cloud user.

    NOTE: Available in v1.141.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const ids = alicloud.getMscSubWebhooks({
        ids: ["example_id"],
    });
    export const mscSubWebhookId1 = ids.then(ids => ids.webhooks?.[0]?.id);
    const nameRegex = alicloud.getMscSubWebhooks({
        nameRegex: "^my-Webhook",
    });
    export const mscSubWebhookId2 = nameRegex.then(nameRegex => nameRegex.webhooks?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.get_msc_sub_webhooks(ids=["example_id"])
    pulumi.export("mscSubWebhookId1", ids.webhooks[0].id)
    name_regex = alicloud.get_msc_sub_webhooks(name_regex="^my-Webhook")
    pulumi.export("mscSubWebhookId2", name_regex.webhooks[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ids, err := alicloud.GetMscSubWebhooks(ctx, &alicloud.GetMscSubWebhooksArgs{
    			Ids: []string{
    				"example_id",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("mscSubWebhookId1", ids.Webhooks[0].Id)
    		nameRegex, err := alicloud.GetMscSubWebhooks(ctx, &alicloud.GetMscSubWebhooksArgs{
    			NameRegex: pulumi.StringRef("^my-Webhook"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("mscSubWebhookId2", nameRegex.Webhooks[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var ids = AliCloud.GetMscSubWebhooks.Invoke(new()
        {
            Ids = new[]
            {
                "example_id",
            },
        });
    
        var nameRegex = AliCloud.GetMscSubWebhooks.Invoke(new()
        {
            NameRegex = "^my-Webhook",
        });
    
        return new Dictionary<string, object?>
        {
            ["mscSubWebhookId1"] = ids.Apply(getMscSubWebhooksResult => getMscSubWebhooksResult.Webhooks[0]?.Id),
            ["mscSubWebhookId2"] = nameRegex.Apply(getMscSubWebhooksResult => getMscSubWebhooksResult.Webhooks[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.AlicloudFunctions;
    import com.pulumi.alicloud.inputs.GetMscSubWebhooksArgs;
    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 = AlicloudFunctions.getMscSubWebhooks(GetMscSubWebhooksArgs.builder()
                .ids("example_id")
                .build());
    
            ctx.export("mscSubWebhookId1", ids.applyValue(getMscSubWebhooksResult -> getMscSubWebhooksResult.webhooks()[0].id()));
            final var nameRegex = AlicloudFunctions.getMscSubWebhooks(GetMscSubWebhooksArgs.builder()
                .nameRegex("^my-Webhook")
                .build());
    
            ctx.export("mscSubWebhookId2", nameRegex.applyValue(getMscSubWebhooksResult -> getMscSubWebhooksResult.webhooks()[0].id()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:getMscSubWebhooks
          Arguments:
            ids:
              - example_id
      nameRegex:
        fn::invoke:
          Function: alicloud:getMscSubWebhooks
          Arguments:
            nameRegex: ^my-Webhook
    outputs:
      mscSubWebhookId1: ${ids.webhooks[0].id}
      mscSubWebhookId2: ${nameRegex.webhooks[0].id}
    

    Using getMscSubWebhooks

    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 getMscSubWebhooks(args: GetMscSubWebhooksArgs, opts?: InvokeOptions): Promise<GetMscSubWebhooksResult>
    function getMscSubWebhooksOutput(args: GetMscSubWebhooksOutputArgs, opts?: InvokeOptions): Output<GetMscSubWebhooksResult>
    def get_msc_sub_webhooks(ids: Optional[Sequence[str]] = None,
                             name_regex: Optional[str] = None,
                             output_file: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetMscSubWebhooksResult
    def get_msc_sub_webhooks_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                             name_regex: Optional[pulumi.Input[str]] = None,
                             output_file: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetMscSubWebhooksResult]
    func GetMscSubWebhooks(ctx *Context, args *GetMscSubWebhooksArgs, opts ...InvokeOption) (*GetMscSubWebhooksResult, error)
    func GetMscSubWebhooksOutput(ctx *Context, args *GetMscSubWebhooksOutputArgs, opts ...InvokeOption) GetMscSubWebhooksResultOutput

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

    public static class GetMscSubWebhooks 
    {
        public static Task<GetMscSubWebhooksResult> InvokeAsync(GetMscSubWebhooksArgs args, InvokeOptions? opts = null)
        public static Output<GetMscSubWebhooksResult> Invoke(GetMscSubWebhooksInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMscSubWebhooksResult> getMscSubWebhooks(GetMscSubWebhooksArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:index/getMscSubWebhooks:getMscSubWebhooks
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of Webhook IDs.
    NameRegex string
    A regex string to filter results by Webhook name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Ids []string
    A list of Webhook IDs.
    NameRegex string
    A regex string to filter results by Webhook name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ids List<String>
    A list of Webhook IDs.
    nameRegex String
    A regex string to filter results by Webhook name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    ids string[]
    A list of Webhook IDs.
    nameRegex string
    A regex string to filter results by Webhook name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    ids Sequence[str]
    A list of Webhook IDs.
    name_regex str
    A regex string to filter results by Webhook name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    ids List<String>
    A list of Webhook IDs.
    nameRegex String
    A regex string to filter results by Webhook name.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getMscSubWebhooks Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Names List<string>
    Webhooks List<Pulumi.AliCloud.Outputs.GetMscSubWebhooksWebhook>
    NameRegex string
    OutputFile string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    Webhooks []GetMscSubWebhooksWebhook
    NameRegex string
    OutputFile string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    webhooks List<GetMscSubWebhooksWebhook>
    nameRegex String
    outputFile String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    webhooks GetMscSubWebhooksWebhook[]
    nameRegex string
    outputFile string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    names Sequence[str]
    webhooks Sequence[GetMscSubWebhooksWebhook]
    name_regex str
    output_file str
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    webhooks List<Property Map>
    nameRegex String
    outputFile String

    Supporting Types

    GetMscSubWebhooksWebhook

    Id string
    The ID of the Webhook.
    ServerUrl string
    The serverUrl of the Subscription.
    WebhookId string
    The first ID of the resource.
    WebhookName string
    The name of the Webhook. Note: The name must be 2 to 12 characters in length, and can contain uppercase and lowercase letters.
    Id string
    The ID of the Webhook.
    ServerUrl string
    The serverUrl of the Subscription.
    WebhookId string
    The first ID of the resource.
    WebhookName string
    The name of the Webhook. Note: The name must be 2 to 12 characters in length, and can contain uppercase and lowercase letters.
    id String
    The ID of the Webhook.
    serverUrl String
    The serverUrl of the Subscription.
    webhookId String
    The first ID of the resource.
    webhookName String
    The name of the Webhook. Note: The name must be 2 to 12 characters in length, and can contain uppercase and lowercase letters.
    id string
    The ID of the Webhook.
    serverUrl string
    The serverUrl of the Subscription.
    webhookId string
    The first ID of the resource.
    webhookName string
    The name of the Webhook. Note: The name must be 2 to 12 characters in length, and can contain uppercase and lowercase letters.
    id str
    The ID of the Webhook.
    server_url str
    The serverUrl of the Subscription.
    webhook_id str
    The first ID of the resource.
    webhook_name str
    The name of the Webhook. Note: The name must be 2 to 12 characters in length, and can contain uppercase and lowercase letters.
    id String
    The ID of the Webhook.
    serverUrl String
    The serverUrl of the Subscription.
    webhookId String
    The first ID of the resource.
    webhookName String
    The name of the Webhook. Note: The name must be 2 to 12 characters in length, and can contain uppercase and lowercase letters.

    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.53.0 published on Wednesday, Apr 17, 2024 by Pulumi