.. meta:: :description: This documentation will guide you through the use of the Memset API. .. index:: double: Methods; memstore.container .. _memstore.container: Memstore Container Methods -------------------------- These methods are provided here as a convenient way to manage containers regarding the Access Control List (ACL) and the Content Delivery Network (CDN), but the same functionality can be achieved using the OpenStack Object Storage API. .. function:: memstore.container.acl Retrieve ACL information associated to a container. :param name: Name of the service. Service names are 1-64 characters A-Z, a-z, 0-9, -, . and _. Ensure this value has at most 64 characters. :type name: String :param container: Name of the container. :type container: String :returns: a dictionary with the following keys: **read_acl** List: The usernames (Strings) with read access to the container. **write_acl** List: The usernames (Strings) with write access to the container. The returned lists may be empty if there's no user in the ACL. .. function:: memstore.container.cdn Retrieve CDN information associated to a container. :param name: Name of the service. Service names are 1-64 characters A-Z, a-z, 0-9, -, . and _. Ensure this value has at most 64 characters. :type name: String :param container: Name of the container. Container name can only contain numbers, letters and hyphens. Hyphens aren't allowed at the beginning or the end of the name. :type container: String :returns: a dictionary with the following keys: **URL** String: public URL for the container. **SSL_URL** String: public SSL URL for the container. **public** Boolean: If the container CDN is enabled (public container). **ttl** Integer: Time to live in seconds for content cached by the CDN. **listing** Boolean: If directory listing is enabled. **index** String: Name of the file used as default index. '0' means the functionality is disabled. **notfound** String: Path of the file used for the HTTP 404 (Not Found) page. '0' means the functionality is disabled. **cors** String: Cross-Origin Resource Sharing (CORS) header value, being a specific site or '*' for any. '0' means the functionality is disabled. The CDN information is stored in the container's metadata, other content not listed here is ignored by the method. .. function:: memstore.container.create Create a container with the given name. :param name: Name of the service. Service names are 1-64 characters A-Z, a-z, 0-9, -, . and _. Ensure this value has at most 64 characters. :type name: String :param container: Name of the container. :type container: String :returns: No value if the container is created successfully, or raises an :class:`ApiError`. .. function:: memstore.container.set_acl Set ACL information associated to a container. Write access implies read access. When a new ACL is set, the existing ACL is discarded. To clear a list, an empty list will be used. Any user added to the ACL must be created and enabled in the container's Memstore instance for the ACL to have effect. :param name: Name of the service. Service names are 1-64 characters A-Z, a-z, 0-9, -, . and _. Ensure this value has at most 64 characters. :type name: String :param container: Name of the container. :type container: String :param read_acl: List of strings with usernames to have read access to the container :type read_acl: List :param write_acl: List of strings with usernames to have write access to the container :type write_acl: List .. function:: memstore.container.set_public_cdn Set a container public enabling the CDN service. :param name: Name of the service. Service names are 1-64 characters A-Z, a-z, 0-9, -, . and _. Ensure this value has at most 64 characters. :type name: String :param container: Name of the container. Container name can only contain numbers, letters and hyphens. Hyphens aren't allowed at the beginning or the end of the name. :type container: String :param ttl: Time to live in seconds for content cached by the CDN. :type ttl: Integer :param listing: If directory listing is enabled. :type listing: Boolean, Optional :param index: Name of the file to be used as default index. :type index: String, Optional :param notfound: Path of the file to be used for the HTTP 404 (Not Found) page. :type notfound: String, Optional :param cors: Cross-Origin Resource Sharing (CORS) header value. :type cors: String, Optional :returns: the public URL for the container. :rtype: String The CDN information is stored in the container's metadata and any unrelated existing metadata information won't be altered. .. function:: memstore.container.unset_public_cdn Unset a public container disabling the CDN service. The CDN information is stored in the container's metadata and any unrelated existing metadata information won't be altered. The container and its data won't be modified. :param name: Name of the service. Service names are 1-64 characters A-Z, a-z, 0-9, -, . and _. Ensure this value has at most 64 characters. :type name: String :param container: Name of the container. Container name can only contain numbers, letters and hyphens. Hyphens aren't allowed at the beginning or the end of the name. :type container: String