Containers

Containers

Create new container, manage metas, get related information, delete, ...

Available methods : create(), create_with_result(), delete_objects(), delete_objects_with_result(), delete(), delete_with_result(), list(), exist(), info(), metas()

Constructor

new Containers(context)

Container constructor

Parameters:
Name Type Description
context OVHStorage

OVHObjectStorage context

Source:

Methods

(async) create(container, types, web_content_pagesopt) → {Promise.<Object>}

Create a new container

Parameters:
Name Type Attributes Description
container String

Name of container

types "public" | "private" | "static"

Type of container : public, private or static

web_content_pages OVHStorageContainerStaticWebContentPages <optional>

Web page parameters (index file, error file, listing cascading style sheet file) if container is on static type

Source:

(async) create_with_result(container, types, web_content_pagesopt) → {Promise.<Boolean>}

Create a new container and return boolean as result

Parameters:
Name Type Attributes Description
container String

Name of container

types "public" | "private" | "static"

Type of container : public, private or static

web_content_pages OVHStorageContainerStaticWebContentPages <optional>

Web page parameters (index file, error file, listing cascading style sheet file) if container is on static type

Source:

(async) delete(container, forceopt) → {Promise.<Object>}

Delete container and all objects in container if force

Parameters:
Name Type Attributes Default Description
container String

Name of container

force Boolean <optional>
false

Boolean as true to delete object in container, default false

Source:

(async) delete_objects(container) → {Promise.<Object>}

Delete all objects in container

Parameters:
Name Type Description
container String

Name of container

Source:

(async) delete_objects_with_result(container) → {Promise.<Boolean>}

Delete all objects in container and return boolean as result

Parameters:
Name Type Description
container String

Name of container

Source:

(async) delete_with_result(container, forceopt) → {Promise.<Boolean>}

Delete container and all objects in container if force and return boolean as result

Parameters:
Name Type Attributes Default Description
container String

Name of container

force Boolean <optional>
false

Boolean as true to delete object in container, default false

Source:

(async) exist(container) → {Promise.<Boolean>}

Check if container exist and return boolean

Parameters:
Name Type Description
container String

Name of container

Source:

(async) info(container) → {Promise.<Object>}

Get information details of container

Parameters:
Name Type Description
container String

Name of container

Source:

(async) list(container) → {Promise.<Array.<Object>>}

List of all objects in container

Parameters:
Name Type Description
container String

Name of container

Source:

metas() → {ContainersMeta}

Manage meta data of container
Available methods : create(), update(), delete(), all(), has(), get()

Source: