Help Center/ Data Security Center/ API Reference/ API Description/ Asset Map/ Setting the Encryption Status of an OBS Bucket
Updated on 2026-01-13 GMT+08:00

Setting the Encryption Status of an OBS Bucket

Function

This API is used to configure encryption settings for an OBS bucket. You can select the encryption type and key to secure data in OBS buckets.

Calling Method

For details, see Calling APIs.

URI

PUT /v2/{project_id}/data-map/obs-bucket-encryption

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID, which is used to identify a specific project.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

asset_id

No

String

Unique identifier of an asset, which uniquely identifies an asset.

bucket_name

No

String

Bucket name, which identifies an OBS bucket.

kms_key_id

No

String

Unique identifier of a KMS key, which specifies the KMS key used for encryption.

type

No

String

Encryption type, which specifies the encryption type of the bucket.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

msg

String

Returned message

status

String

Return status, for example, '200', '400'.

Status code: 201

Created

Example Requests

PUT /v2/{project_id}/data-map/obs-bucket-encryption

{
  "asset_id" : "string",
  "bucket_name" : "string",
  "kms_key_id" : "string",
  "type" : "string"
}

Example Responses

None

Status Codes

Status Code

Description

200

OK

201

Created

401

Unauthorized. The user is not logged in or the token is invalid.

403

Unauthorized to access the resource.

404

The specified project does not exist.

Error Codes

See Error Codes.