Creates an OpenSearch application.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

This operation uses only common request headers. For more information, see Common request parameters.

Request syntax

POST /v4/openapi/app-groups HTTP/1.1

Request parameters

Request body

Parameter

Type

Required

Example

Description

name

String

Yes

"my_app"

The name of the application.

type

String

Yes

"standard"

The type of the application. Valid values:

  • standard: a standard application
  • enhanced: an advanced application

quota

Object

Yes

The information about the quotas of the application.

For more information, see Quota.

chargeType

String

No

"POSTPAY"

The billing method of the application. Valid values:

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

order

Object

No

{"duration": 1,"pricingCycle": "Year"}

The information about the subscription period.

order.duration

Integer

N/A

1

The subscription period.

The value must be greater than or equal to 0.

order.pricingCycle

String

N/A

"Year"

The unit of the subscription period. Valid values:

  • Year
  • Month

order.autoRenew

Boolean

No

true

Specifies whether to enable auto-renewal. This parameter takes effect only when the chargeType parameter is set to PREPAY. Valid values:

  • true: yes.
  • false: no. This is the default value.

Response parameters

Parameter Type Example Description
requestId String 766CF6DB-CA02-3E12-7CBA-6AC21FC978FD

The ID of the request.

result Struct

N/A

chargeType String POSTPAY

The billing method of the application. Valid values:

  • POSTPAY: pay-as-you-go
  • PREPAY: subscription
chargingWay Integer 1

The billing model. Valid values:

  • 1: computing resources
  • 2: queries per second (QPS)
commodityCode String opensearch

The code of the commodity.

created Integer 1590139542

The timestamp when the application was created.

currentVersion String 100302903

The ID of the current online version.

description String N/A

The description of the application.

expireOn String N/A

The expiration time.

firstRankAlgoDeploymentId Integer 0

The ID of the created rough sort expression.

hasPendingQuotaReviewTask Integer 0

The approval status of the quotas. Valid values:

  • 0: The quotas are approved.
  • 1: The quotas are being approved.
id String 100302881

The ID of the application.

instanceId String N/A

The ID of the instance.

lockMode String Unlock

The lock mode of the instance. Valid values:

  • Unlock: The instance is not locked.
  • LockByExpiration: The instance is automatically locked after it expires.
  • ManualLock: The instance is manually locked.
lockedByExpiration Integer 0

Indicates whether the instance is automatically locked after it expires.

name String lsh_test_1

The name of the application.

pendingSecondRankAlgoDeploymentId Integer 0

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

processingOrderId String N/A

The ID of the order that is not complete for the instance. For example, an order is one that is initiated to create the instance or change the quotas or billing method.

produced Integer 1

Indicates whether the order is complete. Valid values:

  • 0: The order is in progress.
  • 1: The order is complete.
projectId String -

The name of the A/B test group.

quota Struct

The information about the quotas of the application.

computeResource Integer 20

The computing resources. Unit: logical computing units (LCUs).

docSize Integer 1

The storage capacity. Unit: GB.

spec String opensearch.share.common

The specifications of the application. Valid values:

  • opensearch.share.junior: basic
  • opensearch.share.common: shared general-purpose
  • opensearch.share.compute: shared computing
  • opensearch.share.storage: shared storage
  • opensearch.private.common: exclusive general-purpose
  • opensearch.private.compute: exclusive computing
  • opensearch.private.storage: exclusive storage
secondRankAlgoDeploymentId Integer 0

The ID of the created fine sort expression.

status String normal

The status of the application. Valid values:

  • producing
  • review_pending
  • config_pending
  • normal
  • frozen
switchedTime Integer 1590486386

The timestamp when the current online version was published.

type String enhanced

The type of the application. Valid values:

  • standard: a standard application.
  • advance: an advanced application which is of an old application type. New applications cannot be of this type.
  • enhanced: an advanced application which is of a new application type.
updated Integer 1590978265

The timestamp when the application was last updated.

Examples

Sample requests

POST /v4/openapi/app-groups 

{
    "name": "foo",
    "type": "standard",
    "chargeType": "PREPAY",
    "quota": {
        "docSize": 1,
        "computeResource": 20,
        "spec": "opensearch.share.common"
    },
    "order": {
        "duration": 1,
        "pricingCycle": "Year"
    }
}

Sample success responses

XML format

<requestId>766CF6DB-CA02-3E12-7CBA-6AC21FC978FD</requestId>

JSON format

{
    "requestId": "766CF6DB-CA02-3E12-7CBA-6AC21FC978FD",
    "result": []
}

Error codes

For a list of error codes, visit the API Error Center.