All Products
Search
Document Center

OpenSearch:CreateAppGroup

Last Updated:Oct 16, 2024

Creates an OpenSearch 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:CreateAppGroupcreate
  • AppGroup
    acs:opensearch:{#regionId}:{#accountId}:app-groups/*
    none
none

Request syntax

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

Request parameters

ParameterTypeRequiredDescriptionExample
bodyobjectNo

The request body.

namestringNo

The name of the application.

jmbon_analyzer
chargeTypestringNo

The billing method. Valid values:

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

The type of the application. Valid values:

  • standard: a standard edition application.
  • enhanced
enhanced
resourceGroupIdstringNo

The ID of the resource group to which the instance belongs.

rg-acfm2ij6pwxsvua
quotaobjectNo

The quota.

docSizeintegerNo

The storage capacity. Unit: GB.

1
computeResourceintegerNo

The computing resources. Unit: logical computing unit (LCU).

20
specstringNo

The specifications. 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.
opensearch.share.common

Request body

ParameterTypeRequiredExampleDescription
nameStringYes"my_app"The name of the application.
typeStringYes"standard"The type of the application.Valid values: standardand enhanced.
quotaObjectYesThe quota information about the application.For more information, see Quota .
chargeTypeStringNo"POSTPAY"The billing method.Valid values: POSTPAYand PREPAY.
orderObjectNo{"duration": 1,"pricingCycle": "Year"}The information about the subscription period.
order.durationInteger--1The subscription duration.The minimum value is no less than 0.
order.pricingCycleString--"Year"The unit of the subscription duration.YearMonth.
order.autoRenewBooleanNotrueSpecifies whether to enable auto-renewal. This parameter takes effect only when the chargeType parameter is set to PREPAY. Valid values:true.false (the default value).

Response parameters

ParameterTypeDescriptionExample
object

The rsponse body.

requestIdstring

The request ID.

766CF6DB-CA02-3E12-7CBA-6AC21FC978FD
resultobject

None

createdinteger

The timestamp when the application was created.

1590139542
currentVersionstring

The ID of the current online version.

100302903
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
updatedinteger

The timestamp when the application was last modified.

1590978265
idstring

The application ID.

100302881
chargeTypestring

The billing method. Valid values:

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

The approval state of the quotas. Valid values:

  • 0: The application is in service.
  • 1: The quotas are being reviewed.
0
namestring

The name of the application.

lsh_test_1
instanceIdstring

The ID of the instance.

-
chargingWayinteger

The type of billing. Valid values:

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

The type of the application. Valid values:

  • standard: a standard edition application.
  • advance: an advanced edition which is of an old version. New version is not supported for this edition.
  • enhanced: an advanced edition application of a new version.
enhanced
statusstring

The status of the application. Valid values:

  • producing: The application is being created.
  • review_pending: The application is being reviewed.
  • config_pending: The application is to be configured.
  • normal: The application is in service.
  • frozen: The application is frozen.
normal
projectIdstring

The name of the A/B test group.

-
switchedTimeinteger

The timestamp when the current online version was published.

1590486386
commodityCodestring

The commodity code.

opensearch
expireOnstring

The expiration time.

-
domainstring

The type of the industry. Valid values:

  • GENERAL
  • ECOMMERCE
  • IT_CONTENT
GENERAL
descriptionstring

The description of the application.

-
producedinteger

Indicates whether the application is created. Valid values:

  • 0: The application is being created.
  • 1: The application is created.
1
quotaobject

The information about the quotas of the application.

specstring

The specifications. 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.
opensearch.share.common
docSizeinteger

The storage capacity. Unit: GB.

1
computeResourceinteger

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

20
engineTypestring

The engine type.

ha3

Examples

Sample success responses

JSONformat

{
  "requestId": "766CF6DB-CA02-3E12-7CBA-6AC21FC978FD",
  "result": {
    "created": 1590139542,
    "currentVersion": "100302903",
    "lockMode": "Unlock",
    "updated": 1590978265,
    "id": "100302881",
    "chargeType": "POSTPAY",
    "hasPendingQuotaReviewTask": 0,
    "name": "lsh_test_1",
    "instanceId": "-",
    "chargingWay": 1,
    "type": "enhanced",
    "status": "normal",
    "projectId": "-",
    "switchedTime": 1590486386,
    "commodityCode": "opensearch",
    "expireOn": "-",
    "domain": "GENERAL",
    "description": "-",
    "produced": 1,
    "quota": {
      "spec": "opensearch.share.common",
      "docSize": 1,
      "computeResource": 20
    },
    "engineType": "ha3"
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-09-03The internal configuration of the API is changed, but the call is not affectedView Change Details
2024-08-08The internal configuration of the API is changed, but the call is not affectedView Change Details
2024-08-08The internal configuration of the API is changed, but the call is not affectedView Change Details
2024-07-16The response structure of the API has changedView Change Details
2023-05-30The request parameters of the API has changedView Change Details