All Products
Search
Document Center

Edge Security Acceleration:CreateCustomScenePolicy

Last Updated:Nov 07, 2025

Creates an account-level custom scenario policy. You can execute a policy after you associate the policy with a website.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
esa:CreateCustomScenePolicycreate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
NamestringYes

The policy name.

test
TemplatestringYes

The name of the policy template. Valid value:

  • promotion: major events.
promotion
StartTimestringYes

The time when the policy takes effect.

The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2021-11-07T17:00:00Z
EndTimestringYes

The time when the policy expires.

The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2021-11-07T18:00:00Z
ObjectsstringNo

The IDs of the websites that you want to associate with the policy. Separate multiple IDs with commas (,).

7096621098****

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

0AEDAF20-4DDF-4165-8750-47FF9C1929C9
Namestring

The policy name.

test
Templatestring

The name of the policy template.

promotion
StartTimestring

The time when the policy takes effect.

The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2021-11-07T17:00:00Z
EndTimestring

The time when the policy expires.

The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2021-11-07T18:00:00Z
Objectsarray

The IDs of websites associated.

objectstring

The website ID.

7096621098****
PolicyIdlong

The policy ID.

1

Examples

Sample success responses

JSONformat

{
  "RequestId": "0AEDAF20-4DDF-4165-8750-47FF9C1929C9",
  "Name": "test",
  "Template": "promotion",
  "StartTime": "2021-11-07T17:00:00Z",
  "EndTime": "2021-11-07T18:00:00Z",
  "Objects": [
    "7096621098****"
  ],
  "PolicyId": 1
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameterThe specified parameter is invalid.The specified parameter is invalid.
400PolicyNameExistThe policy name already exists.Policy name already exists.
400CreateTimeErrorThe effective time of the same policy template cannot overlap.The effective time of the same policy template cannot overlap.
400ScenePolicyQuotaExceedLimitThe maximum number of scenario policies has been reached. Each account can create up to 10 scenario policies.The maximum number of scenario policies has been reached. Each account can create up to 10 scenario policies.
500InternalErrorFailed to call the service. Try again later or contact technical support.Failed to call the service. Try again later or contact technical support.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history