Domain name for API request: vpc.tencentcloudapi.com.
This API is used to create a security group with the same rule configurations as an existing security group. The cloning only copies the security group and its rules, but not the security group tags.
A maximum of 20 requests can be initiated per second for this API.
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: CloneSecurityGroup. |
Version | Yes | String | Common Params. The value used for this API: 2017-03-12. |
Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
SecurityGroupId | Yes | String | ID of the security group to be cloned, such as sg-33ocnj9n . This can be obtained through the DescribeSecurityGroups API. |
GroupName | No | String | The name of security group clone. You can enter any name within 60 characters. If this parameter is left empty, the security group clone will use the name of the source security group. |
GroupDescription | No | String | Description of the security group clone. You can enter up to 100 characters. If this parameter is left empty, the security group clone will use the description of the source security group. |
ProjectId | No | String | Project ID of the security group clone. The default is 0. You can query it on the project management page of the Tencent Cloud console. |
RemoteRegion | No | String | The region of the source security group for a cross-region clone. For example, to clone the security group in Guangzhou to Shanghai, set it to ap-guangzhou . |
Parameter Name | Type | Description |
---|---|---|
SecurityGroup | SecurityGroup | Security group object Note: this field may return null , indicating that no valid values can be obtained. |
RequestId | String | The unique request ID, which is returned for each request. RequestId is required for locating a problem. |
https://vpc.tencentcloudapi.com/?Action=CloneSecurityGroup
&SecurityGroupId=sg-12345678
&<Common request parameters>
{
"Response": {
"RequestId": "354f4ac3-8546-4516-8c8a-69e3ab73aa8a",
"SecurityGroup": {
"SecurityGroupId": "sg-12341234",
"SecurityGroupName": "TestGroup",
"SecurityGroupDesc": "test-group-desc",
"ProjectId": "0"
}
}
}
https://vpc.tencentcloudapi.com/?Action=CloneSecurityGroup
&SecurityGroupId=sg-12345678
&GroupName=test
&GroupDescription=test
&<Common request parameters>
{
"Response": {
"RequestId": "354f4ac3-8546-4516-8c8a-69e3ab73aa8a",
"SecurityGroup": {
"SecurityGroupId": "sg-12341256",
"SecurityGroupName": "test",
"SecurityGroupDesc": "test",
"ProjectId": "0"
}
}
}
https://vpc.tencentcloudapi.com/?Action=CloneSecurityGroup
&SecurityGroupId=sg-12345678
&ProjectId=1001
&<Common request parameters>
{
"Response": {
"RequestId": "354f4ac3-8546-4516-8c8a-69e3ab73aa8a",
"SecurityGroup": {
"SecurityGroupId": "sg-12341278",
"SecurityGroupName": "TestGroup",
"SecurityGroupDesc": "test-group-desc",
"ProjectId": "1001"
}
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Error Code | Description |
---|---|
InvalidParameterValue | Incorrect parameter value. |
InvalidParameterValue.Malformed | Invalid input parameter format. |
InvalidParameterValue.TooLong | Invalid parameter value. The parameter value is too long. |
LimitExceeded | Quota limit is reached. |
ResourceNotFound | The resource does not exist. |
Was this page helpful?