RegistryWebhook

Manages an Azure Container Registry Webhook.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var rg = new Azure.Core.ResourceGroup("rg", new Azure.Core.ResourceGroupArgs
        {
            Location = "West US",
        });
        var acr = new Azure.ContainerService.Registry("acr", new Azure.ContainerService.RegistryArgs
        {
            ResourceGroupName = rg.Name,
            Location = rg.Location,
            Sku = "Standard",
            AdminEnabled = false,
        });
        var webhook = new Azure.ContainerService.RegistryWebhook("webhook", new Azure.ContainerService.RegistryWebhookArgs
        {
            ResourceGroupName = rg.Name,
            RegistryName = acr.Name,
            Location = rg.Location,
            ServiceUri = "https://mywebhookreceiver.example/mytag",
            Status = "enabled",
            Scope = "mytag:*",
            Actions = 
            {
                "push",
            },
            CustomHeaders = 
            {
                { "Content-Type", "application/json" },
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/containerservice"
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        rg, err := core.NewResourceGroup(ctx, "rg", &core.ResourceGroupArgs{
            Location: pulumi.String("West US"),
        })
        if err != nil {
            return err
        }
        acr, err := containerservice.NewRegistry(ctx, "acr", &containerservice.RegistryArgs{
            ResourceGroupName: rg.Name,
            Location:          rg.Location,
            Sku:               pulumi.String("Standard"),
            AdminEnabled:      pulumi.Bool(false),
        })
        if err != nil {
            return err
        }
        _, err = containerservice.NewRegistryWebhook(ctx, "webhook", &containerservice.RegistryWebhookArgs{
            ResourceGroupName: rg.Name,
            RegistryName:      acr.Name,
            Location:          rg.Location,
            ServiceUri:        pulumi.String("https://mywebhookreceiver.example/mytag"),
            Status:            pulumi.String("enabled"),
            Scope:             pulumi.String("mytag:*"),
            Actions: pulumi.StringArray{
                pulumi.String("push"),
            },
            CustomHeaders: pulumi.Map{
                "Content-Type": pulumi.String("application/json"),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_azure as azure

rg = azure.core.ResourceGroup("rg", location="West US")
acr = azure.containerservice.Registry("acr",
    resource_group_name=rg.name,
    location=rg.location,
    sku="Standard",
    admin_enabled=False)
webhook = azure.containerservice.RegistryWebhook("webhook",
    resource_group_name=rg.name,
    registry_name=acr.name,
    location=rg.location,
    service_uri="https://mywebhookreceiver.example/mytag",
    status="enabled",
    scope="mytag:*",
    actions=["push"],
    custom_headers={
        "Content-Type": "application/json",
    })
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const rg = new azure.core.ResourceGroup("rg", {location: "West US"});
const acr = new azure.containerservice.Registry("acr", {
    resourceGroupName: rg.name,
    location: rg.location,
    sku: "Standard",
    adminEnabled: false,
});
const webhook = new azure.containerservice.RegistryWebhook("webhook", {
    resourceGroupName: rg.name,
    registryName: acr.name,
    location: rg.location,
    serviceUri: "https://mywebhookreceiver.example/mytag",
    status: "enabled",
    scope: "mytag:*",
    actions: ["push"],
    customHeaders: {
        "Content-Type": "application/json",
    },
});

Create a RegistryWebhook Resource

def RegistryWebhook(resource_name, opts=None, actions=None, custom_headers=None, location=None, name=None, registry_name=None, resource_group_name=None, scope=None, service_uri=None, status=None, tags=None, __props__=None);
name string
The unique name of the resource.
args RegistryWebhookArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args RegistryWebhookArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args RegistryWebhookArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

RegistryWebhook Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The RegistryWebhook resource accepts the following input properties:

Actions List<string>

A list of actions that trigger the Webhook to post notifications. At least one action needs to be specified. Valid values are: push, delete, quarantine, chart_push, chart_delete

RegistryName string

The Name of Container registry this Webhook belongs to. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the resource group in which to create the Container Registry Webhook. Changing this forces a new resource to be created.

ServiceUri string

Specifies the service URI for the Webhook to post notifications.

CustomHeaders Dictionary<string, string>

Custom headers that will be added to the webhook notifications request.

Location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

Name string

Specifies the name of the Container Registry Webhook. Changing this forces a new resource to be created.

Scope string

Specifies the scope of repositories that can trigger an event. For example, foo:* means events for all tags under repository foo. foo:bar means events for ‘foo:bar’ only. foo is equivalent to foo:latest. Empty means all events.

Status string

Specifies if this Webhook triggers notifications or not. Valid values: enabled and disabled. Default is enabled.

Tags Dictionary<string, string>
Actions []string

A list of actions that trigger the Webhook to post notifications. At least one action needs to be specified. Valid values are: push, delete, quarantine, chart_push, chart_delete

RegistryName string

The Name of Container registry this Webhook belongs to. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the resource group in which to create the Container Registry Webhook. Changing this forces a new resource to be created.

ServiceUri string

Specifies the service URI for the Webhook to post notifications.

CustomHeaders map[string]string

Custom headers that will be added to the webhook notifications request.

Location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

Name string

Specifies the name of the Container Registry Webhook. Changing this forces a new resource to be created.

Scope string

Specifies the scope of repositories that can trigger an event. For example, foo:* means events for all tags under repository foo. foo:bar means events for ‘foo:bar’ only. foo is equivalent to foo:latest. Empty means all events.

Status string

Specifies if this Webhook triggers notifications or not. Valid values: enabled and disabled. Default is enabled.

Tags map[string]string
actions string[]

A list of actions that trigger the Webhook to post notifications. At least one action needs to be specified. Valid values are: push, delete, quarantine, chart_push, chart_delete

registryName string

The Name of Container registry this Webhook belongs to. Changing this forces a new resource to be created.

resourceGroupName string

The name of the resource group in which to create the Container Registry Webhook. Changing this forces a new resource to be created.

serviceUri string

Specifies the service URI for the Webhook to post notifications.

customHeaders {[key: string]: string}

Custom headers that will be added to the webhook notifications request.

location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

name string

Specifies the name of the Container Registry Webhook. Changing this forces a new resource to be created.

scope string

Specifies the scope of repositories that can trigger an event. For example, foo:* means events for all tags under repository foo. foo:bar means events for ‘foo:bar’ only. foo is equivalent to foo:latest. Empty means all events.

status string

Specifies if this Webhook triggers notifications or not. Valid values: enabled and disabled. Default is enabled.

tags {[key: string]: string}
actions List[str]

A list of actions that trigger the Webhook to post notifications. At least one action needs to be specified. Valid values are: push, delete, quarantine, chart_push, chart_delete

registry_name str

The Name of Container registry this Webhook belongs to. Changing this forces a new resource to be created.

resource_group_name str

The name of the resource group in which to create the Container Registry Webhook. Changing this forces a new resource to be created.

service_uri str

Specifies the service URI for the Webhook to post notifications.

custom_headers Dict[str, str]

Custom headers that will be added to the webhook notifications request.

location str

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

name str

Specifies the name of the Container Registry Webhook. Changing this forces a new resource to be created.

scope str

Specifies the scope of repositories that can trigger an event. For example, foo:* means events for all tags under repository foo. foo:bar means events for ‘foo:bar’ only. foo is equivalent to foo:latest. Empty means all events.

status str

Specifies if this Webhook triggers notifications or not. Valid values: enabled and disabled. Default is enabled.

tags Dict[str, str]

Outputs

All input properties are implicitly available as output properties. Additionally, the RegistryWebhook resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing RegistryWebhook Resource

Get an existing RegistryWebhook resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: RegistryWebhookState, opts?: CustomResourceOptions): RegistryWebhook
static get(resource_name, id, opts=None, actions=None, custom_headers=None, location=None, name=None, registry_name=None, resource_group_name=None, scope=None, service_uri=None, status=None, tags=None, __props__=None);
func GetRegistryWebhook(ctx *Context, name string, id IDInput, state *RegistryWebhookState, opts ...ResourceOption) (*RegistryWebhook, error)
public static RegistryWebhook Get(string name, Input<string> id, RegistryWebhookState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Actions List<string>

A list of actions that trigger the Webhook to post notifications. At least one action needs to be specified. Valid values are: push, delete, quarantine, chart_push, chart_delete

CustomHeaders Dictionary<string, string>

Custom headers that will be added to the webhook notifications request.

Location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

Name string

Specifies the name of the Container Registry Webhook. Changing this forces a new resource to be created.

RegistryName string

The Name of Container registry this Webhook belongs to. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the resource group in which to create the Container Registry Webhook. Changing this forces a new resource to be created.

Scope string

Specifies the scope of repositories that can trigger an event. For example, foo:* means events for all tags under repository foo. foo:bar means events for ‘foo:bar’ only. foo is equivalent to foo:latest. Empty means all events.

ServiceUri string

Specifies the service URI for the Webhook to post notifications.

Status string

Specifies if this Webhook triggers notifications or not. Valid values: enabled and disabled. Default is enabled.

Tags Dictionary<string, string>
Actions []string

A list of actions that trigger the Webhook to post notifications. At least one action needs to be specified. Valid values are: push, delete, quarantine, chart_push, chart_delete

CustomHeaders map[string]string

Custom headers that will be added to the webhook notifications request.

Location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

Name string

Specifies the name of the Container Registry Webhook. Changing this forces a new resource to be created.

RegistryName string

The Name of Container registry this Webhook belongs to. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the resource group in which to create the Container Registry Webhook. Changing this forces a new resource to be created.

Scope string

Specifies the scope of repositories that can trigger an event. For example, foo:* means events for all tags under repository foo. foo:bar means events for ‘foo:bar’ only. foo is equivalent to foo:latest. Empty means all events.

ServiceUri string

Specifies the service URI for the Webhook to post notifications.

Status string

Specifies if this Webhook triggers notifications or not. Valid values: enabled and disabled. Default is enabled.

Tags map[string]string
actions string[]

A list of actions that trigger the Webhook to post notifications. At least one action needs to be specified. Valid values are: push, delete, quarantine, chart_push, chart_delete

customHeaders {[key: string]: string}

Custom headers that will be added to the webhook notifications request.

location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

name string

Specifies the name of the Container Registry Webhook. Changing this forces a new resource to be created.

registryName string

The Name of Container registry this Webhook belongs to. Changing this forces a new resource to be created.

resourceGroupName string

The name of the resource group in which to create the Container Registry Webhook. Changing this forces a new resource to be created.

scope string

Specifies the scope of repositories that can trigger an event. For example, foo:* means events for all tags under repository foo. foo:bar means events for ‘foo:bar’ only. foo is equivalent to foo:latest. Empty means all events.

serviceUri string

Specifies the service URI for the Webhook to post notifications.

status string

Specifies if this Webhook triggers notifications or not. Valid values: enabled and disabled. Default is enabled.

tags {[key: string]: string}
actions List[str]

A list of actions that trigger the Webhook to post notifications. At least one action needs to be specified. Valid values are: push, delete, quarantine, chart_push, chart_delete

custom_headers Dict[str, str]

Custom headers that will be added to the webhook notifications request.

location str

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

name str

Specifies the name of the Container Registry Webhook. Changing this forces a new resource to be created.

registry_name str

The Name of Container registry this Webhook belongs to. Changing this forces a new resource to be created.

resource_group_name str

The name of the resource group in which to create the Container Registry Webhook. Changing this forces a new resource to be created.

scope str

Specifies the scope of repositories that can trigger an event. For example, foo:* means events for all tags under repository foo. foo:bar means events for ‘foo:bar’ only. foo is equivalent to foo:latest. Empty means all events.

service_uri str

Specifies the service URI for the Webhook to post notifications.

status str

Specifies if this Webhook triggers notifications or not. Valid values: enabled and disabled. Default is enabled.

tags Dict[str, str]

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.