APIPortal / Client / create_portal

create_portal

APIPortal.Client.create_portal(**kwargs)

Creates a portal that publishes documentation for the products it includes. Use UpdatePortalPublishStatus to publish it.

See also: AWS API Documentation

Request Syntax

response = client.create_portal(
    portalContent={
        'displayName': 'string',
        'description': 'string',
        'theme': {
            'customColors': {
                'backgroundColor': 'string',
                'navigationColor': 'string',
                'headerColor': 'string',
                'textColor': 'string',
                'accentColor': 'string',
                'errorValidationColor': 'string'
            },
            'logoUploadedAt': datetime(2015, 1, 1)
        }
    },
    endpointConfiguration={
        'none': {}
        ,
        'acmManaged': {
            'domainName': 'string',
            'certificateArn': 'string'
        }
    },
    authorization={
        'authorizationConfig': {
            'none': {}
            ,
            'cognitoConfig': {
                'userPoolArn': 'string',
                'appClientId': 'string',
                'userPoolDomain': 'string',
                'identityPoolId': 'string'
            }
        },
        'fineGrainedAccessControl': 'ENABLED'|'DISABLED'
    },
    includedProductArns=[
        'string',
    ],
    logoUri='string',
    rumAppMonitorName='string',
    tags={
        'string': 'string'
    }
)
Parameters:
  • portalContent (dict) –

    [REQUIRED]

    The portal’s display name, description, and theme.

    • displayName (string) – [REQUIRED]

      The name shown in the portal, from 3 to 255 characters.

    • description (string) –

      A description of the portal, up to 1024 characters.

    • theme (dict) – [REQUIRED]

      The colors and logo of the portal.

      • customColors (dict) – [REQUIRED]

        The colors used in the portal.

        • backgroundColor (string) – [REQUIRED]

          The page background color.

        • navigationColor (string) – [REQUIRED]

          The navigation pane color.

        • headerColor (string) – [REQUIRED]

          The header color.

        • textColor (string) – [REQUIRED]

          The text color.

        • accentColor (string) – [REQUIRED]

          The color of links, buttons, and other highlighted elements.

        • errorValidationColor (string) – [REQUIRED]

          The color of error and validation messages.

      • logoUploadedAt (datetime) –

        When the portal logo was last uploaded. Absent if the portal has no logo.

  • endpointConfiguration (dict) –

    [REQUIRED]

    Exactly one of the members is set: none for no custom domain, or acmManaged to bring a domain + ACM certificate. Modeled as a union so the “exactly one” choice is enforced by type.

    Note

    This is a Tagged Union structure. Only one of the following top level keys can be set: none, acmManaged.

    • none (dict) –

      Serve the portal only on its default domain.

    • acmManaged (dict) –

      Serve the portal on your own domain, using a certificate from AWS Certificate Manager.

      • domainName (string) – [REQUIRED]

        The custom domain name for the portal.

      • certificateArn (string) – [REQUIRED]

        The ARN of the ACM certificate for the domain. The certificate must be in us-east-1, issued, not private, and must cover the domain name.

  • authorization (dict) –

    [REQUIRED]

    How readers sign in to the portal, and whether fine-grained access control is on.

    • authorizationConfig (dict) – [REQUIRED]

      Exactly one of the members is set: none for no authorization, or cognitoConfig for Cognito. Modeled as a union so the “exactly one” choice is enforced by type.

      Note

      This is a Tagged Union structure. Only one of the following top level keys can be set: none, cognitoConfig.

      • none (dict) –

        The portal is public and readers do not sign in.

      • cognitoConfig (dict) –

        Readers sign in through an Amazon Cognito user pool.

        • userPoolArn (string) – [REQUIRED]

          The ARN of the Cognito user pool.

        • appClientId (string) – [REQUIRED]

          The ID of the user pool app client the portal uses.

        • userPoolDomain (string) – [REQUIRED]

          The domain of the user pool’s hosted sign-in pages.

        • identityPoolId (string) –

          The ID of the Cognito identity pool. Required only for fine-grained access control.

    • fineGrainedAccessControl (string) – [REQUIRED]

      Whether access to individual products in the portal is controlled per reader.

  • includedProductArns (list) –

    The ARNs of the products the portal includes, up to 200.

    • (string) –

  • logoUri (string) – The S3 location of the portal logo, in the form s3://bucket/key.

  • rumAppMonitorName (string) – The name of the CloudWatch RUM app monitor that collects reader telemetry for the portal.

  • tags (dict) –

    Up to 50 tags per request, matching API Gateway’s limit of 50 tags per resource.

    • (string) –

      A tag key of 1-128 Unicode characters, per the AWS tagging limits.

      • (string) –

        A tag value of 0-256 Unicode characters, per the AWS tagging limits; an empty value is valid.

Return type:

dict

Returns:

Response Syntax

