Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Querying Scheduled Tasks

Updated on 2024-12-31 GMT+08:00

Function

This function is used to query scheduled tasks based on specified conditions.

Constraints

This API supports the following types of instances:

  • GeminiDB Influx
  • GeminiDB Redis
  • GeminiDB Mongo
  • GeminiDB Cassandra

URI

GET https://{Endpoint}/v3/{project_id}/scheduled-jobs

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a user in a region

Table 2 Query parameters

Parameter

Mandatory

Type

Description

job_name

No

String

Task name. This parameter is left blank by default. The value can be:

  • REBOOT: Restart the instance.
  • RESIZE_FLAVOR: Change the CPU or memory of an instance.
  • UPGRADE_DATABASE: patch upgrade

job_status

No

String

Task execution status. This parameter is left blank by default. The value can be:

  • Pending: The task is not executed.
  • Running: The task is being executed.
  • Completed: The task has been successfully executed.
  • Failed: The task fails to be executed.
  • Canceled: The task is canceled.

instance_id

No

String

Instance ID. If this parameter is not specified, all instances that meet the search criteria are queried by default.

start_time

No

String

Task creation time in the yyyy-mm-ddThh:mm:ssZ format. T indicates the start time, and Z indicates the time zone offset. For example, if the time zone offset is one hour, +0100 is displayed. If this parameter is not transferred, the time zone offset is seven days before the current time by default.

end_time

No

String

End time for creating a task, in the yyyy-mm-ddThh:mm:ssZ format. T indicates the start time, and Z indicates the time zone offset. For example, if the time zone offset is one hour, +0100 is displayed. If this parameter is not transferred, the current time is used by default.

offset

No

Integer

Index offset. The query starts from the next piece of data indexed by this parameter. The value is 0 by default.

limit

No

Integer

Number of records to be queried. If this parameter is not transferred, the default value 10 is used. The value ranges from 1 to 100.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total_count

Integer

Total number of records.

schedules

Array of objects

Task details. For details, see Table 5.

Table 5 ScheduleDetailInfo

Parameter

Type

Description

job_id

String

Task ID

job_name

String

Task name. The value can be:

  • REBOOT: Restart the instance.
  • RESIZE_FLAVOR: Change the CPU or memory of an instance.
  • UPGRADE_DATABASE: patch upgrade

job_status

String

Task execution status. The value can be: The value can be:

  • Pending: The task is not executed.
  • Running: The task is being executed.
  • Completed: The task has been successfully executed.
  • Failed: The task fails to be executed.
  • Canceled: The task is canceled.

instance_id

String

Instance ID

instance_name

String

Instance name

instance_status

String

Instance status. The value can be:

  • Createfail, indicating that the instance failed to be created.
  • Creating, indicating that the instance is being created.
  • Normal: The instance is normal.
  • Abnormal: The instance is abnormal.
  • Deleted: The instance has been deleted.

datastore_type

String

Database type

create_time

String

Task creation time in the yyyy-mm-ddThh:mm:ssZ format. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100.

start_time

String

Task start time in the yyyy-mm-ddThh:mm:ssZ format. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100.

end_time

String

Task end time in the yyyy-mm-ddThh:mm:ssZ format. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100.

Example Request

This function is used to query scheduled tasks based on specified conditions.

GET https://{Endpoint}/v3/0549b4a43100d4f32f51c01c2fe4acdb/scheduled-jobs?offset=2&limit=2&start_time=2019-05-27T03:38:51+0000&job_status=Pending

Example Response

Status code: 200

Success

{ 
  "schedules" : [ { 
    "job_id" : "56d3c1138dcf4f1da73b0170700c78d0", 
    "job_name" : "REBOOT", 
    "job_status" : "Pending", 
    "instance_id" : "8a6117ece8a0457a90060441fa372e8ein06", 
    "instance_name" : "gauss-nosql", 
    "instance_status" : "normal", 
    "datastore_type" : "GeminiDB Cassandra", 
    "create_time" : "2019-05-26T10:41:14+0000", 
    "start_time" : "2019-05-26T12:41:14+0000", 
    "end_time" : "2019-05-26T12:51:14+0000" 
  } ], 
  "total_count" : 1 
}

Status Codes

For details, see Status Codes.

Error Codes

For details, see Error Codes.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback