createSpace method
Creates an AWS re:Post Private private re:Post.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter name :
The name for the private re:Post. This must be unique in your account.
Parameter subdomain :
The subdomain that you use to access your AWS re:Post Private private
re:Post. All custom subdomains must be approved by AWS before use. In
addition to your custom subdomain, all private re:Posts are issued an AWS
generated subdomain for immediate use.
Parameter tier :
The pricing tier for the private re:Post.
Parameter description :
A description for the private re:Post. This is used only to help you
identify this private re:Post.
Parameter roleArn :
The IAM role that grants permissions to the private re:Post to convert
unanswered questions into AWS support tickets.
Parameter supportedEmailDomains :
Parameter tags :
The list of tags associated with the private re:Post.
Parameter userKMSKey :
The AWS KMS key ARN that’s used for the AWS KMS encryption. If you don't
provide a key, your data is encrypted by default with a key that AWS owns
and manages for you.
Implementation
Future<CreateSpaceOutput> createSpace({
required String name,
required String subdomain,
required TierLevel tier,
String? description,
String? roleArn,
SupportedEmailDomainsParameters? supportedEmailDomains,
Map<String, String>? tags,
String? userKMSKey,
}) async {
final $payload = <String, dynamic>{
'name': name,
'subdomain': subdomain,
'tier': tier.value,
if (description != null) 'description': description,
if (roleArn != null) 'roleArn': roleArn,
if (supportedEmailDomains != null)
'supportedEmailDomains': supportedEmailDomains,
if (tags != null) 'tags': tags,
if (userKMSKey != null) 'userKMSKey': userKMSKey,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/spaces',
exceptionFnMap: _exceptionFns,
);
return CreateSpaceOutput.fromJson(response);
}