published on Friday, May 22, 2026 by Volcengine
published on Friday, May 22, 2026 by Volcengine
Set event notification rules. Use event notification to receive alerts when resources in the bucket change.
Example Usage
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
resources:
tOSBucketNotificationDemo:
type: volcenginecc:tos:BucketNotification
name: TOSBucketNotificationDemo
properties:
bucketName: ccapi-test
notificationRules:
- destination:
kafka:
- instanceId: kafka-cnnxxxxxm26rh
region: cn-beijing
role: trn:iam::21xxxxxxx:role/TOSNotiKafkaRole
topic: topic-1
user: user-1
rocketMq:
- accessKeyId: IpGw4i6xxxxxKrkdwRXZ
instanceId: rocketmq-cnngaxxxxx22ab8
role: trn:iam::21xxxxxxx:role/TOSNotiRocketMQRole
topic: topic-1
veFaaS:
- functionId: o1xxxxx
events:
- tos:ObjectCreated:Put
- tos:LifecycleExpiration:Delete
filter:
tosKey:
filterRules:
- name: prefix
value: preifx
- name: suffix
value: suffix
rule_id: test-0
Example coming soon!
Create BucketNotification Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BucketNotification(name: string, args: BucketNotificationArgs, opts?: CustomResourceOptions);@overload
def BucketNotification(resource_name: str,
args: BucketNotificationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def BucketNotification(resource_name: str,
opts: Optional[ResourceOptions] = None,
bucket_name: Optional[str] = None,
notification_rules: Optional[Sequence[BucketNotificationNotificationRuleArgs]] = None)func NewBucketNotification(ctx *Context, name string, args BucketNotificationArgs, opts ...ResourceOption) (*BucketNotification, error)public BucketNotification(string name, BucketNotificationArgs args, CustomResourceOptions? opts = null)
public BucketNotification(String name, BucketNotificationArgs args)
public BucketNotification(String name, BucketNotificationArgs args, CustomResourceOptions options)
type: volcenginecc:tos:BucketNotification
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "volcenginecc_tos_bucketnotification" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args BucketNotificationArgs
- 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 BucketNotificationArgs
- 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 BucketNotificationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BucketNotificationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BucketNotificationArgs
- 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 bucketNotificationResource = new Volcenginecc.Tos.BucketNotification("bucketNotificationResource", new()
{
BucketName = "string",
NotificationRules = new[]
{
new Volcenginecc.Tos.Inputs.BucketNotificationNotificationRuleArgs
{
Destination = new Volcenginecc.Tos.Inputs.BucketNotificationNotificationRuleDestinationArgs
{
Kafkas = new[]
{
new Volcenginecc.Tos.Inputs.BucketNotificationNotificationRuleDestinationKafkaArgs
{
InstanceId = "string",
Region = "string",
Role = "string",
Topic = "string",
User = "string",
},
},
RocketMqs = new[]
{
new Volcenginecc.Tos.Inputs.BucketNotificationNotificationRuleDestinationRocketMqArgs
{
AccessKeyId = "string",
InstanceId = "string",
Role = "string",
Topic = "string",
},
},
VeFaaS = new[]
{
new Volcenginecc.Tos.Inputs.BucketNotificationNotificationRuleDestinationVeFaaArgs
{
FunctionId = "string",
},
},
},
Events = new[]
{
"string",
},
Filter = new Volcenginecc.Tos.Inputs.BucketNotificationNotificationRuleFilterArgs
{
TosKey = new Volcenginecc.Tos.Inputs.BucketNotificationNotificationRuleFilterTosKeyArgs
{
FilterRules = new[]
{
new Volcenginecc.Tos.Inputs.BucketNotificationNotificationRuleFilterTosKeyFilterRuleArgs
{
Name = "string",
Value = "string",
},
},
},
},
RuleId = "string",
},
},
});
example, err := tos.NewBucketNotification(ctx, "bucketNotificationResource", &tos.BucketNotificationArgs{
BucketName: pulumi.String("string"),
NotificationRules: tos.BucketNotificationNotificationRuleArray{
&tos.BucketNotificationNotificationRuleArgs{
Destination: &tos.BucketNotificationNotificationRuleDestinationArgs{
Kafkas: tos.BucketNotificationNotificationRuleDestinationKafkaArray{
&tos.BucketNotificationNotificationRuleDestinationKafkaArgs{
InstanceId: pulumi.String("string"),
Region: pulumi.String("string"),
Role: pulumi.String("string"),
Topic: pulumi.String("string"),
User: pulumi.String("string"),
},
},
RocketMqs: tos.BucketNotificationNotificationRuleDestinationRocketMqArray{
&tos.BucketNotificationNotificationRuleDestinationRocketMqArgs{
AccessKeyId: pulumi.String("string"),
InstanceId: pulumi.String("string"),
Role: pulumi.String("string"),
Topic: pulumi.String("string"),
},
},
VeFaaS: tos.BucketNotificationNotificationRuleDestinationVeFaaArray{
&tos.BucketNotificationNotificationRuleDestinationVeFaaArgs{
FunctionId: pulumi.String("string"),
},
},
},
Events: pulumi.StringArray{
pulumi.String("string"),
},
Filter: &tos.BucketNotificationNotificationRuleFilterArgs{
TosKey: &tos.BucketNotificationNotificationRuleFilterTosKeyArgs{
FilterRules: tos.BucketNotificationNotificationRuleFilterTosKeyFilterRuleArray{
&tos.BucketNotificationNotificationRuleFilterTosKeyFilterRuleArgs{
Name: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
},
},
RuleId: pulumi.String("string"),
},
},
})
resource "volcenginecc_tos_bucketnotification" "bucketNotificationResource" {
bucket_name = "string"
notification_rules {
destination = {
kafkas = [{
"instanceId" = "string"
"region" = "string"
"role" = "string"
"topic" = "string"
"user" = "string"
}]
rocket_mqs = [{
"accessKeyId" = "string"
"instanceId" = "string"
"role" = "string"
"topic" = "string"
}]
ve_faa_s = [{
"functionId" = "string"
}]
}
events = ["string"]
filter = {
tos_key = {
filter_rules = [{
"name" = "string"
"value" = "string"
}]
}
}
rule_id = "string"
}
}
var bucketNotificationResource = new BucketNotification("bucketNotificationResource", BucketNotificationArgs.builder()
.bucketName("string")
.notificationRules(BucketNotificationNotificationRuleArgs.builder()
.destination(BucketNotificationNotificationRuleDestinationArgs.builder()
.kafkas(BucketNotificationNotificationRuleDestinationKafkaArgs.builder()
.instanceId("string")
.region("string")
.role("string")
.topic("string")
.user("string")
.build())
.rocketMqs(BucketNotificationNotificationRuleDestinationRocketMqArgs.builder()
.accessKeyId("string")
.instanceId("string")
.role("string")
.topic("string")
.build())
.veFaaS(BucketNotificationNotificationRuleDestinationVeFaaArgs.builder()
.functionId("string")
.build())
.build())
.events("string")
.filter(BucketNotificationNotificationRuleFilterArgs.builder()
.tosKey(BucketNotificationNotificationRuleFilterTosKeyArgs.builder()
.filterRules(BucketNotificationNotificationRuleFilterTosKeyFilterRuleArgs.builder()
.name("string")
.value("string")
.build())
.build())
.build())
.ruleId("string")
.build())
.build());
bucket_notification_resource = volcenginecc.tos.BucketNotification("bucketNotificationResource",
bucket_name="string",
notification_rules=[{
"destination": {
"kafkas": [{
"instance_id": "string",
"region": "string",
"role": "string",
"topic": "string",
"user": "string",
}],
"rocket_mqs": [{
"access_key_id": "string",
"instance_id": "string",
"role": "string",
"topic": "string",
}],
"ve_faa_s": [{
"function_id": "string",
}],
},
"events": ["string"],
"filter": {
"tos_key": {
"filter_rules": [{
"name": "string",
"value": "string",
}],
},
},
"rule_id": "string",
}])
const bucketNotificationResource = new volcenginecc.tos.BucketNotification("bucketNotificationResource", {
bucketName: "string",
notificationRules: [{
destination: {
kafkas: [{
instanceId: "string",
region: "string",
role: "string",
topic: "string",
user: "string",
}],
rocketMqs: [{
accessKeyId: "string",
instanceId: "string",
role: "string",
topic: "string",
}],
veFaaS: [{
functionId: "string",
}],
},
events: ["string"],
filter: {
tosKey: {
filterRules: [{
name: "string",
value: "string",
}],
},
},
ruleId: "string",
}],
});
type: volcenginecc:tos:BucketNotification
properties:
bucketName: string
notificationRules:
- destination:
kafkas:
- instanceId: string
region: string
role: string
topic: string
user: string
rocketMqs:
- accessKeyId: string
instanceId: string
role: string
topic: string
veFaaS:
- functionId: string
events:
- string
filter:
tosKey:
filterRules:
- name: string
value: string
ruleId: string
BucketNotification Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The BucketNotification resource accepts the following input properties:
- Bucket
Name string - Bucket name.
- Notification
Rules List<Volcengine.Bucket Notification Notification Rule>
- Bucket
Name string - Bucket name.
- Notification
Rules []BucketNotification Notification Rule Args
- bucket_
name string - Bucket name.
- notification_
rules list(object)
- bucket
Name String - Bucket name.
- notification
Rules List<BucketNotification Notification Rule>
- bucket
Name string - Bucket name.
- notification
Rules BucketNotification Notification Rule[]
- bucket
Name String - Bucket name.
- notification
Rules List<Property Map>
Outputs
All input properties are implicitly available as output properties. Additionally, the BucketNotification resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing BucketNotification Resource
Get an existing BucketNotification resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: BucketNotificationState, opts?: CustomResourceOptions): BucketNotification@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bucket_name: Optional[str] = None,
notification_rules: Optional[Sequence[BucketNotificationNotificationRuleArgs]] = None) -> BucketNotificationfunc GetBucketNotification(ctx *Context, name string, id IDInput, state *BucketNotificationState, opts ...ResourceOption) (*BucketNotification, error)public static BucketNotification Get(string name, Input<string> id, BucketNotificationState? state, CustomResourceOptions? opts = null)public static BucketNotification get(String name, Output<String> id, BucketNotificationState state, CustomResourceOptions options)resources: _: type: volcenginecc:tos:BucketNotification get: id: ${id}import {
to = volcenginecc_tos_bucketnotification.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Bucket
Name string - Bucket name.
- Notification
Rules List<Volcengine.Bucket Notification Notification Rule>
- Bucket
Name string - Bucket name.
- Notification
Rules []BucketNotification Notification Rule Args
- bucket_
name string - Bucket name.
- notification_
rules list(object)
- bucket
Name String - Bucket name.
- notification
Rules List<BucketNotification Notification Rule>
- bucket
Name string - Bucket name.
- notification
Rules BucketNotification Notification Rule[]
- bucket
Name String - Bucket name.
- notification
Rules List<Property Map>
Supporting Types
BucketNotificationNotificationRule, BucketNotificationNotificationRuleArgs
- Destination
Volcengine.
Bucket Notification Notification Rule Destination - Event notification delivery targets. Must include at least one target and supports up to five different targets.
- Events List<string>
- Event type. List of events supported by TOS.
- Filter
Volcengine.
Bucket Notification Notification Rule Filter - Filter rules.
- Rule
Id string - Event notification rule name. Naming rules: Event names created under the same bucket must be unique. Maximum length is 255 characters. If not set, TOS will automatically generate a rule name.
- Destination
Bucket
Notification Notification Rule Destination - Event notification delivery targets. Must include at least one target and supports up to five different targets.
- Events []string
- Event type. List of events supported by TOS.
- Filter
Bucket
Notification Notification Rule Filter - Filter rules.
- Rule
Id string - Event notification rule name. Naming rules: Event names created under the same bucket must be unique. Maximum length is 255 characters. If not set, TOS will automatically generate a rule name.
- destination object
- Event notification delivery targets. Must include at least one target and supports up to five different targets.
- events list(string)
- Event type. List of events supported by TOS.
- filter object
- Filter rules.
- rule_
id string - Event notification rule name. Naming rules: Event names created under the same bucket must be unique. Maximum length is 255 characters. If not set, TOS will automatically generate a rule name.
- destination
Bucket
Notification Notification Rule Destination - Event notification delivery targets. Must include at least one target and supports up to five different targets.
- events List<String>
- Event type. List of events supported by TOS.
- filter
Bucket
Notification Notification Rule Filter - Filter rules.
- rule
Id String - Event notification rule name. Naming rules: Event names created under the same bucket must be unique. Maximum length is 255 characters. If not set, TOS will automatically generate a rule name.
- destination
Bucket
Notification Notification Rule Destination - Event notification delivery targets. Must include at least one target and supports up to five different targets.
- events string[]
- Event type. List of events supported by TOS.
- filter
Bucket
Notification Notification Rule Filter - Filter rules.
- rule
Id string - Event notification rule name. Naming rules: Event names created under the same bucket must be unique. Maximum length is 255 characters. If not set, TOS will automatically generate a rule name.
- destination
Bucket
Notification Notification Rule Destination - Event notification delivery targets. Must include at least one target and supports up to five different targets.
- events Sequence[str]
- Event type. List of events supported by TOS.
- filter
Bucket
Notification Notification Rule Filter - Filter rules.
- rule_
id str - Event notification rule name. Naming rules: Event names created under the same bucket must be unique. Maximum length is 255 characters. If not set, TOS will automatically generate a rule name.
- destination Property Map
- Event notification delivery targets. Must include at least one target and supports up to five different targets.
- events List<String>
- Event type. List of events supported by TOS.
- filter Property Map
- Filter rules.
- rule
Id String - Event notification rule name. Naming rules: Event names created under the same bucket must be unique. Maximum length is 255 characters. If not set, TOS will automatically generate a rule name.
BucketNotificationNotificationRuleDestination, BucketNotificationNotificationRuleDestinationArgs
BucketNotificationNotificationRuleDestinationKafka, BucketNotificationNotificationRuleDestinationKafkaArgs
- Instance
Id string - Kafka instance ID.
- Region string
- Region where the Kafka instance is located.
- Role string
- Role TRN, used to authorize TOS to access Kafka service.
- Topic string
- Name of the Kafka topic.
- User string
- Kafka username.
- Instance
Id string - Kafka instance ID.
- Region string
- Region where the Kafka instance is located.
- Role string
- Role TRN, used to authorize TOS to access Kafka service.
- Topic string
- Name of the Kafka topic.
- User string
- Kafka username.
- instance_
id string - Kafka instance ID.
- region string
- Region where the Kafka instance is located.
- role string
- Role TRN, used to authorize TOS to access Kafka service.
- topic string
- Name of the Kafka topic.
- user string
- Kafka username.
- instance
Id String - Kafka instance ID.
- region String
- Region where the Kafka instance is located.
- role String
- Role TRN, used to authorize TOS to access Kafka service.
- topic String
- Name of the Kafka topic.
- user String
- Kafka username.
- instance
Id string - Kafka instance ID.
- region string
- Region where the Kafka instance is located.
- role string
- Role TRN, used to authorize TOS to access Kafka service.
- topic string
- Name of the Kafka topic.
- user string
- Kafka username.
- instance_
id str - Kafka instance ID.
- region str
- Region where the Kafka instance is located.
- role str
- Role TRN, used to authorize TOS to access Kafka service.
- topic str
- Name of the Kafka topic.
- user str
- Kafka username.
- instance
Id String - Kafka instance ID.
- region String
- Region where the Kafka instance is located.
- role String
- Role TRN, used to authorize TOS to access Kafka service.
- topic String
- Name of the Kafka topic.
- user String
- Kafka username.
BucketNotificationNotificationRuleDestinationRocketMq, BucketNotificationNotificationRuleDestinationRocketMqArgs
- Access
Key stringId - RocketMQ AccessKey。
- Instance
Id string - RocketMQ instance ID.
- Role string
- Role TRN, used to authorize TOS to access RocketMQ service.
- Topic string
- Name of the RocketMQ topic.
- Access
Key stringId - RocketMQ AccessKey。
- Instance
Id string - RocketMQ instance ID.
- Role string
- Role TRN, used to authorize TOS to access RocketMQ service.
- Topic string
- Name of the RocketMQ topic.
- access_
key_ stringid - RocketMQ AccessKey。
- instance_
id string - RocketMQ instance ID.
- role string
- Role TRN, used to authorize TOS to access RocketMQ service.
- topic string
- Name of the RocketMQ topic.
- access
Key StringId - RocketMQ AccessKey。
- instance
Id String - RocketMQ instance ID.
- role String
- Role TRN, used to authorize TOS to access RocketMQ service.
- topic String
- Name of the RocketMQ topic.
- access
Key stringId - RocketMQ AccessKey。
- instance
Id string - RocketMQ instance ID.
- role string
- Role TRN, used to authorize TOS to access RocketMQ service.
- topic string
- Name of the RocketMQ topic.
- access_
key_ strid - RocketMQ AccessKey。
- instance_
id str - RocketMQ instance ID.
- role str
- Role TRN, used to authorize TOS to access RocketMQ service.
- topic str
- Name of the RocketMQ topic.
- access
Key StringId - RocketMQ AccessKey。
- instance
Id String - RocketMQ instance ID.
- role String
- Role TRN, used to authorize TOS to access RocketMQ service.
- topic String
- Name of the RocketMQ topic.
BucketNotificationNotificationRuleDestinationVeFaa, BucketNotificationNotificationRuleDestinationVeFaaArgs
- Function
Id string - Function ID for event delivery.
- Function
Id string - Function ID for event delivery.
- function_
id string - Function ID for event delivery.
- function
Id String - Function ID for event delivery.
- function
Id string - Function ID for event delivery.
- function_
id str - Function ID for event delivery.
- function
Id String - Function ID for event delivery.
BucketNotificationNotificationRuleFilter, BucketNotificationNotificationRuleFilterArgs
- Tos
Key Volcengine.Bucket Notification Notification Rule Filter Tos Key - Object filter information.
- Tos
Key BucketNotification Notification Rule Filter Tos Key - Object filter information.
- tos
Key BucketNotification Notification Rule Filter Tos Key - Object filter information.
- tos
Key BucketNotification Notification Rule Filter Tos Key - Object filter information.
- tos_
key BucketNotification Notification Rule Filter Tos Key - Object filter information.
- tos
Key Property Map - Object filter information.
BucketNotificationNotificationRuleFilterTosKey, BucketNotificationNotificationRuleFilterTosKeyArgs
BucketNotificationNotificationRuleFilterTosKeyFilterRule, BucketNotificationNotificationRuleFilterTosKeyFilterRuleArgs
Import
$ pulumi import volcenginecc:tos/bucketNotification:BucketNotification example "bucket_name"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcenginecc volcengine/pulumi-volcenginecc
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
volcengineccTerraform Provider.
published on Friday, May 22, 2026 by Volcengine