Webhook
A class represent an AppComplianceAutomation webhook resource. Uses Azure REST API version 2024-06-27.
Example Usage
Webhook_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var webhook = new AzureNative.AppComplianceAutomation.Webhook("webhook", new()
{
ContentType = AzureNative.AppComplianceAutomation.ContentType.ApplicationJson,
EnableSslVerification = AzureNative.AppComplianceAutomation.EnableSslVerification.True,
Events = new[]
{
AzureNative.AppComplianceAutomation.NotificationEvent.Generate_snapshot_failed,
},
PayloadUrl = "https://example.com",
ReportName = "testReportName",
SendAllEvents = AzureNative.AppComplianceAutomation.SendAllEvents.False,
Status = AzureNative.AppComplianceAutomation.WebhookStatus.Enabled,
UpdateWebhookKey = AzureNative.AppComplianceAutomation.UpdateWebhookKey.True,
WebhookKey = "00000000-0000-0000-0000-000000000000",
WebhookName = "testWebhookName",
});
});
Content copied to clipboard
package main
import (
appcomplianceautomation "github.com/pulumi/pulumi-azure-native-sdk/appcomplianceautomation/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := appcomplianceautomation.NewWebhook(ctx, "webhook", &appcomplianceautomation.WebhookArgs{
ContentType: pulumi.String(appcomplianceautomation.ContentTypeApplicationJson),
EnableSslVerification: pulumi.String(appcomplianceautomation.EnableSslVerificationTrue),
Events: pulumi.StringArray{
pulumi.String(appcomplianceautomation.NotificationEvent_Generate_snapshot_failed),
},
PayloadUrl: pulumi.String("https://example.com"),
ReportName: pulumi.String("testReportName"),
SendAllEvents: pulumi.String(appcomplianceautomation.SendAllEventsFalse),
Status: pulumi.String(appcomplianceautomation.WebhookStatusEnabled),
UpdateWebhookKey: pulumi.String(appcomplianceautomation.UpdateWebhookKeyTrue),
WebhookKey: pulumi.String("00000000-0000-0000-0000-000000000000"),
WebhookName: pulumi.String("testWebhookName"),
})
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.appcomplianceautomation.Webhook;
import com.pulumi.azurenative.appcomplianceautomation.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()
.contentType("application/json")
.enableSslVerification("true")
.events("generate_snapshot_failed")
.payloadUrl("https://example.com")
.reportName("testReportName")
.sendAllEvents("false")
.status("Enabled")
.updateWebhookKey("true")
.webhookKey("00000000-0000-0000-0000-000000000000")
.webhookName("testWebhookName")
.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:appcomplianceautomation:Webhook testWebhookName /providers/Microsoft.AppComplianceAutomation/reports/{reportName}/webhooks/{webhookName}
Content copied to clipboard
Properties
Link copied to clipboard
content type
Link copied to clipboard
webhook deliveryStatus
Link copied to clipboard
whether to enable ssl verification
Link copied to clipboard
webhook payload url
Link copied to clipboard
Azure Resource Provisioning State
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
whether to send notification under any event.
Link copied to clipboard
Azure Resource Manager metadata containing createdBy and modifiedBy information.
Link copied to clipboard
whether to update webhookKey.
Link copied to clipboard
webhook secret token. If not set, this field value is null; otherwise, please set a string value.
Link copied to clipboard
whether webhookKey is enabled.