1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. getMscSubWebhooks
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.getMscSubWebhooks

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

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

NOTE: Available since 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);
Copy
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)
Copy
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
	})
}
Copy
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),
    };
});
Copy
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()));
    }
}
Copy
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}
Copy

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>
Copy
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]
Copy
func GetMscSubWebhooks(ctx *Context, args *GetMscSubWebhooksArgs, opts ...InvokeOption) (*GetMscSubWebhooksResult, error)
func GetMscSubWebhooksOutput(ctx *Context, args *GetMscSubWebhooksOutputArgs, opts ...InvokeOption) GetMscSubWebhooksResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetMscSubWebhooksResult> getMscSubWebhooks(GetMscSubWebhooksArgs args, InvokeOptions options)
public static Output<GetMscSubWebhooksResult> getMscSubWebhooks(GetMscSubWebhooksArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:index/getMscSubWebhooks:getMscSubWebhooks
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Ids Changes to this property will trigger replacement. List<string>
A list of Webhook IDs.
NameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. []string
A list of Webhook IDs.
NameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. List<String>
A list of Webhook IDs.
nameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string[]
A list of Webhook IDs.
nameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. Sequence[str]
A list of Webhook IDs.
name_regex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. List<String>
A list of Webhook IDs.
nameRegex Changes to this property will trigger replacement. 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>
A list of Webhook names.
Webhooks List<Pulumi.AliCloud.Outputs.GetMscSubWebhooksWebhook>
A list of Msc Sub Webhooks. Each element contains the following attributes:
NameRegex string
OutputFile string
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
Names []string
A list of Webhook names.
Webhooks []GetMscSubWebhooksWebhook
A list of Msc Sub Webhooks. Each element contains the following attributes:
NameRegex string
OutputFile string
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
A list of Webhook names.
webhooks List<GetMscSubWebhooksWebhook>
A list of Msc Sub Webhooks. Each element contains the following attributes:
nameRegex String
outputFile String
id string
The provider-assigned unique ID for this managed resource.
ids string[]
names string[]
A list of Webhook names.
webhooks GetMscSubWebhooksWebhook[]
A list of Msc Sub Webhooks. Each element contains the following attributes:
nameRegex string
outputFile string
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
names Sequence[str]
A list of Webhook names.
webhooks Sequence[GetMscSubWebhooksWebhook]
A list of Msc Sub Webhooks. Each element contains the following attributes:
name_regex str
output_file str
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
A list of Webhook names.
webhooks List<Property Map>
A list of Msc Sub Webhooks. Each element contains the following attributes:
nameRegex String
outputFile String

Supporting Types

GetMscSubWebhooksWebhook

Id This property is required. string
The ID of the Webhook.
ServerUrl This property is required. string
The serverUrl of the Subscription.
WebhookId This property is required. string
The first ID of the resource.
WebhookName This property is required. 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 This property is required. string
The ID of the Webhook.
ServerUrl This property is required. string
The serverUrl of the Subscription.
WebhookId This property is required. string
The first ID of the resource.
WebhookName This property is required. 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 This property is required. String
The ID of the Webhook.
serverUrl This property is required. String
The serverUrl of the Subscription.
webhookId This property is required. String
The first ID of the resource.
webhookName This property is required. 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 This property is required. string
The ID of the Webhook.
serverUrl This property is required. string
The serverUrl of the Subscription.
webhookId This property is required. string
The first ID of the resource.
webhookName This property is required. 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 This property is required. str
The ID of the Webhook.
server_url This property is required. str
The serverUrl of the Subscription.
webhook_id This property is required. str
The first ID of the resource.
webhook_name This property is required. 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 This property is required. String
The ID of the Webhook.
serverUrl This property is required. String
The serverUrl of the Subscription.
webhookId This property is required. String
The first ID of the resource.
webhookName This property is required. 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.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi