R2Bucket Event Notification
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleR2BucketEventNotification = new cloudflare.R2BucketEventNotification("example_r2_bucket_event_notification", {
accountId: "023e105f4ecef8ad9ca31a8372d0c353",
bucketName: "example-bucket",
queueId: "queue_id",
rules: [{
actions: [
"PutObject",
"CopyObject",
],
description: "Notifications from source bucket to queue",
prefix: "img/",
suffix: ".jpeg",
}],
});
Content copied to clipboard
import pulumi
import pulumi_cloudflare as cloudflare
example_r2_bucket_event_notification = cloudflare.R2BucketEventNotification("example_r2_bucket_event_notification",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
bucket_name="example-bucket",
queue_id="queue_id",
rules=[{
"actions": [
"PutObject",
"CopyObject",
],
"description": "Notifications from source bucket to queue",
"prefix": "img/",
"suffix": ".jpeg",
}])
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var exampleR2BucketEventNotification = new Cloudflare.R2BucketEventNotification("example_r2_bucket_event_notification", new()
{
AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
BucketName = "example-bucket",
QueueId = "queue_id",
Rules = new[]
{
new Cloudflare.Inputs.R2BucketEventNotificationRuleArgs
{
Actions = new[]
{
"PutObject",
"CopyObject",
},
Description = "Notifications from source bucket to queue",
Prefix = "img/",
Suffix = ".jpeg",
},
},
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.NewR2BucketEventNotification(ctx, "example_r2_bucket_event_notification", &cloudflare.R2BucketEventNotificationArgs{
AccountId: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
BucketName: pulumi.String("example-bucket"),
QueueId: pulumi.String("queue_id"),
Rules: cloudflare.R2BucketEventNotificationRuleArray{
&cloudflare.R2BucketEventNotificationRuleArgs{
Actions: pulumi.StringArray{
pulumi.String("PutObject"),
pulumi.String("CopyObject"),
},
Description: pulumi.String("Notifications from source bucket to queue"),
Prefix: pulumi.String("img/"),
Suffix: pulumi.String(".jpeg"),
},
},
})
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.cloudflare.R2BucketEventNotification;
import com.pulumi.cloudflare.R2BucketEventNotificationArgs;
import com.pulumi.cloudflare.inputs.R2BucketEventNotificationRuleArgs;
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 exampleR2BucketEventNotification = new R2BucketEventNotification("exampleR2BucketEventNotification", R2BucketEventNotificationArgs.builder()
.accountId("023e105f4ecef8ad9ca31a8372d0c353")
.bucketName("example-bucket")
.queueId("queue_id")
.rules(R2BucketEventNotificationRuleArgs.builder()
.actions(
"PutObject",
"CopyObject")
.description("Notifications from source bucket to queue")
.prefix("img/")
.suffix(".jpeg")
.build())
.build());
}
}
Content copied to clipboard
resources:
exampleR2BucketEventNotification:
type: cloudflare:R2BucketEventNotification
name: example_r2_bucket_event_notification
properties:
accountId: 023e105f4ecef8ad9ca31a8372d0c353
bucketName: example-bucket
queueId: queue_id
rules:
- actions:
- PutObject
- CopyObject
description: Notifications from source bucket to queue
prefix: img/
suffix: .jpeg
Content copied to clipboard
Properties
Link copied to clipboard
Name of the bucket
Link copied to clipboard
Jurisdiction of the bucket
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
List of queues associated with the bucket.
Link copied to clipboard
Array of rules to drive notifications