Creates a binding relationship between a dataset and an Object Storage Service (OSS) bucket. This allows for the automatic synchronization of incremental and full data and indexing.
Operation description
Before you call this operation, make sure that you are familiar with the billing of Intelligent Media Management (IMM).****
Before you create a binding, make sure that the project and the dataset that you want to use exist.
- For information about how to create a project, see CreateProject .
- For information about how to create a dataset, see CreateDataset .
After you create a binding between a dataset and an OSS bucket, IMM scans the existing objects in the bucket and extracts metadata based on the scanning result. Then, IMM creates an index from the extracted metadata. If new objects are uploaded to the OSS bucket, IMM tracks and scans the objects and updates the index. For objects whose metadata index is created by calling this operation, you can call query operations, such as SimpleQuery , to query objects, manage objects, and collect statistics on objects.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| imm:CreateBinding | create | *Dataset acs:imm:{#regionId}:{#accountId}:project/{#ProjectName}/dataset/{#DatasetName} |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| ProjectName | string | Yes | The name of the project. You can obtain the name of the project from the response of the CreateProject operation. | test-project |
| DatasetName | string | Yes | The name of the dataset. You can obtain the name of the dataset from the response of the CreateDataset operation. | test-dataset |
| URI | string | Yes | The URI of the OSS bucket to which you bind the dataset. Specify the value in the oss://${Bucket} format. | oss://examplebucket |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "5F74C5C9-5AC0-49F9-914D-E01589D3****",
"Binding": {
"ProjectName": "",
"DatasetName": "",
"URI": "",
"State": "",
"Phase": "",
"Detail": "",
"CreateTime": "",
"UpdateTime": "",
"Reason": "",
"Filters": [
""
],
"ServiceRole": "",
"Notification": {
"MNS": {
"TopicName": ""
},
"WithFields": [
""
]
},
"WorkflowParameters": [
{
"Value": "",
"Name": ""
}
]
}
}Error codes
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2024-09-03 | API Description Update. The response structure of the API has changed | View Change Details |
| 2024-04-19 | The API operation is not deprecated.. The Error code has changed | View Change Details |
| 2021-06-15 | Add Operation | View Change Details |
