Help Center/ Data Ingestion Service/ API Reference/ API Description/ Stream Management/ Deleting a Permission Rule of a Resource
Updated on 2025-11-25 GMT+08:00

Deleting a Permission Rule of a Resource

Function

This API is used to delete a permission rule of a resource.

Calling Method

For details, see Calling APIs.

URI

DELETE /v2/{project_id}/streams/{stream_name}/policies

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID. For how to obtain it, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 1 to 64 characters. Only letters and digits are allowed.

Default Value

N/A

stream_name

Yes

String

Definition

Stream name. The system generates a name prefixed with "dis-" followed by four random characters or digits. Example: dis-HvB1. You can also customize a name.

Constraints

N/A

Range

The value can contain 1 to 64 characters. Only letters and digits are allowed.

Default Value

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

AnyType

Definition

User token. You can obtain it by calling the IAM API for obtaining a user token. The user token is the value of X-Subject-Token in the response header. For details, see Token-based Authentication.

Constraints

N/A

Range

The value can contain 1 to 32,768 characters.

Default Value

N/A

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

stream_id

Yes

String

Definition

Unique ID of the stream

Constraints

N/A

Range

N/A

Default Value

N/A

principal_name

Yes

String

Definition

Authorized user. If the permission is granted to a specified tenant, the format is domainName.*. If the permission is granted to a specified sub-user of a tenant, the format is domainName.userName. Multiple accounts can be added and separated by commas (,), for example, domainName1.userName1,domainName2.userName2.

Constraints

N/A

Range

N/A

Default Value

N/A

action_type

Yes

String

Definition

Authorization operation type

Constraints

N/A

Range

  • putRecords: uploading data

  • getRecords: downloading data

  • getStreamInfo: obtaining stream details

Default Value

N/A

effect

No

String

Definition

Authorization impact type. The default value is accept.

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Status code: 200

Normal response

None

Example Requests

Delete a permission rule of a resource.

DELETE https://{Endpoint}/v2/{project_id}/streams/{stream_name}/policies

{
  "action_type" : "putRecords",
  "effect" : "accept",
  "principal_name" : "domainname1",
  "stream_id" : "CiFdELMr0401K9GGZlp"
}

Example Responses

None

Status Codes

Status Code

Description

200

Normal response

Error Codes

See Error Codes.