All Products
Search
Document Center

Enterprise Distributed Application Service:ListK8sConfigMaps

Last Updated:Jan 08, 2024

Queries Kubernetes ConfigMaps.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Debug

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

GET /pop/v5/k8s/acs/k8s_config_map

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

The ID of the region.

cn-hangzhou
ClusterIdstringNo

The ID of the cluster.

c0830281-366c-41b6-80fb-542e76******
NamespacestringNo

The namespace of the Kubernetes cluster.

default
PageNointegerNo

The number of the page to return. Pages start from Page 0.

0
PageSizeintegerNo

The number of entries to return on each page.

50
ConditionstringNo

The filter conditions. Set this parameter to a JSON string in the format of {"field":"Name", "pattern":"configmap-"}.

{"field":"Name", "pattern":"configmap-"}
ShowRelatedAppsbooleanNo

Specifies whether to return a list of applications that use a ConfigMap. Valid values: true and false.

true

Response parameters

ParameterTypeDescriptionExample
object
Codeinteger

The HTTP status code.

200
Messagestring

The additional information that is returned.

success
RequestIdstring

The ID of the request.

D16979DC-4D42-****************
Resultobject

The query results that are returned.

Totalinteger

The total number of entries that are returned.

6
ConfigMapsobject []

The information about ConfigMaps.

CreationTimestring

The time when the ConfigMaps were created. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.

2022-01-31T02:46:14Z
ClusterNamestring

The name of the cluster.

my-cluster
Namespacestring

The namespace of the Kubernetes cluster.

default
Namestring

The name of the ConfigMap.

my-config
ClusterIdstring

The ID of the Kubernetes cluster. You can obtain the cluster ID by calling the GetK8sCluster operation. For more information, see GetK8sCluster .

d73918f4-3b08-4c17-bb07-eaf8********
Dataobject []

The information about ConfigMaps.

Keystring

The user-defined key that is stored in the ConfigMap.

name
Valuestring

The user-defined value that is stored in the ConfigMap.

william
RelatedAppsobject []

The related applications.

AppNamestring

The name of the application.

my-app
AppIdstring

The ID of the application.

728cbdf2-da10-49b8-b69c-9168a********

Examples

Sample success responses

JSONformat

{
  "Code": 200,
  "Message": "success",
  "RequestId": "D16979DC-4D42-****************",
  "Result": {
    "Total": 6,
    "ConfigMaps": [
      {
        "CreationTime": "2022-01-31T02:46:14Z",
        "ClusterName": "my-cluster",
        "Namespace": "default",
        "Name": "my-config",
        "ClusterId": "d73918f4-3b08-4c17-bb07-eaf8********",
        "Data": [
          {
            "Key": "name",
            "Value": "william"
          }
        ],
        "RelatedApps": [
          {
            "AppName": "my-app",
            "AppId": "728cbdf2-da10-49b8-b69c-9168a********"
          }
        ]
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
500Edas.errorcode.PermissionDenied.messageYou are not authorized to perform the operation.No permissions

For a list of error codes, visit the Service error codes.