.. versionadded:: 2015.8.0

    Set a storage container's acl

    CLI Example:

    .. code-block:: bash

        salt-cloud -f set_storage_container my-azure name=mycontainer

    name:
        Name of existing container.
    signed_identifiers:
        SignedIdentifers instance
    blob_public_access:
        Optional. Possible values include: container, blob
    lease_id:
        If specified, set_storage_container_acl only succeeds if the
        container's lease is active and matches this ID.

def set_storage_container_acl(kwargs=None, storage_conn=None, call=None):
    '''
    .. versionadded:: 2015.8.0

    Set a storage container's acl

    CLI Example:

    .. code-block:: bash

        salt-cloud -f set_storage_container my-azure name=mycontainer

    name:
        Name of existing container.
    signed_identifiers:
        SignedIdentifers instance
    blob_public_access:
        Optional. Possible values include: container, blob
    lease_id:
        If specified, set_storage_container_acl only succeeds if the
        container's lease is active and matches this ID.
    '''
    if call != 'function':
        raise SaltCloudSystemExit(
            'The create_storage_container function must be called with -f or --function.'
        )

    if not storage_conn:
        storage_conn = get_storage_conn(conn_kwargs=kwargs)

    try:
        data = storage_conn.set_container_acl(
            container_name=kwargs['name'],
            signed_identifiers=kwargs.get('signed_identifiers', None),
            x_ms_blob_public_access=kwargs.get('blob_public_access', None),
            x_ms_lease_id=kwargs.get('lease_id', None),
        )
        return {'Success': 'The storage container was successfully updated'}
    except AzureConflictHttpError:
        raise SaltCloudSystemExit('There was a conflict.')