createPortal method
Creates a web portal.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter additionalEncryptionContext :
The additional encryption context of the portal.
Parameter authenticationType :
The type of authentication integration points used when signing into the
web portal. Defaults to Standard.
Standard web portals are authenticated directly through your
identity provider. You need to call CreateIdentityProvider to
integrate your identity provider with your web portal. User and group
access to your web portal is controlled through your identity provider.
IAM Identity Center web portals are authenticated through IAM
Identity Center. Identity sources (including external identity provider
integration), plus user and group access to your web portal, can be
configured in the IAM Identity Center.
Parameter clientToken :
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request. Idempotency ensures that an API request
completes only once. With an idempotent request, if the original request
completes successfully, subsequent retries with the same client token
returns the result from the original successful request.
If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.
Parameter customerManagedKey :
The customer managed key of the web portal.
Parameter displayName :
The name of the web portal. This is not visible to users who log into the
web portal.
Parameter instanceType :
The type and resources of the underlying instance.
Parameter maxConcurrentSessions :
The maximum number of concurrent sessions for the portal.
Parameter portalCustomDomain :
The custom domain of the web portal that users access in order to start
streaming sessions.
Parameter tags :
The tags to add to the web portal. A tag is a key-value pair.
Implementation
Future<CreatePortalResponse> createPortal({
Map<String, String>? additionalEncryptionContext,
AuthenticationType? authenticationType,
String? clientToken,
String? customerManagedKey,
String? displayName,
InstanceType? instanceType,
int? maxConcurrentSessions,
String? portalCustomDomain,
List<Tag>? tags,
}) async {
_s.validateNumRange(
'maxConcurrentSessions',
maxConcurrentSessions,
1,
5000,
);
final $payload = <String, dynamic>{
if (additionalEncryptionContext != null)
'additionalEncryptionContext': additionalEncryptionContext,
if (authenticationType != null)
'authenticationType': authenticationType.value,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (customerManagedKey != null) 'customerManagedKey': customerManagedKey,
if (displayName != null) 'displayName': displayName,
if (instanceType != null) 'instanceType': instanceType.value,
if (maxConcurrentSessions != null)
'maxConcurrentSessions': maxConcurrentSessions,
if (portalCustomDomain != null) 'portalCustomDomain': portalCustomDomain,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/portals',
exceptionFnMap: _exceptionFns,
);
return CreatePortalResponse.fromJson(response);
}