容器引擎相关接口

创建应用

创建一个或多个微服务的集合。

描述

  • 一个应用或一组应用(通过标签归类)组成一个完整的业务功能。
  • 每个应用由一个或多个微服务组成,每个微服务可以独立启动、运行、治理。

请求参数

名称 是否必须 描述
DisplayName 应用名称
Tag 应用标签
Description 应用描述

返回参数

名称 位置 类型 是否必须 描述
id body Integer UUID
name body String 应用ID
displayName body String 应用名称
tag body String 应用标签
description body String 应用描述
ownerId body Integer 应用所有者ID
creatorId body Integer 应用创建者ID
ownerGroup body String 应用所属组
createdTime body String 应用创建时间
updatedTime body String 应用更新时间
deletedTime body String 应用删除时间

示例

  • Sample Request(请求):
GET https://ice.cn-north-3.inspurcloudapi.com/?Action=CreateApplication&DisplayName=app-29z84fqn&Tag=instance&Description=应用实例创建&Nonce=825585&Timestamp=1655557904&Version=2019-01-31
  • Sample Response(响应):

  • xml格式

  <CreateApplicationResponse>
      <UpdatedTime>2019-07-12T02:43:02Z</UpdatedTime>
      <DisplayName>app-29z84fqn</DisplayName>
      <CreatorId>0</CreatorId>
      <CreatorName>iopdev</CreatorName>
      <OwnerGroup>group-cloud-operator</OwnerGroup>
      <Description>应用实例创建</Description>
      <OwnerId>0</OwnerId>
      <RequestId>4f2b8518-1f8d-4aa0-a104-df6d3035836f</RequestId>
      <Name>app-6tmcrv69</Name>
      <Namespace/>
      <CreatedTime>2019-07-12T02:43:02Z</CreatedTime>
      <Id>6609</Id>
      <Tag>instance</Tag>
      <DeletedTime>0001-01-01T00:00:00Z</DeletedTime>
      <AppenvSpec>null</AppenvSpec>
  </CreateApplicationResponse>
  • json格式
{
  "updatedTime": "2019-07-12T02:43:47Z",
  "displayName": "app-29z84fqn",
  "creatorId": 0,
  "creatorName": "iopdev",
  "ownerGroup": "group-cloud-operator",
  "description": "应用实例创建",
  "ownerId": 0,
  "requestId": "f20858cf-faac-4134-9d02-f5875ff2901d",
  "name": "app-5kdnbzhb",
  "namespace": "",
  "createdTime": "2019-07-12T02:43:47Z",
  "id": 6610,
  "tag": "instance",
  "deletedTime": "0001-01-01T00:00:00Z",
  "appenvSpec": null
}

错误码

以下为本接口特有的错误码。

错误代码 错误信息 Http状态码
201.999400 请求数据格式失败,读取请求数据失败 400
201.011001 创建应用失败 500

应用遍历

描述

  • 获取应用列表

返回参数

名称 是否必须 描述
id UUID
name 应用ID
displayName 应用名称
namespace 命名空间编码
tag 应用标签
desc 应用描述
ownerId 应用所有者ID
creatorId 应用创建者ID
ownerGroup 应用所属组
createdTime 应用创建时间
updatedTime 应用更新时间
deletedTime 应用删除时间
appenvSpec 应用实例列表

示例

  • Sample Request(请求):
GET https://ice.cn-north-3.inspurcloudapi.com/?Action=ListApplications&Nonce=825585&Timestamp=1655557904&Version=2019-01-31
  • Sample Response(响应):
  • xml格式
<ListApplicationsResponse>
    <DataContainer>
        <Data>
            <UpdatedTime>2019-07-09T06:02:58Z</UpdatedTime>
            <DisplayName>test</DisplayName>
            <CreatorId>0</CreatorId>
            <CreatorName>iopdev</CreatorName>
            <OwnerGroup>group-cloud-operator</OwnerGroup>
            <Description/>
            <OwnerId>0</OwnerId>
            <Name>app-lzdpcqhj</Name>
            <Namespace/>
            <CreatedTime>2019-07-09T06:02:58Z</CreatedTime>
            <Id>6570</Id>
            <Tag>ceshi</Tag>
            <DeletedTime>0001-01-01T00:00:00Z</DeletedTime>
            <AppenvSpecContainer>
                <AppenvSpec>
                    <ServiceType/>
                    <ContainerImageId>container-001#registry.cluster11.com:5000/trident_iopdev/yuio@sha256:f04288efc7e65a84be74d4fc63e235ac3c6c603cf832e442e0bd3f240b10a91b</ContainerImageId>
                    <VirtualService>
                        <Metadata>
                            <CreationTimestamp>null</CreationTimestamp>
                        </Metadata>
                        <Spec></Spec>
                    </VirtualService>
                    <DisplayName>app-kehys</DisplayName>
                    <CreatorId>0</CreatorId>
                    <CreatorName>iopdev</CreatorName>
                    <RoutePathMatchType/>
                    <Type>DeploymentImage</Type>
                    <OwnerId>0</OwnerId>
                    <AccessMode>domain</AccessMode>
                    <DeploymentSpec>null</DeploymentSpec>
                    <RouteruleSpec>null</RouteruleSpec>
                    <EnvironmentId>9439c591-b8c9-486d-8793-8d8f8eb9f292</EnvironmentId>
                    <DeploymentDetail>null</DeploymentDetail>
                    <CreatedTime>2019-07-10T06:12:04Z</CreatedTime>
                    <Id>5528</Id>
                    <ServicePort>null</ServicePort>
                    <Tag/>
                    <CronJobDetail>null</CronJobDetail>
                    <ReleaseStrategyType>RollingUpdate</ReleaseStrategyType>
                    <DeletedTime>0001-01-01T00:00:00Z</DeletedTime>
                    <ContainerImage>container-001#registry.cluster11.com:5000/trident_iopdev/yuio:poiu</ContainerImage>
                    <ServiceSpec>null</ServiceSpec>
                    <UpdatedTime>2019-07-10T06:12:04Z</UpdatedTime>
                    <AppName>app-lzdpcqhj</AppName>
                    <Replicas>1</Replicas>
                    <OwnerGroupId>group-cloud-operator</OwnerGroupId>
                    <SoftPackageImage/>
                    <RouteSubDomain/>
                    <RouteHost/>
                    <IngressSpec></IngressSpec>
                    <IsCreateRoute>false</IsCreateRoute>
                    <PodSpec>
                        <Containers>null</Containers>
                    </PodSpec>
                    <ServiceName/>
                    <RoutePath/>
                    <AutoSwitchTraffic>1</AutoSwitchTraffic>
                    <Name>app-kehys</Name>
                    <Namespace>default</Namespace>
                    <ServiceList>null</ServiceList>
                    <StatefulsetDetail>null</StatefulsetDetail>
                </AppenvSpec>
            </AppenvSpecContainer>
        </Data>
    </DataContainer>
    <RequestId>61b57df5-c0f3-46a5-8b73-365e4592067e</RequestId>
</ListApplicationsResponse>
  • json格式
{
  "data": [
    {
      "updatedTime": "2019-07-09T06:02:58Z",
      "displayName": "test",
      "creatorId": 0,
      "creatorName": "iopdev",
      "ownerGroup": "group-cloud-operator",
      "description": "",
      "ownerId": 0,
      "name": "app-lzdpcqhj",
      "namespace": "",
      "createdTime": "2019-07-09T06:02:58Z",
      "id": 6570,
      "tag": "ceshi",
      "deletedTime": "0001-01-01T00:00:00Z",
      "appenvSpec": [
        {
          "serviceType": "",
          "containerImageId": "container-001#registry.cluster11.com:5000/trident_iopdev/yuio@sha256:f04288efc7e65a84be74d4fc63e235ac3c6c603cf832e442e0bd3f240b10a91b",
          "virtualService": {
            "metadata": {
              "creationTimestamp": null
            },
            "spec": {}
          },
          "displayName": "app-kehys",
          "creatorId": 0,
          "creatorName": "iopdev",
          "routePathMatchType": "",
          "type": "DeploymentImage",
          "ownerId": 0,
          "accessMode": "domain",
          "deploymentSpec": null,
          "routeruleSpec": null,
          "environmentId": "9439c591-b8c9-486d-8793-8d8f8eb9f292",
          "deploymentDetail": null,
          "createdTime": "2019-07-10T06:12:04Z",
          "id": 5528,
          "servicePort": null,
          "tag": "",
          "cronJobDetail": null,
          "releaseStrategyType": "RollingUpdate",
          "deletedTime": "0001-01-01T00:00:00Z",
          "containerImage": "container-001#registry.cluster11.com:5000/trident_iopdev/yuio:poiu",
          "serviceSpec": null,
          "updatedTime": "2019-07-10T06:12:04Z",
          "appName": "app-lzdpcqhj",
          "replicas": 1,
          "ownerGroupId": "group-cloud-operator",
          "softPackageImage": "",
          "routeSubDomain": "",
          "routeHost": "",
          "ingressSpec": {},
          "isCreateRoute": false,
          "podSpec": {
            "containers": null
          },
          "serviceName": "",
          "routePath": "",
          "autoSwitchTraffic": "1",
          "name": "app-kehys",
          "namespace": "default",
          "serviceList": null,
          "statefulsetDetail": null
        }
      ]
    }
  ],
  "requestId": "d3bfcfb4-d4c5-4401-9c89-8412ad271832"
}

错误码

以下为本接口特有的错误码。

错误代码 错误信息 Http状态码
201.011904 查询应用数据失败 500

应用详情

描述

  • 获取应用的详细信息

请求参数

名称 是否必须 描述
Id UUID

返回参数

名称 位置 类型 是否必须 描述
id body Integer UUID
name body String 应用ID
displayName body String 应用名称
namespace body String 命名空间编码
tag body String 应用标签
desc body String 应用描述
ownerId body Integer 应用所有者ID
creatorId body Integer 应用创建者ID
ownerGroup body String 应用所属组
createdTime body String 应用创建时间
updatedTime body String 应用更新时间
deletedTime body String 应用删除时间
appenvSpec body Object(appenvSpec列表) 应用实例列表

示例

  • Sample Request(请求):
GET https://ice.cn-north-3.inspurcloudapi.com/?Action=GetApplicationDetail&Id=6574&Nonce=825585&Timestamp=1655557904&Version=2019-01-31
  • Sample Response(响应):

  • xml格式:

