Skip to content

create_portal

create_portal(
    *,
    config_overrides: Optional[ApiGatewayV2ClientConfig] = None,
    authorization: Optional[Authorization] = None,
    endpoint_configuration: Optional[EndpointConfigurationRequest] = None,
    included_portal_product_arns: Optional[__listOf__stringMin20Max2048] = None,
    logo_uri: Optional[__stringMin0Max1092] = None,
    portal_content: Optional[PortalContent] = None,
    rum_app_monitor_name: Optional[__stringMin0Max255] = None,
    tags: Optional[Tags] = None,
) -> CreatePortalResponse

Creates a portal.

Parameters:

  • authorization (Optional[Authorization], default: None ) –

    The authentication configuration for the portal.

  • endpoint_configuration (Optional[EndpointConfigurationRequest], default: None ) –

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

  • included_portal_product_arns (Optional[__listOf__stringMin20Max2048], default: None ) –

    The ARNs of the portal products included in the portal.

  • logo_uri (Optional[__stringMin0Max1092], default: None ) –

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

  • portal_content (Optional[PortalContent], default: None ) –

    The content of the portal.

  • rum_app_monitor_name (Optional[__stringMin0Max255], default: None ) –

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

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

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

Raises:

  • BadRequestException –

    The request is not valid, for example, the input is incomplete or incorrect. See the accompanying error message for details.

  • TooManyRequestsException –

    A limit has been exceeded. See the accompanying error message for details.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_apigatewayv2/_services/api_gateway_v2.py
def create_portal(
    self,
    *,
    config_overrides: Optional[ApiGatewayV2ClientConfig] = None,
    authorization: Optional[
        "capo_apigatewayv2.types.authorization.Authorization"
    ] = None,
    endpoint_configuration: Optional[
        "capo_apigatewayv2.types.endpoint_configuration_request.EndpointConfigurationRequest"
    ] = None,
    included_portal_product_arns: Optional[
        "capo_apigatewayv2.types.__list_of__string_min20_max2048.__listOf__stringMin20Max2048"
    ] = None,
    logo_uri: Optional[
        "capo_apigatewayv2.types.__string_min0_max1092.__stringMin0Max1092"
    ] = None,
    portal_content: Optional[
        "capo_apigatewayv2.types.portal_content.PortalContent"
    ] = None,
    rum_app_monitor_name: Optional[
        "capo_apigatewayv2.types.__string_min0_max255.__stringMin0Max255"
    ] = None,
    tags: Optional["capo_apigatewayv2.types.tags.Tags"] = None,
) -> "capo_apigatewayv2.types.create_portal_response.CreatePortalResponse":
    """<p>Creates a portal.</p>

    Args:
        authorization: <p>The authentication configuration for the portal.</p>
        endpoint_configuration: <p>The domain configuration for the portal. Use a default domain provided by API Gateway or provide a fully-qualified domain name that you own.</p>
        included_portal_product_arns: <p>The ARNs of the portal products included in the portal.</p>
        logo_uri: <p>The URI for the portal logo image that is displayed in the portal header.</p>
        portal_content: <p>The content of the portal.</p>
        rum_app_monitor_name: <p>The name of the Amazon CloudWatch RUM app monitor for the portal.</p>
        tags: <p>The collection of tags. Each tag element is associated with a given resource.</p>

    Raises:
        capo_apigatewayv2.errors.access_denied_exception.AccessDeniedException
        capo_apigatewayv2.errors.bad_request_exception.BadRequestException: <p>The request is not valid, for example, the input is incomplete or incorrect. See the accompanying error message for details.</p>
        capo_apigatewayv2.errors.too_many_requests_exception.TooManyRequestsException: <p>A limit has been exceeded. See the accompanying error message for details.</p>
        capo_apigatewayv2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        output, http_response = (
            capo_apigatewayv2._operations.api_gateway_v2.create_portal.create_portal(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreatePortal")
    )
    input_: capo_apigatewayv2.types.create_portal_request.CreatePortalRequest = {}
    if authorization is not None:
        input_["authorization"] = authorization
    if endpoint_configuration is not None:
        input_["endpoint_configuration"] = endpoint_configuration
    if included_portal_product_arns is not None:
        input_["included_portal_product_arns"] = included_portal_product_arns
    if logo_uri is not None:
        input_["logo_uri"] = logo_uri
    if portal_content is not None:
        input_["portal_content"] = portal_content
    if rum_app_monitor_name is not None:
        input_["rum_app_monitor_name"] = rum_app_monitor_name
    if tags is not None:
        input_["tags"] = tags

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