ListServiceInstances

Updated at:

Queries all service instances in a specified region for the current account based on parameters such as the region ID and resource ID.

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

computenest:ListServiceInstances

list

*ServiceInstance

acs:computenest:{#regionId}:{#accountId}:serviceinstance/*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID.

cn-hangzhou

MaxResults

integer

No

The number of entries to return per page during paging. For a paged query, the maximum value is 100. Default value: 20.

20

NextToken

string

No

The pagination token. The value is the NextToken parameter value returned from the previous API call.

BBBAAfu+XtuBE55iRLHEYYuojI4=

Filter

array<object>

No

The filter.

object

No

The filter.

Value

array

No

The list of filter values.

string

No

The filter values. Valid values of N: 1 to 10.

value1

Name

string

No

The filter name. You can specify one or more names for the query. Valid values:

  • Name: queries by service name. For fuzzy search, enter the value in the *xxx* format. For example, if the service name is My Service, you can enter *My* or *Service* for a fuzzy search.

  • ServiceInstanceName: queries by service instance name. A fuzzy query is performed if one service instance name is entered. An exact query is performed if multiple service instance names are entered.

  • ServiceInstanceId: the service instance ID.

  • ServiceId: the service ID.

  • Version: the service version.

  • Status: the service instance status.

  • DeployType: the deployment type.

  • ServiceType: the service type.

  • OperationStartTimeBefore: before Alibaba Cloud Managed Services starts.

  • OperationStartTimeAfter: after Alibaba Cloud Managed Services starts.

  • OperationEndTimeBefore: before Alibaba Cloud Managed Services ends.

  • OperationEndTimeAfter: after Alibaba Cloud Managed Services ends.

  • OperatedServiceInstanceId: the instance ID of Alibaba Cloud Managed Services under a private service.

  • OperationServiceInstanceId: the instance ID of the service under pure Alibaba Cloud Managed Services.

  • EnableInstanceOps: specifies whether the Alibaba Cloud Managed Services feature is enabled for the service instance.

ServiceInstanceId

Tag

array<object>

No

The custom tags.

object

No

The custom tags.

Key

string

No

The tag key.

key1

Value

string

No

The tag value.

value1

ResourceGroupId

string

No

The resource group ID.

rg-bp67acfmxazb4p****

Response elements

Element

Type

Description

Example

object

NextToken

string

The pagination token for the next query.

AAAAAfu+XtuBE55iRLHEYYuojI4=

RequestId

string

The request ID.

E50287CB-AABF-4877-92C0-289B339A1546

TotalCount

integer

The total number of results.

100

MaxResults

integer

The number of entries to return per page during paging. For a paged query, the maximum value is 100. Default value: 20.

20

ServiceInstances

array<object>

The service instance information.

array<object>

The service instance information.

Name

string

The service instance name.

TestName

Status

string

The service instance status. Valid values:

  • Created: The instance is created.

  • Deploying: The instance is being deployed.

  • DeployedFailed: The instance failed to be deployed.

  • Deployed: The instance is deployed.

  • Upgrading: The instance is being upgraded.

  • Deleting: The instance is being deleted.

  • Deleted: The instance is deleted.

  • DeletedFailed: The instance failed to be deleted.

Deployed

Outputs

string

The output information of the service instance.

{"managementUrl": "http://xx.xx"}

UpdateTime

string

The update time.

2021-05-20T00:00:00Z

Parameters

string

The parameter information of the service instance.

{"param":"value"}

ServiceInstanceId

string

The service instance ID.

si-d6ab3a63ccbb4b17****

CreateTime

string

The creation time.

2021-05-20T00:00:00Z

StatusDetail

string

The deployment information description of the service instance.

deploy successfully

Progress

integer

The deployment progress of the service instance. Unit: %.

90

Resources

string

The list of resources.

[{"StackId": "stack-xxx"}]

TemplateName

string

The template name.

Template 1

OperatedServiceInstanceId

string

The instance ID of the service managed by Alibaba Cloud Managed Services.

si-d6ab3a63ccbb4b17****

Service

object

The service.

Status

string

The service status.

Online

PublishTime

string

The publish time.

2021-05-21T00:00:00Z

Version

string

The service version.

1.0

DeployType

string

The deployment type. Valid values:

  • ros: deployed by using ROS.

  • terraform: deployed by using Terraform.

  • ack: deployed by using ACK.

  • spi: deployed by using the invoke method of SPI.

  • operation: deployed by Alibaba Cloud Managed Services.

ros

ServiceId

string

The service ID.

service-0e6fca6a51a54420****

SupplierUrl

string

The URL of the service provider.

http://example.com

ServiceType

string

The service type. Valid values:

  • private: deployment in the user account.

  • managed: deployment hosted in the service provider account.

  • operation: Alibaba Cloud Managed Services.

private

SupplierName

string

The name of the service provider.

Company A Co., Ltd

ServiceInfos

array<object>

The service information.

object

The service information.

Locale

string

The language of the service instance.

zh-CN

Image

string

The URL of the service icon.

https://example.com/service-image/c1c4a559-cc60-4af1-b976-98f356602462.png

Name

string

The service name.

Database B

ShortDescription

string

The service overview.

Database B is an open source distributed relational database independently designed and developed by Company A

VersionName

string

The custom version name of the service provider.

Version A

Commodity

object

The commodity specifications.

SaasBoostMetadata

string

The SaaS Boost configuration metadata.

{ // Enable or disable SaaS Boost binding "Enabled":true/false, // Default value: false // Public access URL "PublicAccessUrl":"https://example.com" }

Type

string

The type. Valid values:

  • Marketplace: Alibaba Cloud Marketplace.

  • Css: Lingxiao.

  • SaasBoost: SaaS Boost.

Marketplace

OperationStartTime

string

The start time of the O&M service.

2021-12-29T06:48:56Z

OperationEndTime

string

The end time of the O&M service.

2022-01-28T06:48:56Z

EnableInstanceOps

boolean

Specifies whether the service instance has the O&M service feature. Valid values:

  • true: The service instance has the O&M service feature.

  • false: The service instance does not have the O&M service feature.

true

Tags

array<object>

The custom tags.

object

The custom tags.

Key

string

The tag key.

key1

Value

string

The tag value.

value1

Source

string

The creation source of the service instance.

Supplier

EndTime

string

The expiration time of the service instance.

2022-01-01T12:00:00

ServiceType

string

The service type. Valid values:

  • private: deployment in the user account.

  • managed: deployment hosted in the service provider account.

  • operation: Alibaba Cloud Managed Services.

  • poc: deployment of a trial service instance.

private

PayType

string

The billing method. Valid values:

  • Permanent: permanent purchase.

  • Subscription: subscription in Alibaba Cloud Marketplace.

  • PayAsYouGo: pay-as-you-go in Alibaba Cloud Marketplace.

  • CustomFixTime: custom fixed duration specified by the merchant.

Subscription

MarketInstanceId

string

The Alibaba Cloud Marketplace instance ID.

5827****

ResourceGroupId

string

The resource group ID.

rg-aekz6scpcxxxxxx

BizStatus

string

The business status of the service instance. Valid values:

  • Normal: normal.

  • Renewing: renewing.

  • RenewFoiled: renewal failed.

  • Expired: expired.

Normal

OrderId

string

The order ID.

2306175xxxxxxxx

SupportTrialToPrivate

boolean

Specifies whether upgrading from a trial to a formal version is supported.

PolicyNames

string

The Policy Name of the access policy used for authorization.

AliyunComputeNestPolicyForFullAccess

GrantedPermission

object

The granted O&M permission information.

OperationEndTime

string

The end time of the O&M authorization.

2022-01-28T06:48:56Z

PolicyNames

string

The Policy Name of the access policy used for authorization.

AliyunComputeNestPolicyForFullAccess

Examples

Success response

JSON format

{
  "NextToken": "AAAAAfu+XtuBE55iRLHEYYuojI4=",
  "RequestId": "E50287CB-AABF-4877-92C0-289B339A1546",
  "TotalCount": 100,
  "MaxResults": 20,
  "ServiceInstances": [
    {
      "Name": "TestName",
      "Status": "Deployed",
      "Outputs": "{\"managementUrl\": \"http://xx.xx\"}",
      "UpdateTime": "2021-05-20T00:00:00Z",
      "Parameters": "{\"param\":\"value\"}",
      "ServiceInstanceId": "si-d6ab3a63ccbb4b17****",
      "CreateTime": "2021-05-20T00:00:00Z",
      "StatusDetail": "deploy successfully",
      "Progress": 90,
      "Resources": "[{\"StackId\": \"stack-xxx\"}]",
      "TemplateName": "Template 1",
      "OperatedServiceInstanceId": "si-d6ab3a63ccbb4b17****",
      "Service": {
        "Status": "Online",
        "PublishTime": "2021-05-21T00:00:00Z",
        "Version": "1.0",
        "DeployType": "ros",
        "ServiceId": "service-0e6fca6a51a54420****",
        "SupplierUrl": "http://example.com",
        "ServiceType": "private",
        "SupplierName": "Company A Ltd.",
        "ServiceInfos": [
          {
            "Locale": "zh-CN",
            "Image": "https://example.com/service-image/c1c4a559-cc60-4af1-b976-98f356602462.png",
            "Name": "Database B",
            "ShortDescription": "B is an open-source distributed relational database independently designed and developed by Company A."
          }
        ],
        "VersionName": "Version A",
        "Commodity": {
          "SaasBoostMetadata": "{\n     //Enable/disable SaaS Boost binding\n    \"Enabled\":true/false,default is false\n    //Public access URL\n    \"PublicAccessUrl\":\"https://example.com\"\n}",
          "Type": "Marketplace"
        }
      },
      "OperationStartTime": "2021-12-29T06:48:56Z",
      "OperationEndTime": "2022-01-28T06:48:56Z",
      "EnableInstanceOps": true,
      "Tags": [
        {
          "Key": "key1",
          "Value": "value1"
        }
      ],
      "Source": "Supplier",
      "EndTime": "2022-01-01T12:00:00",
      "ServiceType": "private",
      "PayType": "Subscription",
      "MarketInstanceId": "5827****",
      "ResourceGroupId": "rg-aekz6scpcxxxxxx",
      "BizStatus": "Normal",
      "OrderId": "2306175xxxxxxxx",
      "SupportTrialToPrivate": false,
      "PolicyNames": "AliyunComputeNestPolicyForFullAccess",
      "GrantedPermission": {
        "OperationEndTime": "2022-01-28T06:48:56Z",
        "PolicyNames": "AliyunComputeNestPolicyForFullAccess"
      }
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.