Documentation ¶
Index ¶
- func CopyImageInRegion(client *golangsdk.ServiceClient, opts CopyImageInRegionOpts) (*string, error)
- func ExtractJobId(err error, raw *http.Response) (*string, error)
- func WaitForJob(c *golangsdk.ServiceClient, id string, secs int) error
- type CopyImageInRegionOpts
- type JobEntities
- type JobEntitiesResult
- type JobResponse
- type QuotaInfo
- type SubJobEntities
- type SubJobResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyImageInRegion ¶
func CopyImageInRegion(client *golangsdk.ServiceClient, opts CopyImageInRegionOpts) (*string, error)
func WaitForJob ¶
func WaitForJob(c *golangsdk.ServiceClient, id string, secs int) error
Types ¶
type CopyImageInRegionOpts ¶
type CopyImageInRegionOpts struct { // Specifies the image ID. ImageId string `json:"-" required:"true"` // Specifies the image name. Name string `json:"name" required:"true"` // Specifies the encryption key. This parameter is left blank by default. CmkId string `json:"cmk_id,omitempty"` // Provides supplementary information about the image. For detailed description, see Image Attributes. The value contains a maximum of 1024 characters and consists of only letters and digits. Carriage returns and angle brackets (< >) are not allowed. This parameter is left blank by default. Description string `json:"description,omitempty"` }
type JobEntities ¶
type JobEntities struct { // Specifies the image ID. ImageId string `json:"image_id,omitempty"` // Specifies the job name. CurrentTask string `json:"current_task,omitempty"` // Specifies the image name. ImageName string `json:"image_name,omitempty"` // Specifies the job progress. ProcessPercent float64 `json:"process_percent,omitempty"` // Specifies job execution results. Results []JobEntitiesResult `json:"results,omitempty"` // Specifies sub-job execution results. SubJobsResult []SubJobResult `json:"sub_jobs_result,omitempty"` // Specifies the sub-job IDs. SubJobsList []string `json:"sub_jobs_list,omitempty"` }
type JobEntitiesResult ¶
type JobResponse ¶
type JobResponse struct { // Specifies the job status. The value can be: // // SUCCESS: The job is successfully executed. // // FAIL: The job failed to be executed. // // RUNNING: The job is in progress. // // INIT: The job is being initialized. Status string `json:"status,omitempty"` // Specifies the task ID. JobId string `json:"job_id,omitempty"` // Specifies the job type. JobType string `json:"job_type,omitempty"` // Specifies the start time of the job. The value is in UTC format. BeginTime string `json:"begin_time,omitempty"` // Specifies the end time of the job. The value is in UTC format. EndTime string `json:"end_time,omitempty"` // Specifies the error code. ErrorCode string `json:"error_code,omitempty"` // Specifies the cause of the failure. FailReason string `json:"fail_reason,omitempty"` // Specifies the custom attributes of the job. // // If the job status is normal, the image ID will be returned. If the status is abnormal, an error code and details will be returned. Entities JobEntities `json:"entities,omitempty"` }
func ShowJob ¶
func ShowJob(client *golangsdk.ServiceClient, jobId string) (*JobResponse, error)
type QuotaInfo ¶
type QuotaInfo struct { // Specifies the type of the resource to be queried. Type string `json:"type"` // Specifies the used quota. Used int `json:"used"` // Specifies the total quota. Quota int `json:"quota"` // Specifies the minimum quota. Min int `json:"min"` // Specifies the maximum quota. Max int `json:"max"` }
func ShowImageQuota ¶
func ShowImageQuota(client *golangsdk.ServiceClient) ([]QuotaInfo, error)
type SubJobEntities ¶
type SubJobResult ¶
type SubJobResult struct { // Specifies the sub-job status. The value can be: // // SUCCESS: The sub-job is successfully executed. // // FAIL: The sub-job failed to be executed. // // RUNNING: The sub-job is in progress. // // INIT: The sub-job is being initialized. Status string `json:"status,omitempty"` // Specifies a sub-job ID. JobId string `json:"job_id,omitempty"` // Specifies the sub-job type. JobType string `json:"job_type,omitempty"` // Specifies the start time of the sub-job. The value is in UTC format. BeginTime string `json:"begin_time,omitempty"` // Specifies the end time of the sub-job. The value is in UTC format. EndTime string `json:"end_time,omitempty"` // Specifies the error code. ErrorCode string `json:"error_code,omitempty"` // Specifies the failure cause. FailReason string `json:"fail_reason,omitempty"` // Specifies the custom attributes of the sub-job. For details, see Table 5. // // If a sub-job is properly executed, an image ID is returned. // // If an exception occurs on the sub-job, an error code and associated information are returned. Entities SubJobEntities `json:"entities,omitempty"` }
Click to show internal directories.
Click to hide internal directories.