tencent cloud

文档反馈

ModifyEnterpriseSecurityGroupRule

最后更新时间:2023-05-04 17:40:15

1. API Description

Domain name for API request: cfw.tencentcloudapi.com.

This API is used to modify a new enterprise security group rule.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: ModifyEnterpriseSecurityGroupRule.
Version Yes String Common Params. The value used for this API: 2019-09-04.
Region No String Common Params. This parameter is not required for this API.
RuleUuid Yes Integer UUID of the rule, which can be obtained by querying the rule list
ModifyType Yes Integer Modification type. Values: 0 (Modify rule content), 1 (Toggle on/off a rule) and 2 (Toggle on/off all rules)
Data No SecurityGroupRule The new rule content you want. It’s only required when you want to modify the rule content (ModifyType=0)
Enable No Integer 0: Do not enable; 1: Enable

3. Output Parameters

Parameter Name Type Description
Status Integer Status value. 0: Edited successfully; Others: Failed to edit
NewRuleUuid Integer ID of new rule generated after the modification
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Modifying a new enterprise security group rule

This example shows you how to modify an enterprise security group rule.

Input Example

POST / HTTP/1.1
Host: cfw.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyEnterpriseSecurityGroupRule
<Common request parameters>

{
    "RuleUuid": 1,
    "Data": {
        "OrderIndex": "xx",
        "Protocol": "xx",
        "SourceType": "xx",
        "SourceContent": "xx",
        "DestType": "xx",
        "ServiceTemplateId": "xx",
        "DestContent": "xx",
        "RuleAction": "xx",
        "Port": "xx",
        "Description": "xx"
    },
    "ModifyType": 0
}

Output Example

{
    "Response": {
        "RequestId": "",
        "Status": 0,
        "NewRuleUuid": 35641
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation Operation failed.
InternalError Internal error.
InvalidParameter Invalid parameter.
OperationDenied Operation denied.
ResourceInUse The resource is occupied.
ResourceNotFound The resource does not exist.
联系我们

联系我们,为您的业务提供专属服务。

技术支持

如果你想寻求进一步的帮助,通过工单与我们进行联络。我们提供7x24的工单服务。

7x24 电话支持