createPortal method

Future<CreatePortalResponse> createPortal({
  1. required Authorization authorization,
  2. required EndpointConfigurationRequest endpointConfiguration,
  3. required PortalContent portalContent,
  4. List<String>? includedPortalProductArns,
  5. String? logoUri,
  6. String? rumAppMonitorName,
  7. Map<String, String>? tags,
})

Creates a portal.

May throw AccessDeniedException. May throw BadRequestException. May throw TooManyRequestsException.

Parameter authorization : The authentication configuration for the portal.

Parameter endpointConfiguration : The domain configuration for the portal. Use a default domain provided by API Gateway or provide a fully-qualified domain name that you own.

Parameter portalContent : The content of the portal.

Parameter includedPortalProductArns : The ARNs of the portal products included in the portal.

Parameter logoUri : The URI for the portal logo image that is displayed in the portal header.

Parameter rumAppMonitorName : The name of the Amazon CloudWatch RUM app monitor for the portal.

Parameter tags : The collection of tags. Each tag element is associated with a given resource.

Implementation

Future<CreatePortalResponse> createPortal({
  required Authorization authorization,
  required EndpointConfigurationRequest endpointConfiguration,
  required PortalContent portalContent,
  List<String>? includedPortalProductArns,
  String? logoUri,
  String? rumAppMonitorName,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'authorization': authorization,
    'endpointConfiguration': endpointConfiguration,
    'portalContent': portalContent,
    if (includedPortalProductArns != null)
      'includedPortalProductArns': includedPortalProductArns,
    if (logoUri != null) 'logoUri': logoUri,
    if (rumAppMonitorName != null) 'rumAppMonitorName': rumAppMonitorName,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/v2/portals',
    exceptionFnMap: _exceptionFns,
  );
  return CreatePortalResponse.fromJson(response);
}