Halaman ini belum tersedia dalam bahasa lokal Anda. Kami berusaha keras untuk menambahkan lebih banyak versi bahasa. Terima kasih atas dukungan Anda.

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

Modifying a Component Instance

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

Function

This API is used to modify a component instance.

URI

PUT /v2/{project_id}/cas/applications/{application_id}/components/{component_id}/instances/{instance_id}

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.

component_id

Yes

String

Component ID. See Obtaining All Components of an Application.

instance_id

Yes

String

Component instance ID. See Obtaining All Component Instances.

Request

Table 2 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.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

version

Yes

String

Application component version that meets version semantics. Example: 1.0.1.

flavor_id

No

String

Resource specifications, which can be obtained by using the API in Obtaining All Supported Flavors of Application Resources.

If you need to customize resource specifications, the format is CUSTOM-xxG:xxm-xxm:xxGi-xxGi. Where:

  • xxG: storage capacity allocated to a component instance. It is a reserved field. You can set it to a fixed number.
  • xxm-xxm: the maximum and minimum number of CPU cores allocated to a component instance.
  • xxGi-xxGi: the maximum and minimum memory allocated to a component instance.

For example, CUSTOM-10G:0.5m-0.25m:1.6Gi-0.8Gi indicates that the maximum number of CPU cores allocated to a component instance is 0.5, the minimum number of CPU cores is 0.25, the maximum memory is 1.6 Gi, and the minimum memory is 0.8 Gi.

artifacts

No

Map<String, Object>

Artifact. key indicates the component name. In the Docker container scenario, key indicates the container name. See Table 4.

configuration

No

Object

Configuration parameters, such as environment variables, deployment configurations, and O&M monitoring. By default, this parameter is left blank. See Table 4 in Creating an Application Component Instance.

description

No

String

Description.

The value can contain up to 128 characters.

external_accesses

No

Array of objects

Access mode. See Table 5.

refer_resources

No

Array of objects

Deployed resources. See Table 6.

Table 4 artifact

Parameter

Mandatory

Type

Description

storage

Yes

String

Storage mode. Value: swr (software repository), swr (image), obs, or codearts.

type

Yes

String

Type.

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

url

Yes

String

Software package or image address. For a component deployed on a VM, this parameter is the software package address. For a component deployed based on a container, this parameter is the image address or component name:v${index}. The latter indicates that the component source code or the image automatically built using the software package will be used.

auth

Yes

String

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

version

No

String

Version number.

properties

No

Map<String,String>

Property information.

Table 5 external_accesses

Parameter

Mandatory

Type

Description

id

No

String

Access type ID.

protocol

Yes

String

Protocol. Value: http or https.

address

Yes

String

Access address. Example: www.example.com.

forward_port

Yes

Integer

Port for listening to an application component process.

type

No

String

Type.

status

No

String

Status.

create_time

No

Integer

Creation time.

update_time

No

Integer

Update time.

Table 6 refer_resources

Parameter

Mandatory

Type

Description

id

Yes

String

Resource ID.

type

Yes

String

Resource type. Example: rds or dcs.

refer_alias

No

String

Application alias. This parameter is available only when type is set to dcs. Value: "distributed_session", "distributed_cache", or "distributed_session, distributed_cache" (default).

parameters

No

Map<String, Object>

Reference resource parameter.

Response

Table 7 Response parameter

Parameter

Type

Description

job_id

String

Job ID, which is used to query information about the created job.

Example Request

Modify the application component instance. Change the artifact to the test-micro image package in the SWR image repository swr.roma-dev-1.roma.development.com/ns1/examples:v2. Change the deployment resources to the CCE resource whose ID is 523498f1-36c4-11eb-ae36-0255ac1000c2 and the professional microservice engine cse.

{
	"description": "",
	"artifacts": {
		"test-micro": {
			"storage": "swr",
			"type": "image",
			"url": "swr.roma-dev-1.roma.development.com/ns1/examples:v2", 
			"auth": "iam",
			"version": "1.0.0",
			"properties": {}
		}
	},
	"refer_resources": [
		{
			"id": "523498f1-36c4-11eb-ae36-0255ac1000c2",
			"type": "cce",
			"parameters": {
				"namespace": "default"
			}
		},
		{
			"id": "default",
			"type": "cse"
		}
	],
	"version": "1.0.2"
}

Example Response

{
    "job_id": "JOB66761060-f209-407c-a093-4df6f531b9dc"
}

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.

Kami menggunakan cookie untuk meningkatkan kualitas situs kami dan pengalaman Anda. Dengan melanjutkan penelusuran di situs kami berarti Anda menerima kebijakan cookie kami. Cari tahu selengkapnya

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback