All Products
Search
Document Center

OpenSearch:ReplaceAppGroupCommodityCode

Last Updated:Oct 16, 2024

Converts a service-based application to an instance-based application.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
opensearch:UpdateAppnone
  • AppGroup
    acs:opensearch:{#regionId}:{#accountId}:apps/{#appGroupIdentity}
    none
none

Request syntax

POST /v4/openapi/app-groups/{appGroupIdentity}/actions/to-instance-typed HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
appGroupIdentitystringYes

The name of the application

my_app

Response parameters

ParameterTypeDescriptionExample
object

The response body.

requestIdstring

The request ID.

AC5F78BA-66B9-545B-9CF1-8F542E682E1F
resultobject

The returned result.

createdinteger

The timestamp when the application was created.

1588054131
currentVersionstring

The ID of the current online version.

100302903
pendingSecondRankAlgoDeploymentIdinteger

The ID of the fine sort expression that is being created.

0
typestring

The type of the application.

-
chargingWayinteger

The billing type. Valid values:

  • 1: computing resources.
  • 2: queries per second (QPS).
1
lockModestring

The lock state. Valid values:

  • Unlock: The instance is unlocked.
  • LockByExpiration: The instance is automatically locked after it expires.
  • ManualLock: The instance is manually locked.
Unlock
statusstring

The status of the application.

normal
updatedinteger

The timestamp when the application was updated.

1581065904
chargeTypestring

The billing method. Valid values:

  • POSTPAY: pay-as-you-go.
  • PREPAY: subscription.
POSTPAY
idstring

The application ID.

-
hasPendingQuotaReviewTaskinteger

The approval state of the quotas. Valid values:

  • 0: The approval status is normal.
  • 1: The quotas are being approved.
0
projectIdstring

The name of the A/B test group.

-
secondRankAlgoDeploymentIdinteger

The ID of the fine sort expression.

0
commodityCodestring

The code of the commodity.

opensearch
switchedTimeinteger

The timestamp when the current online version was published.

1590486386
expireOnstring

The expiration time.

-
descriptionstring

The description of the application.

""
firstRankAlgoDeploymentIdinteger

The ID of the rough sort expression.

0
lockedByExpirationinteger

Indicates whether the instance is automatically locked after it expires. Valid values:

  • 0: The instance is not automatically locked after it expires.
  • 1: The instance is automatically locked after it expires.
0
producedinteger

Indicates whether the order is produced.

0
namestring

The name of the order.

-
processingOrderIdstring

The ID of the order that is in progress.

-
instanceIdstring

The instance ID.

-
versionsarray

The versions.

versionsstring

The version.

-
quotaobject

The configuration information.

specstring

The specifications configured.

-
docSizeinteger

The storage capacity.

1
computeResourceinteger

The number of computing resources configured.

20

Examples

Sample success responses

JSONformat

{
  "requestId": "AC5F78BA-66B9-545B-9CF1-8F542E682E1F",
  "result": {
    "created": 1588054131,
    "currentVersion": "100302903",
    "pendingSecondRankAlgoDeploymentId": 0,
    "type": "-",
    "chargingWay": 1,
    "lockMode": "Unlock",
    "status": "normal",
    "updated": 1581065904,
    "chargeType": "POSTPAY",
    "id": "-",
    "hasPendingQuotaReviewTask": 0,
    "projectId": "-",
    "secondRankAlgoDeploymentId": 0,
    "commodityCode": "opensearch",
    "switchedTime": 1590486386,
    "expireOn": "-",
    "description": "\"\"",
    "firstRankAlgoDeploymentId": 0,
    "lockedByExpiration": 0,
    "produced": 0,
    "name": "-",
    "processingOrderId": "-",
    "instanceId": "-",
    "versions": [
      "-"
    ],
    "quota": {
      "spec": "-",
      "docSize": 1,
      "computeResource": 20
    }
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history