All Products
Search
Document Center

Enterprise Distributed Application Service:ListK8sSecrets

Last Updated:Jan 08, 2024

Queries Kubernetes Secrets.

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_secret

Request parameters

ParameterTypeRequiredDescriptionExample
ClusterIdstringNo

The ID of the cluster.

7a953f9a-2946-4c7a-9d82-9939db******
NamespacestringNo

The namespace of the Kubernetes cluster.

default
RegionIdstringNo

The ID of the region.

cn-hangzhou
PageNointegerNo

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

0
PageSizeintegerNo

The number of entries to return on each page. The value 0 indicates that all entries are returned on one page.

10
ConditionstringNo

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

{\"field\":\"Name\",\"pattern\":\"product\"}
ShowRelatedAppsbooleanNo

Specifies whether to return a list of applications that use a Secret.

true

Response parameters

ParameterTypeDescriptionExample
object
Codeinteger

The HTTP status code that is returned.

200
Messagestring

The additional information that is returned.

success
RequestIdstring

The ID of the request.

b197-40ab-9155-****
Resultobject

The returned query results of Kubernetes Secrets.

Totalinteger

The total number of entries that are returned.

6
Secretsobject []

The information about Kubernetes Secrets.

Typestring

The type of the Secret. Valid values:

  • Opaque: user-defined data
  • kubernetes.io/tls: Transport Layer Security (TLS) certificate
Opaque
CreationTimestring

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

2022-05-26T02:57:02Z
ClusterNamestring

The name of the cluster.

test-cluster
Namespacestring

The namespace of the Kubernetes cluster.

default
Base64Encodedboolean

Indicates whether the data is Base64-encoded. Valid values:

  • true: The data is Base64-encoded.
  • false: The data is not Base64-encoded.
false
CertRegionIdstring

The region in which the certificate is stored.

cn-hangzhou
CertIdstring

The ID of the certificate provided by Alibaba Cloud Certificate Management Service.

123456
Namestring

The name of the Secret. The name must start with a letter, and can contain digits, letters, and hyphens (-). It can be up to 63 characters in length.

my-secret
ClusterIdstring

The ID of the cluster in Enterprise Distributed Application Service (EDAS).

4472a6d3-f01d-4087-85a7-3dc52********
RelatedIngressRulesobject []

Rules in the Ingress that is associated with the Secret.

Namestring

The name of the rule in the Ingress.

testrulename
Namespacestring

The namespaces of the Kubernetes cluster.

default
RelatedAppsobject []

Aplications that are associated with the Ingress.

AppNamestring

The name of the EDAS application.

app-test
AppIdstring

The ID of the application.

6dc74432-5a35-4e68-8aaa-3700********
Dataobject []

The data of the Kubernetes Secret.

Keystring

The user-defined key of the Kubernetes Secret.

name
Valuestring

The user-defined value of the Kubernetes Secret.

william
RelatedAppsobject []

Applications that use the Secret.

AppNamestring

The name of the application.

my-app
AppIdstring

The ID of the application.

b08eeb18-8946-410c-a1ea-dbbc********
CertDetailobject

The details of the Secure Sockets Layer (SSL) certificate.

EndTimestring

The time when the SSL certificate expired.

2022-02-22T02:32:41Z
Statusstring

The state of the SSL certificate. Valid values:

  • normal: The SSL certificate is valid.
  • invalid: The SSL certificate is invalid.
  • expired: The SSL certificate has expired.
  • not_yet_valid: The SSL certificate is currently invalid.
  • about_to_expire: The SSL certificate is about to expire.
normal
StartTimestring

The time when the SSL certificate started to take effect.

2022-01-02T22:40:00Z
Issuerstring

The certificate authority (CA) that issued the SSL certificate.

CN=GlobalSign Root CA, OU=Root CA, O=GlobalSign nv-sa, C=BE
DomainNamesarray

Domain names that are associated with the SSL certificate.

string

The domain name.

example.com

Examples

Sample success responses

JSONformat

{
  "Code": 200,
  "Message": "success",
  "RequestId": "b197-40ab-9155-****",
  "Result": {
    "Total": 6,
    "Secrets": [
      {
        "Type": "Opaque",
        "CreationTime": "2022-05-26T02:57:02Z",
        "ClusterName": "test-cluster",
        "Namespace": "default",
        "Base64Encoded": false,
        "CertRegionId": "cn-hangzhou",
        "CertId": "123456",
        "Name": "my-secret",
        "ClusterId": "4472a6d3-f01d-4087-85a7-3dc52********",
        "RelatedIngressRules": [
          {
            "Name": "testrulename",
            "Namespace": "default",
            "RelatedApps": [
              {
                "AppName": "app-test",
                "AppId": "6dc74432-5a35-4e68-8aaa-3700********"
              }
            ]
          }
        ],
        "Data": [
          {
            "Key": "name",
            "Value": "william"
          }
        ],
        "RelatedApps": [
          {
            "AppName": "my-app",
            "AppId": "b08eeb18-8946-410c-a1ea-dbbc********"
          }
        ],
        "CertDetail": {
          "EndTime": "2022-02-22T02:32:41Z",
          "Status": "normal",
          "StartTime": "2022-01-02T22:40:00Z",
          "Issuer": "CN=GlobalSign Root CA, OU=Root CA, O=GlobalSign nv-sa, C=BE",
          "DomainNames": [
            "example.com"
          ]
        }
      }
    ]
  }
}

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.

Change history

Change timeSummary of changesOperation
2021-09-14The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 500
Output ParametersThe response structure of the API has changed.