google_api_storage v0.1.0 GoogleApi.Storage.V1.Api.Buckets View Source

API calls for all endpoints tagged Buckets.

Link to this section Summary

Functions

Permanently deletes an empty bucket

Returns metadata for the specified bucket

Returns an IAM policy for the specified bucket

Retrieves a list of buckets for a given project

Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate. This method supports patch semantics

Updates an IAM policy for the specified bucket

Tests a set of permissions on the given bucket to see which, if any, are held by the caller

Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate

Link to this section Functions

Link to this function storage_buckets_delete(connection, bucket, opts \\ []) View Source
storage_buckets_delete(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil} | {:error, Tesla.Env.t()}

Permanently deletes an empty bucket.

Parameters

  • connection (GoogleApi.Storage.V1.Connection): Connection to server
  • bucket (String.t): Name of a bucket.
  • opts (KeywordList): [optional] Optional parameters

    • :alt (String.t): Data format for the response.
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (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 (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (String.t): Deprecated. Please use quotaUser instead.
    • :ifMetagenerationMatch (String.t): If set, only deletes the bucket if its metageneration matches this value.
    • :ifMetagenerationNotMatch (String.t): If set, only deletes the bucket if its metageneration does not match this value.
    • :userProject (String.t): The project to be billed for this request. Required for Requester Pays buckets.

Returns

{:ok, %{}} on success {:error, info} on failure

Link to this function storage_buckets_get(connection, bucket, opts \\ []) View Source
storage_buckets_get(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, GoogleApi.Storage.V1.Model.Bucket.t()} | {:error, Tesla.Env.t()}

Returns metadata for the specified bucket.

Parameters

  • connection (GoogleApi.Storage.V1.Connection): Connection to server
  • bucket (String.t): Name of a bucket.
  • opts (KeywordList): [optional] Optional parameters

    • :alt (String.t): Data format for the response.
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (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 (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (String.t): Deprecated. Please use quotaUser instead.
    • :ifMetagenerationMatch (String.t): Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.
    • :ifMetagenerationNotMatch (String.t): Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.
    • :projection (String.t): Set of properties to return. Defaults to noAcl.
    • :userProject (String.t): The project to be billed for this request. Required for Requester Pays buckets.

Returns

{:ok, %GoogleApi.Storage.V1.Model.Bucket{}} on success {:error, info} on failure

Link to this function storage_buckets_get_iam_policy(connection, bucket, opts \\ []) View Source
storage_buckets_get_iam_policy(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, GoogleApi.Storage.V1.Model.Policy.t()} | {:error, Tesla.Env.t()}

Returns an IAM policy for the specified bucket.

Parameters

  • connection (GoogleApi.Storage.V1.Connection): Connection to server
  • bucket (String.t): Name of a bucket.
  • opts (KeywordList): [optional] Optional parameters

    • :alt (String.t): Data format for the response.
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (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 (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (String.t): Deprecated. Please use quotaUser instead.
    • :userProject (String.t): The project to be billed for this request. Required for Requester Pays buckets.

Returns

{:ok, %GoogleApi.Storage.V1.Model.Policy{}} on success {:error, info} on failure

Link to this function storage_buckets_insert(connection, project, opts \\ []) View Source
storage_buckets_insert(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, GoogleApi.Storage.V1.Model.Bucket.t()} | {:error, Tesla.Env.t()}

Creates a new bucket.

Parameters

  • connection (GoogleApi.Storage.V1.Connection): Connection to server
  • project (String.t): A valid API project identifier.
  • opts (KeywordList): [optional] Optional parameters

    • :alt (String.t): Data format for the response.
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (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 (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (String.t): Deprecated. Please use quotaUser instead.
    • :predefinedAcl (String.t): Apply a predefined set of access controls to this bucket.
    • :predefinedDefaultObjectAcl (String.t): Apply a predefined set of default object access controls to this bucket.
    • :projection (String.t): Set of properties to return. Defaults to noAcl, unless the bucket resource specifies acl or defaultObjectAcl properties, when it defaults to full.
    • :userProject (String.t): The project to be billed for this request.
    • :body (Bucket):

Returns

{:ok, %GoogleApi.Storage.V1.Model.Bucket{}} on success {:error, info} on failure

Link to this function storage_buckets_list(connection, project, opts \\ []) View Source
storage_buckets_list(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, GoogleApi.Storage.V1.Model.Buckets.t()} | {:error, Tesla.Env.t()}

Retrieves a list of buckets for a given project.

Parameters

  • connection (GoogleApi.Storage.V1.Connection): Connection to server
  • project (String.t): A valid API project identifier.
  • opts (KeywordList): [optional] Optional parameters

    • :alt (String.t): Data format for the response.
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (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 (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (String.t): Deprecated. Please use quotaUser instead.
    • :maxResults (integer()): Maximum number of buckets to return in a single response. The service will use this parameter or 1,000 items, whichever is smaller.
    • :pageToken (String.t): A previously-returned page token representing part of the larger set of results to view.
    • :prefix (String.t): Filter results to buckets whose names begin with this prefix.
    • :projection (String.t): Set of properties to return. Defaults to noAcl.
    • :userProject (String.t): The project to be billed for this request.

Returns

{:ok, %GoogleApi.Storage.V1.Model.Buckets{}} on success {:error, info} on failure

Link to this function storage_buckets_lock_retention_policy(connection, bucket, if_metageneration_match, opts \\ []) View Source
storage_buckets_lock_retention_policy(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  keyword()
) :: {:ok, GoogleApi.Storage.V1.Model.Bucket.t()} | {:error, Tesla.Env.t()}

Locks retention policy on a bucket.

Parameters

  • connection (GoogleApi.Storage.V1.Connection): Connection to server
  • bucket (String.t): Name of a bucket.
  • if_metageneration_match (String.t): Makes the operation conditional on whether bucket's current metageneration matches the given value.
  • opts (KeywordList): [optional] Optional parameters

    • :alt (String.t): Data format for the response.
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (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 (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (String.t): Deprecated. Please use quotaUser instead.
    • :userProject (String.t): The project to be billed for this request. Required for Requester Pays buckets.

Returns

{:ok, %GoogleApi.Storage.V1.Model.Bucket{}} on success {:error, info} on failure

Link to this function storage_buckets_patch(connection, bucket, opts \\ []) View Source
storage_buckets_patch(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, GoogleApi.Storage.V1.Model.Bucket.t()} | {:error, Tesla.Env.t()}

Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate. This method supports patch semantics.

Parameters

  • connection (GoogleApi.Storage.V1.Connection): Connection to server
  • bucket (String.t): Name of a bucket.
  • opts (KeywordList): [optional] Optional parameters

    • :alt (String.t): Data format for the response.
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (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 (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (String.t): Deprecated. Please use quotaUser instead.
    • :ifMetagenerationMatch (String.t): Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.
    • :ifMetagenerationNotMatch (String.t): Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.
    • :predefinedAcl (String.t): Apply a predefined set of access controls to this bucket.
    • :predefinedDefaultObjectAcl (String.t): Apply a predefined set of default object access controls to this bucket.
    • :projection (String.t): Set of properties to return. Defaults to full.
    • :userProject (String.t): The project to be billed for this request. Required for Requester Pays buckets.
    • :body (Bucket):

Returns

{:ok, %GoogleApi.Storage.V1.Model.Bucket{}} on success {:error, info} on failure

Link to this function storage_buckets_set_iam_policy(connection, bucket, opts \\ []) View Source
storage_buckets_set_iam_policy(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, GoogleApi.Storage.V1.Model.Policy.t()} | {:error, Tesla.Env.t()}

Updates an IAM policy for the specified bucket.

Parameters

  • connection (GoogleApi.Storage.V1.Connection): Connection to server
  • bucket (String.t): Name of a bucket.
  • opts (KeywordList): [optional] Optional parameters

    • :alt (String.t): Data format for the response.
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (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 (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (String.t): Deprecated. Please use quotaUser instead.
    • :userProject (String.t): The project to be billed for this request. Required for Requester Pays buckets.
    • :body (Policy):

Returns

{:ok, %GoogleApi.Storage.V1.Model.Policy{}} on success {:error, info} on failure

Link to this function storage_buckets_test_iam_permissions(connection, bucket, permissions, opts \\ []) View Source
storage_buckets_test_iam_permissions(
  Tesla.Env.client(),
  String.t(),
  [String.t()],
  keyword()
) ::
  {:ok, GoogleApi.Storage.V1.Model.TestIamPermissionsResponse.t()}
  | {:error, Tesla.Env.t()}

Tests a set of permissions on the given bucket to see which, if any, are held by the caller.

Parameters

  • connection (GoogleApi.Storage.V1.Connection): Connection to server
  • bucket (String.t): Name of a bucket.
  • permissions ([String.t]): Permissions to test.
  • opts (KeywordList): [optional] Optional parameters

    • :alt (String.t): Data format for the response.
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (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 (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (String.t): Deprecated. Please use quotaUser instead.
    • :userProject (String.t): The project to be billed for this request. Required for Requester Pays buckets.

Returns

{:ok, %GoogleApi.Storage.V1.Model.TestIamPermissionsResponse{}} on success {:error, info} on failure

Link to this function storage_buckets_update(connection, bucket, opts \\ []) View Source
storage_buckets_update(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, GoogleApi.Storage.V1.Model.Bucket.t()} | {:error, Tesla.Env.t()}

Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.

Parameters

  • connection (GoogleApi.Storage.V1.Connection): Connection to server
  • bucket (String.t): Name of a bucket.
  • opts (KeywordList): [optional] Optional parameters

    • :alt (String.t): Data format for the response.
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (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 (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (String.t): Deprecated. Please use quotaUser instead.
    • :ifMetagenerationMatch (String.t): Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.
    • :ifMetagenerationNotMatch (String.t): Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.
    • :predefinedAcl (String.t): Apply a predefined set of access controls to this bucket.
    • :predefinedDefaultObjectAcl (String.t): Apply a predefined set of default object access controls to this bucket.
    • :projection (String.t): Set of properties to return. Defaults to full.
    • :userProject (String.t): The project to be billed for this request. Required for Requester Pays buckets.
    • :body (Bucket):

Returns

{:ok, %GoogleApi.Storage.V1.Model.Bucket{}} on success {:error, info} on failure