Skip to content

create_portal

create_portal(
    *,
    config_overrides: Optional[WorkSpacesWebClientConfig] = None,
    display_name: Optional[DisplayName] = None,
    tags: Optional[TagList] = None,
    customer_managed_key: Optional[keyArn] = None,
    additional_encryption_context: Optional[EncryptionContextMap] = None,
    client_token: Optional[ClientToken] = None,
    authentication_type: Optional[AuthenticationType] = None,
    instance_type: Optional[InstanceType] = None,
    max_concurrent_sessions: Optional[MaxConcurrentSessions] = None,
    portal_custom_domain: Optional[PortalCustomDomain] = None,
) -> CreatePortalResponse

Creates a web portal.

Parameters:

  • display_name (Optional[DisplayName], default: None ) –

    The name of the web portal. This is not visible to users who log into the web portal.

  • tags (Optional[TagList], default: None ) –

    The tags to add to the web portal. A tag is a key-value pair.

  • customer_managed_key (Optional[keyArn], default: None ) –

    The customer managed key of the web portal.

  • additional_encryption_context (Optional[EncryptionContextMap], default: None ) –

    The additional encryption context of the portal.

  • client_token (Optional[ClientToken], default: None ) –

    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.

  • authentication_type (Optional[AuthenticationType], default: None ) –

    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.

  • instance_type (Optional[InstanceType], default: None ) –

    The type and resources of the underlying instance.

  • max_concurrent_sessions (Optional[MaxConcurrentSessions], default: None ) –

    The maximum number of concurrent sessions for the portal.

  • portal_custom_domain (Optional[PortalCustomDomain], default: None ) –

    The custom domain of the web portal that users access in order to start streaming sessions.

Raises:

Source code in docs_src/capo_workspaces_web/_services/work_spaces_web.py
def create_portal(
    self,
    *,
    config_overrides: Optional[WorkSpacesWebClientConfig] = None,
    display_name: Optional[
        "capo_workspaces_web.types.display_name.DisplayName"
    ] = None,
    tags: Optional["capo_workspaces_web.types.tag_list.TagList"] = None,
    customer_managed_key: Optional[
        "capo_workspaces_web.types.key_arn.keyArn"
    ] = None,
    additional_encryption_context: Optional[
        "capo_workspaces_web.types.encryption_context_map.EncryptionContextMap"
    ] = None,
    client_token: Optional[
        "capo_workspaces_web.types.client_token.ClientToken"
    ] = None,
    authentication_type: Optional[
        "capo_workspaces_web.types.authentication_type.AuthenticationType"
    ] = None,
    instance_type: Optional[
        "capo_workspaces_web.types.instance_type.InstanceType"
    ] = None,
    max_concurrent_sessions: Optional[
        "capo_workspaces_web.types.max_concurrent_sessions.MaxConcurrentSessions"
    ] = None,
    portal_custom_domain: Optional[
        "capo_workspaces_web.types.portal_custom_domain.PortalCustomDomain"
    ] = None,
) -> "capo_workspaces_web.types.create_portal_response.CreatePortalResponse":
    """<p>Creates a web portal.</p>

    Args:
        display_name: <p>The name of the web portal. This is not visible to users who log into the web portal.</p>
        tags: <p>The tags to add to the web portal. A tag is a key-value pair.</p>
        customer_managed_key: <p>The customer managed key of the web portal.</p>
        additional_encryption_context: <p>The additional encryption context of the portal.</p>
        client_token: <p>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. </p> <p>If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.</p>
        authentication_type: <p>The type of authentication integration points used when signing into the web portal. Defaults to <code>Standard</code>.</p> <p> <code>Standard</code> web portals are authenticated directly through your identity provider. You need to call <code>CreateIdentityProvider</code> to integrate your identity provider with your web portal. User and group access to your web portal is controlled through your identity provider.</p> <p> <code>IAM Identity Center</code> 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.</p>
        instance_type: <p>The type and resources of the underlying instance.</p>
        max_concurrent_sessions: <p>The maximum number of concurrent sessions for the portal.</p>
        portal_custom_domain: <p>The custom domain of the web portal that users access in order to start streaming sessions.</p>

    Raises:
        capo_workspaces_web.errors.access_denied_exception.AccessDeniedException: <p>Access is denied.</p>
        capo_workspaces_web.errors.conflict_exception.ConflictException: <p>There is a conflict.</p>
        capo_workspaces_web.errors.internal_server_exception.InternalServerException: <p>There is an internal server error.</p>
        capo_workspaces_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource cannot be found.</p>
        capo_workspaces_web.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The service quota has been exceeded.</p>
        capo_workspaces_web.errors.throttling_exception.ThrottlingException: <p>There is a throttling error.</p>
        capo_workspaces_web.errors.validation_exception.ValidationException: <p>There is a validation error.</p>
        capo_workspaces_web.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_workspaces_web.types.create_portal_request.CreatePortalRequest]",
    ) -> OperationResponse[
        "capo_workspaces_web.types.create_portal_response.CreatePortalResponse"
    ]:
        import capo_workspaces_web._operations.aws_ermine_control_plane_service.create_portal

        output, http_response = (
            capo_workspaces_web._operations.aws_ermine_control_plane_service.create_portal.create_portal(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_workspaces_web.types.create_portal_request.CreatePortalRequest",
    ) -> dict[str, Any]:
        import capo_workspaces_web.types.create_portal_request

        return capo_workspaces_web.types.create_portal_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreatePortal", redact_input=_redact_input),
    )
    input_: capo_workspaces_web.types.create_portal_request.CreatePortalRequest = {}
    if display_name is not None:
        input_["display_name"] = display_name
    if tags is not None:
        input_["tags"] = tags
    if customer_managed_key is not None:
        input_["customer_managed_key"] = customer_managed_key
    if additional_encryption_context is not None:
        input_["additional_encryption_context"] = additional_encryption_context
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if authentication_type is not None:
        input_["authentication_type"] = authentication_type
    if instance_type is not None:
        input_["instance_type"] = instance_type
    if max_concurrent_sessions is not None:
        input_["max_concurrent_sessions"] = max_concurrent_sessions
    if portal_custom_domain is not None:
        input_["portal_custom_domain"] = portal_custom_domain

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output