OSS

Updated at:

Connects DataWorks to an Object Storage Service (OSS) bucket to read and write object data.

Property definition

  • Data source type: oss

  • Supported configuration mode (ConnectionPropertiesMode): Connection string mode (UrlMode)

Connection string mode

All connection parameters are provided as a JSON object. The required parameters depend on the authentication method you use.

Common parameters

These parameters are required for both authentication methods.

Parameter Type Required Description Example
regionId String Yes The ID of the region where the OSS bucket is located. cn-shanghai
endpoint String Yes The OSS endpoint. http://oss-beijing.aliyuncs.com
bucket String Yes The name of the OSS bucket. test-oss-sh
authType String Yes The authentication method. Valid values: RamRole, Ak. RamRole
envType String Yes The environment. Valid values: Dev (development environment), Prod (production environment). Prod

Authentication parameters

Choose one of the following authentication methods and provide the corresponding parameters.

RAM role mode (recommended)

Use a RAM role to grant DataWorks access to OSS without storing long-term credentials. Set authType to RamRole.

Parameter Type Required Description Example
authIdentity String Yes The ID of the RAM role. 112345

AccessKey mode

Use an AccessKey ID and AccessKey secret to authenticate directly. Set authType to Ak.

Parameter Type Required Description Example
accessId String Yes The AccessKey ID. xxxxx
accessKey String Yes The AccessKey secret. xxxxx

Configuration examples

RAM role mode

{
    "envType": "Prod",
    "endpoint": "http://oss-beijing.aliyuncs.com",
    "bucket": "test-oss-sh",
    "authType": "RamRole",
    "authIdentity": "1123455"
}

AccessKey mode

{
    "envType": "Prod",
    "endpoint": "http://oss-beijing.aliyuncs.com",
    "bucket": "test-oss-sh",
    "authType": "Ak",
    "accessId": "xxx",
    "accessKey": "xxx"
}