UpdateServiceRollout

更新时间:
复制 MD 格式

Updates a service rollout.

Operation description

Usage notes

  • Provide at least one parameter: Specify at least one of the Partition, Batch, or Paused parameters.

  • Mutually exclusive strategies: You cannot specify both the Partition and Batch parameters in the same request.

  • Immediate effect: Updates take effect immediately and affect ongoing service rollouts.

  • Rollback: You can perform a rollback by increasing the Partition value. However, this is not an automatic process, and you must manually update the service image.

  • Pause does not affect parameters: Pausing a rollout does not change the configured Partition or Batch parameters. It only suspends the current rollout strategy.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

PUT /api/v2/services/{ClusterId}/{ServiceName}/rollout HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

ClusterId

string

Yes

The region ID where the service is located.

  • Type: string

  • Required: Yes

  • Description: The ID of the region where the service is located.

  • Example: cn-shanghai

cn-shanghai

ServiceName

string

Yes

The name of the service.

  • Type: string

  • Required: Yes

  • Description: The name of the service for which to update the release policy.

  • Example: my-service

my-service

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The request body.

Partition

object

No

The partition rollout configuration. This parameter is mutually exclusive with Batch.

  • Type: object

  • Required: No

  • Description: The partition rollout configuration. This parameter adjusts the parameters for the partition strategy. It is mutually exclusive with Batch.

Partition

string

No

Partition value

  • Type: string

  • Required: Yes

  • Description: The partition value. This parameter specifies the number or percentage of old-version replicas to retain. It supports two formats:
    1. An integer, such as "5", for the number of replicas.

    2. A percentage, such as "50%", for the proportion of replicas.

    Adjustment strategy:
    • Increasing the value rolls back to the previous version by increasing the number of old-version replicas.

    • Decreasing the value continues the rollout by reducing the number of old-version replicas.

    • Setting the value to "0" or "0%" completes the rollout, replacing all old-version replicas.

  • Example: 30%

30%

Batch

object

No

The batch rollout configuration. This parameter is mutually exclusive with Partition.

  • Type: object

  • Required: No

  • Description: The batch rollout configuration for adjusting batch policy parameters. This parameter is mutually exclusive with Partition.

BatchSize

string

No

The number of replicas to update in each batch. This can be an integer or a percentage. The default is "25%".

25%

Interval

string

No

The interval to wait between batches. Supported units include s (seconds), m (minutes), and h (hours).

60s

Paused

boolean

No

Set to true to pause the rollout or false to resume it.

true

Response elements

Element

Type

Description

Example

object

The response body.

RequestId

string

A unique identifier for the request. You can use this request ID for troubleshooting and tracking.

40325405-579C-4D82****

Message

string

A message that indicates the result of the request. Possible values include:

  • "Rollout updated successfully"

  • "Rollout paused successfully"

  • "Rollout resumed successfully"

Rollout updated successfully

Examples

Success response

JSON format

{
  "RequestId": "40325405-579C-4D82****",
  "Message": "Rollout updated successfully"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.