def set_alias(self, alias, *digests):<EOL>
try:<EOL><INDENT>manifest_json = self.make_manifest(*digests)<EOL>self.set_manifest(alias, manifest_json)<EOL>return manifest_json<EOL><DEDENT>except requests.exceptions.HTTPError as ex:<EOL><INDENT>if ex.response.status_code != requests.codes.bad_request:<EOL><INDENT>raise<EOL><DEDENT>manifest_json = self.make_unsigned_manifest(alias, *digests)<EOL>signed_json = _sign_manifest(manifest_json)<EOL>self._request('<STR_LIT>', '<STR_LIT>' + alias, data=signed_json)<EOL>return signed_json<EOL><DEDENT>
Give a name (alias) to a set of blobs. Each blob is specified by
the hash of its content.

:param alias: Alias name
:type alias: str

:param digests: List of blob hashes (prefixed by ``sha256:``).
:type digests: list of strings

:rtype: str
:returns: The registry manifest used to define the alias. You almost definitely won't need this.