<GetApplicationDetailResponse>
    <UpdatedTime>2019-07-09T08:13:21Z</UpdatedTime>
    <DisplayName>xj20190708</DisplayName>
    <CreatorId>0</CreatorId>
    <CreatorName>iopdev</CreatorName>
    <OwnerGroup>group-cloud-operator</OwnerGroup>
    <Description/>
    <OwnerId>0</OwnerId>
    <RequestId>4b2b6145-1969-472d-b639-9c9fc72c7c76</RequestId>
    <Name>app-29z84fqn</Name>
    <Namespace/>
    <CreatedTime>2019-07-09T08:13:21Z</CreatedTime>
    <Id>6574</Id>
    <Tag>xjtest</Tag>
    <DeletedTime>0001-01-01T00:00:00Z</DeletedTime>
    <AppenvSpecContainer>
        <AppenvSpec>
            <ServiceType/>
            <ContainerImageId>container-001#registry.cluster11.com:5000/trident_iopdev/nginx@sha256:c662b511116086245e66993e5f4199b3d11a3f6a57d184a61c8928d8cae51cb3</ContainerImageId>
            <VirtualService>
                <Metadata>
                    <Uid>78545ed2-a440-11e9-9d8d-6c92bf743ff6</Uid>
                    <ResourceVersion>265175624</ResourceVersion>
                    <Name>app-y5v4b-default-gateway</Name>
                    <Namespace>default</Namespace>
                    <CreationTimestamp>2019-07-12T01:00:41Z</CreationTimestamp>
                    <Annotations>
                        <Cloud.inspur.com/defaultsvc>true</Cloud.inspur.com/defaultsvc>
                    </Annotations>
                    <SelfLink>/apis/networking.istio.io/v1alpha3/namespaces/default/virtualservices/app-y5v4b-default-gateway</SelfLink>
                    <Labels>
                        <App>app-y5v4b</App>
                        <User_group>group-cloud-operator</User_group>
                        <Application>app-29z84fqn</Application>
                        <Appinstance>app-y5v4b</Appinstance>
                        <App-y5v4b-default-svc>service</App-y5v4b-default-svc>
                        <Scope>gateway</Scope>
                        <User>iopdev</User>
                    </Labels>
                </Metadata>
                <ApiVersion>networking.istio.io/v1alpha3</ApiVersion>
                <Kind>VirtualService</Kind>
                <Spec>
                    <GatewaysContainer>
                        <Gateways>default.istio-system.svc.cluster.local</Gateways>
                    </GatewaysContainer>
                    <HostsContainer>
                        <Hosts>app-y5v4b-default.10.110.25.114.xip.io</Hosts>
                    </HostsContainer>
                    <HttpContainer>
                        <Http>
                            <RouteContainer>
                                <Route>
                                    <Destination>
                                        <Port>
                                            <Number>161</Number>
                                        </Port>
                                        <Host>app-y5v4b-default-svc.default.svc.cluster.local</Host>
                                        <Subset>rollingupdate</Subset>
                                    </Destination>
                                </Route>
                            </RouteContainer>
                            <MatchContainer>
                                <Match>
                                    <Uri>
                                        <Prefix>/</Prefix>
                                    </Uri>
                                </Match>
                            </MatchContainer>
                        </Http>
                    </HttpContainer>
                </Spec>
            </VirtualService>
            <DisplayName>app-y5v4b</DisplayName>
            <CreatorId>0</CreatorId>
            <CreatorName>iopdev</CreatorName>
            <RoutePathMatchType/>
            <Type>DeploymentImage</Type>
            <OwnerId>0</OwnerId>
            <AccessMode>domain</AccessMode>
            <DeploymentSpec>null</DeploymentSpec>
            <RouteruleSpec>null</RouteruleSpec>
            <EnvironmentId>9439c591-b8c9-486d-8793-8d8f8eb9f292</EnvironmentId>
            <DeploymentDetailContainer>
                <DeploymentDetail>
                    <NewReplicaSet>
                        <ContainerImagesContainer>
                            <ContainerImages>
                                <ContainerName>container-001</ContainerName>
                                <ContainerImage>registry.cluster11.com:5000/trident_iopdev/nginx@sha256:c662b511116086245e66993e5f4199b3d11a3f6a57d184a61c8928d8cae51cb3</ContainerImage>
                            </ContainerImages>
                        </ContainerImagesContainer>
                        <TypeMeta>
                            <Kind>replicaset</Kind>
                        </TypeMeta>
                        <ObjectMeta>
                            <Name>app-y5v4b-6b567c5876</Name>
                            <Namespace>default</Namespace>
                            <CreationTimestamp>2019-07-12T01:00:34Z</CreationTimestamp>
                            <Annotations>
                                <Deployment.inspur.com/role>rollingupdate</Deployment.inspur.com/role>
                                <Deployment.kubernetes.io/max-replicas>2</Deployment.kubernetes.io/max-replicas>
                                <Sidecar.istio.io/inject>true</Sidecar.istio.io/inject>
                                <Deployment.kubernetes.io/revision>1</Deployment.kubernetes.io/revision>
                                <Deployment.kubernetes.io/desired-replicas>1</Deployment.kubernetes.io/desired-replicas>
                                <Kubernetes.io/change-cause>应用初始化部署</Kubernetes.io/change-cause>
                            </Annotations>
                            <Labels>
                                <App>app-y5v4b</App>
                                <User_group>group-cloud-operator</User_group>
                                <Application>app-29z84fqn</Application>
                                <Appinstance>app-y5v4b</Appinstance>
                                <Pod-template-hash>2612371432</Pod-template-hash>
                                <User>iopdev</User>
                                <Version>rollingupdate</Version>
                                <Deployment>app-y5v4b</Deployment>
                            </Labels>
                        </ObjectMeta>
                        <Pods>
                            <Running>1</Running>
                            <Current>1</Current>
                            <Desired>1</Desired>
                            <Pending>0</Pending>
                            <WarningsContainer></WarningsContainer>
                            <Failed>0</Failed>
                            <Succeeded>0</Succeeded>
                        </Pods>
                        <InitContainerImages>null</InitContainerImages>
                    </NewReplicaSet>
                    <StatusInfo>
                        <Unavailable>0</Unavailable>
                        <Replicas>1</Replicas>
                        <Available>1</Available>
                        <Updated>1</Updated>
                    </StatusInfo>
                    <EventList>
                        <ListMeta>
                            <TotalItems>0</TotalItems>
                        </ListMeta>
                        <Events>null</Events>
                    </EventList>
                    <Replicas>1</Replicas>
                    <PodList>
                        <ListMeta>
                            <TotalItems>0</TotalItems>
                        </ListMeta>
                        <Pods>null</Pods>
                        <CumulativeMetrics>null</CumulativeMetrics>
                        <Errors>null</Errors>
                        <Status>
                            <Running>0</Running>
                            <Pending>0</Pending>
                            <Failed>0</Failed>
                            <Succeeded>0</Succeeded>
                        </Status>
                    </PodList>
                    <RollingUpdateStrategy>
                        <MaxSurge>25%</MaxSurge>
                        <MaxUnavailable>25%</MaxUnavailable>
                    </RollingUpdateStrategy>
                    <OldReplicaSetList>
                        <ListMeta>
                            <TotalItems>0</TotalItems>
                        </ListMeta>
                        <ReplicaSets>null</ReplicaSets>
                        <CumulativeMetrics>null</CumulativeMetrics>
                        <Errors>null</Errors>
                        <Status>
                            <Running>0</Running>
                            <Pending>0</Pending>
                            <Failed>0</Failed>
                            <Succeeded>0</Succeeded>
                        </Status>
                    </OldReplicaSetList>
                    <TypeMeta>
                        <Kind>deployment</Kind>
                    </TypeMeta>
                    <ObjectMeta>
                        <Name>app-y5v4b</Name>
                        <Namespace>default</Namespace>
                        <CreationTimestamp>2019-07-12T01:00:33Z</CreationTimestamp>
                        <Annotations>
                            <Deployment.inspur.com/role>rollingupdate</Deployment.inspur.com/role>
                            <Sidecar.istio.io/inject>true</Sidecar.istio.io/inject>
                            <Deployment.kubernetes.io/revision>1</Deployment.kubernetes.io/revision>
                            <Kubernetes.io/change-cause>应用初始化部署</Kubernetes.io/change-cause>
                        </Annotations>
                        <Labels>
                            <App>app-y5v4b</App>
                            <User_group>group-cloud-operator</User_group>
                            <Application>app-29z84fqn</Application>
                            <Appinstance>app-y5v4b</Appinstance>
                            <User>iopdev</User>
                            <Version>rollingupdate</Version>
                            <Deployment>app-y5v4b</Deployment>
                        </Labels>
                    </ObjectMeta>
                    <Selector>
                        <App>app-y5v4b</App>
                        <User_group>group-cloud-operator</User_group>
                        <Application>app-29z84fqn</Application>
                        <Appinstance>app-y5v4b</Appinstance>
                        <User>iopdev</User>
                        <Version>rollingupdate</Version>
                        <Deployment>app-y5v4b</Deployment>
                    </Selector>
                    <RevisionHistoryLimit>10</RevisionHistoryLimit>
                    <MinReadySeconds>0</MinReadySeconds>
                    <Strategy>RollingUpdate</Strategy>
                    <HorizontalPodAutoscalerList>
                        <Horizontalpodautoscalers>null</Horizontalpodautoscalers>
                        <ListMeta>
                            <TotalItems>0</TotalItems>
                        </ListMeta>
                        <Errors>null</Errors>
                    </HorizontalPodAutoscalerList>
                    <ErrorsContainer></ErrorsContainer>
                </DeploymentDetail>
            </DeploymentDetailContainer>
            <CreatedTime>2019-07-12T01:00:41Z</CreatedTime>
            <Id>5535</Id>
            <ServicePort>null</ServicePort>
            <Tag/>
            <CronJobDetail>null</CronJobDetail>
            <ReleaseStrategyType>RollingUpdate</ReleaseStrategyType>
            <DeletedTime>0001-01-01T00:00:00Z</DeletedTime>
            <ContainerImage>container-001#registry.cluster11.com:5000/trident_iopdev/nginx:latest</ContainerImage>
            <ServiceSpec>null</ServiceSpec>
            <UpdatedTime>2019-07-12T01:00:41Z</UpdatedTime>
            <AppName>app-29z84fqn</AppName>
            <Replicas>1</Replicas>
            <OwnerGroupId>group-cloud-operator</OwnerGroupId>
            <SoftPackageImage/>
            <RouteSubDomain/>
            <RouteHost/>
            <IngressSpec></IngressSpec>
            <IsCreateRoute>false</IsCreateRoute>
            <PodSpec>
                <Containers>null</Containers>
            </PodSpec>
            <ServiceName/>
            <RoutePath/>
            <AutoSwitchTraffic>1</AutoSwitchTraffic>
            <Name>app-y5v4b</Name>
            <Namespace>default</Namespace>
            <ServiceList>null</ServiceList>
            <StatefulsetDetail>null</StatefulsetDetail>
        </AppenvSpec>
    </AppenvSpecContainer>
