Contents x
Bucket Notification Rule Create Command
- Print
- DarkLight
Contents
Bucket Notification Rule Create Command
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
V4.0.2
This command creates bucket notification rules for the given bucket.
Note
To enable this feature, contact the Support team to request access.
Currently, Group admins cannot manage Event Notification rules in a Group member’s account.
Currently, Group admins cannot manage Event Notification rules in a Group member’s account.
b2 bucket notification-rule create [-h] --event-type EVENT_TYPE --webhook-url
WEBHOOK_URL [--sign-secret SIGN_SECRET]
[--custom-header CUSTOM_HEADER] [--enable]
[--disable] [--json]
B2_URI ruleName
b2 notification-rule create b2://bucketName/optionalSubPath/ ruleName --event-type "b2:ObjectCreated:*" --webhook-url https://example.com/webhook
Required Capabilities
- readBucketNotifications
- writeBucketNotifications
Positional Arguments
- B2_URI
B2 URI of the bucket with optional path prefix (for example,b2://bucketName
orb2://bucketName/optionalSubPath/
). - ruleName
Name of the rule.
Named Arguments
- --event-type
Events scope (for example,‘b2:ObjectCreated:*’
). You can use the parameter multiple times to set multiple scopes. - --webhook-url
URL to use to send the notification. - --sign-secret
Optional signature key that consists of 32 alphanumeric characters. - --custom-header
Custom header that is sent with the notification. You can use the parameter multiple times to set multiple headers.
Format: HEADER_NAME=VALUE - --enable
Flag that enables the notification rule. - --disable
Flag that disables the notification rule.
Default: True - --json
The output in JSON format to use in scripts.
Default: False
V4.0.1
This command creates bucket notification rules for the given bucket.
Note
To enable this feature, contact the Support team to request access.
Currently, Group admins cannot manage Event Notification rules in a Group member’s account.
Currently, Group admins cannot manage Event Notification rules in a Group member’s account.
b2 bucket notification-rule create [-h] --event-type EVENT_TYPE --webhook-url
WEBHOOK_URL [--sign-secret SIGN_SECRET]
[--custom-header CUSTOM_HEADER] [--enable]
[--disable] [--json]
B2_URI ruleName
b2 notification-rule create b2://bucketName/optionalSubPath/ ruleName --event-type "b2:ObjectCreated:*" --webhook-url https://example.com/webhook
Required Capabilities
- readBucketNotifications
- writeBucketNotifications
Positional Arguments
- B2_URI
B2 URI of the bucket with optional path prefix (for example,b2://bucketName
orb2://bucketName/optionalSubPath/
). - ruleName
Name of the rule.
Named Arguments
- --event-type
Events scope (for example,‘b2:ObjectCreated:*’
). You can use the parameter multiple times to set multiple scopes. - --webhook-url
URL to use to send the notification. - --sign-secret
Optional signature key that consists of 32 alphanumeric characters. - --custom-header
Custom header that is sent with the notification. You can use the parameter multiple times to set multiple headers.
Format: HEADER_NAME=VALUE - --enable
Flag that enables the notification rule. - --disable
Flag that disables the notification rule.
Default: True - --json
The output in JSON format to use in scripts.
Default: False
V4.0.0
This command creates bucket notification rules for the given bucket.
Note
To enable this feature, contact the Support team to request access.
Currently, Group admins cannot manage Event Notification rules in a Group member’s account.
Currently, Group admins cannot manage Event Notification rules in a Group member’s account.
b2 bucket notification-rule create [-h] --event-type EVENT_TYPE --webhook-url
WEBHOOK_URL [--sign-secret SIGN_SECRET]
[--custom-header CUSTOM_HEADER] [--enable]
[--disable] [--json]
B2_URI ruleName
b2 notification-rule create b2://bucketName/optionalSubPath/ ruleName --event-type "b2:ObjectCreated:*" --webhook-url https://example.com/webhook
Required Capabilities
- readBucketNotifications
- writeBucketNotifications
Positional Arguments
- B2_URI
B2 URI of the bucket with optional path prefix (for example,b2://bucketName
orb2://bucketName/optionalSubPath/
). - ruleName
Name of the rule.
Named Arguments
- --event-type
Events scope (for example,‘b2:ObjectCreated:*’
). You can use the parameter multiple times to set multiple scopes. - --webhook-url
URL to use to send the notification. - --sign-secret
Optional signature key that consists of 32 alphanumeric characters. - --custom-header
Custom header that is sent with the notification. You can use the parameter multiple times to set multiple headers.
Format: HEADER_NAME=VALUE - --enable
Flag that enables the notification rule. - --disable
Flag that disables the notification rule.
Default: True - --json
The output in JSON format to use in scripts.
Default: False
This command is not included in version 2.1.0.
This command is not included in version 2.2.0.
This command is not included in version 2.3.0.
This command is not included in version 2.4.0.
This command is not included in version 2.5.0.
This command is not included in version 2.5.1.
This command is not included in version 3.0.0.
This command is not included in version 3.0.1.
This command is not included in version 3.0.2.
This command is not included in version 3.0.3.
This command is not included in version 3.1.0.
This command is not included in version 3.2.0.
This command is not included in version 3.2.1.
This command is not included in version 3.3.0.
This command is not included in version 3.4.0.
This command is not included in version 3.5.0.
This command is not included in version 3.6.0.
This command is not included in version 3.7.0.
This command is not included in version 3.7.1.
This command is not included in version 3.8.0.
This command is not included in version 3.9.0.
This command is not included in version 3.12.0.
This command is not included in version 3.13.0.
This command is not included in version 3.13.1.
This command is not included in version 3.14.0.
This command is not included in version 3.15.0.
This command is not included in version 3.16.0.
This command is not included in version 3.16.1.
This command is not included in version 3.17.0.
This command is not included in version 3.18.0.
This command is not included in version 3.19.0.
This command is not included in version 3.19.1.
Versions
Was this article helpful?
Thank you for your feedback! Our team will get back to you
How can we improve this article?
Your feedback
Comment
Comment (Optional)
Character limit : 500
Please enter your comment
Email (Optional)
Email
Please enter a valid email
Related articles
- Buckets
- Event Notifications
- Bucket Notification Rule Delete Command
- Bucket Notification Rule Disable Command
- Bucket Notification Rule Enable Command
- Bucket Notification Rule List Command
- Bucket Notification Rule Update Command
- Bucket Create Command
- Bucket Get Command
- Bucket Get Download Auth Command
- Bucket List Command
- Bucket Update Command