| 1 | package nas |
| 2 | |
| 3 | type CreateAccessRuleRequest struct { |
| 4 | AccessGroupName string |
| 5 | SourceCidrIp string |
| 6 | Policy string |
| 7 | SquashType string |
| 8 | Priority string |
| 9 | Version string |
| 10 | RegionId string |
| 11 | } |
| 12 | |
| 13 | type CreateAccessRuleResponse struct { |
| 14 | Code string |
| 15 | } |
| 16 | |
| 17 | func (client *Client) CreateAccessRule(args *CreateAccessRuleRequest) (resp CreateAccessRuleResponse, err error) { |
| 18 | response := CreateAccessRuleResponse{} |
| 19 | args.Version = VERSION |
| 20 | args.Policy = DEFAULT_POLICY |
| 21 | args.SquashType = DEFAULT_SQUASHTYPE |
| 22 | args.Priority = DEFAULT_PRIORITY |
| 23 | |
| 24 | err = client.Invoke("CreateAccessRule", args, &response) |
| 25 | return response, err |
| 26 | } |