Updates the firewall rules in an existing firewall template based on your business requirements and applies the rules to Simple Application Server instances through the firewall template.
Operation description
Updating a firewall template does not affect the rules of instances to which the template is already applied.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
swas-open:ModifyFirewallTemplate |
update |
*FirewallTemplate
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the Simple Application Server instance. You can call the ListRegions operation to query the list of supported Alibaba Cloud regions. |
cn-hangzhou |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, and you must make sure that the value is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence. |
123e4567-e89b-12d3-a456-426655440000 |
| FirewallTemplateId |
string |
Yes |
The ID of the firewall template. |
ft-bcf1a7hrdq717**** |
| Name |
string |
No |
The name of the firewall template. |
testName |
| Description |
string |
No |
The description of the firewall template. |
test |
| FirewallTemplateRule |
array<object> |
No |
The firewall rules. |
|
|
object |
No |
The firewall rules. |
||
| FirewallTemplateRuleId |
string |
Yes |
The ID of the firewall template rule. |
eeea34d9867b4d55a4ff8d5fcfbd**** |
| RuleProtocol |
string |
No |
The transport layer protocol. Valid values:
|
TCP |
| Port |
string |
No |
The port range. Valid values: 1 to 65535. Use a forward slash (/) to separate the start port and the end port. For example, Note
If you set the protocol to ICMP, the port must be set to -1/-1. |
8080 |
| SourceCidrIp |
string |
No |
The source IPv4 CIDR block for which you want to configure access permissions. You can specify an IP address range in CIDR format or IPv4 format. |
0.0.0.0/0 |
| Remark |
string |
No |
The remark of the firewall rule. |
test |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
30637AD6-D977-4833-A54C-CC89483E**** |
Examples
Success response
JSON format
{
"RequestId": "30637AD6-D977-4833-A54C-CC89483E****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.