alicloud.getMscSubWebhooks
This data source provides the Msc Sub Webhooks of the current Alibaba Cloud user.
NOTE: Available in v1.141.0+.
Example Usage
Basic Usage
using System.Collections.Generic;
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 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
})
}
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()));
}
}
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)
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);
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.
- Name
Regex string A regex string to filter results by Webhook name.
- Output
File string
- Ids []string
A list of Webhook IDs.
- Name
Regex string A regex string to filter results by Webhook name.
- Output
File string
- ids List<String>
A list of Webhook IDs.
- name
Regex String A regex string to filter results by Webhook name.
- output
File String
- ids string[]
A list of Webhook IDs.
- name
Regex string A regex string to filter results by Webhook name.
- output
File string
- ids Sequence[str]
A list of Webhook IDs.
- name_
regex str A regex string to filter results by Webhook name.
- output_
file str
- ids List<String>
A list of Webhook IDs.
- name
Regex String A regex string to filter results by Webhook name.
- output
File String
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.
Ali Cloud. Outputs. Get Msc Sub Webhooks Webhook> - Name
Regex string - Output
File string
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Webhooks
[]Get
Msc Sub Webhooks Webhook - Name
Regex string - Output
File string
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- webhooks
List<Get
Msc Sub Webhooks Webhook> - name
Regex String - output
File String
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- webhooks
Get
Msc Sub Webhooks Webhook[] - name
Regex string - output
File string
- id str
The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- webhooks
Sequence[Get
Msc Sub Webhooks Webhook] - 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>
- name
Regex String - output
File String
Supporting Types
GetMscSubWebhooksWebhook
- Id string
The ID of the Webhook.
- Server
Url string The serverUrl of the Subscription.
- Webhook
Id string The first ID of the resource.
- Webhook
Name string The name of the Webhook. Note: The name must be
2
to12
characters in length, and can contain uppercase and lowercase letters.
- Id string
The ID of the Webhook.
- Server
Url string The serverUrl of the Subscription.
- Webhook
Id string The first ID of the resource.
- Webhook
Name string The name of the Webhook. Note: The name must be
2
to12
characters in length, and can contain uppercase and lowercase letters.
- id String
The ID of the Webhook.
- server
Url String The serverUrl of the Subscription.
- webhook
Id String The first ID of the resource.
- webhook
Name String The name of the Webhook. Note: The name must be
2
to12
characters in length, and can contain uppercase and lowercase letters.
- id string
The ID of the Webhook.
- server
Url string The serverUrl of the Subscription.
- webhook
Id string The first ID of the resource.
- webhook
Name string The name of the Webhook. Note: The name must be
2
to12
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
to12
characters in length, and can contain uppercase and lowercase letters.
- id String
The ID of the Webhook.
- server
Url String The serverUrl of the Subscription.
- webhook
Id String The first ID of the resource.
- webhook
Name String The name of the Webhook. Note: The name must be
2
to12
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.