github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/dli/v1/queues/results.go (about) 1 package queues 2 3 import ( 4 "github.com/chnsz/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 // The name of the elastic resource pool. 78 ElasticResourcePoolName string `json:"elastic_resource_pool_name"` 79 } 80 81 type Queue4Get struct { 82 QueueName string `json:"queueName"` 83 Description string `json:"description"` 84 Owner string `json:"owner"` 85 CreateTime int64 `json:"create_time"` 86 QueueType string `json:"queueType"` 87 CuCount int `json:"cuCount"` 88 ChargingMode int `json:"chargingMode"` 89 ResourceId string `json:"resource_id"` 90 ResourceMode int `json:"resource_mode"` 91 EnterpriseProjectId string `json:"enterprise_project_id"` 92 QueueResourceType string `json:"resource_type"` 93 } 94 95 type ListResult struct { 96 IsSuccess bool `json:"is_success"` 97 Message string `json:"message"` 98 Queues []Queue `json:"queues"` 99 } 100 101 // CreateResult contains the response body and error from a Create request. 102 type CreateResult struct { 103 golangsdk.Result 104 } 105 106 // GetResult contains the response body and error from a Get request. 107 type GetResult struct { 108 golangsdk.Result 109 } 110 111 // DeleteResult contains the response body and error from a Delete request. 112 type DeleteResult struct { 113 golangsdk.Result 114 } 115 116 type PutResult struct { 117 golangsdk.Result 118 } 119 120 type UpdateCidrResp struct { 121 IsSuccess bool `json:"is_success"` 122 Message string `json:"message"` 123 }