gcloudex v0.4.3 GCloudex.CloudStorage.Client
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}]
Functions
Specs
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’.
Specs
create_bucket(bucket :: binary) :: HTTPResponse.t
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’.
Specs
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’.
Specs
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’.
Specs
delete_bucket(bucket :: binary) :: HTTPResponse.t
Deletes and empty bucket.
Specs
delete_object(bucket :: binary, object :: binary) :: HTTPResponse.t
Deletes the ‘object’ in the specified ‘bucket’.
Specs
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}].
Specs
exists_bucket(bucket :: binary) :: HTTPResponse.t
Indicates if the specified ‘bucket’ exists or whether the request has READ access to it.
Specs
get_bucket_acl(bucket :: binary) :: HTTPResponse.t
Lists the specified ‘bucket’ ACL.
Specs
get_bucket_class(bucket :: binary) :: HTTPResponse.t
Lists the specified ‘bucket’ class.
Specs
get_bucket_cors(bucket :: binary) :: HTTPResponse.t
Lists the specified ‘bucket’ CORS configuration.
Specs
get_bucket_lifecycle(bucket :: binary) :: HTTPResponse.t
Lists the specified ‘bucket’ lifecycle configuration.
Specs
get_bucket_logging(bucket :: binary) :: HTTPResponse.t
Lists the specified ‘bucket’ logging configuration.
Specs
get_bucket_region(bucket :: binary) :: HTTPResponse.t
Lists the specified ‘bucket’ location.
Specs
get_bucket_versioning(bucket :: binary) :: HTTPResponse.t
Lists the specified ‘bucket’ versioning configuration.
Specs
get_bucket_website(bucket :: binary) :: HTTPResponse.t
Lists the specified ‘bucket’ website configuration.
Specs
get_object(bucket :: binary, object :: binary) :: HTTPResponse.t
Downloads the ‘object’ from the specified ‘bucket’. The requester must have READ permission.
Specs
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.
Specs
get_object_acl(bucket :: binary, object :: binary) :: HTTPResponse.t
Lists the ‘object’ ACL from the specified ‘bucket’. The requester must have FULL_CONTROL permission.
Specs
get_object_metadata(bucket :: binary, object :: binary) :: HTTPResponse.t
Lists metadata for the given ‘object’ from the specified ‘bucket’.
Specs
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}].
Specs
list_objects(bucket :: binary) :: HTTPResponse.t
Lists all the objects in the specified ‘bucket’.
Specs
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}].
Specs
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.
Specs
request(atom, binary, [tuple], binary) :: HTTPoison.HTTPResponse.t
Sends an HTTP request without any query parameters.
Specs
request_query(atom, binary, [tuple], binary, binary) :: HTTPoison.HTTPResponse.t
Sends an HTTP request with the specified query parameters.
Specs
request_service :: HTTPoison.HTTPResponse.t
Sends an HTTP request according to the Service resource in the Google Cloud Storage documentation.
Specs
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.
Specs
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.
Specs
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.
Specs
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.
Specs
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.
Specs
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.
Specs
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.
Specs
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}].