</GetApplicationDetailResponse>
  • json格式:
{
  "updatedTime": "2019-07-09T08:13:21Z",
  "displayName": "xj20190708",
  "creatorId": 0,
  "creatorName": "iopdev",
  "ownerGroup": "group-cloud-operator",
  "description": "",
  "ownerId": 0,
  "requestId": "c581e100-2e06-4038-9f48-ed6654baa96c",
  "name": "app-29z84fqn",
  "namespace": "",
  "createdTime": "2019-07-09T08:13:21Z",
  "id": 6574,
  "tag": "xjtest",
  "deletedTime": "0001-01-01T00:00:00Z",
  "appenvSpec": [
    {
      "serviceType": "",
      "containerImageId": "container-001#registry.cluster11.com:5000/trident_iopdev/nginx@sha256:c662b511116086245e66993e5f4199b3d11a3f6a57d184a61c8928d8cae51cb3",
      "virtualService": {
        "metadata": {
          "uid": "78545ed2-a440-11e9-9d8d-6c92bf743ff6",
          "resourceVersion": "265175624",
          "name": "app-y5v4b-default-gateway",
          "namespace": "default",
          "creationTimestamp": "2019-07-12T01:00:41Z",
          "annotations": {
            "cloud.inspur.com/defaultsvc": "true"
          },
          "selfLink": "/apis/networking.istio.io/v1alpha3/namespaces/default/virtualservices/app-y5v4b-default-gateway",
          "labels": {
            "app": "app-y5v4b",
            "user_group": "group-cloud-operator",
            "application": "app-29z84fqn",
            "appinstance": "app-y5v4b",
            "app-y5v4b-default-svc": "service",
            "scope": "gateway",
            "user": "iopdev"
          }
        },
        "apiVersion": "networking.istio.io/v1alpha3",
        "kind": "VirtualService",
        "spec": {
          "gateways": [
            "default.istio-system.svc.cluster.local"
          ],
          "hosts": [
            "app-y5v4b-default.10.110.25.114.xip.io"
          ],
          "http": [
            {
              "route": [
                {
                  "destination": {
                    "port": {
                      "number": 161
                    },
                    "host": "app-y5v4b-default-svc.default.svc.cluster.local",
                    "subset": "rollingupdate"
                  }
                }
              ],
              "match": [
                {
                  "uri": {
                    "prefix": "/"
                  }
                }
              ]
            }
          ]
        }
      },
      "displayName": "app-y5v4b",
      "creatorId": 0,
      "creatorName": "iopdev",
      "routePathMatchType": "",
      "type": "DeploymentImage",
      "ownerId": 0,
      "accessMode": "domain",
      "deploymentSpec": null,
      "routeruleSpec": null,
      "environmentId": "9439c591-b8c9-486d-8793-8d8f8eb9f292",
      "deploymentDetail": [
        {
          "newReplicaSet": {
            "containerImages": [
              {
                "containerName": "container-001",
                "containerImage": "registry.cluster11.com:5000/trident_iopdev/nginx@sha256:c662b511116086245e66993e5f4199b3d11a3f6a57d184a61c8928d8cae51cb3"
              }
            ],
            "typeMeta": {
              "kind": "replicaset"
            },
            "objectMeta": {
              "name": "app-y5v4b-6b567c5876",
              "namespace": "default",
              "creationTimestamp": "2019-07-12T01:00:34Z",
              "annotations": {
                "deployment.inspur.com/role": "rollingupdate",
                "deployment.kubernetes.io/max-replicas": "2",
                "sidecar.istio.io/inject": "true",
                "deployment.kubernetes.io/revision": "1",
                "deployment.kubernetes.io/desired-replicas": "1",
                "kubernetes.io/change-cause": "应用初始化部署"
              },
              "labels": {
                "app": "app-y5v4b",
                "user_group": "group-cloud-operator",
                "application": "app-29z84fqn",
                "appinstance": "app-y5v4b",
                "pod-template-hash": "2612371432",
                "user": "iopdev",
                "version": "rollingupdate",
                "deployment": "app-y5v4b"
              }
            },
            "pods": {
              "running": 1,
              "current": 1,
              "desired": 1,
              "pending": 0,
              "warnings": [],
              "failed": 0,
              "succeeded": 0
            },
            "initContainerImages": null
          },
          "statusInfo": {
            "unavailable": 0,
            "replicas": 1,
            "available": 1,
            "updated": 1
          },
          "eventList": {
            "listMeta": {
              "totalItems": 0
            },
            "events": null
          },
          "replicas": 1,
          "podList": {
            "listMeta": {
              "totalItems": 0
            },
            "pods": null,
            "cumulativeMetrics": null,
            "errors": null,
            "status": {
              "running": 0,
              "pending": 0,
              "failed": 0,
              "succeeded": 0
            }
          },
          "rollingUpdateStrategy": {
            "maxSurge": "25%",
            "maxUnavailable": "25%"
          },
          "oldReplicaSetList": {
            "listMeta": {
              "totalItems": 0
            },
            "replicaSets": null,
            "cumulativeMetrics": null,
            "errors": null,
            "status": {
              "running": 0,
              "pending": 0,
              "failed": 0,
              "succeeded": 0
            }
          },
          "typeMeta": {
            "kind": "deployment"
          },
          "objectMeta": {
            "name": "app-y5v4b",
            "namespace": "default",
            "creationTimestamp": "2019-07-12T01:00:33Z",
            "annotations": {
              "deployment.inspur.com/role": "rollingupdate",
              "sidecar.istio.io/inject": "true",
              "deployment.kubernetes.io/revision": "1",
              "kubernetes.io/change-cause": "应用初始化部署"
            },
            "labels": {
              "app": "app-y5v4b",
              "user_group": "group-cloud-operator",
              "application": "app-29z84fqn",
              "appinstance": "app-y5v4b",
              "user": "iopdev",
              "version": "rollingupdate",
              "deployment": "app-y5v4b"
            }
          },
          "selector": {
            "app": "app-y5v4b",
            "user_group": "group-cloud-operator",
            "application": "app-29z84fqn",
            "appinstance": "app-y5v4b",
            "user": "iopdev",
            "version": "rollingupdate",
            "deployment": "app-y5v4b"
          },
          "revisionHistoryLimit": 10,
          "minReadySeconds": 0,
          "strategy": "RollingUpdate",
          "horizontalPodAutoscalerList": {
            "horizontalpodautoscalers": null,
            "listMeta": {
              "totalItems": 0
            },
            "errors": null
          },
          "errors": []
        }
      ],
      "createdTime": "2019-07-12T01:00:41Z",
      "id": 5535,
      "servicePort": null,
      "tag": "",
      "cronJobDetail": null,
      "releaseStrategyType": "RollingUpdate",
      "deletedTime": "0001-01-01T00:00:00Z",
      "containerImage": "container-001#registry.cluster11.com:5000/trident_iopdev/nginx:latest",
      "serviceSpec": null,
      "updatedTime": "2019-07-12T01:00:41Z",
      "appName": "app-29z84fqn",
      "replicas": 1,
      "ownerGroupId": "group-cloud-operator",
      "softPackageImage": "",
      "routeSubDomain": "",
      "routeHost": "",
      "ingressSpec": {},
      "isCreateRoute": false,
      "podSpec": {
        "containers": null
      },
      "serviceName": "",
      "routePath": "",
      "autoSwitchTraffic": "1",
      "name": "app-y5v4b",
      "namespace": "default",
      "serviceList": null,
      "statefulsetDetail": null
    }
  ]
}

错误码

以下为本接口特有的错误码。

错误代码 错误信息 Http状态码
201.011905 查询应用数据失败 500

删除应用

描述

  • 删除一个应用

URI

DELETE /cks/apps/v1/applications/{id}

请求参数

名称 是否必须 描述
Id UUID

示例

  • Sample Request(请求):
GET https://ice.cn-north-3.inspurcloudapi.com/?Action=DeleteApplication&Id=6574&Nonce=825585&Timestamp=1655557904&Version=2019-01-31
  • Sample Response(响应):

  • xml格式

  • json格式

错误码

以下为本接口特有的错误码。

错误代码 错误信息 Http状态码
201.011905 删除应用数据失败 500

发布应用实例

创建一个应用实例。

描述

  • 一个应用实例可以通过指定程序包或一个镜像创建,每个应用实例包含一个服务或多个服务。
  • 可简单的配置发布策略,实现应用的滚动发布、蓝绿发布或灰度发布。 在高级配置中可以指定应用本身所需的环境变量、卷、资源限额等信息以及服务路由信息。

请求参数

名称 是否必须 描述
ClusterId 集群环境ID
DisplayName 实例名称
Name 实例ID
AppName 应用ID
Namespace 命名空间
ContainerImage 镜像名称
ContainerImageId 镜像编码
ReleaseStrategyType 发布策略
Replicas 副本数
PodSpec 实例描述
ServicePort 服务端口
EnvironmentId 集群环境ID
RouteHost 域名前缀
RouteSubDomain 域名后缀
AccessMode 访问方式

返回参数

