หน้านี้ยังไม่พร้อมใช้งานในภาษาท้องถิ่นของคุณ เรากำลังพยายามอย่างหนักเพื่อเพิ่มเวอร์ชันภาษาอื่น ๆ เพิ่มเติม ขอบคุณสำหรับการสนับสนุนเสมอมา

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ ServiceStage/ API Reference/ Application Management V3 APIs/ Component/ Obtaining All Components of an Application

Obtaining All Components of an Application

Updated on 2024-10-16 GMT+08:00

Function

This API is used to obtain all components of an application.

URI

GET /v3/{project_id}/cas/applications/{application_id}/components

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Tenant's project ID. See Obtaining a Project ID.

application_id

Yes

String

Application ID. See Obtaining All Applications.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

limit

No

integer

Number of records to be queried. Value range: 0–100.

offset

No

integer

Query offset, which indicates the result after the Nth data record is queried.

order_by

No

String

Sorting field.

Numerated values:

  • create_time (default)
  • name
  • update_time

If the transferred value is not within the supported enumerated value range, the default sorting field is used.

order

No

String

Sorting order.

  • desc (default)
  • asc

Request

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Message body type (format). Default value: application/json;charset=utf8.

X-Auth-Token

Yes

String

API calling can be authenticated using a token or AK/SK. If you use a token, this parameter is mandatory and must be set to the token. For details about how to obtain a token, see Obtaining a User Token.

Response

Table 4 Response parameters

Parameter

Type

Description

count

Integer

Total number of components.

components

Array of objects

Component parameters. See Table 5.

Table 5 components

Parameter

Type

Description

id

String

Component ID.

name

String

Component name.

labels

Array of objects

Label. For container-deployed components, you can query a workload by label. For VM-deployed components, you can configure a label of the corresponding microservice name to use graceful startup and shutdown. See Table 10.

status

Object

Component status. See Table 8.

runtime_stack

Object

Technology stack. See Table 7.

application_name

String

Application name.

application_id

String

Application ID.

environment_name

String

Environment name.

environment_id

String

Environment ID.

version

String

Component version.

source

Object

Source of the code or software package. See Table 6.

creator

String

Component creator.

platform_type

String

Component deployment type.

external_accesses

Array of objects

External access. See Table 11.

Table 6 source

Parameter

Type

Description

kind

String

Component source kind.

  • code
  • package
  • image

version

String

Version number.

url

String

Package address. This parameter is mandatory when kind is set to package or image.

storage

String

Storage mode. Value: swr (image), swr(software repository), codearts, or obs. This parameter is mandatory when kind is set to package or image.

auth

String

Authentication mode. Value: iam or none. Default value: iam.

repo_auth

String

Authorization name, which can be obtained from the authorization list.

repo_namespace

String

Namespace of the code repository.

repo_ref

String

Code branch or tag. Default value: master.

repo_type

String

Code repository type. Value: GitHub, BitBucket, or GitLab.

web_url

String

Code redirection URL. Example: https://github.com/example/demo.git.

repo_url

String

Code repository URL. Example: https://github.com/example/demo.git.

Table 7 runtime_stack

Parameter

Type

Description

name

String

Technology stack name. Example: OpenJDK8.

type

String

Technology stack type. Value: Java, Tomcat, Nodejs, Php, Docker, or Python.

When deploy_mode is set to virtualmachine, only Java, Tomcat, and Node.js are supported. When deploy_mode is set to container, all of the preceding types are supported.

version

String

Technology stack version. Example: 1.1.4.

deploy_mode

String

Deployment mode.

  • container
  • virtualmachine
Table 8 status

Parameter

Type

Description

component_status

String

Component status.

  • INITIALIZING
  • UPGRADING
  • FAILED
  • RUNNING
  • DOWN
  • DELETING
  • DELETED
  • RESERVED
  • STARTING
  • STOPPING
  • STOPPED
  • RESTARTING
  • PENDING
  • UNKNOWN
  • PARTIALLY_FAILED

available_replica

Integer

Available instances.

replica

Integer

Total instances.

fail_detail

String

Failure cause.

  • cluster_deleted
  • cluster_unavailable
  • cluster_inaccessible
  • namespace_deleted
  • namespace_unavailable
  • namespace_inaccessible
  • resource_deleted
  • create_failed
  • delete_failed

last_job_id

String

ID of the last executed job.

create_time

Integer

Creation time.

update_time

Integer

Update time.

creator

String

Creator.

artifact

Object

Artifact information. See Table 9.

Table 9 artifact

Parameter

Type

Description

type

String

Component source type.

  • VM-based deployment supports package.
  • Container-based deployment supports package and image.

url

String

Software package or image address.

Table 10 labels

Parameter

Type

Description

key

String

Label name.

value

String

Label value.

Table 11 external_accesses

Parameter

Type

Description

protocol

String

External access type. Value: http or https.

address

String

External access address.

forward_port

Integer

External access port.

Example Request

None

Example Response

{
    "components": [
        {
            "source": {
                "kind": "package",
                "url": "obs://bucket0001/weather-1.0.0.jar",
                "storage": "obs"
            },
            "name": "mycomponent",
            "id": "b8702b0f-94d3-4822-98a1-56815632a0a0",
            "labels": null,
            "runtime_stack": {
                "name": "OpenJDK8",
                "deploy_mode": "virtualmachine",
                "version": "1.1.1"
            },
            "external_accesses": null,
            "status": {
                "component_status": "RUNNING",
                "available_replica": 1,
                "replica": 1,
                "fail_detail": null,
                "last_job_id": "JOB8be53b2a-af9a-4e2b-8505-096688a52237",
                "creator": "ss-test",
                "create_time": 1679556221028,
                "update_time": 1679556318779
            },
            "environment_name": "sudo",
            "environment_id": "4d084044-0b80-4641-963c-b9c9f4092a4f",
            "application_name": "app-39mbbn",
            "application_id": "fc092465-a5fb-4a52-bc65-b735f18366d8",
            "creator": "ss-test",
            "platform_type": "cce",
            "version": "2023.0323.15181"
        }
    ],
    "count": 1
}

Status Code

Status Code

Description

200

OK

400

Bad Request

404

Not Found

500

Internal Server Error

Error Code

The error code format is SVCSTG.00100.[Error_ID], for example, SVCSTG.00100400. For details, see ServiceStage Error Codes.

เราใช้คุกกี้เพื่อปรับปรุงไซต์และประสบการณ์การใช้ของคุณ การเรียกดูเว็บไซต์ของเราต่อแสดงว่าคุณยอมรับนโยบายคุกกี้ของเรา เรียนรู้เพิ่มเติม

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback