1. Packages
  2. Azure Native v1
  3. API Docs
  4. containerregistry
  5. Webhook
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

azure-native.containerregistry.Webhook

Explore with Pulumi AI

azure-native-v1 logo
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

    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",
        });
    
    });
    
    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
    	})
    }
    
    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());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    webhook = azure_native.containerregistry.Webhook("webhook",
        actions=["push"],
        custom_headers={
            "Authorization": "******",
        },
        location="westus",
        registry_name="myRegistry",
        resource_group_name="myResourceGroup",
        scope="myRepository",
        service_uri="http://myservice.com",
        status="enabled",
        tags={
            "key": "value",
        },
        webhook_name="myWebhook")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const webhook = new azure_native.containerregistry.Webhook("webhook", {
        actions: ["push"],
        customHeaders: {
            Authorization: "******",
        },
        location: "westus",
        registryName: "myRegistry",
        resourceGroupName: "myResourceGroup",
        scope: "myRepository",
        serviceUri: "http://myservice.com",
        status: "enabled",
        tags: {
            key: "value",
        },
        webhookName: "myWebhook",
    });
    
    resources:
      webhook:
        type: azure-native:containerregistry:Webhook
        properties:
          actions:
            - push
          customHeaders:
            Authorization: '******'
          location: westus
          registryName: myRegistry
          resourceGroupName: myResourceGroup
          scope: myRepository
          serviceUri: http://myservice.com
          status: enabled
          tags:
            key: value
          webhookName: myWebhook
    

    Create Webhook Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Webhook(name: string, args: WebhookArgs, opts?: CustomResourceOptions);
    @overload
    def Webhook(resource_name: str,
                args: WebhookArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Webhook(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                actions: Optional[Sequence[Union[str, WebhookAction]]] = None,
                registry_name: Optional[str] = None,
                resource_group_name: Optional[str] = None,
                service_uri: Optional[str] = None,
                custom_headers: Optional[Mapping[str, str]] = None,
                location: Optional[str] = None,
                scope: Optional[str] = None,
                status: Optional[Union[str, WebhookStatus]] = None,
                tags: Optional[Mapping[str, str]] = None,
                webhook_name: Optional[str] = None)
    func NewWebhook(ctx *Context, name string, args WebhookArgs, opts ...ResourceOption) (*Webhook, error)
    public Webhook(string name, WebhookArgs args, CustomResourceOptions? opts = null)
    public Webhook(String name, WebhookArgs args)
    public Webhook(String name, WebhookArgs args, CustomResourceOptions options)
    
    type: azure-native:containerregistry:Webhook
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args WebhookArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args WebhookArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args WebhookArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WebhookArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WebhookArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var azure_nativeWebhookResource = new AzureNative.Containerregistry.Webhook("azure-nativeWebhookResource", new()
    {
        Actions = new[]
        {
            "string",
        },
        RegistryName = "string",
        ResourceGroupName = "string",
        ServiceUri = "string",
        CustomHeaders = 
        {
            { "string", "string" },
        },
        Location = "string",
        Scope = "string",
        Status = "string",
        Tags = 
        {
            { "string", "string" },
        },
        WebhookName = "string",
    });
    
    example, err := containerregistry.NewWebhook(ctx, "azure-nativeWebhookResource", &containerregistry.WebhookArgs{
    	Actions: []string{
    		"string",
    	},
    	RegistryName:      "string",
    	ResourceGroupName: "string",
    	ServiceUri:        "string",
    	CustomHeaders: map[string]interface{}{
    		"string": "string",
    	},
    	Location: "string",
    	Scope:    "string",
    	Status:   "string",
    	Tags: map[string]interface{}{
    		"string": "string",
    	},
    	WebhookName: "string",
    })
    
    var azure_nativeWebhookResource = new Webhook("azure-nativeWebhookResource", WebhookArgs.builder()
        .actions("string")
        .registryName("string")
        .resourceGroupName("string")
        .serviceUri("string")
        .customHeaders(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
        .location("string")
        .scope("string")
        .status("string")
        .tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
        .webhookName("string")
        .build());
    
    azure_native_webhook_resource = azure_native.containerregistry.Webhook("azure-nativeWebhookResource",
        actions=[string],
        registry_name=string,
        resource_group_name=string,
        service_uri=string,
        custom_headers={
            string: string,
        },
        location=string,
        scope=string,
        status=string,
        tags={
            string: string,
        },
        webhook_name=string)
    
    const azure_nativeWebhookResource = new azure_native.containerregistry.Webhook("azure-nativeWebhookResource", {
        actions: ["string"],
        registryName: "string",
        resourceGroupName: "string",
        serviceUri: "string",
        customHeaders: {
            string: "string",
        },
        location: "string",
        scope: "string",
        status: "string",
        tags: {
            string: "string",
        },
        webhookName: "string",
    });
    
    type: azure-native:containerregistry:Webhook
    properties:
        actions:
            - string
        customHeaders:
            string: string
        location: string
        registryName: string
        resourceGroupName: string
        scope: string
        serviceUri: string
        status: string
        tags:
            string: string
        webhookName: string
    

    Webhook Resource Properties

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

    Inputs

    The Webhook resource accepts the following input properties:

    Actions List<Union<string, Pulumi.AzureNative.ContainerRegistry.WebhookAction>>
    The list of actions that trigger the webhook to post notifications.
    RegistryName string
    The name of the container registry.
    ResourceGroupName string
    The name of the resource group to which the container registry belongs.
    ServiceUri string
    The service URI for the webhook to post notifications.
    CustomHeaders Dictionary<string, string>
    Custom headers that will be added to the webhook notifications.
    Location string
    The location of the webhook. This cannot be changed after the resource is created.
    Scope string
    The scope of repositories where the event can be triggered. 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 | Pulumi.AzureNative.ContainerRegistry.WebhookStatus
    The status of the webhook at the time the operation was called.
    Tags Dictionary<string, string>
    The tags for the webhook.
    WebhookName string
    The name of the webhook.
    Actions []string
    The list of actions that trigger the webhook to post notifications.
    RegistryName string
    The name of the container registry.
    ResourceGroupName string
    The name of the resource group to which the container registry belongs.
    ServiceUri string
    The service URI for the webhook to post notifications.
    CustomHeaders map[string]string
    Custom headers that will be added to the webhook notifications.
    Location string
    The location of the webhook. This cannot be changed after the resource is created.
    Scope string
    The scope of repositories where the event can be triggered. 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 | WebhookStatus
    The status of the webhook at the time the operation was called.
    Tags map[string]string
    The tags for the webhook.
    WebhookName string
    The name of the webhook.
    actions List<Either<String,WebhookAction>>
    The list of actions that trigger the webhook to post notifications.
    registryName String
    The name of the container registry.
    resourceGroupName String
    The name of the resource group to which the container registry belongs.
    serviceUri String
    The service URI for the webhook to post notifications.
    customHeaders Map<String,String>
    Custom headers that will be added to the webhook notifications.
    location String
    The location of the webhook. This cannot be changed after the resource is created.
    scope String
    The scope of repositories where the event can be triggered. 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 | WebhookStatus
    The status of the webhook at the time the operation was called.
    tags Map<String,String>
    The tags for the webhook.
    webhookName String
    The name of the webhook.
    actions (string | WebhookAction)[]
    The list of actions that trigger the webhook to post notifications.
    registryName string
    The name of the container registry.
    resourceGroupName string
    The name of the resource group to which the container registry belongs.
    serviceUri string
    The service URI for the webhook to post notifications.
    customHeaders {[key: string]: string}
    Custom headers that will be added to the webhook notifications.
    location string
    The location of the webhook. This cannot be changed after the resource is created.
    scope string
    The scope of repositories where the event can be triggered. 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 | WebhookStatus
    The status of the webhook at the time the operation was called.
    tags {[key: string]: string}
    The tags for the webhook.
    webhookName string
    The name of the webhook.
    actions Sequence[Union[str, WebhookAction]]
    The list of actions that trigger the webhook to post notifications.
    registry_name str
    The name of the container registry.
    resource_group_name str
    The name of the resource group to which the container registry belongs.
    service_uri str
    The service URI for the webhook to post notifications.
    custom_headers Mapping[str, str]
    Custom headers that will be added to the webhook notifications.
    location str
    The location of the webhook. This cannot be changed after the resource is created.
    scope str
    The scope of repositories where the event can be triggered. 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 | WebhookStatus
    The status of the webhook at the time the operation was called.
    tags Mapping[str, str]
    The tags for the webhook.
    webhook_name str
    The name of the webhook.
    actions List<String | "push" | "delete" | "quarantine" | "chart_push" | "chart_delete">
    The list of actions that trigger the webhook to post notifications.
    registryName String
    The name of the container registry.
    resourceGroupName String
    The name of the resource group to which the container registry belongs.
    serviceUri String
    The service URI for the webhook to post notifications.
    customHeaders Map<String>
    Custom headers that will be added to the webhook notifications.
    location String
    The location of the webhook. This cannot be changed after the resource is created.
    scope String
    The scope of repositories where the event can be triggered. 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 | "enabled" | "disabled"
    The status of the webhook at the time the operation was called.
    tags Map<String>
    The tags for the webhook.
    webhookName String
    The name of the webhook.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the resource.
    ProvisioningState string
    The provisioning state of the webhook at the time the operation was called.
    Type string
    The type of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the resource.
    ProvisioningState string
    The provisioning state of the webhook at the time the operation was called.
    Type string
    The type of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the resource.
    provisioningState String
    The provisioning state of the webhook at the time the operation was called.
    type String
    The type of the resource.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the resource.
    provisioningState string
    The provisioning state of the webhook at the time the operation was called.
    type string
    The type of the resource.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the resource.
    provisioning_state str
    The provisioning state of the webhook at the time the operation was called.
    type str
    The type of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the resource.
    provisioningState String
    The provisioning state of the webhook at the time the operation was called.
    type String
    The type of the resource.

    Supporting Types

    WebhookAction, WebhookActionArgs

    Push
    push
    Delete
    delete
    Quarantine
    quarantine
    Chart_push
    chart_push
    Chart_delete
    chart_delete
    WebhookActionPush
    push
    WebhookActionDelete
    delete
    WebhookActionQuarantine
    quarantine
    WebhookAction_Chart_push
    chart_push
    WebhookAction_Chart_delete
    chart_delete
    Push
    push
    Delete
    delete
    Quarantine
    quarantine
    Chart_push
    chart_push
    Chart_delete
    chart_delete
    Push
    push
    Delete
    delete
    Quarantine
    quarantine
    Chart_push
    chart_push
    Chart_delete
    chart_delete
    PUSH
    push
    DELETE
    delete
    QUARANTINE
    quarantine
    CHART_PUSH
    chart_push
    CHART_DELETE
    chart_delete
    "push"
    push
    "delete"
    delete
    "quarantine"
    quarantine
    "chart_push"
    chart_push
    "chart_delete"
    chart_delete

    WebhookStatus, WebhookStatusArgs

    Enabled
    enabled
    Disabled
    disabled
    WebhookStatusEnabled
    enabled
    WebhookStatusDisabled
    disabled
    Enabled
    enabled
    Disabled
    disabled
    Enabled
    enabled
    Disabled
    disabled
    ENABLED
    enabled
    DISABLED
    disabled
    "enabled"
    enabled
    "disabled"
    disabled

    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 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    azure-native-v1 pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native-v1 logo
    These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
    Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi