Updated on 2024-10-11 GMT+08:00

OBSWrite

This system keyword is used for OBS string operations, that is, to set the value based on a specified key.

Parameter

Mandatory

Type

Description

Access Key ID

Yes

String

OBS AK (This personal information must be defined as sensitive in the environment parameters.)

Secret Access ID

Yes

String

OBS SK (This personal information must be defined as sensitive in the environment parameters.)

Rest Endpoint

Yes

String

OBS endpoint

Bucket Name

Yes

String

OBS bucket name

Key

Yes

String

OBS file path

Value

Yes

String

OBS file content

OBSWrite Response

Status: success

Parameter

Type

Description

result

String

If the setting is successful, ok is returned.

key

String

OBS file path

Status: failed

Parameter

Type

Description

result

String

If the setting is successful, fail is returned.

errorMessage

String

Failure cause

OBSWrite Response Example

{
  "result" : "ok",
  "key" : "/key"
}

OBSWrite Usage Example

Write the test data to the key1/key2 path.

Check whether the setting is successful.