CreateParameter

Updated at:

Creates a parameter.

Operation description

You must purchase DataWorks Professional Edition or higher to use this feature.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

Name

string

Yes

The name of the parameter. The name must be unique within the workspace. It must start with "workspace.". The subsequent content must start with a letter and can contain only letters, underscores, and digits. The total length of the name cannot exceed 255 characters.

workspace.para

Properties

array<object>

Yes

Sets the values of the parameter in different environments. When you create a parameter, you must specify a production environment configuration by setting EnvType to Prod and providing a non-empty Value. To configure the development environment, add another configuration with EnvType set to Dev. If multiple configurations are specified for the same environment, the last one takes precedence.

object

No

EnvType

string

No

The project environment. Valid values:

  • Prod: Production.

  • Dev: Development.

Valid values:

  • Prod :

    Production.

  • Dev :

    Development.

Prod

Value

string

No

The value of the parameter. Only Chinese characters, letters, digits, and specific special characters are allowed, such as /, :, ., [, ], ,, , ', ", _, =, ?, space, carriage return, line feed, +, -, *, %, &, @, !, $, #, {, and }.

value123

Type

string

Yes

The type. Valid values:

  • PlainConstant: Constant (plaintext).

  • SecretConstant: Constant (ciphertext).

  • Variable: Variable.

Valid values:

  • Variable :

    Variable.

  • SecretConstant :

    Constant (ciphertext).

  • PlainConstant :

    Constant (plaintext).

PlainConstant

ProjectId

integer

Yes

The ID of the workspace. This parameter is required when Scope is set to Project.

1000

Owner

string

Yes

The ID of the account of the owner.

123456789

Description

string

No

The description.

This is a test parameter

Scope

string

No

The scope of the parameter. Default value: Project. Other types are not supported.

Valid values:

  • Project :

    Project.

Project

Response elements

Element

Type

Description

Example

object

Schema of Response

Id

integer

The ID of the created parameter. You can pass this ID to GetParameter to query the parameter details.

123

RequestId

string

The request ID.

6A6CBE87-9F91-1323-B680-E7A7065XXXXX

Examples

Success response

JSON format

{
  "Id": 123,
  "RequestId": "6A6CBE87-9F91-1323-B680-E7A7065XXXXX"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.