ListServiceInstanceLogs

Updated at:

Queries the deployment, upgrade, and application logs of a service instance.

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

computenestsupplier:ListServiceInstanceLogs

list

*ServiceInstance

acs:computenestsupplier:{#regionId}:{#accountId}:serviceinstance/{#serviceinstanceId}

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 for paging during a paged query. Maximum value: 100. Default value: 20.

20

NextToken

string

No

The pagination token. Set the value to the NextToken value returned from the previous API call.

BBBAAfu+XtuBE55iRLHEYYuojI4=

ServiceInstanceId

string

Yes

The service instance ID.

si-70a3b15bb626435b****

LogSource

string

No

The log source. Valid values:

  • application: logs generated by the application.

  • computeNest: logs generated by Compute Nest.

  • ros: logs generated by Resource Orchestration Service (ROS).

computeNest

Logstore

string

No

The name of the Logstore in Simple Log Service.

livelog

Filter

array<object>

No

The filter.

object

No

The filter.

Name

string

No

The name of the filter condition. Valid values:

  • StartTime

  • EndTime

  • ApplicationGroupName

  • ResouceName

  • EventName

StartTime

Value

array

No

The value of the filter condition.

string

No

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

2022-01-01T22:22:22Z

SortOrder

string

No

The sort order. Valid values:

  • Ascending: ascending order

  • Descending: descending order

Default value: Descending.

Ascending

Response elements

Element

Type

Description

Example

object

NextToken

string

The pagination token for the next query.

AAAAAfu+XtuBE55iRLHEYYuojI4=

RequestId

string

The request ID.

51945B04-6AA6-410D-93BA-236E0248B104

MaxResults

integer

The number of entries returned per page for paging during a paged query. Maximum value: 100. Default value: 20.

20

ServiceInstancesLogs

array<object>

The service instance logs.

object

The service instance logs.

Timestamp

string

The timestamp of the service instance log.

2022-05-21T00:00:00Z

Source

string

The source of the service instance log. Valid values:

  • ros: logs generated by Resource Orchestration Service (ROS).

  • computeNest: logs generated by Compute Nest.

  • application: logs generated by the application in the instance.

  • compliancePack: logs generated by the compliance pack of the instance.

  • actionTrail: logs generated by ActionTrail.

computeNest

Content

string

The log content.

Start creating service instance

LogType

string

The log type. Valid values:

  • serviceInstance: logs generated at the service instance level.

  • resource: logs generated at the ROS resource level.

serviceInstance

ResourceType

string

The resource type.

ROS.Stack

ResourceId

string

The associated ID.

si-5c6525c0589545c3****

Status

string

The log status. Valid values:

  • Creating: creating

  • Created: created

  • Deploying: deploying

  • Deployed: deployed

  • DeployedFailed: deployment failed

  • Expired: expired

  • ExtendSuccess: renewal succeeded

  • Upgrading: upgrading

  • UpgradeSuccess: upgrade succeeded

Deployed

CompliancePackType

string

The risk type of the compliance pack. This parameter is returned when Source is set to compliancePack. Example: VpcDataRisk, which indicates a data security check in a VPC.

VpcDataRisk

ComplianceRuleName

string

The name of the specific risk rule in the compliance pack. This parameter is returned when Source is set to compliancePack. Example: vpc-ecs-move-out-vpc, which indicates an ECS instance migration out of a VPC.

vpc-ecs-move-out-vpc

Examples

Success response

JSON format

{
  "NextToken": "AAAAAfu+XtuBE55iRLHEYYuojI4=",
  "RequestId": "51945B04-6AA6-410D-93BA-236E0248B104",
  "MaxResults": 20,
  "ServiceInstancesLogs": [
    {
      "Timestamp": "2022-05-21T00:00:00Z",
      "Source": "computeNest",
      "Content": "Start creating service instance",
      "LogType": "serviceInstance",
      "ResourceType": "ROS.Stack",
      "ResourceId": "si-5c6525c0589545c3****",
      "Status": "Deployed",
      "CompliancePackType": "VpcDataRisk",
      "ComplianceRuleName": "vpc-ecs-move-out-vpc"
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.