github.com/morlay/goqcloud@v0.0.0-20181123023149-b00e0b0b9afc/clients/vpc/modify_security_group_policies.go (about)

     1  package vpc
     2  
     3  import (
     4  	github_com_morlay_goqcloud "github.com/morlay/goqcloud"
     5  )
     6  
     7  // 修改安全组出站和入站规则
     8  // https://cloud.tencent.com/document/api/215/15810
     9  
    10  type ModifySecurityGroupPoliciesRequest struct {
    11  	// 区域
    12  	Region string `name:"Region"`
    13  	// 安全组实例ID,例如sg-33ocnj9n,可通过DescribeSecurityGroups获取。
    14  	SecurityGroupId string `name:"SecurityGroupId"`
    15  	// 安全组规则集合。 SecurityGroupPolicySet对象必须同时指定新的出(Egress)入(Ingress)站规则。 SecurityGroupPolicy对象不支持自定义索引(PolicyIndex)。
    16  	SecurityGroupPolicySet SecurityGroupPolicySet `name:"SecurityGroupPolicySet"`
    17  }
    18  
    19  func (req *ModifySecurityGroupPoliciesRequest) Invoke(client github_com_morlay_goqcloud.Client) (*ModifySecurityGroupPoliciesResponse, error) {
    20  	resp := &ModifySecurityGroupPoliciesResponse{}
    21  	err := client.Request("vpc", "ModifySecurityGroupPolicies", "2017-03-12").Do(req, resp)
    22  	return resp, err
    23  }
    24  
    25  type ModifySecurityGroupPoliciesResponse struct {
    26  	github_com_morlay_goqcloud.TencentCloudBaseResponse
    27  }