createAccountSubscription method
- required String accountName,
- required AuthenticationMethodOption authenticationMethod,
- required String awsAccountId,
- required String notificationEmail,
- String? activeDirectoryName,
- List<
String> ? adminGroup, - List<
String> ? adminProGroup, - List<
String> ? authorGroup, - List<
String> ? authorProGroup, - String? contactNumber,
- String? directoryId,
- Edition? edition,
- String? emailAddress,
- String? firstName,
- String? iAMIdentityCenterInstanceArn,
- String? lastName,
- List<
String> ? readerGroup, - List<
String> ? readerProGroup, - String? realm,
Creates an Amazon Quick Sight account, or subscribes to Amazon Quick Sight Q.
The Amazon Web Services Region for the account is derived from what is configured in the CLI or SDK.
Before you use this operation, make sure that you can connect to an existing Amazon Web Services account. If you don't have an Amazon Web Services account, see Sign up for Amazon Web Services in the Amazon Quick Sight User Guide. The person who signs up for Amazon Quick Sight needs to have the correct Identity and Access Management (IAM) permissions. For more information, see IAM Policy Examples for Amazon Quick Sight in the Amazon Quick Sight User Guide.
If your IAM policy includes both the Subscribe and
CreateAccountSubscription actions, make sure that both
actions are set to Allow. If either action is set to
Deny, the Deny action prevails and your API call
fails.
You can't pass an existing IAM role to access other Amazon Web Services services using this API operation. To pass your existing IAM role to Amazon Quick Sight, see Passing IAM roles to Amazon Quick Sight in the Amazon Quick Sight User Guide.
You can't set default resource access on the new account from the Amazon Quick Sight API. Instead, add default resource access from the Amazon Quick Sight console. For more information about setting default resource access to Amazon Web Services services, see Setting default resource access to Amazon Web Services services in the Amazon Quick Sight User Guide.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalFailureException.
May throw InvalidParameterValueException.
May throw PreconditionNotMetException.
May throw ResourceExistsException.
May throw ResourceNotFoundException.
May throw ResourceUnavailableException.
May throw ThrottlingException.
Parameter accountName :
The name of your Amazon Quick Sight account. This name is unique over all
of Amazon Web Services, and it appears only when users sign in. You can't
change AccountName value after the Amazon Quick Sight account
is created.
Parameter authenticationMethod :
The method that you want to use to authenticate your Quick Sight account.
If you choose ACTIVE_DIRECTORY, provide an
ActiveDirectoryName and an AdminGroup associated
with your Active Directory.
If you choose IAM_IDENTITY_CENTER, provide an
AdminGroup associated with your IAM Identity Center account.
Parameter awsAccountId :
The Amazon Web Services account ID of the account that you're using to
create your Quick Sight account.
Parameter notificationEmail :
The email address that you want Quick Sight to send notifications to
regarding your Quick Sight account or Quick Sight subscription.
Parameter activeDirectoryName :
The name of your Active Directory. This field is required if
ACTIVE_DIRECTORY is the selected authentication method of the
new Quick Sight account.
Parameter adminGroup :
The admin group associated with your Active Directory or IAM Identity
Center account. Either this field or the AdminProGroup field
is required if ACTIVE_DIRECTORY or
IAM_IDENTITY_CENTER is the selected authentication method of
the new Quick Sight account.
For more information about using IAM Identity Center in Amazon Quick Sight, see Using IAM Identity Center with Amazon Quick Sight Enterprise Edition in the Amazon Quick Sight User Guide. For more information about using Active Directory in Amazon Quick Sight, see Using Active Directory with Amazon Quick Sight Enterprise Edition in the Amazon Quick Sight User Guide.
Parameter adminProGroup :
The admin pro group associated with your Active Directory or IAM Identity
Center account. Either this field or the AdminGroup field is
required if ACTIVE_DIRECTORY or
IAM_IDENTITY_CENTER is the selected authentication method of
the new Quick Sight account.
For more information about using IAM Identity Center in Amazon Quick Sight, see Using IAM Identity Center with Amazon Quick Sight Enterprise Edition in the Amazon Quick Sight User Guide. For more information about using Active Directory in Amazon Quick Sight, see Using Active Directory with Amazon Quick Sight Enterprise Edition in the Amazon Quick Sight User Guide.
Parameter authorGroup :
The author group associated with your Active Directory or IAM Identity
Center account.
For more information about using IAM Identity Center in Amazon Quick Sight, see Using IAM Identity Center with Amazon Quick Sight Enterprise Edition in the Amazon Quick Sight User Guide. For more information about using Active Directory in Amazon Quick Sight, see Using Active Directory with Amazon Quick Sight Enterprise Edition in the Amazon Quick Sight User Guide.
Parameter authorProGroup :
The author pro group associated with your Active Directory or IAM Identity
Center account.
For more information about using IAM Identity Center in Amazon Quick Sight, see Using IAM Identity Center with Amazon Quick Sight Enterprise Edition in the Amazon Quick Sight User Guide. For more information about using Active Directory in Amazon Quick Sight, see Using Active Directory with Amazon Quick Sight Enterprise Edition in the Amazon Quick Sight User Guide.
Parameter contactNumber :
A 10-digit phone number for the author of the Amazon Quick Sight account
to use for future communications. This field is required if
ENTERPPRISE_AND_Q is the selected edition of the new Amazon
Quick Sight account.
Parameter directoryId :
The ID of the Active Directory that is associated with your Quick Sight
account.
Parameter edition :
The edition of Amazon Quick Sight that you want your account to have.
Currently, you can choose from ENTERPRISE or
ENTERPRISE_AND_Q.
If you choose ENTERPRISE_AND_Q, the following parameters are
required:
-
FirstName -
LastName -
EmailAddress -
ContactNumber
Parameter emailAddress :
The email address of the author of the Amazon Quick Sight account to use
for future communications. This field is required if
ENTERPPRISE_AND_Q is the selected edition of the new Amazon
Quick Sight account.
Parameter firstName :
The first name of the author of the Amazon Quick Sight account to use for
future communications. This field is required if
ENTERPPRISE_AND_Q is the selected edition of the new Amazon
Quick Sight account.
Parameter iAMIdentityCenterInstanceArn :
The Amazon Resource Name (ARN) for the IAM Identity Center instance.
Parameter lastName :
The last name of the author of the Amazon Quick Sight account to use for
future communications. This field is required if
ENTERPPRISE_AND_Q is the selected edition of the new Amazon
Quick Sight account.
Parameter readerGroup :
The reader group associated with your Active Directory or IAM Identity
Center account.
For more information about using IAM Identity Center in Amazon Quick Sight, see Using IAM Identity Center with Amazon Quick Sight Enterprise Edition in the Amazon Quick Sight User Guide. For more information about using Active Directory in Amazon Quick Sight, see Using Active Directory with Amazon Quick Sight Enterprise Edition in the Amazon Quick Sight User Guide.
Parameter readerProGroup :
The reader pro group associated with your Active Directory or IAM Identity
Center account.
For more information about using IAM Identity Center in Amazon Quick Sight, see Using IAM Identity Center with Amazon Quick Sight Enterprise Edition in the Amazon Quick Sight User Guide. For more information about using Active Directory in Amazon Quick Sight, see Using Active Directory with Amazon Quick Sight Enterprise Edition in the Amazon Quick Sight User Guide.
Parameter realm :
The realm of the Active Directory that is associated with your Quick Sight
account. This field is required if ACTIVE_DIRECTORY is the
selected authentication method of the new Quick Sight account.
Implementation
Future<CreateAccountSubscriptionResponse> createAccountSubscription({
required String accountName,
required AuthenticationMethodOption authenticationMethod,
required String awsAccountId,
required String notificationEmail,
String? activeDirectoryName,
List<String>? adminGroup,
List<String>? adminProGroup,
List<String>? authorGroup,
List<String>? authorProGroup,
String? contactNumber,
String? directoryId,
Edition? edition,
String? emailAddress,
String? firstName,
String? iAMIdentityCenterInstanceArn,
String? lastName,
List<String>? readerGroup,
List<String>? readerProGroup,
String? realm,
}) async {
final $payload = <String, dynamic>{
'AccountName': accountName,
'AuthenticationMethod': authenticationMethod.value,
'NotificationEmail': notificationEmail,
if (activeDirectoryName != null)
'ActiveDirectoryName': activeDirectoryName,
if (adminGroup != null) 'AdminGroup': adminGroup,
if (adminProGroup != null) 'AdminProGroup': adminProGroup,
if (authorGroup != null) 'AuthorGroup': authorGroup,
if (authorProGroup != null) 'AuthorProGroup': authorProGroup,
if (contactNumber != null) 'ContactNumber': contactNumber,
if (directoryId != null) 'DirectoryId': directoryId,
if (edition != null) 'Edition': edition.value,
if (emailAddress != null) 'EmailAddress': emailAddress,
if (firstName != null) 'FirstName': firstName,
if (iAMIdentityCenterInstanceArn != null)
'IAMIdentityCenterInstanceArn': iAMIdentityCenterInstanceArn,
if (lastName != null) 'LastName': lastName,
if (readerGroup != null) 'ReaderGroup': readerGroup,
if (readerProGroup != null) 'ReaderProGroup': readerProGroup,
if (realm != null) 'Realm': realm,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/account/${Uri.encodeComponent(awsAccountId)}',
exceptionFnMap: _exceptionFns,
);
return CreateAccountSubscriptionResponse.fromJson(response);
}