github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/dli/v1/queues/results.go (about) 1 package queues 2 3 import ( 4 "github.com/huaweicloud/golangsdk" 5 ) 6 7 type Queue struct { 8 9 // Name of a newly created resource queue. The name can contain only digits, letters, and underscores (_), 10 // but cannot contain only digits or start with an underscore (_). Length range: 1 to 128 characters. 11 QueueName string `json:"queue_name"` 12 13 // Description of a queue. 14 Description string `json:"description"` 15 16 Owner string `json:"owner"` 17 18 CreateTime int64 `json:"create_time"` 19 20 // Indicates the queue type. The options are as follows: 21 // sql 22 // general 23 // all 24 // NOTE: 25 // If the type is not specified, the default value sql is used. 26 QueueType string `json:"queue_type"` 27 28 // Minimum number of CUs that are bound to a queue. Currently, the value can only be 16, 64, or 256. 29 CuCount int `json:"cu_count"` 30 31 // Billing mode of a queue. This value can only be set to 1, indicating that the billing is based on the CUH used. 32 ChargingMode int `json:"charging_mode"` 33 34 // 35 ResourceId string `json:"resource_id"` 36 37 // Enterprise project ID. The value 0 indicates the default enterprise project. 38 // NOTE: 39 // Users who have enabled Enterprise Management can set this parameter to bind a specified project. 40 EnterpriseProjectId string `json:"enterprise_project_id"` 41 42 // The VPC CIDR block of the queue. 43 CidrInVpc string `json:"cidr_in_vpc"` 44 // CIDR block of the management subnet 45 CidrInMgntsubnet string `json:"cidr_in_mgntsubnet"` 46 // Subnet CIDR block 47 CidrInSubnet string `json:"cidr_in_subnet"` 48 49 // Queue resource mode. The options are as follows: 50 // 0: indicates the shared resource mode. 51 // 1: indicates the exclusive resource mode. 52 ResourceMode int `json:"resource_mode"` 53 54 // CPU architecture of queue computing resources. 55 // x86_64 (default) 56 // aarch64 57 Platform string `json:"platform"` 58 59 // Whether to restart the queue. The default value is false. 60 IsRestarting bool `json:"is_restarting"` 61 62 // Indicates the queue feature. The options are as follows: 63 // basic: basic type 64 // ai: AI-enhanced (Only the SQL x86_64 dedicated queue supports this option.) 65 // The default value is basic. 66 // NOTE: 67 // For an enhanced AI queue, an AI image is loaded in the background. 68 // The image integrates AI algorithm packages based on the basic image. 69 Feature string `json:"feature"` 70 71 /** 72 The resource type to which the queue belongs. 73 VM: ECF cluster 74 Container: containerized cluster (k8s) 75 **/ 76 QueueResourceType string `json:"queue_resource_type"` 77 } 78 79 type Queue4Get struct { 80 QueueName string `json:"queueName"` 81 Description string `json:"description"` 82 Owner string `json:"owner"` 83 CreateTime int64 `json:"create_time"` 84 QueueType string `json:"queueType"` 85 CuCount int `json:"cuCount"` 86 ChargingMode int `json:"chargingMode"` 87 ResourceId string `json:"resource_id"` 88 ResourceMode int `json:"resource_mode"` 89 EnterpriseProjectId string `json:"enterprise_project_id"` 90 QueueResourceType string `json:"resource_type"` 91 } 92 93 type ListResult struct { 94 IsSuccess bool `json:"is_success"` 95 Message string `json:"message"` 96 Queues []Queue `json:"queues"` 97 } 98 99 // CreateResult contains the response body and error from a Create request. 100 type CreateResult struct { 101 golangsdk.Result 102 } 103 104 // GetResult contains the response body and error from a Get request. 105 type GetResult struct { 106 golangsdk.Result 107 } 108 109 // DeleteResult contains the response body and error from a Delete request. 110 type DeleteResult struct { 111 golangsdk.Result 112 } 113 114 type PutResult struct { 115 golangsdk.Result 116 }