ListInventorySynchronizationJobs

Updated at:

Queries resource synchronization tasks.

Operation description

You can use one of the following two methods to view the returned data:

  • Method 1: When querying the first page during paging in a paged query, you only need to apply the Settings for MaxResults to limit the number of returned entries. The NextToken value in the response is used as the token to query the next page. When querying subsequent pages, set the NextToken parameter to the NextToken value obtained from the previous response, and apply the Settings for MaxResults to limit the number of returned entries. If there are no more pages, NextToken is not returned. The maximum value of MaxResults is 100.

  • Method 2: Use the PageSize Settings to specify the number of entries returned per page during paging, and use the PageNumber Settings to specify the page number.

You can use only one of the two methods. Method 1 is recommended when a large number of entries are returned. If the Settings for MaxResults or NextToken are applied, the PageSize and PageNumber request parameters become invalid.

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

eiam:ListInventorySynchronizationJobs

list

*InventorySynchronizationJob

acs:eiam:{#regionId}:{#accountId}:instance/{#InstanceId}/inventorysynchronizationjob/*

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The ID of the IDaaS EIAM instance.

idaas_ue2jvisn35ea5lmthk267xxxxx

NextToken

string

No

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

NTxxxxxexample

MaxResults

integer

No

The number of entries to return per page during paging in a paged query. Default value: 20. Maximum value: 100.

20

InventorySourceIds

array

No

The IDs of the synchronization targets.

string

No

The IDs of the synchronization targets.

isrc_xxxxxxxxx

StartTime

integer

No

The start time. The value is a UNIX timestamp in seconds.

1234567890

EndTime

integer

No

The end time. The value is a UNIX timestamp in seconds.

1234567890

Status

string

No

The synchronization status.

success

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

0441BD79-92F3-53AA-8657-F8CE4A2B912A

TotalCount

integer

The total number of items.

100

NextToken

string

The pagination token returned by the current call for the next query.

NTxxxexample

InventorySynchronizationJobs

array<object>

The synchronization jobs.

array<object>

InventorySynchronizationJobId

string

The ID of the synchronization job.

sync_xxxxxxx

InventorySourceId

string

The IDs of the synchronization targets.

src_xxxxx

StartTime

integer

The start time of the synchronization. The value is a UNIX timestamp in seconds.

1761531256

EndTime

integer

The end time of the synchronization. The value is a UNIX timestamp in seconds.

1761533214

TriggerType

string

The trigger type of the synchronization.

Valid values:

  • auto :

    auto

  • manual :

    manual

manual

Status

string

The status of the synchronization job.

Valid values:

  • running :

    running

  • partial_success :

    partial_success

  • success :

    success

  • pending :

    pending

  • creating :

    creating

  • failed :

    failed

success

Description

string

The description of the synchronization job.

No Description

Result

object

The task result of the synchronization node.

AssetStatistics

object

The statistics on the asset synchronization results.

Created

object

The statistics on the creation results.

Total

integer

The total number of items.

5

Success

integer

The number of successful items.

3

Failed

integer

The number of failed items.

1

Skipped

integer

The number of skipped items.

1

Updated

object

The statistics on the update results.

Total

integer

The total number of items.

5

Success

integer

The number of successful items.

3

Failed

integer

The number of failed items.

1

Skipped

integer

The number of skipped items.

1

Deleted

object

The statistics on the deletion results.

Total

integer

The total number of items.

5

Success

integer

The number of successful items.

3

Failed

integer

The number of failed items.

1

Skipped

integer

The number of skipped items.

1

Same

object

The statistics on the unchanged results.

Total

integer

The total number of items.

5

Success

integer

The number of successful items.

3

Failed

integer

The number of failed items.

1

Skipped

integer

The number of skipped items.

1

AgentStatistics

object

The statistics on the agent synchronization results.

Created

object

The statistics on the creation results.

Total

integer

The total number of items.

5

Success

integer

The number of successful items.

3

Failed

integer

The number of failed items.

1

Skipped

integer

The number of skipped items.

1

Updated

object

The statistics on the update results.

Total

integer

The total number of items.

5

Success

integer

The number of successful items.

3

Failed

integer

The number of failed items.

1

Skipped

integer

The number of skipped items.

1

Deleted

object

The statistics on the deletion results.

Total

integer

The total number of items.

5

Success

integer

The number of successful items.

3

Failed

integer

The number of failed items.

1

Skipped

integer

The number of skipped items.

1

Same

object

The statistics on the unchanged results.

Total

integer

The total number of items.

5

Success

integer

The number of successful items.

3

Failed

integer

The number of failed items.

1

Skipped

integer

The number of skipped items.

1

ErrorMessage

string

The error message of the synchronization result.

No Error Message

ErrorCode

string

The error code of the synchronization result.

No ErrorCode

MaxResults

integer

The maximum number of returned results.

20

Examples

Success response

JSON format

{
  "RequestId": "0441BD79-92F3-53AA-8657-F8CE4A2B912A",
  "TotalCount": 100,
  "NextToken": "NTxxxexample",
  "InventorySynchronizationJobs": [
    {
      "InventorySynchronizationJobId": "sync_xxxxxxx",
      "InventorySourceId": "src_xxxxx",
      "StartTime": 1761531256,
      "EndTime": 1761533214,
      "TriggerType": "manual",
      "Status": "success",
      "Description": "No Description",
      "Result": {
        "AssetStatistics": {
          "Created": {
            "Total": 5,
            "Success": 3,
            "Failed": 1,
            "Skipped": 1
          },
          "Updated": {
            "Total": 5,
            "Success": 3,
            "Failed": 1,
            "Skipped": 1
          },
          "Deleted": {
            "Total": 5,
            "Success": 3,
            "Failed": 1,
            "Skipped": 1
          },
          "Same": {
            "Total": 5,
            "Success": 3,
            "Failed": 1,
            "Skipped": 1
          }
        },
        "AgentStatistics": {
          "Created": {
            "Total": 5,
            "Success": 3,
            "Failed": 1,
            "Skipped": 1
          },
          "Updated": {
            "Total": 5,
            "Success": 3,
            "Failed": 1,
            "Skipped": 1
          },
          "Deleted": {
            "Total": 5,
            "Success": 3,
            "Failed": 1,
            "Skipped": 1
          },
          "Same": {
            "Total": 5,
            "Success": 3,
            "Failed": 1,
            "Skipped": 1
          }
        },
        "ErrorMessage": "No Error Message",
        "ErrorCode": "No ErrorCode"
      }
    }
  ],
  "MaxResults": 20
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.