createNamespace method

Future<CreateNamespaceResponse> createNamespace({
  1. required String awsAccountId,
  2. required IdentityStore identityStore,
  3. required String namespace,
  4. List<Tag>? tags,
})

(Enterprise edition only) Creates a new namespace for you to use with Amazon QuickSight.

A namespace allows you to isolate the QuickSight users and groups that are registered for that namespace. Users that access the namespace can share assets only with other users or groups in the same namespace. They can't see users and groups in other namespaces. You can create a namespace after your AWS account is subscribed to QuickSight. The namespace must be unique within the AWS account. By default, there is a limit of 100 namespaces per AWS account. To increase your limit, create a ticket with AWS Support.

May throw AccessDeniedException. May throw InvalidParameterValueException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw LimitExceededException. May throw ResourceExistsException. May throw PreconditionNotMetException. May throw ConflictException. May throw InternalFailureException. May throw ResourceUnavailableException.

Parameter awsAccountId : The ID for the AWS account that you want to create the QuickSight namespace in.

Parameter identityStore : Specifies the type of your user identity directory. Currently, this supports users with an identity type of QUICKSIGHT.

Parameter namespace : The name that you want to use to describe the new namespace.

Parameter tags : The tags that you want to associate with the namespace that you're creating.

Implementation

Future<CreateNamespaceResponse> createNamespace({
  required String awsAccountId,
  required IdentityStore identityStore,
  required String namespace,
  List<Tag>? tags,
}) async {
  ArgumentError.checkNotNull(awsAccountId, 'awsAccountId');
  _s.validateStringLength(
    'awsAccountId',
    awsAccountId,
    12,
    12,
    isRequired: true,
  );
  ArgumentError.checkNotNull(identityStore, 'identityStore');
  ArgumentError.checkNotNull(namespace, 'namespace');
  _s.validateStringLength(
    'namespace',
    namespace,
    0,
    64,
    isRequired: true,
  );
  final $payload = <String, dynamic>{
    'IdentityStore': identityStore.toValue(),
    'Namespace': namespace,
    if (tags != null) 'Tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/accounts/${Uri.encodeComponent(awsAccountId)}',
    exceptionFnMap: _exceptionFns,
  );
  return CreateNamespaceResponse.fromJson(response);
}