跳到主要内容

ListImportJobs()

This operation lists all bulk-import jobs of a specific cluster.

func ListImportJobs(ctx context.Context, option *ListImportJobsOption) (*ListImportJobsResponse, error)

Request Parameters

Parameter

Description

Type

ctx

Context for the current call to work.

context.Context

option

Optional parameters of the methods.

ListImportJobsOption

callOpts

Optional parameters for calling the methods.

grpc.CallOption

ListImportJobsOption

This is a struct type. You can use NewListImportJobsOption to get its concrete implementation.

NewListImportJobsOption

The signature of NewListImportJobsOption() is as follows:

func NewListImportJobsOption(uri string, collectionName string) *ListImportJobsOption

Parameter

Description

Type

uri

The endpoint URL of the Zilliz Cloud Data Plane, which should be one of the follows:

string

collectionName

The name of a collection in the target cluster of this operation.

string

You can chain the following methods to append more parameters to the ListImportJobsOption struct.

WithAPIKey

This method appends your Zilliz Cloud API key to the BulkImportOption struct. The signature of the method is as follows:

func (opt *BulkImportOption) WithAPIKey(key string) *BulkImportOption

Parameter

Description

Type

key

A valid Zilliz Cloud API key with sufficient permissions to manipulate the cluster.

string

WithCurrentPage

This method sets the current page number of the import job list. The signature of the method is as follows:

func (opt *ListImportJobsOption) WithCurrentPage(currentPage int) *ListImportJobsOption

Parameter

Description

Type

currentPage

The current page of the import job list. You can combine this parameter and pageSize to offset certain import jobs.

int

WithPageSize

This method sets the number of import jobs to return each time. The signature of the method is as follows:

func (opt *ListImportJobsOption) WithPageSize(pageSize int) *ListImportJobsOption

Parameter

Description

Type

pageSize

The number of import jobs to return each time.

int

grpc.CallOption

This interface provided by the gRPC Go library allows you to specify additional options or configurations when making requests. For possible implementations of this interface, refer to this file.

ListImportJobsResponse

The ListImportJobsResponse struct type is as follows:

type ListImportJobsResponse struct {
Status int `json:"status"`
Message string `json:"message"`
Data *ListImportJobData `json:"data"`
}

ListImportJobData

The ListImportJobData struct type is as follows:

type ListImportJobsOption struct {
URL string `json:"-"`
CollectionName string `json:"collectionName"`
ClusterID string `json:"clusterId,omitempty"`
APIKey string `json:"-"`
PageSize int `json:"pageSize,omitempty"`
CurrentPage int `json:"currentPage,omitempty"`
}

Return

*ListImportJobsResponse

Example

Example