名称 位置 类型 是否必须 描述
Id body Integer UUID
Name body String 实例ID
DisplayName body String 实例名称
AppName body String 所属应用ID
Namespace body String 命名空间
EnvironmentId body String 集群环境ID
AccessMode body String 访问方式
OwnerId body Integer 实例所有者ID
CreatorId body Integer 实例创建者ID
OwnerGroup body String 实例所属组
CreatedTime body String 实例创建时间
UpdatedTime body String 实例更新时间
DeletedTime body String 实例删除时间
ContainerImage body String 镜像名称
ContainerImageId body String 镜像编码
ReleaseStrategyType body String 发布策略
Replicas body Integer 副本数
PodSpec body Object(PodSpec 实例描述
ServicePort body Object(ServicePort 服务端口

示例

  • Sample Request(请求):
POST https://ice.cn-north-3.inspurcloudapi.com/?Action=CreateInstance&ClusterId=9439c591-b8c9-486d-8793-8d8f8eb9f292&Nonce=825585&Timestamp=1655557904&Version=2019-01-31
  • 请求Body:
{
  "autoSwitchTraffic": "1",
  "displayName": "app-s65ag",
  "name": "app-s65ags",
  "namespace": "default",
  "appName": "app-6qfcq7f6",
  "containerImage": "container-001#registry.cluster11.com:5000/trident_iopdev/iot-streammgr:4.5-beta",
  "containerImageId": "container-001#registry.cluster11.com:5000/trident_iopdev/iot-streammgr@sha256:4e54cf9be83458973f4102f9b768f31fe3f0466f0c65adb555fea586a6e5de62",
  "releaseStrategyType": "RollingUpdate",
  "replicas": 1,
  "podSpec": {
    "restartPolicy": "Always",
    "affinity": {
      "nodeAffinity": {

      },
      "podAffinity": {

      },
      "podAntiAffinity": {

      }
    },
    "containers": [
      {
        "image": "registry.cluster11.com:5000/trident_iopdev/iot-streammgr@sha256:4e54cf9be83458973f4102f9b768f31fe3f0466f0c65adb555fea586a6e5de62",
        "ports": [
          {
            "containerPort": 80,
            "protocol": "TCP"
          }
        ],
        "volumeMounts": [

        ],
        "name": "container-001"
      }
    ],
    "initContainers": [

    ],
    "volumes": [

    ]
  },
  "serviceType": "ClusterIP",
  "volumeMount": {
    "pvcMount": [

    ],
    "dynamicMount": [

    ],
    "staticMount": [

    ]
  },
  "servicePort": [
    {
      "targetPort": 80,
      "protocol": "TCP"
    }
  ],
  "environmentId": "9439c591-b8c9-486d-8793-8d8f8eb9f292",
  "type": "DeploymentImage",
  "routeHost": "",
  "routeSubDomain": ".10.110.25.114.xip.io",
  "accessMode": "domain"
}
  • xml格式
<CreateInstanceResponse>
    <ServiceType>ClusterIP</ServiceType>
    <ContainerImageId>container-001#registry.cluster11.com:5000/trident_iopdev/iot-streammgr@sha256:4e54cf9be83458973f4102f9b768f31fe3f0466f0c65adb555fea586a6e5de62</ContainerImageId>
    <VolumeMount></VolumeMount>
    <VirtualService>
        <Metadata>
            <CreationTimestamp>null</CreationTimestamp>
        </Metadata>
        <Spec></Spec>
    </VirtualService>
    <DisplayName>app-s65ag</DisplayName>
    <CreatorId>0</CreatorId>
    <CreatorName>iopdev</CreatorName>
    <RoutePathMatchType/>
    <Type>DeploymentImage</Type>
    <OwnerId>0</OwnerId>
    <AccessMode>domain</AccessMode>
    <DeploymentSpecContainer>
        <DeploymentSpec>
            <ServiceType>ClusterIP</ServiceType>
            <ImagePullPolicy>Always</ImagePullPolicy>
            <CpuRequirement>null</CpuRequirement>
            <PodManagementPolicy/>
            <Variables>null</Variables>
            <ContainerCommandArgs>null</ContainerCommandArgs>
            <IsExternal>false</IsExternal>
            <SoftPackageName/>
            <Replicas>1</Replicas>
            <SoftPackageImage/>
            <Description>null</Description>
            <AnnotationsContainer>
                <Annotations>
                    <Value>应用初始化部署</Value>
                    <Key>kubernetes.io/change-cause</Key>
                </Annotations>
                <Annotations>
                    <Value>rollingupdate</Value>
                    <Key>deployment.inspur.com/role</Key>
                </Annotations>
                <Annotations>
                    <Value>true</Value>
                    <Key>sidecar.istio.io/inject</Key>
                </Annotations>
            </AnnotationsContainer>
            <StatefulsetUpdateType/>
            <PodSpec>
                <ImagePullSecretsContainer>
                    <ImagePullSecrets>
                        <Name>trident-iopdev-registry</Name>
                    </ImagePullSecrets>
                </ImagePullSecretsContainer>
                <ContainersContainer>
                    <Containers>
                        <Image>registry.cluster11.com:5000/trident_iopdev/iot-streammgr@sha256:4e54cf9be83458973f4102f9b768f31fe3f0466f0c65adb555fea586a6e5de62</Image>
                        <ImagePullPolicy>Always</ImagePullPolicy>
                        <Name>container-001</Name>
                        <Resources></Resources>
                        <PortsContainer>
                            <Ports>
                                <Protocol>TCP</Protocol>
                                <Name>2wk2d-tcp-80</Name>
                                <ContainerPort>80</ContainerPort>
                            </Ports>
                        </PortsContainer>
                    </Containers>
                </ContainersContainer>
                <RestartPolicy>Always</RestartPolicy>
                <Affinity>
                    <NodeAffinity></NodeAffinity>
                    <PodAffinity></PodAffinity>
                    <PodAntiAffinity></PodAntiAffinity>
                </Affinity>
            </PodSpec>
            <ServiceName/>
            <ContainerCommand>null</ContainerCommand>
            <PortMappingsContainer>
                <PortMappings>
                    <Protocol>TCP</Protocol>
                    <Port>21278</Port>
                    <Name>http-21278-80-nn5vz</Name>
                    <TargetPort>80</TargetPort>
                    <NodePort>0</NodePort>
                </PortMappings>
            </PortMappingsContainer>
            <LabelsContainer>
                <Labels>
                    <Value>app-s65ag</Value>
                    <Key>app</Key>
                </Labels>
                <Labels>
                    <Value>app-6qfcq7f6</Value>
                    <Key>application</Key>
                </Labels>
                <Labels>
                    <Value>app-s65ag</Value>
                    <Key>appinstance</Key>
                </Labels>
                <Labels>
                    <Value>group-cloud-operator</Value>
                    <Key>user_group</Key>
                </Labels>
                <Labels>
                    <Value>iopdev</Value>
                    <Key>user</Key>
                </Labels>
                <Labels>
                    <Value>rollingupdate</Value>
                    <Key>version</Key>
                </Labels>
                <Labels>
                    <Value>app-s65ag</Value>
                    <Key>deployment</Key>
                </Labels>
            </LabelsContainer>
            <ImagePullSecret>trident-iopdev-registry</ImagePullSecret>
            <Name>app-s65ag</Name>
            <Namespace>default</Namespace>
            <MemoryRequirement>null</MemoryRequirement>
            <RunAsPrivileged>false</RunAsPrivileged>
            <ContainerImage>container-001#registry.cluster11.com:5000/trident_iopdev/iot-streammgr:4.5-beta</ContainerImage>
        </DeploymentSpec>
    </DeploymentSpecContainer>
    <RouteruleSpec>null</RouteruleSpec>
    <EnvironmentId>9439c591-b8c9-486d-8793-8d8f8eb9f292</EnvironmentId>
    <RequestId>2bea6cca-77e5-44ed-a913-a4446f4754eb</RequestId>
    <DeploymentDetail>null</DeploymentDetail>
    <CreatedTime>2019-07-15T06:40:59Z</CreatedTime>
    <Id>5558</Id>
    <ServicePortContainer>
        <ServicePort>
            <Protocol>TCP</Protocol>
            <Port>21278</Port>
            <Name>http-21278-80-nn5vz</Name>
            <TargetPort>80</TargetPort>
        </ServicePort>
    </ServicePortContainer>
    <Tag/>
    <CronJobDetail>null</CronJobDetail>
    <ReleaseStrategyType>RollingUpdate</ReleaseStrategyType>
    <DeletedTime>0001-01-01T00:00:00Z</DeletedTime>
    <ContainerImage>container-001#registry.cluster11.com:5000/trident_iopdev/iot-streammgr:4.5-beta</ContainerImage>
    <ServiceSpec>null</ServiceSpec>
    <UpdatedTime>2019-07-15T06:40:59Z</UpdatedTime>
    <AppName>app-6qfcq7f6</AppName>
    <Replicas>1</Replicas>
    <OwnerGroupId>group-cloud-operator</OwnerGroupId>
    <SoftPackageImage/>
    <RouteSubDomain>.10.110.25.114.xip.io</RouteSubDomain>
    <RouteHost/>
    <IngressSpec></IngressSpec>
    <IsCreateRoute>false</IsCreateRoute>
    <PodSpec>
        <ContainersContainer>
            <Containers>
                <Image>registry.cluster11.com:5000/trident_iopdev/iot-streammgr@sha256:4e54cf9be83458973f4102f9b768f31fe3f0466f0c65adb555fea586a6e5de62</Image>
                <ImagePullPolicy>Always</ImagePullPolicy>
                <Name>container-001</Name>
                <Resources></Resources>
                <PortsContainer>
                    <Ports>
                        <Protocol>TCP</Protocol>
                        <Name>2wk2d-tcp-80</Name>
                        <ContainerPort>80</ContainerPort>
                    </Ports>
                </PortsContainer>
            </Containers>
        </ContainersContainer>
        <RestartPolicy>Always</RestartPolicy>
        <Affinity>
            <NodeAffinity></NodeAffinity>
            <PodAffinity></PodAffinity>
            <PodAntiAffinity></PodAntiAffinity>
        </Affinity>
    </PodSpec>
    <ServiceName/>
    <RoutePath/>
    <AutoSwitchTraffic>1</AutoSwitchTraffic>
    <Name>app-s65ag</Name>
    <Namespace>default</Namespace>
    <ServiceList>null</ServiceList>
    <StatefulsetDetail>null</StatefulsetDetail>
</CreateInstanceResponse>
  • json格式
{
  "serviceType": "ClusterIP",
  "containerImageId": "container-001#registry.cluster11.com:5000/trident_iopdev/iot-streammgr@sha256:4e54cf9be83458973f4102f9b768f31fe3f0466f0c65adb555fea586a6e5de62",
  "volumeMount": {},
  "virtualService": {
    "metadata": {
      "creationTimestamp": null
    },
    "spec": {}
  },
  "displayName": "app-s65ag",
  "creatorId": 0,
  "creatorName": "iopdev",
  "routePathMatchType": "",
  "type": "DeploymentImage",
  "ownerId": 0,
  "accessMode": "domain",
  "deploymentSpec": [
    {
      "serviceType": "ClusterIP",
      "imagePullPolicy": "Always",
      "cpuRequirement": null,
      "podManagementPolicy": "",
      "variables": null,
      "containerCommandArgs": null,
      "isExternal": false,
      "softPackageName": "",
      "replicas": 1,
      "softPackageImage": "",
      "description": null,
      "annotations": [
        {
          "value": "应用初始化部署",
          "key": "kubernetes.io/change-cause"
        },
        {
          "value": "rollingupdate",
          "key": "deployment.inspur.com/role"
        },
        {
          "value": "true",
          "key": "sidecar.istio.io/inject"
        }
      ],
      "statefulsetUpdateType": "",
      "podSpec": {
        "imagePullSecrets": [
          {
            "name": "trident-iopdev-registry"
          }
        ],
        "containers": [
          {
            "image": "registry.cluster11.com:5000/trident_iopdev/iot-streammgr@sha256:4e54cf9be83458973f4102f9b768f31fe3f0466f0c65adb555fea586a6e5de62",
            "imagePullPolicy": "Always",
            "name": "container-001",
            "resources": {},
            "ports": [
              {
                "protocol": "TCP",
                "name": "bqdr2-tcp-80",
                "containerPort": 80
              }
            ]
          }
        ],
        "restartPolicy": "Always",
        "affinity": {
          "nodeAffinity": {},
          "podAffinity": {},
          "podAntiAffinity": {}
        }
      },
      "serviceName": "",
      "containerCommand": null,
      "portMappings": [
        {
          "protocol": "TCP",
          "port": 15684,
          "name": "http-15684-80-hknff",
          "targetPort": 80,
          "nodePort": 0
        }
      ],
      "labels": [
        {
          "value": "app-s65ags",
          "key": "app"
        },
        {
          "value": "app-6qfcq7f6",
          "key": "application"
        },
        {
          "value": "app-s65ags",
          "key": "appinstance"
        },
        {
          "value": "group-cloud-operator",
          "key": "user_group"
        },
        {
          "value": "iopdev",
          "key": "user"
        },
        {
          "value": "rollingupdate",
          "key": "version"
        },
        {
          "value": "app-s65ags",
          "key": "deployment"
        }
      ],
      "imagePullSecret": "trident-iopdev-registry",
      "name": "app-s65ags",
      "namespace": "default",
      "memoryRequirement": null,
      "runAsPrivileged": false,
      "containerImage": "container-001#registry.cluster11.com:5000/trident_iopdev/iot-streammgr:4.5-beta"
    }
  ],
  "routeruleSpec": null,
  "environmentId": "9439c591-b8c9-486d-8793-8d8f8eb9f292",
  "requestId": "80ebcf1a-64d1-4433-9e3d-225f80084fb2",
  "deploymentDetail": null,
  "createdTime": "2019-07-15T06:43:41Z",
  "id": 5559,
  "servicePort": [
    {
      "protocol": "TCP",
      "port": 15684,
      "name": "http-15684-80-hknff",
      "targetPort": 80
    }
  ],
  "tag": "",
  "cronJobDetail": null,
  "releaseStrategyType": "RollingUpdate",
  "deletedTime": "0001-01-01T00:00:00Z",
  "containerImage": "container-001#registry.cluster11.com:5000/trident_iopdev/iot-streammgr:4.5-beta",
  "serviceSpec": null,
  "updatedTime": "2019-07-15T06:43:41Z",
  "appName": "app-6qfcq7f6",
  "replicas": 1,
  "ownerGroupId": "group-cloud-operator",
  "softPackageImage": "",
  "routeSubDomain": ".10.110.25.114.xip.io",
  "routeHost": "",
  "ingressSpec": {},
  "isCreateRoute": false,
  "podSpec": {
    "containers": [
      {
        "image": "registry.cluster11.com:5000/trident_iopdev/iot-streammgr@sha256:4e54cf9be83458973f4102f9b768f31fe3f0466f0c65adb555fea586a6e5de62",
        "imagePullPolicy": "Always",
        "name": "container-001",
        "resources": {},
        "ports": [
          {
            "protocol": "TCP",
            "name": "bqdr2-tcp-80",
            "containerPort": 80
          }
        ]
      }
    ],
    "restartPolicy": "Always",
    "affinity": {
      "nodeAffinity": {},
      "podAffinity": {},
      "podAntiAffinity": {}
    }
  },
  "serviceName": "",
  "routePath": "",
  "autoSwitchTraffic": "1",
  "name": "app-s65ags",
  "namespace": "default",
  "serviceList": null,
  "statefulsetDetail": null
}

错误码

以下为本接口特有的错误码。

错误代码 错误信息 Http状态码 说明
204.001902 获取集群信息失败 500 连接集群失败
201.999400 请求数据格式失败,读取请求数据失败 400 请求数据格式有误
201.012001 创建应用实例失败 500 应用容器数量为0,请至少创建1个应用容器
201.012003 容器数量已达配额上限 500 容器数量超过最大可建容器数量
201.012002 创建应用实例失败 500 获取卷详细信息失败,卷名已存在等原因
201.019001 连接集群失败,无法创建服务 500 集群连接异常
201.013021 连接集群失败,无法创建无状态负载 500 集群连接异常
201.012005 负载数量已达配额上限,无法创建实例 500 负载数量已达最大可创建负载数量
201.016001 连接集群失败,无法创建有状态负载 500 集群连接异常
201.012901 保存应用实例数据失败 500 数据库保存数据失败

实例遍历

条件查询应用实例列表。

描述

  • 可以根据不同的集群和不同的名称空间进行实例列表查询
  • 可以根据实例名称和应用名称查询实例

请求参数

名称 是否必须 描述
ClusterId 集群环境ID
AppenvName 实例名称
AppName 应用名称
Namespace 命名空间

返回参数

名称 位置 类型 是否必须 描述
Object body Object(InstanceSpec列表) 应用实例列表

示例

  • Sample Request(请求):
GET https://ice.cn-north-3.inspurcloudapi.com/?Action=ListInstances&ClusterId=9439c591-b8c9-486d-8793-8d8f8eb9f292&AppenvName=&AppName=&Namespace=&Nonce=825585&Timestamp=1655557904&Version=2019-01-31
  • Sample Response(响应):

  • xml格式

<ListInstancesResponse>
    <DataContainer>
        <Data>
            <ServiceType/>
            <ContainerImageId>container-001#registry.cluster11.com:5000/trident_iopdev/nginx@sha256:8ae79811f8d183544805d5e20a06dcb2d735e2712c11ce602babe18f58f82e3f</ContainerImageId>
            <VirtualService>
                <Metadata>
                    <CreationTimestamp>null</CreationTimestamp>
                </Metadata>
                <Spec></Spec>
            </VirtualService>
            <DisplayName>app-4891x</DisplayName>
            <CreatorId>0</CreatorId>
            <CreatorName>iopdev</CreatorName>
            <RoutePathMatchType/>
            <Type>DeploymentImage</Type>
            <OwnerId>0</OwnerId>
            <AccessMode>cluster</AccessMode>
            <DeploymentSpec>null</DeploymentSpec>
            <RouteruleSpec>null</RouteruleSpec>
            <EnvironmentId>9439c591-b8c9-486d-8793-8d8f8eb9f292</EnvironmentId>
            <DeploymentDetail>null</DeploymentDetail>
            <CreatedTime>2019-07-09T06:49:34Z</CreatedTime>
            <Id>5521</Id>
            <ServicePort>null</ServicePort>
            <Tag/>
            <CronJobDetail>null</CronJobDetail>
            <ReleaseStrategyType>RollingUpdate</ReleaseStrategyType>
            <DeletedTime>0001-01-01T00:00:00Z</DeletedTime>
            <ContainerImage>container-001#registry.cluster11.com:5000/trident_iopdev/nginx:test</ContainerImage>
            <ServiceSpec>null</ServiceSpec>
            <UpdatedTime>2019-07-09T08:16:02Z</UpdatedTime>
            <AppName>app-5552s5lz</AppName>
            <Replicas>1</Replicas>
            <OwnerGroupId>group-cloud-operator</OwnerGroupId>
            <SoftPackageImage/>
            <RouteSubDomain/>
            <RouteHost/>
            <IngressSpec></IngressSpec>
            <IsCreateRoute>false</IsCreateRoute>
            <PodSpec>
                <Containers>null</Containers>
            </PodSpec>
            <ServiceName/>
            <RoutePath/>
            <AutoSwitchTraffic>1</AutoSwitchTraffic>
            <Name>app-4891x</Name>
            <Namespace>default</Namespace>
            <ServiceList>null</ServiceList>
            <StatefulsetDetail>null</StatefulsetDetail>
        </Data>
    </DataContainer>
    <RequestId>c99aa72c-d5cd-4b48-a36a-c1ec0fa77d1f</RequestId>
</ListInstancesResponse>
  • json格式
{
  "data": [
    {
      "serviceType": "",
      "containerImageId": "container-001#registry.cluster11.com:5000/trident_iopdev/nginx@sha256:8ae79811f8d183544805d5e20a06dcb2d735e2712c11ce602babe18f58f82e3f",
      "virtualService": {
        "metadata": {
          "creationTimestamp": null
        },
        "spec": {}
      },
      "displayName": "app-4891x",
      "creatorId": 0,
      "creatorName": "iopdev",
      "routePathMatchType": "",
      "type": "DeploymentImage",
      "ownerId": 0,
      "accessMode": "cluster",
      "deploymentSpec": null,
      "routeruleSpec": null,
      "environmentId": "9439c591-b8c9-486d-8793-8d8f8eb9f292",
      "deploymentDetail": null,
      "createdTime": "2019-07-09T06:49:34Z",
      "id": 5521,
      "servicePort": null,
      "tag": "",
      "cronJobDetail": null,
      "releaseStrategyType": "RollingUpdate",
      "deletedTime": "0001-01-01T00:00:00Z",
      "containerImage": "container-001#registry.cluster11.com:5000/trident_iopdev/nginx:test",
      "serviceSpec": null,
      "updatedTime": "2019-07-09T08:16:02Z",
      "appName": "app-5552s5lz",
      "replicas": 1,
      "ownerGroupId": "group-cloud-operator",
      "softPackageImage": "",
      "routeSubDomain": "",
      "routeHost": "",
      "ingressSpec": {},
      "isCreateRoute": false,
      "podSpec": {
        "containers": null
      },
      "serviceName": "",
      "routePath": "",
      "autoSwitchTraffic": "1",
      "name": "app-4891x",
      "namespace": "default",
      "serviceList": null,
      "statefulsetDetail": null
    }
  ],
  "requestId": "d13976f6-3de3-41ab-b8a7-8ead5e479ecd"
}

错误码

以下为本接口特有的错误码。

错误代码 错误信息 Http状态码
204.001902 获取集群信息失败 500
201.012905 查询应用实例数据失败 500

实例详情

获取某个实例的详情信息。

描述

  • 通过应用实例ID获取该实例的详情信息

请求参数

名称 是否必须 描述
ClusterId 集群环境ID
Id 实例ID
Type 实例类型

返回参数

名称 位置 类型 是否必须 描述
id body Integer UUID
name body String 实例ID
displayName body String 实例名称
appName body String 所属应用ID
namespace body String 命名空间
environmentId body String 集群环境ID
accessMode body String 访问方式
ownerId body Integer 实例所有者ID
creatorId body Integer 实例创建者ID
ownerGroup body String 实例所属组
createdTime body String 实例创建时间
updatedTime body String 实例更新时间
deletedTime body String 实例删除时间
containerImage body String 镜像名称
containerImageId body String 镜像编码
releaseStrategyType body String 发布策略
replicas body Integer 副本数
podSpec body Object(PodSpec 实例描述
serviceList body Object(ServicePort 服务列表
virtualService body Object(VirtualService 服务路由
deploymentDetail body Object(DeploymentDetail 部署详情

示例

  • Sample Request(请求):
GET https://ice.cn-north-3.inspurcloudapi.com/?Action=GetInstanceDetail&ClusterId=9439c591-b8c9-486d-8793-8d8f8eb9f292&Id=5542&Type=deployment&Nonce=825585&Timestamp=1655557904&Version=2019-01-31
  • Sample Response(响应):

  • xml格式

<GetInstanceDetailResponse>
    <ServiceType/>
    <ContainerImageId>container-001#registry.cluster11.com:5000/trident_iopdev/iot-streammgr@sha256:4e54cf9be83458973f4102f9b768f31fe3f0466f0c65adb555fea586a6e5de62</ContainerImageId>
    <VirtualService>
        <Metadata>
            <CreationTimestamp>null</CreationTimestamp>
        </Metadata>
        <Spec></Spec>
    </VirtualService>
    <DisplayName>app-ddqxa</DisplayName>
    <CreatorId>0</CreatorId>
    <CreatorName>iopdev</CreatorName>
    <RoutePathMatchType/>
    <Type>DeploymentImage</Type>
    <OwnerId>0</OwnerId>
    <AccessMode>domain</AccessMode>
    <DeploymentSpec>null</DeploymentSpec>
    <RouteruleSpec>null</RouteruleSpec>
    <EnvironmentId>9439c591-b8c9-486d-8793-8d8f8eb9f292</EnvironmentId>
    <RequestId>82811f1f-ec07-43d2-a20f-ffb60a419636</RequestId>
    <DeploymentDetailContainer>
        <DeploymentDetail>
            <NewReplicaSet>
                <ContainerImagesContainer>
                    <ContainerImages>
                        <ContainerName>container-001</ContainerName>
                        <ContainerImage>trident_iopdev/iot-streammgr@sha256:4e54cf9be83458973f4102f9b768f31fe3f0466f0c65adb555fea586a6e5de62</ContainerImage>
                    </ContainerImages>
                </ContainerImagesContainer>
                <TypeMeta>
                    <Kind>replicaset</Kind>
                </TypeMeta>
                <ObjectMeta>
                    <Name>app-ddqxa-5f957bbdd9</Name>
                    <Namespace>default</Namespace>
                    <CreationTimestamp>2019-07-12T03:36:53Z</CreationTimestamp>
                    <Annotations>
                        <Deployment.inspur.com/role>rollingupdate</Deployment.inspur.com/role>
                        <Deployment.kubernetes.io/max-replicas>2</Deployment.kubernetes.io/max-replicas>
                        <Sidecar.istio.io/inject>true</Sidecar.istio.io/inject>
                        <Deployment.kubernetes.io/revision>3</Deployment.kubernetes.io/revision>
                        <Deployment.kubernetes.io/desired-replicas>1</Deployment.kubernetes.io/desired-replicas>
                        <Kubernetes.io/change-cause>手动触发更新</Kubernetes.io/change-cause>
                    </Annotations>
                    <Labels>
                        <App>app-ddqxa</App>
                        <User_group>group-cloud-operator</User_group>
                        <Application>app-qn22mvcn</Application>
                        <Appinstance>app-ddqxa</Appinstance>
                        <Pod-template-hash>1951366885</Pod-template-hash>
                        <User>iopdev</User>
                        <Version>rollingupdate</Version>
                        <Deployment>app-ddqxa</Deployment>
                    </Labels>
                </ObjectMeta>
                <Pods>
                    <Running>1</Running>
                    <Current>1</Current>
                    <Desired>1</Desired>
                    <Pending>0</Pending>
                    <WarningsContainer></WarningsContainer>
                    <Failed>0</Failed>
                    <Succeeded>0</Succeeded>
                </Pods>
                <InitContainerImages>null</InitContainerImages>
            </NewReplicaSet>
            <StatusInfo>
                <Unavailable>0</Unavailable>
                <Replicas>1</Replicas>
                <Available>1</Available>
                <Updated>1</Updated>
            </StatusInfo>
            <EventList>
                <ListMeta>
                    <TotalItems>0</TotalItems>
                </ListMeta>
                <EventsContainer></EventsContainer>
            </EventList>
            <Replicas>1</Replicas>
            <PodList>
                <ListMeta>
                    <TotalItems>1</TotalItems>
                </ListMeta>
                <PodsContainer>
                    <Pods>
                        <NodeName>slave2</NodeName>
                        <TypeMeta>
                            <Kind>pod</Kind>
                        </TypeMeta>
                        <PodStatus>
                            <PodPhase>Running</PodPhase>
                            <ContainerStatesContainer>
                                <ContainerStates>
                                    <Running>
                                        <StartedAt>2019-07-12T06:22:22Z</StartedAt>
                                    </Running>
                                </ContainerStates>
                                <ContainerStates>
                                    <Running>
                                        <StartedAt>2019-07-12T03:37:00Z</StartedAt>
                                    </Running>
                                </ContainerStates>
                            </ContainerStatesContainer>
                            <Status>Running</Status>
                        </PodStatus>
                        <RestartCount>21</RestartCount>
                        <ObjectMeta>
                            <Name>app-ddqxa-5f957bbdd9-zgbjs</Name>
                            <Namespace>default</Namespace>
                            <CreationTimestamp>2019-07-12T03:36:53Z</CreationTimestamp>
                            <Annotations>
                                <Sidecar.istio.io/status>{"version":"b64ff87990d99becd4433f619b4b51b0913453430ba4ab54dfce844f9d37f1dc","initContainers":["istio-init"],"containers":["istio-proxy"],"volumes":["istio-envoy","istio-certs"],"imagePullSecrets":null}</Sidecar.istio.io/status>
                                <Deployment.inspur.com/role>rollingupdate</Deployment.inspur.com/role>
                                <Cluster.inspur.com/container-image>{"container-001":"registry.cluster11.com:5000/trident_iopdev/iot-streammgr:0.1.0"}</Cluster.inspur.com/container-image>
                                <Sidecar.istio.io/inject>true</Sidecar.istio.io/inject>
                                <Kubernetes.io/change-cause>应用初始化部署</Kubernetes.io/change-cause>
                            </Annotations>
                            <Labels>
                                <App>app-ddqxa</App>
                                <User_group>group-cloud-operator</User_group>
                                <Application>app-qn22mvcn</Application>
                                <Appinstance>app-ddqxa</Appinstance>
                                <Pod-template-hash>1951366885</Pod-template-hash>
                                <User>iopdev</User>
                                <Version>rollingupdate</Version>
                                <Deployment>app-ddqxa</Deployment>
                            </Labels>
                        </ObjectMeta>
                        <WarningsContainer></WarningsContainer>
                        <Metrics>null</Metrics>
                    </Pods>
                </PodsContainer>
                <CumulativeMetricsContainer></CumulativeMetricsContainer>
                <ErrorsContainer></ErrorsContainer>
                <Status>
                    <Running>0</Running>
                    <Pending>0</Pending>
                    <Failed>0</Failed>
                    <Succeeded>0</Succeeded>
                </Status>
            </PodList>
            <RollingUpdateStrategy>
                <MaxSurge>25%</MaxSurge>
                <MaxUnavailable>25%</MaxUnavailable>
            </RollingUpdateStrategy>
            <OldReplicaSetList>
                <ListMeta>
                    <TotalItems>0</TotalItems>
                </ListMeta>
                <ReplicaSetsContainer></ReplicaSetsContainer>
                <CumulativeMetricsContainer></CumulativeMetricsContainer>
                <ErrorsContainer></ErrorsContainer>
                <Status>
                    <Running>0</Running>
                    <Pending>0</Pending>
                    <Failed>0</Failed>
                    <Succeeded>0</Succeeded>
                </Status>
            </OldReplicaSetList>
            <TypeMeta>
                <Kind>deployment</Kind>
            </TypeMeta>
            <ObjectMeta>
                <Name>app-ddqxa</Name>
                <Namespace>default</Namespace>
                <CreationTimestamp>2019-07-12T02:34:54Z</CreationTimestamp>
                <Annotations>
                    <Deployment.inspur.com/role>rollingupdate</Deployment.inspur.com/role>
                    <Sidecar.istio.io/inject>true</Sidecar.istio.io/inject>
                    <Deployment.kubernetes.io/revision>3</Deployment.kubernetes.io/revision>
                    <Kubernetes.io/change-cause>手动触发更新</Kubernetes.io/change-cause>
                </Annotations>
                <Labels>
                    <App>app-ddqxa</App>
                    <User_group>group-cloud-operator</User_group>
                    <Application>app-qn22mvcn</Application>
                    <Appinstance>app-ddqxa</Appinstance>
                    <User>iopdev</User>
                    <Version>rollingupdate</Version>
                    <Deployment>app-ddqxa</Deployment>
                </Labels>
            </ObjectMeta>
            <Selector>
                <App>app-ddqxa</App>
                <User_group>group-cloud-operator</User_group>
                <Application>app-qn22mvcn</Application>
                <Appinstance>app-ddqxa</Appinstance>
                <User>iopdev</User>
                <Version>rollingupdate</Version>
                <Deployment>app-ddqxa</Deployment>
            </Selector>
            <RevisionHistoryLimit>10</RevisionHistoryLimit>
            <MinReadySeconds>0</MinReadySeconds>
            <Strategy>RollingUpdate</Strategy>
            <HorizontalPodAutoscalerList>
                <HorizontalpodautoscalersContainer></HorizontalpodautoscalersContainer>
                <ListMeta>
                    <TotalItems>0</TotalItems>
                </ListMeta>
                <ErrorsContainer></ErrorsContainer>
            </HorizontalPodAutoscalerList>
            <ErrorsContainer></ErrorsContainer>
        </DeploymentDetail>
    </DeploymentDetailContainer>
    <CreatedTime>2019-07-12T02:34:54Z</CreatedTime>
    <Id>5542</Id>
    <ServicePort>null</ServicePort>
    <Tag/>
    <CronJobDetail>null</CronJobDetail>
    <ReleaseStrategyType>RollingUpdate</ReleaseStrategyType>
    <DeletedTime>0001-01-01T00:00:00Z</DeletedTime>
    <ContainerImage>container-001#registry.cluster11.com:5000/trident_iopdev/iot-streammgr:0.1.0</ContainerImage>
    <ServiceSpec>null</ServiceSpec>
    <UpdatedTime>2019-07-12T03:36:53Z</UpdatedTime>
    <AppName>app-qn22mvcn</AppName>
    <Replicas>1</Replicas>
    <OwnerGroupId>group-cloud-operator</OwnerGroupId>
    <SoftPackageImage/>
    <RouteSubDomain/>
    <RouteHost/>
    <IngressSpec></IngressSpec>
    <IsCreateRoute>false</IsCreateRoute>
    <PodSpec>
        <Containers>null</Containers>
    </PodSpec>
    <ServiceName/>
    <RoutePath/>
    <AutoSwitchTraffic>1</AutoSwitchTraffic>
    <Name>app-ddqxa</Name>
    <Namespace>default</Namespace>
    <ServiceList>
        <Metadata>
            <ResourceVersion>265308334</ResourceVersion>
            <SelfLink>/api/v1/namespaces/default/services</SelfLink>
        </Metadata>
        <ItemsContainer>
            <Items>
                <Metadata>
                    <Uid>a1e18d6c-a44d-11e9-9d8d-6c92bf743ff6</Uid>
                    <ResourceVersion>265214692</ResourceVersion>
                    <Name>app-ddqxa-default-svc</Name>
                    <Namespace>default</Namespace>
                    <CreationTimestamp>2019-07-12T02:34:54Z</CreationTimestamp>
                    <Annotations>
                        <Cloud.inspur.com/defaultsvc>true</Cloud.inspur.com/defaultsvc>
                    </Annotations>
                    <SelfLink>/api/v1/namespaces/default/services/app-ddqxa-default-svc</SelfLink>
                    <Labels>
                        <App>app-ddqxa</App>
                        <User_group>group-cloud-operator</User_group>
                        <Application>app-qn22mvcn</Application>
                        <Appinstance>app-ddqxa</Appinstance>
                        <User>iopdev</User>
                    </Labels>
                </Metadata>
                <Spec>
                    <SessionAffinity>None</SessionAffinity>
                    <Selector>
                        <App>app-ddqxa</App>
                        <User_group>group-cloud-operator</User_group>
                        <Application>app-qn22mvcn</Application>
                        <Appinstance>app-ddqxa</Appinstance>
                        <User>iopdev</User>
                    </Selector>
                    <PortsContainer>
                        <Ports>
                            <Protocol>TCP</Protocol>
                            <Port>11730</Port>
                            <Name>http-11730-80-xcgbc</Name>
                            <TargetPort>80</TargetPort>
                        </Ports>
                    </PortsContainer>
                    <Type>ClusterIP</Type>
                    <ClusterIP>158.158.44.52</ClusterIP>
                </Spec>
                <Status>
                    <LoadBalancer></LoadBalancer>
                </Status>
            </Items>
        </ItemsContainer>
    </ServiceList>
    <StatefulsetDetail>null</StatefulsetDetail>
</GetInstanceDetailResponse>
  • json格式
{
  "serviceType": "",
  "containerImageId": "container-001#registry.cluster11.com:5000/trident_iopdev/iot-streammgr@sha256:4e54cf9be83458973f4102f9b768f31fe3f0466f0c65adb555fea586a6e5de62",
  "virtualService": {
    "metadata": {
      "creationTimestamp": null
    },
    "spec": {}
  },
  "displayName": "app-ddqxa",
  "creatorId": 0,
  "creatorName": "iopdev",
  "routePathMatchType": "",
  "type": "DeploymentImage",
  "ownerId": 0,
  "accessMode": "domain",
  "deploymentSpec": null,
  "routeruleSpec": null,
  "environmentId": "9439c591-b8c9-486d-8793-8d8f8eb9f292",
  "requestId": "405abe18-9a71-40d7-950b-cb66a51659b2",
  "deploymentDetail": [
    {
      "newReplicaSet": {
        "containerImages": [
          {
            "containerName": "container-001",
            "containerImage": "trident_iopdev/iot-streammgr@sha256:4e54cf9be83458973f4102f9b768f31fe3f0466f0c65adb555fea586a6e5de62"
          }
        ],
        "typeMeta": {
          "kind": "replicaset"
        },
        "objectMeta": {
          "name": "app-ddqxa-5f957bbdd9",
          "namespace": "default",
          "creationTimestamp": "2019-07-12T03:36:53Z",
          "annotations": {
            "deployment.inspur.com/role": "rollingupdate",
            "deployment.kubernetes.io/max-replicas": "2",
            "sidecar.istio.io/inject": "true",
            "deployment.kubernetes.io/revision": "3",
            "deployment.kubernetes.io/desired-replicas": "1",
            "kubernetes.io/change-cause": "手动触发更新"
          },
          "labels": {
            "app": "app-ddqxa",
            "user_group": "group-cloud-operator",
            "application": "app-qn22mvcn",
            "appinstance": "app-ddqxa",
            "pod-template-hash": "1951366885",
            "user": "iopdev",
            "version": "rollingupdate",
            "deployment": "app-ddqxa"
          }
        },
        "pods": {
          "running": 1,
          "current": 1,
          "desired": 1,
          "pending": 0,
          "warnings": [],
          "failed": 0,
          "succeeded": 0
        },
        "initContainerImages": null
      },
      "statusInfo": {
        "unavailable": 0,
        "replicas": 1,
        "available": 1,
        "updated": 1
      },
      "eventList": {
        "listMeta": {
          "totalItems": 0
        },
        "events": []
      },
      "replicas": 1,
      "podList": {
        "listMeta": {
          "totalItems": 1
        },
        "pods": [
          {
            "nodeName": "slave2",
            "typeMeta": {
              "kind": "pod"
            },
            "podStatus": {
              "podPhase": "Running",
              "containerStates": [
                {
                  "running": {
                    "startedAt": "2019-07-12T06:22:22Z"
                  }
                },
                {
                  "running": {
                    "startedAt": "2019-07-12T03:37:00Z"
                  }
                }
              ],
              "status": "Running"
            },
            "restartCount": 21,
            "objectMeta": {
              "name": "app-ddqxa-5f957bbdd9-zgbjs",
              "namespace": "default",
              "creationTimestamp": "2019-07-12T03:36:53Z",
              "annotations": {
                "sidecar.istio.io/status": "{\"version\":\"b64ff87990d99becd4433f619b4b51b0913453430ba4ab54dfce844f9d37f1dc\",\"initContainers\":[\"istio-init\"],\"containers\":[\"istio-proxy\"],\"volumes\":[\"istio-envoy\",\"istio-certs\"],\"imagePullSecrets\":null}",
                "deployment.inspur.com/role": "rollingupdate",
                "cluster.inspur.com/container-image": "{\"container-001\":\"registry.cluster11.com:5000/trident_iopdev/iot-streammgr:0.1.0\"}",
                "sidecar.istio.io/inject": "true",
                "kubernetes.io/change-cause": "应用初始化部署"
              },
              "labels": {
                "app": "app-ddqxa",
                "user_group": "group-cloud-operator",
                "application": "app-qn22mvcn",
                "appinstance": "app-ddqxa",
                "pod-template-hash": "1951366885",
                "user": "iopdev",
                "version": "rollingupdate",
                "deployment": "app-ddqxa"
              }
            },
            "warnings": [],
            "metrics": null
          }
        ],
        "cumulativeMetrics": [],
        "errors": [],
        "status": {
          "running": 0,
          "pending": 0,
          "failed": 0,
          "succeeded": 0
        }
      },
      "rollingUpdateStrategy": {
        "maxSurge": "25%",
        "maxUnavailable": "25%"
      },
      "oldReplicaSetList": {
        "listMeta": {
          "totalItems": 0
        },
        "replicaSets": [],
        "cumulativeMetrics": [],
        "errors": [],
        "status": {
          "running": 0,
          "pending": 0,
          "failed": 0,
          "succeeded": 0
        }
      },
      "typeMeta": {
        "kind": "deployment"
      },
      "objectMeta": {
        "name": "app-ddqxa",
        "namespace": "default",
        "creationTimestamp": "2019-07-12T02:34:54Z",
        "annotations": {
          "deployment.inspur.com/role": "rollingupdate",
          "sidecar.istio.io/inject": "true",
          "deployment.kubernetes.io/revision": "3",
          "kubernetes.io/change-cause": "手动触发更新"
        },
        "labels": {
          "app": "app-ddqxa",
          "user_group": "group-cloud-operator",
          "application": "app-qn22mvcn",
          "appinstance": "app-ddqxa",
          "user": "iopdev",
          "version": "rollingupdate",
          "deployment": "app-ddqxa"
        }
      },
      "selector": {
        "app": "app-ddqxa",
        "user_group": "group-cloud-operator",
        "application": "app-qn22mvcn",
        "appinstance": "app-ddqxa",
        "user": "iopdev",
        "version": "rollingupdate",
        "deployment": "app-ddqxa"
      },
      "revisionHistoryLimit": 10,
      "minReadySeconds": 0,
      "strategy": "RollingUpdate",
      "horizontalPodAutoscalerList": {
        "horizontalpodautoscalers": [],
        "listMeta": {
          "totalItems": 0
        },
        "errors": []
      },
      "errors": []
    }
  ],
  "createdTime": "2019-07-12T02:34:54Z",
  "id": 5542,
  "servicePort": null,
  "tag": "",
  "cronJobDetail": null,
  "releaseStrategyType": "RollingUpdate",
  "deletedTime": "0001-01-01T00:00:00Z",
  "containerImage": "container-001#registry.cluster11.com:5000/trident_iopdev/iot-streammgr:0.1.0",
  "serviceSpec": null,
  "updatedTime": "2019-07-12T03:36:53Z",
  "appName": "app-qn22mvcn",
  "replicas": 1,
  "ownerGroupId": "group-cloud-operator",
  "softPackageImage": "",
  "routeSubDomain": "",
  "routeHost": "",
  "ingressSpec": {},
  "isCreateRoute": false,
  "podSpec": {
    "containers": null
  },
  "serviceName": "",
  "routePath": "",
  "autoSwitchTraffic": "1",
  "name": "app-ddqxa",
  "namespace": "default",
  "serviceList": {
    "metadata": {
      "resourceVersion": "265308479",
      "selfLink": "/api/v1/namespaces/default/services"
    },
    "items": [
      {
        "metadata": {
          "uid": "a1e18d6c-a44d-11e9-9d8d-6c92bf743ff6",
          "resourceVersion": "265214692",
          "name": "app-ddqxa-default-svc",
          "namespace": "default",
          "creationTimestamp": "2019-07-12T02:34:54Z",
          "annotations": {
            "cloud.inspur.com/defaultsvc": "true"
          },
          "selfLink": "/api/v1/namespaces/default/services/app-ddqxa-default-svc",
          "labels": {
            "app": "app-ddqxa",
            "user_group": "group-cloud-operator",
            "application": "app-qn22mvcn",
            "appinstance": "app-ddqxa",
            "user": "iopdev"
          }
        },
        "spec": {
          "sessionAffinity": "None",
          "selector": {
            "app": "app-ddqxa",
            "user_group": "group-cloud-operator",
            "application": "app-qn22mvcn",
            "appinstance": "app-ddqxa",
            "user": "iopdev"
          },
          "ports": [
            {
              "protocol": "TCP",
              "port": 11730,
              "name": "http-11730-80-xcgbc",
              "targetPort": 80
            }
          ],
          "type": "ClusterIP",
          "clusterIP": "158.158.44.52"
        },
        "status": {
          "loadBalancer": {}
        }
      }
    ]
  },
  "statefulsetDetail": null
}

错误码

以下为本接口特有的错误码。

错误代码 错误信息 Http状态码
204.001902 获取集群信息失败 500
201.016902 连接集群失败,无法获取有状态负载信息 500
201.013002 连接集群失败,无法获取悟状态负载信息 500
201.019004 连接集群失败,无法获取服务信息 500

删除实例

根据应用实例ID删除某个实例的信息。

描述

  • 删除该应用实例相关的数据库元数据和k8s资源。

请求参数

名称 是否必须 描述
Id 实力编码
ClusterId 集群ID

返回参数

示例

  • Sample Request(请求):
GET https://ice.cn-north-3.inspurcloudapi.com/?Action=DeleteInstance&ClusterId=97f94dd5-3466-476b-9b1a-617bd50c4449&Id=5542&Nonce=825585&Timestamp=1655557904&Version=2019-01-31
  • Sample Response(响应):

  • xml格式

  • json格式

错误码

以下为本接口特有的错误码。

错误代码 错误信息 Http状态码
201.012907 查询应用实例数据失败 500

获取实例访问地址

获取某个实例的访问地址。

描述

根据实例名称查询该实例的访问地址

请求参数

名称 位置 类型 是否必须 描述
ClusterId path String 集群ID
Namespace path String 名称空间
Application path String 应用名称
Instance path String 应用实例名称

返回参数

名称 位置 类型 是否必须 描述
地址列表 body List<NetAddress> 访问地址列表

示例

  • Sample Request(请求):
GET https://ice.cn-north-3.inspurcloudapi.com/?Action=GetInstanceAccessAddress&ClusterId=9439c591-b8c9-486d-8793-8d8f8eb9f292&Namespace=default&Application=app-h9wh2m74&Instance=app-akevt&Nonce=825585&Timestamp=1655557904&Version=2019-01-31
  • Sample Response(响应):

  • xml格式

<GetInstanceAccessAddressResponse>
    <DataContainer>
        <Data>
            <NetAddress>app-akevt-default.10.110.25.114.xip.io/</NetAddress>
            <MatchMode>prefix</MatchMode>
        </Data>
    </DataContainer>
    <RequestId>95bb7006-f4dd-407c-b733-48f9a8d9154a</RequestId>
</GetInstanceAccessAddressResponse>
  • json格式
{
  "data": [
    {
      "netAddress": "app-akevt-default.10.110.25.114.xip.io/",
      "matchMode": "prefix"
    }
  ],
  "requestId": "a9625e2c-c111-41f5-83ab-667b537a8157"
}

返回值

请参考通用请求返回值

错误码

以下为本接口特有的错误码。

错误代码 错误信息 Http状态码 说明
201.018002 获取数据失败,请检查k8s集群环境 500 集群连接异常

微服务遍历

描述

  • 获取微服务列表

请求参数

名称 是否必须 描述
ClusterId 是 集群ID
Scope 范围(固定传入值mesh)
Namespace 命名空间编码
AppName 应用ID

返回参数

名称 位置 类型 是否必须 描述
apiVersion body String APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.
kind body String Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated.
metadata body Object(ListMeta) Standard list metadata
items body Object(VirtualService列表) 应用标签

示例

  • Sample Request(请求):
GET https://ice.cn-north-3.inspurcloudapi.com/?Action=ListMeshVirtualServices&ClusterId=9439c591-b8c9-486d-8793-8d8f8eb9f292&Namespace=&AppName=&Scope=mesh(scope为固定值)&Nonce=825585&Timestamp=1655557904&Version=2019-01-31
  • Sample Response(响应):

  • xml格式

<ListMeshVirtualServicesResponse>
    <Metadata>
        <ResourceVersion>265297788</ResourceVersion>
        <SelfLink>/apis/networking.istio.io/v1alpha3/namespaces/iop-test/virtualservices</SelfLink>
    </Metadata>
    <ApiVersion>networking.istio.io/v1alpha3</ApiVersion>
    <Kind>VirtualServiceList</Kind>
    <RequestId>512d1891-dd53-429c-a341-4ca19cb284a3</RequestId>
    <ItemsContainer>
        <Items>
            <Metadata>
                <Uid>6fba53e6-a2c2-11e9-9d8d-6c92bf743ff6</Uid>
                <ResourceVersion>263915797</ResourceVersion>
                <Name>app-w7rbk-default-mesh</Name>
                <Namespace>default</Namespace>
                <CreationTimestamp>2019-07-10T03:25:59Z</CreationTimestamp>
                <Annotations>
                    <Cloud.inspur.com/defaultsvc>true</Cloud.inspur.com/defaultsvc>
                </Annotations>
                <SelfLink>/apis/networking.istio.io/v1alpha3/namespaces/default/virtualservices/app-w7rbk-default-mesh</SelfLink>
                <Labels>
                    <App>app-w7rbk</App>
                    <User_group>group-cloud-operator</User_group>
                    <Application>app-5552s5lz</Application>
                    <Appinstance>app-w7rbk</Appinstance>
                    <Scope>mesh</Scope>
                    <App-w7rbk-default-svc>service</App-w7rbk-default-svc>
                    <User>iopdev</User>
                </Labels>
            </Metadata>
            <ApiVersion>networking.istio.io/v1alpha3</ApiVersion>
            <Kind>VirtualService</Kind>
            <Spec>
                <GatewaysContainer>
                    <Gateways>mesh</Gateways>
                </GatewaysContainer>
                <HostsContainer>
                    <Hosts>app-w7rbk-default-svc.default.svc.cluster.local</Hosts>
                </HostsContainer>
                <HttpContainer>
                    <Http>
                        <RouteContainer>
                            <Route>
                                <Destination>
                                    <Port>
                                        <Number>771</Number>
                                    </Port>
                                    <Host>app-w7rbk-default-svc.default.svc.cluster.local</Host>
                                    <Subset>rollingupdate</Subset>
                                </Destination>
                            </Route>
                        </RouteContainer>
                    </Http>
                </HttpContainer>
            </Spec>
        </Items>
    </ItemsContainer>
</ListMeshVirtualServicesResponse>
  • json格式
{
  "metadata": {
    "resourceVersion": "265297134",
    "selfLink": "/apis/networking.istio.io/v1alpha3/namespaces/iop-test/virtualservices"
  },
  "apiVersion": "networking.istio.io/v1alpha3",
  "kind": "VirtualServiceList",
  "requestId": "d632930e-5fe9-4716-8ac4-9b6bff95ea3b",
  "items": [
    {
      "metadata": {
        "uid": "6fba53e6-a2c2-11e9-9d8d-6c92bf743ff6",
        "resourceVersion": "263915797",
        "name": "app-w7rbk-default-mesh",
        "namespace": "default",
        "creationTimestamp": "2019-07-10T03:25:59Z",
        "annotations": {
          "cloud.inspur.com/defaultsvc": "true"
        },
        "selfLink": "/apis/networking.istio.io/v1alpha3/namespaces/default/virtualservices/app-w7rbk-default-mesh",
        "labels": {
          "app": "app-w7rbk",
          "user_group": "group-cloud-operator",
          "application": "app-5552s5lz",
          "appinstance": "app-w7rbk",
          "scope": "mesh",
          "app-w7rbk-default-svc": "service",
          "user": "iopdev"
        }
      },
      "apiVersion": "networking.istio.io/v1alpha3",
      "kind": "VirtualService",
      "spec": {
        "gateways": [
          "mesh"
        ],
        "hosts": [
          "app-w7rbk-default-svc.default.svc.cluster.local"
        ],
        "http": [
          {
            "route": [
              {
                "destination": {
                  "port": {
                    "number": 771
                  },
                  "host": "app-w7rbk-default-svc.default.svc.cluster.local",
                  "subset": "rollingupdate"
                }
              }
            ]
          }
        ]
      }
    }
  ]
}

错误码

以下为本接口特有的错误码。

错误代码 错误信息 Http状态码
201.018001 命名空间不能为空 400
201.018002 获取数据失败,请确认集群信息 500
201.018003 获取数据失败,数据转换异常

微服务详情

描述

  • 获取微服务详情

请求参数

名称 是否必须 描述
ClusterId 集群环境ID
Namespace 命名空间
Name 微服务名称

返回参数

名称 位置 类型 是否必须 描述
apiVersion body String APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.
kind body String Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated.
metadata body Object(ObjectMeta) Standard metadata
spec body Object(VirtualServiceSpec) Virtual Service

示例

  • Sample Request(请求):
GET https://ice.cn-north-3.inspurcloudapi.com/?Action=GetMeshVirtualServiceDetail&ClusterId=9439c591-b8c9-486d-8793-8d8f8eb9f292&Namespace=default&Name=app-akevt-default-mesh&Nonce=825585&Timestamp=1655557904&Version=2019-01-31
  • Sample Response(响应):

  • xml格式

<GetMeshVirtualServiceDetailResponse>
    <Metadata>
        <Uid>0d1304d8-a470-11e9-9d8d-6c92bf743ff6</Uid>
        <ResourceVersion>265315089</ResourceVersion>
        <Name>app-akevt-default-mesh</Name>
        <Namespace>default</Namespace>
        <CreationTimestamp>2019-07-12T06:41:17Z</CreationTimestamp>
        <Annotations>
            <Cloud.inspur.com/defaultsvc>true</Cloud.inspur.com/defaultsvc>
        </Annotations>
        <SelfLink>/apis/networking.istio.io/v1alpha3/namespaces/default/virtualservices/app-akevt-default-mesh</SelfLink>
        <Labels>
            <App>app-akevt</App>
            <User_group>group-cloud-operator</User_group>
            <Application>app-h9wh2m74</Application>
            <Appinstance>app-akevt</Appinstance>
            <Scope>mesh</Scope>
            <App-akevt-default-svc>service</App-akevt-default-svc>
            <User>iopdev</User>
        </Labels>
    </Metadata>
    <ApiVersion>networking.istio.io/v1alpha3</ApiVersion>
    <Kind>VirtualService</Kind>
    <RequestId>c20b0e35-bd18-4659-b15e-60f6d612cd75</RequestId>
    <Spec>
        <GatewaysContainer>
            <Gateways>mesh</Gateways>
        </GatewaysContainer>
        <HostsContainer>
            <Hosts>app-akevt-default-svc.default.svc.cluster.local</Hosts>
        </HostsContainer>
        <HttpContainer>
            <Http>
                <RouteContainer>
                    <Route>
                        <Destination>
                            <Port>
                                <Number>19777</Number>
                            </Port>
                            <Host>app-akevt-default-svc.default.svc.cluster.local</Host>
                            <Subset>rollingupdate</Subset>
                        </Destination>
                    </Route>
                </RouteContainer>
            </Http>
        </HttpContainer>
    </Spec>
</GetMeshVirtualServiceDetailResponse>
  • json格式
{
  "metadata": {
    "uid": "0d1304d8-a470-11e9-9d8d-6c92bf743ff6",
    "resourceVersion": "265315089",
    "name": "app-akevt-default-mesh",
    "namespace": "default",
    "creationTimestamp": "2019-07-12T06:41:17Z",
    "annotations": {
      "cloud.inspur.com/defaultsvc": "true"
    },
    "selfLink": "/apis/networking.istio.io/v1alpha3/namespaces/default/virtualservices/app-akevt-default-mesh",
    "labels": {
      "app": "app-akevt",
      "user_group": "group-cloud-operator",
      "application": "app-h9wh2m74",
      "appinstance": "app-akevt",
      "scope": "mesh",
      "app-akevt-default-svc": "service",
      "user": "iopdev"
    }
  },
  "apiVersion": "networking.istio.io/v1alpha3",
  "kind": "VirtualService",
  "requestId": "800f55ac-66cc-404c-8a56-de5e8dd00b5c",
  "spec": {
    "gateways": [
      "mesh"
    ],
    "hosts": [
      "app-akevt-default-svc.default.svc.cluster.local"
    ],
    "http": [
      {
        "route": [
          {
            "destination": {
              "port": {
                "number": 19777
              },
              "host": "app-akevt-default-svc.default.svc.cluster.local",
              "subset": "rollingupdate"
            }
          }
        ]
      }
    ]
  }
}

错误码

以下为本接口特有的错误码。

错误代码 错误信息 Http状态码
201.018009 微服务不存在 404
201.018010 获取VirtualService失败,请确认集群信息 500
201.018005 获取VirtualService失败,数据转换错误 500

路由遍历

描述

  • 获取微服务路由列表

请求参数

名称 是否必须 描述
ClusterId 集群ID
Scope 范围(固定传入值gateway)
Namespace 命名空间编码
AppName 应用ID

返回参数

名称 位置 类型 是否必须 描述
apiVersion body String APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.
kind body String Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated.
metadata body Object(ListMeta) Standard list metadata
items body Object(VirtualService列表) 应用标签

示例

  • Sample Request(请求):
GET https://ice.cn-north-3.inspurcloudapi.com/?Action=ListGateWayVirtualServices&ClusterId=9439c591-b8c9-486d-8793-8d8f8eb9f292&Namespace=&AppName=&Scope=gateway(scope为固定值)&Nonce=825585&Timestamp=1655557904&Version=2019-01-31
  • Sample Response(响应):

  • xml格式

<ListGateWayVirtualServicesResponse>
    <Metadata>
        <ResourceVersion>265245428</ResourceVersion>
        <SelfLink>/apis/networking.istio.io/v1alpha3/namespaces/iop-test/virtualservices</SelfLink>
    </Metadata>
    <ApiVersion>networking.istio.io/v1alpha3</ApiVersion>
    <Kind>VirtualServiceList</Kind>
    <RequestId>e08e4375-2885-4097-b15e-8cf95f92f91d</RequestId>
    <ItemsContainer>
        <Items>
            <Metadata>
                <Uid>6fbb5569-a2c2-11e9-9d8d-6c92bf743ff6</Uid>
                <ResourceVersion>263915800</ResourceVersion>
                <Name>app-w7rbk-default-gateway</Name>
                <Namespace>default</Namespace>
                <CreationTimestamp>2019-07-10T03:25:59Z</CreationTimestamp>
                <Annotations>
                    <Cloud.inspur.com/defaultsvc>true</Cloud.inspur.com/defaultsvc>
                </Annotations>
                <SelfLink>/apis/networking.istio.io/v1alpha3/namespaces/default/virtualservices/app-w7rbk-default-gateway</SelfLink>
                <Labels>
                    <App>app-w7rbk</App>
                    <User_group>group-cloud-operator</User_group>
                    <Application>app-5552s5lz</Application>
                    <Appinstance>app-w7rbk</Appinstance>
                    <Scope>gateway</Scope>
                    <App-w7rbk-default-svc>service</App-w7rbk-default-svc>
                    <User>iopdev</User>
                </Labels>
            </Metadata>
            <ApiVersion>networking.istio.io/v1alpha3</ApiVersion>
            <Kind>VirtualService</Kind>
            <Spec>
                <GatewaysContainer>
                    <Gateways>default.istio-system.svc.cluster.local</Gateways>
                </GatewaysContainer>
                <HostsContainer>
                    <Hosts>app-w7rbk-default.10.110.25.114.xip.io</Hosts>
                </HostsContainer>
                <HttpContainer>
                    <Http>
                        <RouteContainer>
                            <Route>
                                <Destination>
                                    <Port>
                                        <Number>771</Number>
                                    </Port>
                                    <Host>app-w7rbk-default-svc.default.svc.cluster.local</Host>
                                    <Subset>rollingupdate</Subset>
                                </Destination>
                            </Route>
                        </RouteContainer>
                        <MatchContainer>
                            <Match>
                                <Uri>
                                    <Prefix>/</Prefix>
                                </Uri>
                            </Match>
                        </MatchContainer>
                    </Http>
                </HttpContainer>
            </Spec>
        </Items>
    </ItemsContainer>
</ListGateWayVirtualServicesResponse>
  • json格式
{
  "metadata": {
    "resourceVersion": "265242629",
    "selfLink": "/apis/networking.istio.io/v1alpha3/namespaces/iop-test/virtualservices"
  },
  "apiVersion": "networking.istio.io/v1alpha3",
  "kind": "VirtualServiceList",
  "requestId": "e177527b-7c72-40b1-85af-8e599cba841c",
  "items": [
    {
      "metadata": {
        "uid": "6fbb5569-a2c2-11e9-9d8d-6c92bf743ff6",
        "resourceVersion": "263915800",
        "name": "app-w7rbk-default-gateway",
        "namespace": "default",
        "creationTimestamp": "2019-07-10T03:25:59Z",
        "annotations": {
          "cloud.inspur.com/defaultsvc": "true"
        },
        "selfLink": "/apis/networking.istio.io/v1alpha3/namespaces/default/virtualservices/app-w7rbk-default-gateway",
        "labels": {
          "app": "app-w7rbk",
          "user_group": "group-cloud-operator",
          "application": "app-5552s5lz",
          "appinstance": "app-w7rbk",
          "scope": "gateway",
          "app-w7rbk-default-svc": "service",
          "user": "iopdev"
        }
      },
      "apiVersion": "networking.istio.io/v1alpha3",
      "kind": "VirtualService",
      "spec": {
        "gateways": [
          "default.istio-system.svc.cluster.local"
        ],
        "hosts": [
          "app-w7rbk-default.10.110.25.114.xip.io"
        ],
        "http": [
          {
            "route": [
              {
                "destination": {
                  "port": {
                    "number": 771
                  },
                  "host": "app-w7rbk-default-svc.default.svc.cluster.local",
                  "subset": "rollingupdate"
                }
              }
            ],
            "match": [
              {
                "uri": {
                  "prefix": "/"
                }
              }
            ]
          }
        ]
      }
    }
  ]
}

错误码

以下为本接口特有的错误码。

错误代码 错误信息 Http状态码
201.018001 命名空间不能为空 400
201.018002 获取数据失败,请确认集群信息 500
201.018003 获取数据失败,数据转换异常

路由详情

描述

  • 获取微服务的路由详情

请求参数

名称 位置 类型 是否必须 描述
ClusterId path String 集群环境ID
Namespace path String 命名空间编码
Name path String 服务路由名称

返回参数

名称 位置 类型 是否必须 描述
apiVersion body String APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.
kind body String Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated.
metadata body Object(ObjectMeta) Standard metadata
spec body Object(VirtualServiceSpec) Virtual Service

示例

  • Sample Request(请求):
GET https://ice.cn-north-3.inspurcloudapi.com/?Action=GetGateWayVirtualServiceDetail&ClusterId=9439c591-b8c9-486d-8793-8d8f8eb9f292&Namespace=default&Name=app-qjcrx-default-gateway&Nonce=825585&Timestamp=1655557904&Version=2019-01-31
  • Sample Response(响应):

  • xml格式

<GetMeshVirtualServiceDetailResponse>
    <Metadata>
        <Uid>8fa9cd35-a44f-11e9-9d8d-6c92bf743ff6</Uid>
        <ResourceVersion>265220797</ResourceVersion>
        <Name>app-qjcrx-default-gateway</Name>
        <Namespace>default</Namespace>
        <CreationTimestamp>2019-07-12T02:48:43Z</CreationTimestamp>
        <Annotations>
            <Cloud.inspur.com/defaultsvc>true</Cloud.inspur.com/defaultsvc>
        </Annotations>
        <SelfLink>/apis/networking.istio.io/v1alpha3/namespaces/default/virtualservices/app-qjcrx-default-gateway</SelfLink>
        <Labels>
            <App>app-qjcrx</App>
            <App-qjcrx-default-svc>service</App-qjcrx-default-svc>
            <User_group>group-cloud-operator</User_group>
            <Application>app-dtqq5rcj</Application>
            <Appinstance>app-qjcrx</Appinstance>
            <Scope>gateway</Scope>
            <User>iopdev</User>
        </Labels>
    </Metadata>
    <ApiVersion>networking.istio.io/v1alpha3</ApiVersion>
    <Kind>VirtualService</Kind>
    <RequestId>698973a8-18a2-4f53-9245-8b034f8fa4cf</RequestId>
    <Spec>
        <GatewaysContainer>
            <Gateways>default.istio-system.svc.cluster.local</Gateways>
        </GatewaysContainer>
        <HostsContainer>
            <Hosts>app-qjcrx-default.10.110.25.114.xip.io</Hosts>
        </HostsContainer>
        <HttpContainer>
            <Http>
                <RouteContainer>
                    <Route>
                        <Destination>
                            <Port>
                                <Number>10396</Number>
                            </Port>
                            <Host>app-qjcrx-default-svc.default.svc.cluster.local</Host>
                            <Subset>rollingupdate</Subset>
                        </Destination>
                    </Route>
                </RouteContainer>
                <MatchContainer>
                    <Match>
                        <Uri>
                            <Prefix>/</Prefix>
                        </Uri>
                    </Match>
                </MatchContainer>
            </Http>
        </HttpContainer>
    </Spec>
</GetMeshVirtualServiceDetailResponse>
  • json格式
{
  "metadata": {
    "uid": "8fa9cd35-a44f-11e9-9d8d-6c92bf743ff6",
    "resourceVersion": "265220797",
    "name": "app-qjcrx-default-gateway",
    "namespace": "default",
    "creationTimestamp": "2019-07-12T02:48:43Z",
    "annotations": {
      "cloud.inspur.com/defaultsvc": "true"
    },
    "selfLink": "/apis/networking.istio.io/v1alpha3/namespaces/default/virtualservices/app-qjcrx-default-gateway",
    "labels": {
      "app": "app-qjcrx",
      "app-qjcrx-default-svc": "service",
      "user_group": "group-cloud-operator",
      "application": "app-dtqq5rcj",
      "appinstance": "app-qjcrx",
      "scope": "gateway",
      "user": "iopdev"
    }
  },
  "apiVersion": "networking.istio.io/v1alpha3",
  "kind": "VirtualService",
  "requestId": "ebd4dce6-98e5-4d5b-bb9b-71539a6c5976",
  "spec": {
    "gateways": [
      "default.istio-system.svc.cluster.local"
    ],
    "hosts": [
      "app-qjcrx-default.10.110.25.114.xip.io"
    ],
    "http": [
      {
        "route": [
          {
            "destination": {
              "port": {
                "number": 10396
              },
              "host": "app-qjcrx-default-svc.default.svc.cluster.local",
              "subset": "rollingupdate"
            }
          }
        ],
        "match": [
          {
            "uri": {
              "prefix": "/"
            }
          }
        ]
      }
    ]
  }
}

错误码

以下为本接口特有的错误码。

错误代码 错误信息 Http状态码
201.018009 微服务不存在 404
201.018010 获取VirtualService失败,请确认集群信息 500
201.018005 获取VirtualService失败,数据转换错误 500

获取token

获取token。

URL

https:// + 请求域名 + /getToken

请求参数

名称 是否必须 描述
UserName 用户名
Password 密码

返回参数

名称 位置 类型 是否必须 描述
message body String 执行结果信息 有效值:成功 或 失败。
code body Integer 出现错误时,返回的错误码。
data body String 结果

示例

  • Sample Request(请求):
GET https://ice.cn-north-3.inspurcloudapi.com/getToken?UserName=test&Password=123456&Timestamp=1645786445&Nonce=23645212&Version=2019-01-31
  • Sample Response(响应):

  • xml格式

<GetTokenResponse>
  <RequestId>089a6afb-363c-4ff2-bcb5-7845a0dde522</RequestId>
  <Code>200</Code>
  <Data>eyJhbGciOiJS……amw</Data>
</GetTokenResponse>
  • json格式
{
  "code": "200",
  "data": "eyJhbGciOiJS……amw",
  "requestId": "6b391432-d613-456d-83c3-467036e427bc"
}

错误码

以下为本接口特有的错误码。

错误代码 错误信息 Http状态码
401 Invalid user credentials 401