Queries the ConfigMap instances in a namespace.
Debugging
Request headers
This operation uses only common request headers. For more information, see Common request and response headers.
Request syntax
GET /pop/v1/sam/configmap/listNamespacedConfigMaps HTTP/1.1
Request parameters
Parameter | Type | Position | Required | Example | Description |
---|---|---|---|---|---|
NamespaceId | String | Query | Yes | cn-hangzhou | The ID of the namespace. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 91F93257-7A4A-4BD3-9A7E-2F6EAE6D**** | The ID of the request. |
Message | String | success | The returned information. Valid values:
|
TraceId | String | 0a98a02315955564772843261e**** | The ID of the trace. The ID is used to query the details of a request. |
Data | Object | The returned result. |
|
ConfigMaps | Array of ConfigMap | The ConfigMap instances. |
|
UpdateTime | Long | 1593760185111 | The time when the instance was last modified. |
Data | Map | The data of ConfigMap key-value pairs. Format: {"k1":"v1", "k2":"v2"} k specifies a key and v specifies a value. For more information, see Manage and use configurations. |
|
NamespaceId | String | cn-hangzhou | The ID of the namespace. |
Description | String | test-desc | The description of the instance. |
CreateTime | Long | 1593760185111 | The time when the instance was created. |
RelateApps | Array of RelateApp | The application that is associated with the instance. |
|
AppName | String | test-app | The name of the application. |
AppId | String | f16b4000-9058-4c22-a49d-49a28f0b**** | The ID of the application. |
ConfigMapId | Long | 1 | The ID of the ConfigMap instance. |
Name | String | test-name | The name of the ConfigMap instance. |
ErrorCode | String | Empty | The returned error code. Valid values:
|
Code | String | 200 | The HTTP status code. Valid values:
|
Success | Boolean | true | Indicates whether the ConfigMap instances were obtained. Valid values:
|
Examples
Sample requests
GET /pop/v1/sam/configmap/listNamespacedConfigMaps?NamespaceId=cn-hangzhou HTTP/1.1
Host:sae.aliyuncs.com
Content-Type:application/json
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListNamespacedConfigMapsResponse>
<RequestId>91F93257-7A4A-4BD3-9A7E-2F6EAE6D****</RequestId>
<Message>success</Message>
<TraceId>0a98a02315955564772843261e****</TraceId>
<Data>
<ConfigMaps>
<UpdateTime>1593760185111</UpdateTime>
<NamespaceId>cn-hangzhou</NamespaceId>
<Description>test-desc</Description>
<CreateTime>1593760185111</CreateTime>
<RelateApps>
<AppName>test-app</AppName>
<AppId>f16b4000-9058-4c22-a49d-49a28f0b****</AppId>
</RelateApps>
<ConfigMapId>1</ConfigMapId>
<Name>test-name</Name>
</ConfigMaps>
</Data>
<Code>200</Code>
<Success>true</Success>
</ListNamespacedConfigMapsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "91F93257-7A4A-4BD3-9A7E-2F6EAE6D****",
"Message" : "success",
"TraceId" : "0a98a02315955564772843261e****",
"Data" : {
"ConfigMaps" : [ {
"UpdateTime" : 1593760185111,
"NamespaceId" : "cn-hangzhou",
"Description" : "test-desc",
"CreateTime" : 1593760185111,
"RelateApps" : [ {
"AppName" : "test-app",
"AppId" : "f16b4000-9058-4c22-a49d-49a28f0b****"
} ],
"ConfigMapId" : 1,
"Name" : "test-name"
} ]
},
"Code" : "200",
"Success" : true
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParameter.NotEmpty | You must specify the parameter %s. | The error message returned because the value of the %s parameter is invalid. This parameter cannot be left empty. |
400 | InvalidParameter.Obviously | The specified parameter is invalid {%s}. | The error message returned because the value of the %s parameter is invalid. |
400 | InvalidParameter.WithMessage | The parameter is invalid {%s}: %s | The error message returned because the value of the %s parameter is invalid: %s. |
404 | InvalidNamespaceId.NotFound | The specified NamespaceId does not exist. | The error message returned because the specified namespace ID does not exist. |
For a list of error codes, visit the API Error Center.