github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/bss/v2/resources/results.go (about) 1 package resources 2 3 // QueryResp is the structure that represents the API response of 'Get' method. 4 type QueryResp struct { 5 // Error code. 6 ErrorCode string `json:"error_code"` 7 // Error message. 8 ErrorMsg string `json:"error_msg"` 9 // List of the prepaid resources. 10 Resources []Resource `json:"data"` 11 // The total number of resources queried. 12 TotalCount int `json:"total_count"` 13 } 14 15 // Resource is the structure that represents the detail of the prepaid resource. 16 type Resource struct { 17 // The internal ID of the resource to be activated. The ID generated after the resource is activated is resource_id. 18 ID string `json:"id"` 19 // Resource ID. 20 ResourceId string `json:"resource_id"` 21 // Resource name. 22 ResourceName string `json:"resource_name"` 23 // Cloud service area code, for example: "cn-north-1". 24 Region string `json:"region_code"` 25 // Cloud service type code, for example: the cloud service type code of OBS is "hws.service.type.obs". 26 ServiceTypeCode string `json:"service_type_code"` 27 // Resource type name, for example: the VM of ECS is "hws.resource.type.vm". 28 ServieTypeName string `json:"service_type_name"` 29 // Resource specifications for cloud service. If it is a resource specification of a VM, the specification will 30 // contain ".win" or ".linux", such as "s2.small.1.linux". 31 ResourceTypeCode string `json:"resource_type_code"` 32 // Cloud service type name, for example: the name of the cloud service type of ECS is "弹性云服务器". 33 ResourceTypeName string `json:"resource_type_name"` 34 // Resource type name, for example: the resource type name of ECS is "云主机". 35 ResourceSpecCode string `json:"resource_spec_code"` 36 // Project ID. 37 ProjectId string `json:"project_id"` 38 // Product ID. 39 ProductId string `json:"product_id"` 40 // Parent resource ID. 41 ParentResourceId string `json:"parent_resource_id"` 42 // Whether it is the main resource. 43 // + 0: non-primary resource 44 // + 1: Main resource 45 IsMainResource int `json:"is_main_resource"` 46 // Status code. 47 // + 2: in use 48 // + 3: Closed (the page does not display this state) 49 // + 4: Frozen 50 // + 5: Expired 51 Status int `json:"status"` 52 // Resource effective time. 53 EffectiveTime string `json:"effective_time"` 54 // Resource expire time. 55 ExpireTime string `json:"expire_time"` 56 // Resource expire policy. 57 // + 0: Expires into the grace period 58 // + 1: Expired to on-demand 59 // + 2: Automatic deletion after expiration (direct deletion from effective) 60 // + 3: Automatic renewal after expiration 61 // + 4: Freeze after expiration 62 // + 5: Delete after expiration (delete from retention period) 63 ExpirePolicy int `json:"expire_policy"` 64 }