{
    'portalId': 'string',
    'portalArn': 'string',
    'endpointConfiguration': {
        'domainName': 'string',
        'certificateArn': 'string',
        'portalDomainHostedZoneId': 'string',
        'portalDefaultDomainName': 'string'
    },
    'authorization': {
        'authorizationConfig': {
            'none': {},
            'cognitoConfig': {
                'userPoolArn': 'string',
                'appClientId': 'string',
                'userPoolDomain': 'string',
                'identityPoolId': 'string'
            }
        },
        'fineGrainedAccessControl': 'ENABLED'|'DISABLED'
    },
    'portalContent': {
        'displayName': 'string',
        'description': 'string',
        'theme': {
            'customColors': {
                'backgroundColor': 'string',
                'navigationColor': 'string',
                'headerColor': 'string',
                'textColor': 'string',
                'accentColor': 'string',
                'errorValidationColor': 'string'
            },
            'logoUploadedAt': datetime(2015, 1, 1)
        }
    },
    'includedProductArns': [
        'string',
    ],
    'publishStatus': 'PUBLISHED'|'PUBLISH_IN_PROGRESS'|'PUBLISH_FAILED'|'DISABLE_IN_PROGRESS'|'DISABLE_FAILED'|'DISABLED',
    'statusException': {
        'exception': 'INTERNAL_FAILURE'|'UNSHARED_PRODUCT_EXCEPTION'|'CLOUDFRONT_DOMAIN_IN_USE'|'MISSING_CLOUDFRONT_PERMISSIONS',
        'message': 'string'
    },
    'updatedAt': datetime(2015, 1, 1),
    'publishedAt': datetime(2015, 1, 1),
    'publishDescription': 'string',
    'rumAppMonitorName': 'string',
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) –

    • portalId (string) –

      The identifier of the portal.

    • portalArn (string) –

      The ARN of the portal.

    • endpointConfiguration (dict) –

      The domain configuration of the portal.

      • domainName (string) –

        The custom domain name of the portal. Absent if the portal has no custom domain.

      • certificateArn (string) –

        The ARN of the ACM certificate for the custom domain. Absent if the portal has no custom domain.

      • portalDomainHostedZoneId (string) –

        The ID of the hosted zone for the portal’s distribution. Use it to create an alias record for a custom domain.

      • portalDefaultDomainName (string) –

        The default domain name assigned to the portal.

    • authorization (dict) –

      How readers sign in to the portal, and whether fine-grained access control is on.

      • authorizationConfig (dict) –

        Exactly one of the members is set: none for no authorization, or cognitoConfig for Cognito. Modeled as a union so the “exactly one” choice is enforced by type.

        Note

        This is a Tagged Union structure. Only one of the following top level keys will be set: none, cognitoConfig. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
        
        • none (dict) –

          The portal is public and readers do not sign in.

        • cognitoConfig (dict) –

          Readers sign in through an Amazon Cognito user pool.

          • userPoolArn (string) –

            The ARN of the Cognito user pool.

          • appClientId (string) –

            The ID of the user pool app client the portal uses.

          • userPoolDomain (string) –

            The domain of the user pool’s hosted sign-in pages.

          • identityPoolId (string) –

            The ID of the Cognito identity pool. Required only for fine-grained access control.

      • fineGrainedAccessControl (string) –

        Whether access to individual products in the portal is controlled per reader.

    • portalContent (dict) –

      The portal’s display name, description, and theme.

      • displayName (string) –

        The name shown in the portal, from 3 to 255 characters.

      • description (string) –

        A description of the portal, up to 1024 characters.

      • theme (dict) –

        The colors and logo of the portal.

        • customColors (dict) –

          The colors used in the portal.

          • backgroundColor (string) –

            The page background color.

          • navigationColor (string) –

            The navigation pane color.

          • headerColor (string) –

            The header color.

          • textColor (string) –

            The text color.

          • accentColor (string) –

            The color of links, buttons, and other highlighted elements.

          • errorValidationColor (string) –

            The color of error and validation messages.

        • logoUploadedAt (datetime) –

          When the portal logo was last uploaded. Absent if the portal has no logo.

    • includedProductArns (list) –

      The ARNs of the products the portal includes.

      • (string) –

    • publishStatus (string) –

      The publish status of the portal. Absent if the portal has never been published.

    • statusException (dict) –

      Failure detail attached to a Portal’s publish/preview status: a typed reason plus an optional human-readable message.

      • exception (string) –

        Treat any unrecognized value as INTERNAL_FAILURE.

      • message (string) –

        A description of the failure.

    • updatedAt (datetime) –

      When the resource was last updated.

    • publishedAt (datetime) –

      When the portal was last published.

    • publishDescription (string) –

      The description supplied with the most recent publish request.

    • rumAppMonitorName (string) –

      The name of the CloudWatch RUM app monitor that collects reader telemetry for the portal.

    • tags (dict) –

      Up to 50 tags per request, matching API Gateway’s limit of 50 tags per resource.

      • (string) –

        A tag key of 1-128 Unicode characters, per the AWS tagging limits.

        • (string) –

          A tag value of 0-256 Unicode characters, per the AWS tagging limits; an empty value is valid.

Exceptions