Class 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" },
},
});
}
}
Inherited Members
Namespace: Pulumi.Azure.ContainerService
Assembly: Pulumi.Azure.dll
Syntax
public class RegistryWebhook : CustomResource
Constructors
View SourceRegistryWebhook(String, RegistryWebhookArgs, CustomResourceOptions)
Create a RegistryWebhook resource with the given unique name, arguments, and options.
Declaration
public RegistryWebhook(string name, RegistryWebhookArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| RegistryWebhookArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceActions
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
Declaration
public Output<ImmutableArray<string>> Actions { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
CustomHeaders
Custom headers that will be added to the webhook notifications request.
Declaration
public Output<ImmutableDictionary<string, string>> CustomHeaders { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>> |
Location
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Declaration
public Output<string> Location { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
Specifies the name of the Container Registry Webhook. Changing this forces a new resource to be created.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
RegistryName
The Name of Container registry this Webhook belongs to. Changing this forces a new resource to be created.
Declaration
public Output<string> RegistryName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ResourceGroupName
The name of the resource group in which to create the Container Registry Webhook. Changing this forces a new resource to be created.
Declaration
public Output<string> ResourceGroupName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Scope
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.
Declaration
public Output<string> Scope { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ServiceUri
Specifies the service URI for the Webhook to post notifications.
Declaration
public Output<string> ServiceUri { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Status
Specifies if this Webhook triggers notifications or not. Valid values: enabled and disabled. Default is enabled.
Declaration
public Output<string> Status { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tags
Declaration
public Output<ImmutableDictionary<string, string>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>> |
Methods
View SourceGet(String, Input<String>, RegistryWebhookState, CustomResourceOptions)
Get an existing RegistryWebhook resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static RegistryWebhook Get(string name, Input<string> id, RegistryWebhookState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| RegistryWebhookState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| RegistryWebhook |