1. Packages
  2. Packages
  3. Volcenginecc Provider
  4. API Docs
  5. tos
  6. BucketNotification
Viewing docs for volcenginecc v0.0.37
published on Friday, May 22, 2026 by Volcengine
volcenginecc logo
Viewing docs for volcenginecc v0.0.37
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:

    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) -> BucketNotification
    func 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.

    Supporting Types

    BucketNotificationNotificationRule, BucketNotificationNotificationRuleArgs

    Destination Volcengine.BucketNotificationNotificationRuleDestination
    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.BucketNotificationNotificationRuleFilter
    Filter rules.
    RuleId 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 BucketNotificationNotificationRuleDestination
    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 BucketNotificationNotificationRuleFilter
    Filter rules.
    RuleId 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 BucketNotificationNotificationRuleDestination
    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 BucketNotificationNotificationRuleFilter
    Filter rules.
    ruleId 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 BucketNotificationNotificationRuleDestination
    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 BucketNotificationNotificationRuleFilter
    Filter rules.
    ruleId 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 BucketNotificationNotificationRuleDestination
    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 BucketNotificationNotificationRuleFilter
    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.
    ruleId 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

    InstanceId 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.
    InstanceId 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.
    instanceId 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.
    instanceId 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.
    instanceId 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

    AccessKeyId string
    RocketMQ AccessKey。
    InstanceId string
    RocketMQ instance ID.
    Role string
    Role TRN, used to authorize TOS to access RocketMQ service.
    Topic string
    Name of the RocketMQ topic.
    AccessKeyId string
    RocketMQ AccessKey。
    InstanceId 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_id string
    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.
    accessKeyId String
    RocketMQ AccessKey。
    instanceId String
    RocketMQ instance ID.
    role String
    Role TRN, used to authorize TOS to access RocketMQ service.
    topic String
    Name of the RocketMQ topic.
    accessKeyId string
    RocketMQ AccessKey。
    instanceId 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_id str
    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.
    accessKeyId String
    RocketMQ AccessKey。
    instanceId 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

    FunctionId string
    Function ID for event delivery.
    FunctionId string
    Function ID for event delivery.
    function_id string
    Function ID for event delivery.
    functionId String
    Function ID for event delivery.
    functionId string
    Function ID for event delivery.
    function_id str
    Function ID for event delivery.
    functionId String
    Function ID for event delivery.

    BucketNotificationNotificationRuleFilter, BucketNotificationNotificationRuleFilterArgs

    tos_key object
    Object filter information.
    tosKey Property Map
    Object filter information.

    BucketNotificationNotificationRuleFilterTosKey, BucketNotificationNotificationRuleFilterTosKeyArgs

    BucketNotificationNotificationRuleFilterTosKeyFilterRule, BucketNotificationNotificationRuleFilterTosKeyFilterRuleArgs

    Name string
    Matching conditions. The values are as follows: prefix: prefix; suffix: suffix.
    Value string
    Matched prefix and suffix information.
    Name string
    Matching conditions. The values are as follows: prefix: prefix; suffix: suffix.
    Value string
    Matched prefix and suffix information.
    name string
    Matching conditions. The values are as follows: prefix: prefix; suffix: suffix.
    value string
    Matched prefix and suffix information.
    name String
    Matching conditions. The values are as follows: prefix: prefix; suffix: suffix.
    value String
    Matched prefix and suffix information.
    name string
    Matching conditions. The values are as follows: prefix: prefix; suffix: suffix.
    value string
    Matched prefix and suffix information.
    name str
    Matching conditions. The values are as follows: prefix: prefix; suffix: suffix.
    value str
    Matched prefix and suffix information.
    name String
    Matching conditions. The values are as follows: prefix: prefix; suffix: suffix.
    value String
    Matched prefix and suffix information.

    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 volcenginecc Terraform Provider.
    volcenginecc logo
    Viewing docs for volcenginecc v0.0.37
    published on Friday, May 22, 2026 by Volcengine

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial