Updating an Orchestration Rule
Function
This API is used to update an orchestration rule.
URI
PUT /v2/{project_id}/apic/instances/{instance_id}/orchestrations/{orchestration_id}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Appendix > Obtaining a Project ID in the ROMA Connect API Reference. |
|
instance_id |
Yes |
String |
Instance ID. |
|
orchestration_id |
Yes |
String |
Orchestration rule ID |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token, which can be obtained by calling the IAM API (value of X-Subject-Token in the response header). |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
orchestration_name |
Yes |
String |
Orchestration mapping rule name. The name must be 3 to 64 characters long, start with a letter and use only letters, digits, and underscores (_). It must be unique in the same instance. |
|
orchestration_strategy |
Yes |
String |
Orchestration policy. Options:
|
|
orchestration_mapped_param |
No |
OrchestrationMappedParam object |
Parameter configuration after orchestration. This parameter is mandatory when isPreprocessing is set to false. |
|
is_preprocessing |
No |
Boolean |
Whether the policy is a preprocessing policy. A preprocessing policy generates only temporary parameters as the input of the subsequent parameter orchestration rule. And it cannot be used as the last orchestration rule except the default orchestration rule. |
|
orchestration_map |
No |
Array of OrchestrationMap objects |
List of orchestration mapping rules. The list contains 1 to 300 characters. Orchestration mapping rules are prioritized in the same sequence as the list. Mapping rules must be unique. When orchestration_strategy is list, map_param_list cannot contain same elements. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
mapped_param_name |
Yes |
String |
Name of the request parameter after orchestration. The value can contain 1 to 128 characters, including letters, digits, and hyphens (-). It must start with a letter and cannot be the same as an existing parameter name. By default, the parameter name is transparently transmitted to the backend. |
|
mapped_param_type |
Yes |
String |
Type of the parameter after orchestration. The value can be string or number. |
|
mapped_param_location |
Yes |
String |
Position of the orchestrated parameter. The value can be query or header. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
map_param_list |
No |
Array of strings |
List of parameters after mapping orchestration. This parameter is mandatory when orchestration_strategy is set to list. The list length ranges from 0 to 3000. The value can contain 1 to 128 characters, including letters, digits, hyphens (-), and underscores (_). |
|
map_param_range |
No |
OrchestrationMapParamRange object |
This parameter is for mapping range configurations of parameters after orchestration and is mandatory if orchestration_strategy is range or hash_range. |
|
mapped_param_value |
No |
String |
The parameter value after orchestration can contain 1 to 128 characters, including only letters and digits. This parameter is optional only when orchestration_strategy is set to hash, head_n, or tail_n, or is_preprocessing is set to false. |
|
intercept_length |
No |
Integer |
Truncation length. The value ranges from 1 to 100. This parameter is mandatory when the policy type is head_n or tail_n. If the truncation length is greater than the parameter length, the parameter truncation result is a complete parameter. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
range_start |
No |
String |
Range start value. The value is a string that can be converted to an integer. After the conversion, the value of range_start ranges from 0 to 9223372036854775807. Range_start cannot exceed range_end. |
|
range_end |
No |
String |
Range end value. The value is a string that can be converted to an integer. After the conversion, the value of range_end ranges from 0 to 9223372036854775807. Range_start cannot exceed range_end. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
orchestration_name |
String |
Orchestration mapping rule name. The name must be 3 to 64 characters long, start with a letter and use only letters, digits, and underscores (_). It must be unique in the same instance. |
|
orchestration_strategy |
String |
Orchestration policy. Options:
|
|
orchestration_mapped_param |
OrchestrationMappedParam object |
Parameter configuration after orchestration. This parameter is mandatory when isPreprocessing is set to false. |
|
is_preprocessing |
Boolean |
Whether the policy is a preprocessing policy. A preprocessing policy generates only temporary parameters as the input of the subsequent parameter orchestration rule. And it cannot be used as the last orchestration rule except the default orchestration rule. |
|
orchestration_map |
Array of OrchestrationMap objects |
List of orchestration mapping rules. The list contains 1 to 300 characters. Orchestration mapping rules are prioritized in the same sequence as the list. Mapping rules must be unique. When orchestration_strategy is list, map_param_list cannot contain same elements. |
|
orchestration_id |
String |
Orchestration rule ID. |
|
orchestration_create_time |
String |
Time when an orchestration rule was created. |
|
orchestration_update_time |
String |
Time when an orchestration rule was updated. |
|
Parameter |
Type |
Description |
|---|---|---|
|
mapped_param_name |
String |
Name of the request parameter after orchestration. The value can contain 1 to 128 characters, including letters, digits, and hyphens (-). It must start with a letter and cannot be the same as an existing parameter name. By default, the parameter name is transparently transmitted to the backend. |
|
mapped_param_type |
String |
Type of the parameter after orchestration. The value can be string or number. |
|
mapped_param_location |
String |
Position of the orchestrated parameter. The value can be query or header. |
|
Parameter |
Type |
Description |
|---|---|---|
|
map_param_list |
Array of strings |
List of parameters after mapping orchestration. This parameter is mandatory when orchestration_strategy is set to list. The list length ranges from 0 to 3000. The value can contain 1 to 128 characters, including letters, digits, hyphens (-), and underscores (_). |
|
map_param_range |
OrchestrationMapParamRange object |
This parameter is for mapping range configurations of parameters after orchestration and is mandatory if orchestration_strategy is range or hash_range. |
|
mapped_param_value |
String |
The parameter value after orchestration can contain 1 to 128 characters, including only letters and digits. This parameter is optional only when orchestration_strategy is set to hash, head_n, or tail_n, or is_preprocessing is set to false. |
|
intercept_length |
Integer |
Truncation length. The value ranges from 1 to 100. This parameter is mandatory when the policy type is head_n or tail_n. If the truncation length is greater than the parameter length, the parameter truncation result is a complete parameter. |
|
Parameter |
Type |
Description |
|---|---|---|
|
range_start |
String |
Range start value. The value is a string that can be converted to an integer. After the conversion, the value of range_start ranges from 0 to 9223372036854775807. Range_start cannot exceed range_end. |
|
range_end |
String |
Range end value. The value is a string that can be converted to an integer. After the conversion, the value of range_end ranges from 0 to 9223372036854775807. Range_start cannot exceed range_end. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error description. |
Status code: 401
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error description. |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error description. |
Status code: 404
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error description. |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error description. |
Example Requests
Updating an orchestration rule
{
"orchestration_name" : "orchestration_demo_1",
"orchestration_strategy" : "range",
"orchestration_mapped_param" : {
"mapped_param_name" : "shared-tag",
"mapped_param_type" : "number",
"mapped_param_location" : "header"
},
"orchestration_map" : [ {
"map_param_range" : {
"range_start" : "1",
"range_end" : "1000"
},
"mapped_param_value" : "1"
} ]
}
Example Responses
Status code: 200
OK
{
"orchestration_id" : "yt655e81d9cb4424bf704ef2b0ac7600",
"orchestration_name" : "orchestration_demo_1",
"orchestration_create_time" : "2023-07-02T12:31:23.353Z",
"orchestration_update_time" : "2023-07-02T13:31:23.353Z",
"orchestration_strategy" : "range",
"orchestration_mapped_param" : {
"mapped_param_name" : "shared-tag",
"mapped_param_type" : "number",
"mapped_param_location" : "header"
},
"orchestration_map" : [ {
"map_param_range" : {
"range_start" : "1",
"range_end" : "1000"
},
"mapped_param_value" : "1"
} ]
}
Status code: 400
Bad Request
{
"error_code" : "APIG.2012",
"error_msg" : "Invalid parameter value,parameterName:orchestration_id. Please refer to the support documentation"
}
Status code: 401
Unauthorized
{
"error_code" : "APIG.1002",
"error_msg" : "Incorrect token or token resolution failed"
}
Status code: 403
Forbidden
{
"error_code" : "APIG.1005",
"error_msg" : "No permissions to request this method"
}
Status code: 404
Not Found
{
"error_code" : "APIG.3030",
"error_msg" : "The instance does not exist;id:f0fa1789-3b76-433b-a787-9892951c620ec"
}
Status code: 500
Internal Server Error
{
"error_code" : "APIG.9999",
"error_msg" : "System error"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
403 |
Forbidden |
|
404 |
Not Found |
|
500 |
Internal Server Error |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.