gcloudex_storage v0.9.0 GCloudex.CloudStorage.Client
Link to this section Summary
Functions
Copies the specified ‘source_object’ into the given ‘new_bucket’ as ‘new_object’
Creates a bucket with the specified ‘bucket’ name if available. This function will create the bucket in the default region ‘US’ and with the default class ‘STANDARD’
Creates a bucket with the specified ‘bucket’ name if available and in the specified ‘region’. This function will create the bucket with the default class ‘STANDARD’
Creates a bucket with the specified ‘bucket’ name if available and in the specified ‘region’ and with the specified ‘class’
Deletes and empty bucket
Deletes the ‘object’ in the specified ‘bucket’
Deletes the ‘object’ in the specified ‘bucket’ using the given ‘query_params’. The query parameters must be passed as a list of tuples [{param_1, value_1}, {param_2, value_2}]
Indicates if the specified ‘bucket’ exists or whether the request has READ access to it
Lists the specified ‘bucket’ ACL
Lists the specified ‘bucket’ class
Lists the specified ‘bucket’ CORS configuration
Lists the specified ‘bucket’ lifecycle configuration
Lists the specified ‘bucket’ logging configuration
Lists the specified ‘bucket’ location
Lists the specified ‘bucket’ versioning configuration
Lists the specified ‘bucket’ website configuration
Downloads the ‘object’ from the specified ‘bucket’. The requester must have READ permission
Downloads the ‘object’ from the specified ‘bucket’ using the given ‘query_params’. The query parameters must be passed as a list of tuples [{param_1, value_1}, {param_2, value_2}]. The requester must have READ permission
Lists the ‘object’ ACL from the specified ‘bucket’. The requester must have FULL_CONTROL permission
Lists metadata for the given ‘object’ from the specified ‘bucket’
Lists metadata for the given ‘object’ from the specified ‘bucket’ using the given ‘query_params’. The query parameters must be passed as a list of tuples [{param_1, value_1}, {param_2, value_2}]
Lists all the buckets in the specified project
Lists all the objects in the specified ‘bucket’
Lists all the objects in the specified ‘bucket’ using the given ‘query_params’. The query parameters must be passed as a list of tuples [{param_1, value_1}, {param_2, value_2}]
Uploads the file in the given ‘filepath’ to the specified ‘bucket’. If a ‘bucket_path’ is specified then the filename must be included at the end
Sends an HTTP request without any query parameters
Sends an HTTP request with the specified query parameters
Sends an HTTP request according to the Service resource in the Google Cloud Storage documentation
Sets or modifies the existing ACL in the specified ‘bucket’ with the given ‘acl_config’ in XML format
Sets or modifies the existing CORS configuration in the specified ‘bucket’ with the given ‘cors_config’ in XML format
Sets or modifies the existing lifecyle configuration in the specified ‘bucket’ with the given ‘lifecycle_config’ in XML format
Sets or modifies the existing logging configuration in the specified ‘bucket’ with the given ‘logging_config’ in XML format
Sets or modifies the existing versioning configuration in the specified ‘bucket’ with the given ‘versioning_config’ in XML format
Sets or modifies the existing website configuration in the specified ‘bucket’ with the given ‘website_config’ in XML format
Sets or modifies the ‘object’ from the specified ‘bucket’ with the provided ‘acl_config’ in XML format
Sets or modifies the ‘object’ from the specified ‘bucket’ with the provided ‘acl_config’ in XML format and using the given ‘query_params’. The query parameters must be passed as a list of tuples [{param_1, value_1}, {param_2, value_2}]
Link to this section Functions
copy_object(new_bucket :: binary(), new_object :: binary(), source_object :: binary()) :: HTTPResponse.t()
Copies the specified ‘source_object’ into the given ‘new_bucket’ as ‘new_object’.
Creates a bucket with the specified ‘bucket’ name if available. This function will create the bucket in the default region ‘US’ and with the default class ‘STANDARD’.
create_bucket(bucket :: binary(), region :: binary()) :: HTTPResponse.t()
Creates a bucket with the specified ‘bucket’ name if available and in the specified ‘region’. This function will create the bucket with the default class ‘STANDARD’.
create_bucket(bucket :: binary(), region :: binary(), class :: binary()) :: HTTPResponse.t()
Creates a bucket with the specified ‘bucket’ name if available and in the specified ‘region’ and with the specified ‘class’.
Deletes and empty bucket.
delete_object(bucket :: binary(), object :: binary()) :: HTTPResponse.t()
Deletes the ‘object’ in the specified ‘bucket’.
delete_object(bucket :: binary(), object :: binary(), query_params :: [{binary(), binary()}]) :: HTTPResponse.t()
Deletes the ‘object’ in the specified ‘bucket’ using the given ‘query_params’. The query parameters must be passed as a list of tuples [{param_1, value_1}, {param_2, value_2}].
Indicates if the specified ‘bucket’ exists or whether the request has READ access to it.
Lists the specified ‘bucket’ ACL.
get_bucket_class(bucket :: binary()) :: HTTPResponse.t()
Lists the specified ‘bucket’ class.
get_bucket_cors(bucket :: binary()) :: HTTPResponse.t()
Lists the specified ‘bucket’ CORS configuration.
get_bucket_lifecycle(bucket :: binary()) :: HTTPResponse.t()
Lists the specified ‘bucket’ lifecycle configuration.
get_bucket_logging(bucket :: binary()) :: HTTPResponse.t()
Lists the specified ‘bucket’ logging configuration.
get_bucket_region(bucket :: binary()) :: HTTPResponse.t()
Lists the specified ‘bucket’ location.
get_bucket_versioning(bucket :: binary()) :: HTTPResponse.t()
Lists the specified ‘bucket’ versioning configuration.
get_bucket_website(bucket :: binary()) :: HTTPResponse.t()
Lists the specified ‘bucket’ website configuration.
get_object(bucket :: binary(), object :: binary()) :: HTTPResponse.t()
Downloads the ‘object’ from the specified ‘bucket’. The requester must have READ permission.
get_object(bucket :: binary(), object :: binary(), query_params :: [{binary(), binary()}]) :: HTTPResponse.t()
Downloads the ‘object’ from the specified ‘bucket’ using the given ‘query_params’. The query parameters must be passed as a list of tuples [{param_1, value_1}, {param_2, value_2}]. The requester must have READ permission.
get_object_acl(bucket :: binary(), object :: binary()) :: HTTPResponse.t()
Lists the ‘object’ ACL from the specified ‘bucket’. The requester must have FULL_CONTROL permission.
get_object_metadata(bucket :: binary(), object :: binary()) :: HTTPResponse.t()
Lists metadata for the given ‘object’ from the specified ‘bucket’.
get_object_metadata(bucket :: binary(), object :: binary(), [{binary(), binary()}]) :: HTTPResponse.t()
Lists metadata for the given ‘object’ from the specified ‘bucket’ using the given ‘query_params’. The query parameters must be passed as a list of tuples [{param_1, value_1}, {param_2, value_2}].
Lists all the buckets in the specified project.
Lists all the objects in the specified ‘bucket’.
list_objects(bucket :: binary(), query_params :: [{binary(), binary()}]) :: HTTPResponse.t()
Lists all the objects in the specified ‘bucket’ using the given ‘query_params’. The query parameters must be passed as a list of tuples [{param_1, value_1}, {param_2, value_2}].
put_object(bucket :: binary(), filepath :: binary(), bucket_path :: binary()) :: HTTPResponse.t()
Uploads the file in the given ‘filepath’ to the specified ‘bucket’. If a ‘bucket_path’ is specified then the filename must be included at the end:
put_object “somebucket”,
"/home/user/Documents/this_file",
"new_folder/some_other_folder/this_file"
=> # This will upload the file to the directory in ‘bucket_path’ and
will create the directories if they do not exist.
request(atom(), binary(), [tuple()], binary()) :: HTTPoison.HTTPResponse.t()
Sends an HTTP request without any query parameters.
request_query(atom(), binary(), [tuple()], binary(), binary()) :: HTTPoison.HTTPResponse.t()
Sends an HTTP request with the specified query parameters.
Sends an HTTP request according to the Service resource in the Google Cloud Storage documentation.
set_bucket_acl(bucket :: binary(), acl_config :: binary()) :: HTTPResponse.t()
Sets or modifies the existing ACL in the specified ‘bucket’ with the given ‘acl_config’ in XML format.
set_bucket_cors(bucket :: binary(), cors_config :: binary()) :: HTTPResponse.t()
Sets or modifies the existing CORS configuration in the specified ‘bucket’ with the given ‘cors_config’ in XML format.
set_bucket_lifecycle(bucket :: binary(), lifecycle_config :: binary()) :: HTTPResponse.t()
Sets or modifies the existing lifecyle configuration in the specified ‘bucket’ with the given ‘lifecycle_config’ in XML format.
set_bucket_logging(bucket :: binary(), logging_config :: binary()) :: HTTPResponse.t()
Sets or modifies the existing logging configuration in the specified ‘bucket’ with the given ‘logging_config’ in XML format.
set_bucket_versioning(bucket :: binary(), versioning_config :: binary()) :: HTTPResponse.t()
Sets or modifies the existing versioning configuration in the specified ‘bucket’ with the given ‘versioning_config’ in XML format.
set_bucket_website(bucket :: binary(), website_config :: binary()) :: HTTPResponse.t()
Sets or modifies the existing website configuration in the specified ‘bucket’ with the given ‘website_config’ in XML format.
set_object_acl(bucket :: binary(), object :: binary(), acl_config :: binary()) :: HTTPResponse.t()
Sets or modifies the ‘object’ from the specified ‘bucket’ with the provided ‘acl_config’ in XML format.
set_object_acl(bucket :: binary(), object :: binary(), acl_config :: binary(), [{binary(), binary()}]) :: HTTPResponse.t()
Sets or modifies the ‘object’ from the specified ‘bucket’ with the provided ‘acl_config’ in XML format and using the given ‘query_params’. The query parameters must be passed as a list of tuples [{param_1, value_1}, {param_2, value_2}].