El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Configuring a DIS-Enabled Notification Policy

Updated on 2024-01-02 GMT+08:00

Functions

Configures a DIS-enabled notification policy for a specified bucket. The API is idempotent. If the same rule already exists in the bucket, a success message is returned with the status code of 200. Otherwise, status code 201 is returned.

Request Syntax

PUT /?disPolicy HTTP/1.1
Host: bucketname.obs.region.example.com
Authorization: authorization
Content-Type: application/json
Content-Length: length
Date: date
Body:
{
    "rules": [{
        "id":"rule_id",
        "stream": "stream_name",
        "project": "project_id",
        "events": ["ObjectCreated:*", "ObjectRemoved:*"],
        "prefix": "",
        "suffix": "",
        "agency": "agency_name"
    }]
}

Request parameters

This request contains no message parameters.

Request Headers

This request uses common headers. For details, see Table 3.

Request Elements

Table 1 Request Elements

Parameter

Description

Mandatory

rules

Number of rules.

Type: container

Value range: [1, 10]

NOTE:

For the same bucket, prefixes of different rules cannot contain each other or have duplicate beginning characters. The same agency is recommended.

Yes

Table 2 Rule parameters

Parameter

Description

Mandatory

id

Rule ID. Unique identifier of the DIS policy rule configured for the bucket.

Type: string

Value range: 1 to 256. The value must be within the range of ^[a-zA-Z0-9_-]{1, 256}$.

Yes

stream

DIS stream name. You need to create a DIS stream first.

Type: string

Yes

project

ID of the project to which the DIS stream belongs.

Type: string

Yes

events

OBS event list.

Type: string

Valid value: a string of 0 to 1023 characters. The value can contain any characters. The following event types are supported:

  • ObjectCreated:* (all upload operations)
  • ObjectCreated:Put (object upload)
  • ObjectCreated:Post (object upload through a web browser)
  • ObjectCreated:Copy (copying objects)
  • ObjectCreated:CompleteMultipartUpload (merge uploaded parts)
  • ObjectRemoved:* (all deletion operations)
  • ObjectRemoved:Delete (deleting an object with a specified version ID)
  • ObjectRemoved:DeleteMarkerCreated (deleting an object without a specified version ID)

Yes

prefix

Object name prefix, key word of object names. Based on the prefix defined by this parameter, enter the key word for filtering objects. A longer string of characters delivers a more accurate filtering result. A maximum of 1024 characters are supported. It also can be empty. In addition, the total length of the prefix and suffix cannot exceed 1024 characters.

Type: string

Value range: [0, 1024]

No

suffix

Object name suffix. Key word of object names. Based on the suffix defined by this parameter, enter the key word for filtering objects. A longer string of characters delivers a more accurate filtering result. A maximum of 1024 characters are supported. It also can be empty. In addition, the total length of the prefix and suffix cannot exceed 1024 characters.

Type: string

Value range: [0, 1024]

No

agency

IAM agency name. The delegated party must contain OBS and be granted with the DIS Administrator or DIS User permission.

Type: string

Yes

Response Syntax

HTTP/1.1 status
Server: OBS
Date: date
Content-Length: length

Response Headers

The response to the request uses common headers. For details, see Table 1.

Response Elements

This response contains no elements.

Error Responses

No special error responses are returned. For details about error responses, see Table 2.

Sample Request

PUT /?disPolicy HTTP/1.1
Host: bucketname.obs.region.example.com
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:sc2PM13Wlfcoc/YZLK0MwsI2Zpo=
Content-Type: application/json
Content-Length: 1049
Date: Tue, 21 Jul 2020 15:38:30 GMT
{
    "rules": [{
        "id":"event-01",
        "stream": "stream_name",
        "project": "project_id",
        "events": ["ObjectCreated:*", "ObjectRemoved:*"],
        "prefix": "",
        "suffix": "",
        "agency": "dis_agency"
    }]
}

Sample Response

HTTP/1.1 201 Created
Server: OBS
Date: Tue, 07 Jul 2020 07:29:13 GMT
Content-Length: 0

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback