Webhook Args
data class WebhookArgs(val actions: Output<List<Either<String, WebhookAction>>>? = null, val customHeaders: Output<Map<String, String>>? = null, val location: Output<String>? = null, val registryName: Output<String>? = null, val resourceGroupName: Output<String>? = null, val scope: Output<String>? = null, val serviceUri: Output<String>? = null, val status: Output<Either<String, WebhookStatus>>? = null, val tags: Output<Map<String, String>>? = null, val webhookName: Output<String>? = null) : ConvertibleToJava<WebhookArgs>
An object that represents a webhook for a container registry. API Version: 2019-05-01.
Example Usage
WebhookCreate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var webhook = new AzureNative.ContainerRegistry.Webhook("webhook", new()
{
Actions = new[]
{
"push",
},
CustomHeaders =
{
{ "Authorization", "******" },
},
Location = "westus",
RegistryName = "myRegistry",
ResourceGroupName = "myResourceGroup",
Scope = "myRepository",
ServiceUri = "http://myservice.com",
Status = "enabled",
Tags =
{
{ "key", "value" },
},
WebhookName = "myWebhook",
});
});
Content copied to clipboard
package main
import (
containerregistry "github.com/pulumi/pulumi-azure-native-sdk/containerregistry"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := containerregistry.NewWebhook(ctx, "webhook", &containerregistry.WebhookArgs{
Actions: pulumi.StringArray{
pulumi.String("push"),
},
CustomHeaders: pulumi.StringMap{
"Authorization": pulumi.String("******"),
},
Location: pulumi.String("westus"),
RegistryName: pulumi.String("myRegistry"),
ResourceGroupName: pulumi.String("myResourceGroup"),
Scope: pulumi.String("myRepository"),
ServiceUri: pulumi.String("http://myservice.com"),
Status: pulumi.String("enabled"),
Tags: pulumi.StringMap{
"key": pulumi.String("value"),
},
WebhookName: pulumi.String("myWebhook"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.containerregistry.Webhook;
import com.pulumi.azurenative.containerregistry.WebhookArgs;
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) {
var webhook = new Webhook("webhook", WebhookArgs.builder()
.actions("push")
.customHeaders(Map.of("Authorization", "******"))
.location("westus")
.registryName("myRegistry")
.resourceGroupName("myResourceGroup")
.scope("myRepository")
.serviceUri("http://myservice.com")
.status("enabled")
.tags(Map.of("key", "value"))
.webhookName("myWebhook")
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:containerregistry:Webhook myWebhook /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/webhooks/myWebhook
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(actions: Output<List<Either<String, WebhookAction>>>? = null, customHeaders: Output<Map<String, String>>? = null, location: Output<String>? = null, registryName: Output<String>? = null, resourceGroupName: Output<String>? = null, scope: Output<String>? = null, serviceUri: Output<String>? = null, status: Output<Either<String, WebhookStatus>>? = null, tags: Output<Map<String, String>>? = null, webhookName: Output<String>? = null)
Properties
Link copied to clipboard
The list of actions that trigger the webhook to post notifications.
Link copied to clipboard
Custom headers that will be added to the webhook notifications.
Link copied to clipboard
The name of the container registry.
Link copied to clipboard
The name of the resource group to which the container registry belongs.
Link copied to clipboard
The service URI for the webhook to post notifications.
Link copied to clipboard
The status of the webhook at the time the operation was called.
Link copied to clipboard
The name of the webhook.