Googly.CloudStorage.Operations (googly_cloud_storage v0.1.0)

Copy Markdown View Source

Endpoints for the Operations resource.

Summary

Functions

Starts asynchronous advancement of the relocate bucket operation in the case of required write downtime, to allow it to lock the bucket at the source location, and proceed with the bucket location swap. The server makes a best effort to advance the relocate bucket operation, but success is not guaranteed.

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed.

Gets the latest state of a long-running operation.

Lists operations that match the specified filter in the request.

Functions

advance_relocate_bucket(bucket, operation_id, opts \\ [])

@spec advance_relocate_bucket(String.t(), String.t(), keyword()) ::
  {:ok, Req.Response.t()} | {:error, term()}

Starts asynchronous advancement of the relocate bucket operation in the case of required write downtime, to allow it to lock the bucket at the source location, and proceed with the bucket location swap. The server makes a best effort to advance the relocate bucket operation, but success is not guaranteed.

Parameters

  • bucket (type: String.t()) - Name of the bucket to advance the relocate for.
  • operation_id (type: String.t()) - ID of the operation resource.
  • opts (type: keyword()) - Query and call options (:token, plus any of the below)
    • alt (type: String.t()) - Data format for the response.
    • fields (type: String.t()) - Selector specifying which fields to include in a partial response.
    • key (type: String.t()) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token (type: String.t()) - OAuth 2.0 token for the current user.
    • pretty_print (type: boolean()) - Returns response with indentations and line breaks.
    • quota_user (type: String.t()) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • upload_type (type: String.t()) - Upload protocol for media (e.g. "media", "multipart", "resumable").
    • user_ip (type: String.t()) - Deprecated. Please use quotaUser instead.
    • body (type: Googly.CloudStorage.Model.AdvanceRelocateBucketOperationRequest.t()) -

Returns

  • {:ok, Req.Response.t()} on success
  • {:error, %Googly.CloudStorage.Error{}} on failure

cancel(bucket, operation_id, opts \\ [])

@spec cancel(String.t(), String.t(), keyword()) ::
  {:ok, Req.Response.t()} | {:error, term()}

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed.

Parameters

  • bucket (type: String.t()) - The parent bucket of the operation resource.
  • operation_id (type: String.t()) - The ID of the operation resource.
  • opts (type: keyword()) - Query and call options (:token, plus any of the below)
    • alt (type: String.t()) - Data format for the response.
    • fields (type: String.t()) - Selector specifying which fields to include in a partial response.
    • key (type: String.t()) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token (type: String.t()) - OAuth 2.0 token for the current user.
    • pretty_print (type: boolean()) - Returns response with indentations and line breaks.
    • quota_user (type: String.t()) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • upload_type (type: String.t()) - Upload protocol for media (e.g. "media", "multipart", "resumable").
    • user_ip (type: String.t()) - Deprecated. Please use quotaUser instead.

Returns

  • {:ok, Req.Response.t()} on success
  • {:error, %Googly.CloudStorage.Error{}} on failure

get(bucket, operation_id, opts \\ [])

Gets the latest state of a long-running operation.

Parameters

  • bucket (type: String.t()) - The parent bucket of the operation resource.
  • operation_id (type: String.t()) - The ID of the operation resource.
  • opts (type: keyword()) - Query and call options (:token, plus any of the below)
    • alt (type: String.t()) - Data format for the response.
    • fields (type: String.t()) - Selector specifying which fields to include in a partial response.
    • key (type: String.t()) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token (type: String.t()) - OAuth 2.0 token for the current user.
    • pretty_print (type: boolean()) - Returns response with indentations and line breaks.
    • quota_user (type: String.t()) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • upload_type (type: String.t()) - Upload protocol for media (e.g. "media", "multipart", "resumable").
    • user_ip (type: String.t()) - Deprecated. Please use quotaUser instead.

Returns

  • {:ok, %Googly.CloudStorage.Model.GoogleLongrunningOperation{}} on success
  • {:error, %Googly.CloudStorage.Error{}} on failure

list(bucket, opts \\ [])

Lists operations that match the specified filter in the request.

Parameters

  • bucket (type: String.t()) - Name of the bucket in which to look for operations.
  • opts (type: keyword()) - Query and call options (:token, plus any of the below)
    • alt (type: String.t()) - Data format for the response.
    • fields (type: String.t()) - Selector specifying which fields to include in a partial response.
    • key (type: String.t()) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token (type: String.t()) - OAuth 2.0 token for the current user.
    • pretty_print (type: boolean()) - Returns response with indentations and line breaks.
    • quota_user (type: String.t()) - An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • upload_type (type: String.t()) - Upload protocol for media (e.g. "media", "multipart", "resumable").
    • user_ip (type: String.t()) - Deprecated. Please use quotaUser instead.
    • filter (type: String.t()) - A filter to narrow down results to a preferred subset. The filtering language is documented in more detail in AIP-160.
    • page_size (type: integer()) - Maximum number of items to return in a single page of responses. Fewer total results may be returned than requested. The service uses this parameter or 100 items, whichever is smaller.
    • page_token (type: String.t()) - A previously-returned page token representing part of the larger set of results to view.

Returns

  • {:ok, %Googly.CloudStorage.Model.GoogleLongrunningListOperationsResponse{}} on success
  • {:error, %Googly.CloudStorage.Error{}} on failure