DeleteBucketInventoryConfiguration deletes an inventory configuration from 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 configuration t
(ctx context.Context, bucket, id string)
| 168 | // |
| 169 | // Returns an error if the operation fails or if the configuration doesn't exist. |
| 170 | func (c *Client) DeleteBucketInventoryConfiguration(ctx context.Context, bucket, id string) error { |
| 171 | if err := s3utils.CheckValidBucketName(bucket); err != nil { |
| 172 | return err |
| 173 | } |
| 174 | if id == "" { |
| 175 | return errInvalidArgument("inventory ID cannot be empty") |
| 176 | } |
| 177 | reqMeta := makeInventoryReqMetadata(bucket, "id", id) |
| 178 | resp, err := c.executeMethod(ctx, http.MethodDelete, reqMeta) |
| 179 | defer closeResponse(resp) |
| 180 | if err != nil { |
| 181 | return err |
| 182 | } |
| 183 | if resp.StatusCode != http.StatusOK { |
| 184 | return httpRespToErrorResponse(resp, bucket, "") |
| 185 | } |
| 186 | return nil |
| 187 | } |
| 188 | |
| 189 | // InventoryConfiguration represents the inventory configuration |
| 190 | type InventoryConfiguration struct { |
nothing calls this directly
no test coverage detected