updateWorkspaceAlias method

Future<void> updateWorkspaceAlias({
  1. required String workspaceId,
  2. String? alias,
  3. String? clientToken,
})

Updates the alias of an existing workspace.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter workspaceId : The ID of the workspace to update.

Parameter alias : The new alias for the workspace. It does not need to be unique.

Amazon Managed Service for Prometheus will automatically strip any blank spaces from the beginning and end of the alias that you specify.

Parameter clientToken : A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive.

Implementation

Future<void> updateWorkspaceAlias({
  required String workspaceId,
  String? alias,
  String? clientToken,
}) async {
  final $payload = <String, dynamic>{
    if (alias != null) 'alias': alias,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
  };
  await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/workspaces/${Uri.encodeComponent(workspaceId)}/alias',
    exceptionFnMap: _exceptionFns,
  );
}