- Service Overview
- Billing
- Getting Started
-
User Guide
- Overview
- Permissions Management
- Environment Management
- Application Management
- Component Management
- Instance Management
- Component Configurations
- Component O&M
- System Settings
- Key Operations Recorded by CTS
-
Best Practices
- CAE Best Practices
- Using CAE to Host Nginx Static File Servers
- Interconnecting GitLab with Jenkins for Automatic Build and Deployment on CAE
- Deploying Components Based on the Dependency Sequence Using the Jenkins Pipeline
- Deploying Spring Cloud Applications to CAE to Automatically Connect to the Nacos Engine
- Graceful Startup of a Spring Cloud Application
- Health Check
- Lifecycle Management
- Sending Event Alarms to WeCom
-
Connecting to the CodeArts Pipeline to Automatically Upgrade CAE Components
- Overview
- Upgrading a CAE Component After Uploading a Software Package Built Using the Pipeline to a CodeArts Release Repo
- Upgrading a CAE Component After Uploading a Software Package Built Using the Pipeline to the OBS Bucket
- Upgrading a CAE Component After Uploading an Image Built Using the Pipeline to the SWR Image Repository
- Configuring PromQL to Implement Custom Auto Scaling
- Configuring the Interconnection Between CAE and DEW to Help Applications Obtain Encrypted Secrets from DEW
- Deploying ASP.NET Core Applications to CAE
- Connecting the Network Through Enterprise Routes
- API Reference
-
FAQs
- Component Management FAQs
- Environment Management
-
Component Configuration FAQs
- Is Manual Scaling Still Effective When a Scaling Policy Is Configured?
- Can Components Be Scaled Without a Scaling Policy?
- Why Is My Instance Abnormal After Cloud Storage Is Configured?
- What Do I Do If a Component Becomes Not Ready?
- How Does CAE Support Dark Launch?
- How Do I Provide Prometheus Metrics for a Java Application?
- System Configuration FAQs
- Service Resources FAQs
- General Reference
Copied.
Modifying a Scheduled Start/Stop Policy
Function
This API is used to modify a scheduled start/stop rule.
URI
PUT /v1/{project_id}/cae/timer-rules/{timer_rule_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. See Obtaining a Project ID. |
timer_rule_id |
Yes |
String |
ID of a scheduled start/stop policy. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token.
Maximum characters: 16,384 |
X-Enterprise-Project-ID |
No |
String |
Enterprise project ID.
For more information about enterprise projects and how to obtain enterprise project IDs, see Enterprise Management User Guide. |
X-Environment-ID |
Yes |
String |
Environment ID.
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
api_version |
Yes |
String |
API version. Fixed value: v1. Enumerated value:
|
kind |
Yes |
String |
API type. Fixed value: TimerRule. Enumerated value:
|
spec |
Yes |
UpdateTimerRuleDetails object |
Specifications. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Name of a scheduled start/stop policy. |
type |
Yes |
String |
Policy type. Options: stop and start. |
status |
Yes |
String |
Policy status. Options: on and off. |
apps |
No |
Array of AppInfo objects |
Applications to which the scheduled start/stop policy applies. This parameter is mandatory only when effective_range is set to application. |
components |
No |
Array of ComponentInfo objects |
Components to which the scheduled start/stop policy applies. This parameter is mandatory only when effective_range is set to component. |
cron |
Yes |
String |
Cron expression. |
effective_range |
Yes |
String |
Scope to which a policy applies. Options: component, application, and environment. |
effective_policy |
Yes |
String |
Trigger mode. Options: onetime and periodic. |
Response Parameters
None
Example Request
Modify a scheduled start/stop policy: Set name to test-2, type to start, effective_range to component, and effective_policy to onetime.
PUT https://{endpoint}/v1/{project_id}/cae/timer-rules/{rule_id} { "api_version" : "v1", "kind" : "TimerRule", "spec" : { "name" : "test-2", "type" : "start", "cron" : "0 55 16 22 2 ? 2023", "status" : "on", "env_id" : "c41a8e9f-5447-406a-8783-85885f3870a3", "effective_range" : "component", "effective_policy" : "onetime", "components" : [ { "component_id" : "10f7b6be-5dc2-4fb7-b62c-e8f362dfdabf", "component_name" : "addd" }, { "component_id" : "3f3041f9-5063-40c9-94ee-8473517b3956", "component_name" : "demo-frontend-1676360408" } ] } }
Example Response
None
Status Code
Status Code |
Description |
---|---|
204 |
The request is successful. |
Error Code
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot