Documentation
¶
Overview ¶
Package keys provides information and interaction with keys in the Queues in DLI are computing resources, which are the basis for using DLI. All executed jobs require computing resources.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActionOpts ¶
type ActionOpts struct { Action string `json:"action" required:"true"` //Operations to be performed: restart; scale_out;scale_in Force bool `json:"force,omitempty"` //when action= restart,can Specifies whether to forcibly restart CuCount int `json:"cu_count,omitempty"` // Number of CUs to be scaled in or out. QueueName string `json:"-" required:"true"` }
type CreateOpts ¶
type CreateOpts struct { // Name of a newly created resource queue. The name can contain only digits, letters, and underscores (_), //but cannot contain only digits or start with an underscore (_). Length range: 1 to 128 characters. QueueName string `json:"queue_name" required:"true"` // Indicates the queue type. The options are as follows: // sql // general // all // NOTE: // If the type is not specified, the default value sql is used. QueueType string `json:"queue_type ,omitempty"` // Description of a queue. Description string `json:"description,omitempty"` // Minimum number of CUs that are bound to a queue. Currently, the value can only be 16, 64, or 256. CuCount int `json:"cu_count" required:"true"` // Billing mode of a queue. This value can only be set to 1, indicating that the billing is based on the CUH used. ChargingMode int `json:"charging_mode,omitempty"` // Enterprise project ID. The value 0 indicates the default enterprise project. // NOTE: // Users who have enabled Enterprise Management can set this parameter to bind a specified project. EnterpriseProjectId string `json:"enterprise_project_id,omitempty"` // CPU architecture of queue computing resources. // x86_64 (default) // aarch64 Platform string `json:"platform,omitempty"` // Queue resource mode. The options are as follows: // 0: indicates the shared resource mode. // 1: indicates the exclusive resource mode. ResourceMode int `json:"resource_mode"` // Specifies the tag information of the queue to be created, // including the JSON character string indicating whether the queue is Dual-AZ. Currently, // only the value 2 is supported, indicating that two queues are created. Labels []string `json:"labels,omitempty"` // Indicates the queue feature. The options are as follows: // basic: basic type // ai: AI-enhanced (Only the SQL x86_64 dedicated queue supports this option.) // The default value is basic. // NOTE: // For an enhanced AI queue, an AI image is loaded in the background. // The image integrates AI algorithm packages based on the basic image. Feature string `json:"feature,omitempty"` Tags []tags.ResourceTag `json:"tags,omitempty"` }
CreateOpts contains the options for create a service. This object is passed to Create().
func (CreateOpts) ToDomainCreateMap ¶
func (opts CreateOpts) ToDomainCreateMap() (map[string]interface{}, error)
ToDomainCreateMap builds a create request body from CreateOpts.
type CreateOptsBuilder ¶
CreateOptsBuilder allows extensions to add additional parameters to the Create request.
type CreateResult ¶
CreateResult contains the response body and error from a Create request.
func Create ¶
func Create(c *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
This API is used to create a queue.
@cloudAPI-URL: POST /v1.0/{project_id}/queues @cloudAPI-ResourceType: dli @cloudAPI-version: v1.0
@since: 2021-07-07 12:12:12
type DeleteResult ¶
DeleteResult contains the response body and error from a Delete request.
func Delete ¶
func Delete(c *golangsdk.ServiceClient, queueName string) (r DeleteResult)
This API is used to delete a queue.
@cloudAPI-URL: Delete /v1.0/{project_id}/queues/{queueName} @cloudAPI-ResourceType: dli @cloudAPI-version: v1.0
@since: 2021-07-07 12:12:12
type GetResult ¶
GetResult contains the response body and error from a Get request.
func Get ¶
func Get(c *golangsdk.ServiceClient, queueName string) (r GetResult)
This API is used to query the Details of a Queue
@cloudAPI-URL: GET /v1.0/{project_id}/queues/{queueName} @cloudAPI-ResourceType: dli @cloudAPI-version: v1.0
@since: 2021-07-07 12:12:12
func List ¶
func List(c *golangsdk.ServiceClient, listOpts ListOptsBuilder) (r GetResult)
This API is used to query all Queue list
@cloudAPI-URL: GET /v1.0/{project_id}/queues @cloudAPI-ResourceType: dli @cloudAPI-version: v1.0
@since: 2021-07-07 12:12:12
type ListOpts ¶
type ListOpts struct { QueueType string `q:"queue_type"` WithPriv bool `q:"with-priv"` WithChargeInfo bool `q:"with-charge-info"` Tags string `q:"tags"` }
func (ListOpts) ToListQuery ¶
type ListOptsBuilder ¶
type ListResult ¶
type PutResult ¶
func ScaleOrRestart ¶
func ScaleOrRestart(c *golangsdk.ServiceClient, opts ActionOpts) (r PutResult)
type Queue ¶
type Queue struct { // Name of a newly created resource queue. The name can contain only digits, letters, and underscores (_), // but cannot contain only digits or start with an underscore (_). Length range: 1 to 128 characters. QueueName string `json:"queue_name"` // Description of a queue. Description string `json:"description"` Owner string `json:"owner"` CreateTime int64 `json:"create_time"` // Indicates the queue type. The options are as follows: // sql // general // all // NOTE: // If the type is not specified, the default value sql is used. QueueType string `json:"queue_type"` // Minimum number of CUs that are bound to a queue. Currently, the value can only be 16, 64, or 256. CuCount int `json:"cu_count"` // Billing mode of a queue. This value can only be set to 1, indicating that the billing is based on the CUH used. ChargingMode int `json:"charging_mode"` // ResourceId string `json:"resource_id"` // Enterprise project ID. The value 0 indicates the default enterprise project. // NOTE: // Users who have enabled Enterprise Management can set this parameter to bind a specified project. EnterpriseProjectId string `json:"enterprise_project_id"` // The VPC CIDR block of the queue. CidrInVpc string `json:"cidr_in_vpc"` // CIDR block of the management subnet CidrInMgntsubnet string `json:"cidr_in_mgntsubnet"` // Subnet CIDR block CidrInSubnet string `json:"cidr_in_subnet"` // Queue resource mode. The options are as follows: // 0: indicates the shared resource mode. // 1: indicates the exclusive resource mode. ResourceMode int `json:"resource_mode"` // CPU architecture of queue computing resources. // x86_64 (default) // aarch64 Platform string `json:"platform"` // Whether to restart the queue. The default value is false. IsRestarting bool `json:"is_restarting"` // Indicates the queue feature. The options are as follows: // basic: basic type // ai: AI-enhanced (Only the SQL x86_64 dedicated queue supports this option.) // The default value is basic. // NOTE: // For an enhanced AI queue, an AI image is loaded in the background. // The image integrates AI algorithm packages based on the basic image. Feature string `json:"feature"` /** The resource type to which the queue belongs. VM: ECF cluster Container: containerized cluster (k8s) **/ QueueResourceType string `json:"queue_resource_type"` }
type Queue4Get ¶
type Queue4Get struct { QueueName string `json:"queueName"` Description string `json:"description"` Owner string `json:"owner"` CreateTime int64 `json:"create_time"` QueueType string `json:"queueType"` CuCount int `json:"cuCount"` ChargingMode int `json:"chargingMode"` ResourceId string `json:"resource_id"` ResourceMode int `json:"resource_mode"` EnterpriseProjectId string `json:"enterprise_project_id"` QueueResourceType string `json:"resource_type"` }