GetBucketInventoryJobStatus retrieves the status of an inventory job for a bucket. This is a MinIO-specific API and is not compatible with AWS S3. Parameters: - ctx: Context for request cancellation and timeout - bucket: Name of the bucket - id: Unique identifier for the inventory job Returns the
(ctx context.Context, bucket, id string)
| 307 | // |
| 308 | // Returns the inventory job status including execution state, progress, and error information, or an error if the operation fails. |
| 309 | func (c *Client) GetBucketInventoryJobStatus(ctx context.Context, bucket, id string) (*InventoryJobStatus, error) { |
| 310 | if err := s3utils.CheckValidBucketName(bucket); err != nil { |
| 311 | return nil, err |
| 312 | } |
| 313 | if id == "" { |
| 314 | return nil, errInvalidArgument("inventory ID cannot be empty") |
| 315 | } |
| 316 | reqMeta := makeInventoryReqMetadata(bucket, "id", id, "status", "") |
| 317 | resp, err := c.executeMethod(ctx, http.MethodGet, reqMeta) |
| 318 | defer closeResponse(resp) |
| 319 | if err != nil { |
| 320 | return nil, err |
| 321 | } |
| 322 | if resp.StatusCode != http.StatusOK { |
| 323 | return nil, httpRespToErrorResponse(resp, bucket, "") |
| 324 | } |
| 325 | decoder := json.NewDecoder(resp.Body) |
| 326 | var jStatus InventoryJobStatus |
| 327 | err = decoder.Decode(&jStatus) |
| 328 | if err != nil { |
| 329 | return nil, err |
| 330 | } |
| 331 | return &jStatus, nil |
| 332 | } |
nothing calls this directly
no test coverage detected