Googly.CloudStorage.ObjectAccessControls (googly_cloud_storage v0.1.0)

Copy Markdown View Source

Endpoints for the ObjectAccessControls resource.

Summary

Functions

Permanently deletes the ACL entry for the specified entity on the specified object.

Returns the ACL entry for the specified entity on the specified object.

Creates a new ACL entry on the specified object.

Retrieves ACL entries on the specified object.

Patches an ACL entry on the specified object.

Updates an ACL entry on the specified object.

Functions

delete(bucket, object, entity, opts \\ [])

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

Permanently deletes the ACL entry for the specified entity on the specified object.

Parameters

  • bucket (type: String.t()) - Name of a bucket.
  • object (type: String.t()) - Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.
  • entity (type: String.t()) - The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
  • 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.
    • generation (type: String.t()) - If present, selects a specific revision of this object (as opposed to the latest version, the default).
    • user_project (type: String.t()) - The project to be billed for this request. Required for Requester Pays buckets.

Returns

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

get(bucket, object, entity, opts \\ [])

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

Returns the ACL entry for the specified entity on the specified object.

Parameters

  • bucket (type: String.t()) - Name of a bucket.
  • object (type: String.t()) - Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.
  • entity (type: String.t()) - The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
  • 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.
    • generation (type: String.t()) - If present, selects a specific revision of this object (as opposed to the latest version, the default).
    • user_project (type: String.t()) - The project to be billed for this request. Required for Requester Pays buckets.

Returns

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

insert(bucket, object, opts \\ [])

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

Creates a new ACL entry on the specified object.

Parameters

  • bucket (type: String.t()) - Name of a bucket.
  • object (type: String.t()) - Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.
  • 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.
    • generation (type: String.t()) - If present, selects a specific revision of this object (as opposed to the latest version, the default).
    • user_project (type: String.t()) - The project to be billed for this request. Required for Requester Pays buckets.
    • body (type: Googly.CloudStorage.Model.ObjectAccessControl.t()) -

Returns

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

list(bucket, object, opts \\ [])

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

Retrieves ACL entries on the specified object.

Parameters

  • bucket (type: String.t()) - Name of a bucket.
  • object (type: String.t()) - Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.
  • 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.
    • generation (type: String.t()) - If present, selects a specific revision of this object (as opposed to the latest version, the default).
    • user_project (type: String.t()) - The project to be billed for this request. Required for Requester Pays buckets.

Returns

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

patch(bucket, object, entity, opts \\ [])

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

Patches an ACL entry on the specified object.

Parameters

  • bucket (type: String.t()) - Name of a bucket.
  • object (type: String.t()) - Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.
  • entity (type: String.t()) - The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
  • 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.
    • generation (type: String.t()) - If present, selects a specific revision of this object (as opposed to the latest version, the default).
    • user_project (type: String.t()) - The project to be billed for this request. Required for Requester Pays buckets.
    • body (type: Googly.CloudStorage.Model.ObjectAccessControl.t()) -

Returns

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

update(bucket, object, entity, opts \\ [])

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

Updates an ACL entry on the specified object.

Parameters

  • bucket (type: String.t()) - Name of a bucket.
  • object (type: String.t()) - Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.
  • entity (type: String.t()) - The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
  • 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.
    • generation (type: String.t()) - If present, selects a specific revision of this object (as opposed to the latest version, the default).
    • user_project (type: String.t()) - The project to be billed for this request. Required for Requester Pays buckets.
    • body (type: Googly.CloudStorage.Model.ObjectAccessControl.t()) -

Returns

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