AlterAlias()
Repoints an alias from its current collection to another collection.
pub async fn alter_alias(&self, request: AlterAliasRequest) -> Result<()>
Request Syntax
let request = AlterAliasRequest::builder()
.collection_name("archive")
.alias("featured")
.build()?;
REQUEST FIELDS:
database_name: Option<String>Name of the target database; uses the default database when empty.
collection_name: StringName of the collection the alias should now point to. Required.
alias: StringThe alias to repoint. Required.
RETURN TYPE:
Result<()>
RETURNS:
Returns an empty result indicating success. Returns Error on failure.
Example
let request = AlterAliasRequest::builder()
.collection_name("archive")
.alias("featured")
.build()?;
client.alter_alias(request).await?;