func RequestAPI(params map[string]string) (string, error) { query := util.GetQueryFromMap(params) req := &util.AliyunRequest{} req.Url = ECSHost + query log.Debug(req.Url) result, err := req.DoGetRequest() return result, err }
func (c *CommonParam) RequestAPI(params map[string]interface{}) (string, error) { query := GetQueryFromMap(params) req := &AliyunRequest{} req.Url = c.Host + query log.Debug(req.Url) result, err := req.DoGetRequest() return result, err }
func (c *CommonParam) Request(action string, params map[string]string, response interface{}) error { p := c.ResolveAllParams(action, params) result, err := RequestAPI(p) if err != nil { return err } log.Debug(result) json.Unmarshal([]byte(result), response) return nil }
func (op *OtherOperator) DescribeInstanceTypes(params map[string]string) (DescribeInstanceTypesResponse, error) { var resp DescribeInstanceTypesResponse action := GetFuncName(1) p := op.Common.ResolveAllParams(action, params) result, err := RequestAPI(p) if err != nil { return DescribeInstanceTypesResponse{}, err } log.Debug(result) json.Unmarshal([]byte(result), &resp) return resp, nil }
func (op *ImageOperator) ModifyImageSharePermission(params map[string]string) (ModifyImageSharePermissionResponse, error) { var resp ModifyImageSharePermissionResponse action := GetFuncName(1) p := op.Common.ResolveAllParams(action, params) result, err := RequestAPI(p) if err != nil { return ModifyImageSharePermissionResponse{}, err } log.Debug(result) json.Unmarshal([]byte(result), &resp) return resp, nil }
func (op *ImageOperator) CancelCopyImage(params map[string]string) (CancelCopyImageResponse, error) { var resp CancelCopyImageResponse action := GetFuncName(1) p := op.Common.ResolveAllParams(action, params) result, err := RequestAPI(p) if err != nil { return CancelCopyImageResponse{}, err } log.Debug(result) json.Unmarshal([]byte(result), &resp) return resp, nil }
func (op *SecurityGroupOperator) RevokeSecurityGroupEgress(params map[string]string) (RevokeSecurityGroupEgressResponse, error) { var resp RevokeSecurityGroupEgressResponse action := GetFuncName(1) p := op.Common.ResolveAllParams(action, params) result, err := RequestAPI(p) if err != nil { return RevokeSecurityGroupEgressResponse{}, err } log.Debug(result) json.Unmarshal([]byte(result), &resp) return resp, nil }
func (op *DiskOperator) ReplaceSystemDisk(params map[string]string) (ReplaceSystemDiskResponse, error) { var resp ReplaceSystemDiskResponse action := GetFuncName(1) p := op.Common.ResolveAllParams(action, params) result, err := RequestAPI(p) if err != nil { return ReplaceSystemDiskResponse{}, err } log.Debug(result) json.Unmarshal([]byte(result), &resp) return resp, nil }
func (op *SnapshotOperator) ModifyAutoSnapshotPolicy(params map[string]string) (ModifyAutoSnapshotPolicyResponse, error) { var resp ModifyAutoSnapshotPolicyResponse action := GetFuncName(1) p := op.Common.ResolveAllParams(action, params) result, err := RequestAPI(p) if err != nil { return ModifyAutoSnapshotPolicyResponse{}, err } log.Debug(result) json.Unmarshal([]byte(result), &resp) return resp, nil }
func (op *NetworkOperator) AllocatePublicIpAddress(params map[string]string) (AllocatePublicIpAddressResponse, error) { var resp AllocatePublicIpAddressResponse action := GetFuncName(1) p := op.Common.ResolveAllParams(action, params) result, err := RequestAPI(p) if err != nil { return AllocatePublicIpAddressResponse{}, err } log.Debug(result) json.Unmarshal([]byte(result), &resp) return resp, nil }
func (op *NetworkOperator) ModifyEipAddressAttribute(params map[string]string) (ModifyEipAddressAttributeResponse, error) { var resp ModifyEipAddressAttributeResponse action := GetFuncName(1) p := op.Common.ResolveAllParams(action, params) result, err := RequestAPI(p) if err != nil { return ModifyEipAddressAttributeResponse{}, err } log.Debug(result) json.Unmarshal([]byte(result), &resp) return resp, nil }