![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azure.containerservice.kotlin.RegistryWebook.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.containerservice.kotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
/**
* Builder for [RegistryWebook].
*/
@PulumiTagMarker
@Deprecated(
message = """
azure.containerservice.RegistryWebook has been deprecated in favor of
azure.containerservice.RegistryWebhook
""",
)
public class RegistryWebookResourceBuilder internal constructor() {
public var name: String? = null
public var args: RegistryWebookArgs = RegistryWebookArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend RegistryWebookArgsBuilder.() -> Unit) {
val builder = RegistryWebookArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): RegistryWebook {
val builtJavaResource =
com.pulumi.azure.containerservice.RegistryWebook(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return RegistryWebook(builtJavaResource)
}
}
/**
* Manages an Azure Container Registry Webhook.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* const acr = new azure.containerservice.Registry("acr", {
* name: "containerRegistry1",
* resourceGroupName: example.name,
* location: example.location,
* sku: "Standard",
* adminEnabled: false,
* });
* const webhook = new azure.containerservice.RegistryWebhook("webhook", {
* name: "mywebhook",
* resourceGroupName: example.name,
* registryName: acr.name,
* location: example.location,
* serviceUri: "https://mywebhookreceiver.example/mytag",
* status: "enabled",
* scope: "mytag:*",
* actions: ["push"],
* customHeaders: {
* "Content-Type": "application/json",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* acr = azure.containerservice.Registry("acr",
* name="containerRegistry1",
* resource_group_name=example.name,
* location=example.location,
* sku="Standard",
* admin_enabled=False)
* webhook = azure.containerservice.RegistryWebhook("webhook",
* name="mywebhook",
* resource_group_name=example.name,
* registry_name=acr.name,
* location=example.location,
* service_uri="https://mywebhookreceiver.example/mytag",
* status="enabled",
* scope="mytag:*",
* actions=["push"],
* custom_headers={
* "Content-Type": "application/json",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-resources",
* Location = "West Europe",
* });
* var acr = new Azure.ContainerService.Registry("acr", new()
* {
* Name = "containerRegistry1",
* ResourceGroupName = example.Name,
* Location = example.Location,
* Sku = "Standard",
* AdminEnabled = false,
* });
* var webhook = new Azure.ContainerService.RegistryWebhook("webhook", new()
* {
* Name = "mywebhook",
* ResourceGroupName = example.Name,
* RegistryName = acr.Name,
* Location = example.Location,
* ServiceUri = "https://mywebhookreceiver.example/mytag",
* Status = "enabled",
* Scope = "mytag:*",
* Actions = new[]
* {
* "push",
* },
* CustomHeaders =
* {
* { "Content-Type", "application/json" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/containerservice"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* acr, err := containerservice.NewRegistry(ctx, "acr", &containerservice.RegistryArgs{
* Name: pulumi.String("containerRegistry1"),
* ResourceGroupName: example.Name,
* Location: example.Location,
* Sku: pulumi.String("Standard"),
* AdminEnabled: pulumi.Bool(false),
* })
* if err != nil {
* return err
* }
* _, err = containerservice.NewRegistryWebhook(ctx, "webhook", &containerservice.RegistryWebhookArgs{
* Name: pulumi.String("mywebhook"),
* ResourceGroupName: example.Name,
* RegistryName: acr.Name,
* Location: example.Location,
* ServiceUri: pulumi.String("https://mywebhookreceiver.example/mytag"),
* Status: pulumi.String("enabled"),
* Scope: pulumi.String("mytag:*"),
* Actions: pulumi.StringArray{
* pulumi.String("push"),
* },
* CustomHeaders: pulumi.StringMap{
* "Content-Type": pulumi.String("application/json"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.core.ResourceGroup;
* import com.pulumi.azure.core.ResourceGroupArgs;
* import com.pulumi.azure.containerservice.Registry;
* import com.pulumi.azure.containerservice.RegistryArgs;
* import com.pulumi.azure.containerservice.RegistryWebhook;
* import com.pulumi.azure.containerservice.RegistryWebhookArgs;
* 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("example-resources")
* .location("West Europe")
* .build());
* var acr = new Registry("acr", RegistryArgs.builder()
* .name("containerRegistry1")
* .resourceGroupName(example.name())
* .location(example.location())
* .sku("Standard")
* .adminEnabled(false)
* .build());
* var webhook = new RegistryWebhook("webhook", RegistryWebhookArgs.builder()
* .name("mywebhook")
* .resourceGroupName(example.name())
* .registryName(acr.name())
* .location(example.location())
* .serviceUri("https://mywebhookreceiver.example/mytag")
* .status("enabled")
* .scope("mytag:*")
* .actions("push")
* .customHeaders(Map.of("Content-Type", "application/json"))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* acr:
* type: azure:containerservice:Registry
* properties:
* name: containerRegistry1
* resourceGroupName: ${example.name}
* location: ${example.location}
* sku: Standard
* adminEnabled: false
* webhook:
* type: azure:containerservice:RegistryWebhook
* properties:
* name: mywebhook
* resourceGroupName: ${example.name}
* registryName: ${acr.name}
* location: ${example.location}
* serviceUri: https://mywebhookreceiver.example/mytag
* status: enabled
* scope: mytag:*
* actions:
* - push
* customHeaders:
* Content-Type: application/json
* ```
*
* ## Import
* Container Registry Webhooks can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:containerservice/registryWebook:RegistryWebook example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ContainerRegistry/registries/myregistry1/webHooks/mywebhook1
* ```
*/
@Deprecated(
message = """
azure.containerservice.RegistryWebook has been deprecated in favor of
azure.containerservice.RegistryWebhook
""",
)
public class RegistryWebook internal constructor(
override val javaResource: com.pulumi.azure.containerservice.RegistryWebook,
) : KotlinCustomResource(javaResource, RegistryWebookMapper) {
/**
* 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`
*/
public val actions: Output>
get() = javaResource.actions().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* Custom headers that will be added to the webhook notifications request.
*/
public val customHeaders: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy