Adding or Modifying Application Configurations
Function
This API is used to add or modify application configurations.
Application configurations refer to common environment variables of an application. Components deployed in the application inherit these environment variables.
URI
PUT /v2/{project_id}/cas/applications/{application_id}/configuration
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
project_id |
String |
Yes |
Tenant's project ID. |
application_id |
String |
Yes |
Application ID. |
Request
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
environment_id |
String |
Yes |
Environment ID. |
configuration |
Object |
Yes |
Application configurations, such as public environment variables. See Table 3. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
env |
Array of objects |
Yes |
Environment variables of the application. See Table 4. If the names of multiple environment variables are the same, only the last environment variable takes effect. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
name |
String |
Yes |
Name of the environment variable. The value contains 1 to 64 characters consisting of letters, digits, underscores (_), hyphens (-), and dots (.), and cannot start with a digit. |
value |
String |
Yes |
Value of the environment variable. |
Response
Parameter |
Type |
Description |
---|---|---|
application_id |
String |
Application ID. |
environment_id |
String |
Environment ID. |
configuration |
Object |
Application configurations. See Table 6. |
Parameter |
Type |
Description |
---|---|---|
env |
Array of objects |
Environment variables. See Table 7. |
Example
Example request
{ "environment_id": "0fa75dfe-0d32-4bc1-848b-8008cf3f2567", "configuration": { "env": [ { "name": "app-env", "value": "env" } ] } }
Example response
{ "application_id": "06cf2fda-af45-44b4-9e22-6294c4804515", "environment_id": "0fa75dfe-0d32-4bc1-848b-8008cf3f2567", "configuration": { "env": [ { "name": "app-env", "value": "env" } ] } }
Status Code
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
404 |
Not Found |
500 |
Internal Server Error |
Error Code
Error code must be in the format of SVCSTG.00100.[Error_ID]. Example: SVCSTG.00100400. See Error Codes of Application Management APIs.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot