UpdateInstance

Updated at:

Updates the basic information and specification configurations of an ApsaraMQ for RocketMQ instance.

Operation description

Important The OpenAPI provided by Alibaba Cloud is a management and control API used to manage and query resources of Alibaba Cloud services. It is recommended only for integration in management and control paths. Do not use OpenAPI in the core data link for sending and receiving messages. Otherwise, risks may occur on the link.

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

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

rocketmq:UpdateInstance

update

*Instance

acs:rocketmq:{#regionId}:{#accountId}:instance/{#InstanceId}

None None

Request syntax

PATCH /instances/{instanceId} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

instanceId

string

Yes

The ID of the instance to be updated.

rmq-cn-7e22ody****

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The request body structure.

instanceName

string

No

The updated instance name.

test_instance

remark

string

No

The updated remarks for the instance.

This is the remark for test.

networkInfo

object

No

The updated network information of the instance.

internetInfo

object

No

The public network information. This parameter is valid only when the public network access feature is enabled for the instance.

ipWhitelist

array

No

The public network access IP whitelist.

  • If no IP whitelist is configured, all IP address ranges are allowed to access the ApsaraMQ for RocketMQ server over the public network by default.

  • If an IP whitelist is configured, only the IP addresses in the whitelist are allowed to access the ApsaraMQ for RocketMQ server over the public network.

string

No

The public network access IP whitelist.

192.168.x.x/24

productInfo

object

No

The extension configurations of the instance.

sendReceiveRatio

number

No

The ratio of messages sent to messages accepted.

Valid values: [0.25, 1]

0.5

autoScaling

boolean

No

Specifies whether to enable the burstable elastic capacity beyond the specification.

After the burstable elastic capacity is enabled, ApsaraMQ for RocketMQ allows the instance to exceed the TPS limit of the base specification within a certain range. The portion that exceeds the base specification incurs additional elastic specification fees. For more information about billing, see Computing fee.

Note

Only instances of specific specifications support the burstable elastic specification capability. For more information about supported instances, see Instance specifications.

Valid values:

  • true :

    Enable elastic scaling.

  • false :

    Shutdown elastic scaling.

true

messageRetentionTime

integer

No

The message retention period. Unit: hours.

For the valid values, see Limits > Resource Quotas > Message retention period limit.

The log broker in ApsaraMQ for RocketMQ is fully serverless and elastic. Fees are charged based on the actual storage space used. You can control the storage capacity of messages by adjusting the message retention period. For more information, see Storage fee.

72

traceOn

boolean

No

Specifies whether to enable the message trace feature.

This parameter takes effect only for Serverless instances. If the message trace feature is enabled, message trace fees are incurred. For more information about billing, see Serverless billing. For pay-as-you-go and subscription instances, this parameter does not take effect. The message trace feature is supported by default regardless of whether this parameter is enabled.

Valid values:

  • false :

    Shutdown the message trace feature.

  • true :

    Enable the message trace feature.

true

adaptiveElasticity

boolean

No

Specifies whether to enable the adaptive elasticity capability. A value of true indicates enabled, and a value of false indicates shutdown.

aclInfo

object

No

The access control information.

aclTypes

array

No

The authentication type of the instance.

string

No

The authentication type of the instance.

Valid values:

  • default :

    Intelligent identity recognition.

  • apache_acl :

    Apache RocketMQ ACL

apache_acl

defaultVpcAuthFree

boolean

No

Indicates whether password-free access is enabled for VPC connections under the intelligent identity recognition type.

Valid values:

  • true :

    Enable password-free access.

  • false :

    Shutdown password-free access.

false

Response elements

Element

Type

Description

Example

object

Result

requestId

string

The request ID. Each request ID is unique and active for troubleshooting and locating issues.

AA87DE09-DA44-52F4-9515-78B1B607****

success

boolean

Indicates whether the operation is executed successfully.

true

data

boolean

The returned result.

true

code

string

The fault code.

MissingInstanceId

message

string

The fault message.

Parameter instanceId is mandatory for this action .

httpStatusCode

integer

The HTTP status code.

400

dynamicCode

string

The dynamic fault code.

InstanceId

dynamicMessage

string

The dynamic fault message.

instanceId

Examples

Success response

JSON format

{
  "requestId": "AA87DE09-DA44-52F4-9515-78B1B607****",
  "success": true,
  "data": true,
  "code": "MissingInstanceId",
  "message": "Parameter instanceId is mandatory for this action .",
  "httpStatusCode": 400,
  "dynamicCode": "InstanceId",
  "dynamicMessage": "instanceId"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.