Obtaining the Component Configuration List
Function
This API is used to obtain the component configuration list.
URI
GET /v1/{project_id}/cae/applications/{application_id}/components/{component_id}/configurations
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. See Obtaining a Project ID. |
application_id |
Yes |
String |
Application ID. |
component_id |
Yes |
String |
Component ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token.
Maximum characters: 16,384 |
X-Enterprise-Project-ID |
No |
String |
Enterprise project ID.
For more information about enterprise projects and how to obtain enterprise project IDs, see Enterprise Management User Guide. |
X-Environment-ID |
Yes |
String |
Environment ID.
|
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
api_version |
String |
API version. Fixed value: v1. |
kind |
String |
API type. Fixed value: ComponentConfiguration. |
items |
Array of Configuration objects |
Component configuration list. |
Parameter |
Type |
Description |
---|---|---|
data |
Component configuration data. |
|
operated_at |
String |
Operation time. |
operation_id |
String |
Operator ID. |
type |
String |
Component configuration type. Enumerated values:
|
is_activated |
Boolean |
Whether the configuration takes effect. |
Parameter |
Type |
Description |
---|---|---|
spec |
Component configuration data specifications. |
|
metadata |
ConfigurationDataMetadata object |
Component configuration metadata. |
Parameter |
Type |
Description |
---|---|---|
rds_id |
String |
RDS DB instance ID. This parameter is returned when type under Configuration is set to rds. |
rds_db_name |
String |
RDS database name. This parameter is returned when type under Configuration is set to rds. |
rds_address |
String |
RDS database address. This parameter is returned when type under Configuration is set to rds. |
rds_username |
String |
RDS database username. This parameter is returned when type under Configuration is set to rds. |
rds_password |
String |
RDS database password. This parameter is returned when type under Configuration is set to rds. |
rds_port |
String |
RDS database port. This parameter is returned when type under Configuration is set to rds. |
config_center_addr |
String |
Address of the CSE configuration center. This parameter is returned when type under Configuration is set to cse. |
service_center_addr |
String |
Address for service registry and discovery. This parameter is returned when type under Configuration is set to cse. |
cse_id |
String |
CSE engine ID. This parameter is returned when type under Configuration is set to cse. |
envs |
map<string, object> |
Environment variable. This parameter is returned when type under Configuration is set to env. Common environment variables:
|
ip |
String |
EIP, which is returned when no domain name is configured. |
items |
Array of AccessConfigurationDataItems objects |
Access configuration list. This parameter is returned when type under Configuration is set to access. |
scale_strategy |
String |
AS policy type. This parameter is returned when type under Configuration is set to scaling. Enumerated values:
|
max_replica_count |
Integer |
Maximum number of instances that can be scaled in an AS policy. This parameter is returned when type under Configuration is set to scaling. |
min_replica_count |
Integer |
Minimum number of instances that can be scaled in an AS policy. This parameter is returned when type under Configuration is set to scaling. |
advanced |
Advanced settings of an AS policy. This parameter is returned when type under Configuration is set to scaling. |
|
triggers |
Array of ScaleConfigurationDataTrigger objects |
Trigger list of an AS policy. This parameter is returned when type under Configuration is set to scaling. |
volumes |
Array of VolumeConfigurationDataVolume objects |
Cloud storage configuration list. This parameter is returned when type under Configuration is set to volume. |
livenessProbe |
Liveness probe configuration for health check. This parameter is returned when type under Configuration is set to healthCheck. |
|
startupProbe |
Startup probe configuration for health check. This parameter is returned when type under Configuration is set to healthCheck. |
|
readinessProbe |
Readiness probe configuration for health check. This parameter is returned when type under Configuration is set to healthCheck. |
|
postStart |
postStart object |
Post-startup processing configured for lifecycle management. This parameter is returned when type under Configuration is set to lifecycle. |
preStop |
preStop object |
Pre-stop processing configured for lifecycle management. This parameter is returned when type under Configuration is set to lifecycle. |
log_paths |
Array of strings |
Custom log path array. This parameter is returned when type under Configuration is set to log. |
instrumentation |
String |
Agent injection mode. This parameter is returned when type under Configuration is set to apm2. |
apm_application |
String |
APM 2.0 application. This parameter is returned when type under Configuration is set to apm2. |
type |
String |
Monitoring system type, including apm2. This parameter is returned when type under Configuration is set to apm2. |
app_name |
String |
APM 2.0 component. This parameter is returned when type under Configuration is set to apm2. |
instance_name |
String |
APM 2.0 instance. This parameter is returned when type under Configuration is set to apm2. |
env_name |
String |
APM 2.0 environment. This parameter is returned when type under Configuration is set to apm2. |
image_pull_policy |
String |
Agent image update policy, which has been discarded and migrated to the monitoring system.
This parameter is returned when type under Configuration is set to apm2. |
version |
String |
Enhanced Agent version, which has been discarded and migrated to the monitoring system. This parameter is returned when type under Configuration is set to apm2. |
access_key |
String |
APM 2.0 access key, which has been discarded and migrated to the monitoring system. This parameter is returned when type under Configuration is set to apm2. |
access_value |
String |
APM 2.0 access key value, which has been discarded and migrated to the monitoring system. This parameter is returned when type under Configuration is set to apm2. |
business |
String |
APM 2.0 application, which is the same as apm_application and has been discarded. This parameter is returned when type under Configuration is set to apm2. |
path |
String |
Collection path for custom metric monitoring. This parameter is returned when type under Configuration is set to customMetric. |
port |
String |
Collection port for custom metric monitoring. This parameter is returned when type under Configuration is set to customMetric. |
metrics |
Array of strings |
Metric for custom monitoring. This parameter is returned when type under Configuration is set to customMetric. |
Parameter |
Type |
Description |
---|---|---|
type |
String |
Access mode. Enumerated values:
|
domain_names |
String |
Domain name for private network access. |
access_control |
AccessControl object |
Access control configuration. Blacklists and whitelists can be configured. |
ports |
Array of AccessConfigurationPort objects |
Access information, such as the port, protocol, certificate, and URL. |
Parameter |
Type |
Description |
---|---|---|
black |
Array of strings |
Blacklist array.
|
white |
Array of strings |
Whitelist array.
|
Parameter |
Type |
Description |
---|---|---|
target_port |
Integer |
Listening port. |
port |
Integer |
Access port. |
protocol |
String |
Protocol. Load balancing supports TCP, HTTP, and HTTPS while route configuration supports HTTP and HTTPS. Enumerated values:
|
default_certificate |
String |
Default certificate, which is configured when the access mode is set to Ingress and protocol is set to HTTPS. It will be used if SNI is not configured. |
certificate |
String |
Certificate. |
policy |
String |
Security policy. Enumerated values:
|
paths |
Array of AccessConfigurationHttpPath objects |
Path and domain name for matching. |
elb_id |
String |
Selected ELB ID. |
Parameter |
Type |
Description |
---|---|---|
hostname |
String |
Domain name. If it is left blank, the IP address is used. |
path |
String |
URL. |
url_match_mode |
String |
URL path matching mode. Options: STARTS_WITH, REGEX, and EQUAL_TO. Enumerated values:
|
Parameter |
Type |
Description |
---|---|---|
scaledown_stabilization_seconds |
Integer |
Cooling time window for scale-in. |
scaledown_rate |
Integer |
Scale-in step. |
scaleup_stabilization_seconds |
Integer |
Cooling time window for scale-out. |
scaleup_rate |
Integer |
Scale-out step. |
disable_scaledown |
Boolean |
Whether to disable automatic scale-in. |
Parameter |
Type |
Description |
---|---|---|
type |
String |
Metric type. Enumerated values:
|
metadata |
ScalingTriggerMeta object |
Metadata. |
Parameter |
Type |
Description |
---|---|---|
type |
String |
Data type, which can only be Utilization. This parameter is mandatory when type under ScaleConfigurationDataTrigger is set to cpu or memory. |
value |
String |
Threshold for triggering scaling. This parameter is mandatory when type under ScaleConfigurationDataTrigger is set to cpu or memory. |
period_type |
String |
Validity period. This parameter is mandatory when type under ScaleConfigurationDataTrigger is set to cron. Enumerated values:
|
schedulers |
Array of CronTriggerScheduler objects |
Time when the scaling is triggered and number of instances triggered in each period. This parameter is mandatory when type under ScaleConfigurationDataTrigger is set to cron. |
Parameter |
Type |
Description |
---|---|---|
cron |
String |
Trigger time, which is a cron expression consisting of five fields. |
target_replica |
Integer |
Number of required instances. |
Parameter |
Type |
Description |
---|---|---|
volume_id |
String |
Cloud storage ID. |
resource_name |
String |
Cloud storage name. |
resource_type |
String |
Resource type. Enumerated values:
|
resource_sub_type |
String |
Resource sub-type. Enumerated values:
|
umask |
String |
Default permission on a directory or file. SFS 3.0 cloud storage does not support this parameter. Default value: 0027. |
mount_info |
Array of VolumeConfigurationMountInfo objects |
Cloud storage mounting information. |
Parameter |
Type |
Description |
---|---|---|
path |
String |
Container mount path. |
sub_path |
String |
Sub-path. |
access_mode |
String |
Read or write permission. Enumerated values:
|
Parameter |
Type |
Description |
---|---|---|
periodSeconds |
Integer |
Detection period. Unit: second. |
initialDelaySeconds |
Integer |
Latency. Unit: second. |
timeoutSeconds |
Integer |
Timeout. Unit: second. |
successThreshold |
Integer |
Success threshold. |
failureThreshold |
Integer |
Failure threshold. |
httpGet |
HTTP request check information in the health check configuration. |
|
tcpSocket |
TCP port check information in the health check configuration. |
|
exec |
HealthCheckConfigurationExec object |
Command check information in the health check configuration. |
Parameter |
Type |
Description |
---|---|---|
periodSeconds |
Integer |
Detection period. Unit: second. |
initialDelaySeconds |
Integer |
Latency. Unit: second. |
timeoutSeconds |
Integer |
Timeout. Unit: second. |
successThreshold |
Integer |
Success threshold. |
failureThreshold |
Integer |
Failure threshold. |
httpGet |
HTTP request check information in the health check configuration. |
|
tcpSocket |
TCP port check information in the health check configuration. |
|
exec |
HealthCheckConfigurationExec object |
Command check information in the health check configuration. |
Parameter |
Type |
Description |
---|---|---|
periodSeconds |
Integer |
Detection period. Unit: second. |
initialDelaySeconds |
Integer |
Latency. Unit: second. |
timeoutSeconds |
Integer |
Timeout. Unit: second. |
successThreshold |
Integer |
Success threshold. |
failureThreshold |
Integer |
Failure threshold. |
httpGet |
HTTP request check information in the health check configuration. |
|
tcpSocket |
TCP port check information in the health check configuration. |
|
exec |
HealthCheckConfigurationExec object |
Command check information in the health check configuration. |
Parameter |
Type |
Description |
---|---|---|
path |
String |
URL. |
port |
String |
Port. |
scheme |
String |
Protocol. Enumerated values:
|
Parameter |
Type |
Description |
---|---|---|
command |
Array of strings |
Shell statement. |
Parameter |
Type |
Description |
---|---|---|
exec |
LifeCycleConfigurationExec object |
Command to execute. |
Parameter |
Type |
Description |
---|---|---|
exec |
LifeCycleConfigurationExec object |
Command to execute. |
Parameter |
Type |
Description |
---|---|---|
command |
Array of strings |
Shell statement. |
Parameter |
Type |
Description |
---|---|---|
annotations |
Map<String,String> |
Additional parameters. Assume that you need to use the weighted round robin algorithm for load balancing and disable health check. Configuration example:
|
Example Request
Obtain the component configuration list.
GET https://{endpoint}/v1/{project_id}/cae/applications/{application_id}/components/{component_id}/configurations
Example Response
Status code: 200
The request is successful.
{ "api_version" : "v1", "kind" : "ComponentConfiguration", "items" : [ { "type" : "env", "data" : { "spec" : { "envs" : { "TZ" : "Asia/Shanghai" }, "env_references" : [ { "env_name" : "test", "value_from" : { "name" : "test", "reference_type" : "dewSecret" } } ] } }, "operation_id" : "68e82e30-190d-40b2-9680-98a66ccb2f8f", "operated_at" : "2023-02-16T06:35:46.23126Z", "is_activated" : true }, { "type" : "volume", "data" : { "spec" : { "volumes" : [ { "volume_id" : "bef119d0-c7d1-4b58-9794-8b74faf80a59", "resource_name" : "test-nacos", "resource_type" : "", "resource_sub_type" : "object_bucket", "mount_info" : [ { "path" : "/tmp", "access_mode" : "ReadWriteMany", "create_time" : "2023-02-16T03:22:59.599Z" } ] }, { "volume_id" : "a061934d-52e3-4b36-aea7-6c51879f84c9", "resource_name" : "test", "resource_type" : "", "resource_sub_type" : "parallel_file_system", "mount_info" : [ { "path" : "/temp", "access_mode" : "ReadWriteMany", "create_time" : "2023-02-16T03:25:08.841Z" } ] } ] } }, "operation_id" : "68e82e30-190d-40b2-9680-98a66ccb2f8f", "operated_at" : "2023-02-16T06:35:46.23126Z", "is_activated" : true }, { "type" : "rds", "data" : { "spec" : { "rds_id" : "a5fdee4cf88c4277a68688a014f444bdin01", "rds_port" : "", "rds_address" : "100.xx.xx.xxx", "rds_db_name" : "cae", "rds_password" : "xxx", "rds_username" : "cae" } }, "operation_id" : "b4ce410c-3ac3-40ae-9f11-0c8b98c2df19", "operated_at" : "2023-02-16T02:14:03.416282Z", "is_activated" : true }, { "type" : "scaling", "data" : { "spec" : { "scale_strategy" : "mix", "max_replica_count" : 2, "min_replica_count" : 1, "advanced" : { "scaledown_stabilization_seconds" : 300, "scaledown_rate" : 99, "scaleup_stabilization_seconds" : 0, "scaleup_rate" : 4, "disable_scaledown" : false }, "triggers" : [ { "metadata" : { "period_type" : "day", "schedulers" : [ { "cron" : "00 01 * * *", "target_replica" : 2 }, { "cron" : "00 02 * * *", "target_replica" : 1 } ] }, "type" : "cron" }, { "metadata" : { "type" : "Utilization", "value" : "10" }, "type" : "cpu" }, { "metadata" : { "type" : "Utilization", "value" : "20" }, "type" : "memory" } ] } }, "operation_id" : "02c81e5a-251b-4921-878e-a8f78efbadd1", "operated_at" : "2023-02-16T07:03:07.711734Z", "is_activated" : true }, { "type" : "access", "data" : { "metadata" : { "annotations" : { "deployBackend" : "k8s", "kubernetes.io/elb.health-check-flag" : "off", "kubernetes.io/elb.lb-algorithm" : "ROUND_ROBIN" } }, "spec" : { "ip" : "100.xx.xx.xxx", "items" : [ { "type" : "ClusterIP", "domain_names" : [ "test-test-config" ], "ports" : [ { "ip" : "", "name" : "loadBalancer-5x095cix5deo", "target_port" : 80, "port" : 8080, "protocol" : "TCP" } ] }, { "type" : "LoadBalancer", "access_control" : { "type" : "white", "ip_list" : [ "1.1.1.1" ] }, "elb_id" : "f5de88cc-64be-4f70-ac17-db745eb12345", "ports" : [ { "ip" : "", "name" : "loadBalancer-0yzp5ud3w2pa", "target_port" : 80, "port" : 8080, "protocol" : "TCP" } ] } ] }, "ref" : { "id" : "f5de88cc-64be-4f70-ac17-db745eb76e67" } }, "operation_id" : "68e82e30-190d-40b2-9680-98a66ccb2f8f", "operated_at" : "2023-02-16T06:35:46.23126Z", "is_activated" : true }, { "type" : "lifecycle", "data" : { "api_version" : "v1", "kind" : "lifecycle", "spec" : { "postStart" : { "exec" : { "command" : [ "/bin/sh", "-c", "echo service start" ] } }, "preStop" : { "exec" : { "command" : [ "/bin/sh", "-c", "echo service end" ] } } } }, "operation_id" : "69bcf986-6f83-4f43-9ca1-595684ba0748", "operated_at" : "2023-02-16T07:05:05.610439Z", "is_activated" : true }, { "type" : "cse", "data" : { "spec" : { "cse_id" : "25779525-1aac-44be-abda-f9164f1b41b8", "config_center_addr" : "https://192.168.1.xxx:30103,https://192.168.1.xxx:30103", "service_center_addr" : "https://192.168.1.xxx:30100,https://192.168.1.xxx:30100" } }, "operation_id" : "945305ee-8be5-4826-9215-45a0b545ed13", "operated_at" : "2023-02-16T07:10:38.937075Z", "is_activated" : true }, { "type" : "healthCheck", "data" : { "spec" : { "livenessProbe" : { "httpGet" : { "path" : "", "port" : 80, "scheme" : "HTTP" }, "initialDelaySeconds" : 0, "timeoutSeconds" : 1, "periodSeconds" : 10, "successThreshold" : 1, "failureThreshold" : 3 }, "readinessProbe" : { "httpGet" : { "path" : "", "port" : 80, "scheme" : "HTTP" }, "initialDelaySeconds" : 0, "timeoutSeconds" : 1, "periodSeconds" : 10, "successThreshold" : 1, "failureThreshold" : 3 }, "startupProbe" : { "httpGet" : { "path" : "", "port" : 80, "scheme" : "HTTP", "httpHeaders" : [ { "name" : "x-auth-token", "value" : "xxx" } ] }, "initialDelaySeconds" : 0, "timeoutSeconds" : 1, "periodSeconds" : 10, "successThreshold" : 1, "failureThreshold" : 3 } } }, "operation_id" : "2361fba9-ee7e-405d-8b05-afc945a43e65", "operated_at" : "2023-02-16T07:07:23.193231Z", "is_activated" : true }, { "type" : "customMetric", "data" : { "metadata" : { "annotations" : { "deployBackend" : "k8s" }, "created_at" : "0001-01-01T00:00:00Z", "updated_at" : "0001-01-01T00:00:00Z" }, "spec" : { "port" : 2112, "path" : "/metrics", "metrics" : [ "myapp_processed_ops_total" ] }, "ref" : { "id" : "17b7f411-5a34-4319-abfc-34f6cf774a44" } }, "operation_id" : "a79a7c8d-6d5e-41ec-892b-973d11f5e835", "operated_at" : "2023-08-30T11:21:22.222476Z", "is_activated" : false } ] }
Status Code
Status Code |
Description |
---|---|
200 |
The request is successful. |
Error Code
For details, see Error Codes.
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