Googly.CloudStorage.AnywhereCaches (googly_cloud_storage v0.1.0)

Copy Markdown View Source

Endpoints for the AnywhereCaches resource.

Summary

Functions

Disables an Anywhere Cache instance.

Returns the metadata of an Anywhere Cache instance.

Creates an Anywhere Cache instance.

Returns a list of Anywhere Cache instances of the bucket matching the criteria.

Pauses an Anywhere Cache instance.

Resumes a paused or disabled Anywhere Cache instance.

Updates the config of an Anywhere Cache instance.

Functions

disable(bucket, anywhere_cache_id, opts \\ [])

@spec disable(String.t(), String.t(), keyword()) ::
  {:ok, Googly.CloudStorage.Model.AnywhereCache.t()} | {:error, term()}

Disables an Anywhere Cache instance.

Parameters

  • bucket (type: String.t()) - Name of the parent bucket.
  • anywhere_cache_id (type: String.t()) - The ID of requested Anywhere Cache instance.
  • 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.AnywhereCache{}} on success
  • {:error, %Googly.CloudStorage.Error{}} on failure

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

@spec get(String.t(), String.t(), keyword()) ::
  {:ok, Googly.CloudStorage.Model.AnywhereCache.t()} | {:error, term()}

Returns the metadata of an Anywhere Cache instance.

Parameters

  • bucket (type: String.t()) - Name of the parent bucket.
  • anywhere_cache_id (type: String.t()) - The ID of requested Anywhere Cache instance.
  • 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.AnywhereCache{}} on success
  • {:error, %Googly.CloudStorage.Error{}} on failure

insert(bucket, opts \\ [])

@spec insert(
  String.t(),
  keyword()
) ::
  {:ok, Googly.CloudStorage.Model.GoogleLongrunningOperation.t()}
  | {:error, term()}

Creates an Anywhere Cache instance.

Parameters

  • bucket (type: String.t()) - Name of the parent bucket.
  • 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.AnywhereCache.t()) -

Returns

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

list(bucket, opts \\ [])

@spec list(
  String.t(),
  keyword()
) :: {:ok, Googly.CloudStorage.Model.AnywhereCaches.t()} | {:error, term()}

Returns a list of Anywhere Cache instances of the bucket matching the criteria.

Parameters

  • bucket (type: String.t()) - Name of the parent bucket.
  • 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.
    • page_size (type: integer()) - Maximum number of items to return in a single page of responses. Maximum 1000.
    • 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.AnywhereCaches{}} on success
  • {:error, %Googly.CloudStorage.Error{}} on failure

pause(bucket, anywhere_cache_id, opts \\ [])

@spec pause(String.t(), String.t(), keyword()) ::
  {:ok, Googly.CloudStorage.Model.AnywhereCache.t()} | {:error, term()}

Pauses an Anywhere Cache instance.

Parameters

  • bucket (type: String.t()) - Name of the parent bucket.
  • anywhere_cache_id (type: String.t()) - The ID of requested Anywhere Cache instance.
  • 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.AnywhereCache{}} on success
  • {:error, %Googly.CloudStorage.Error{}} on failure

resume(bucket, anywhere_cache_id, opts \\ [])

@spec resume(String.t(), String.t(), keyword()) ::
  {:ok, Googly.CloudStorage.Model.AnywhereCache.t()} | {:error, term()}

Resumes a paused or disabled Anywhere Cache instance.

Parameters

  • bucket (type: String.t()) - Name of the parent bucket.
  • anywhere_cache_id (type: String.t()) - The ID of requested Anywhere Cache instance.
  • 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.AnywhereCache{}} on success
  • {:error, %Googly.CloudStorage.Error{}} on failure

update(bucket, anywhere_cache_id, opts \\ [])

@spec update(String.t(), String.t(), keyword()) ::
  {:ok, Googly.CloudStorage.Model.GoogleLongrunningOperation.t()}
  | {:error, term()}

Updates the config of an Anywhere Cache instance.

Parameters

  • bucket (type: String.t()) - Name of the parent bucket.
  • anywhere_cache_id (type: String.t()) - The ID of requested Anywhere Cache instance.
  • 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.AnywhereCache.t()) -

Returns

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