Skip to content

create_web_app

create_web_app(
    identity_provider_details: WebAppIdentityProviderDetails,
    *,
    config_overrides: Optional[TransferClientConfig] = None,
    access_endpoint: Optional[WebAppAccessEndpoint] = None,
    web_app_units: Optional[WebAppUnits] = None,
    tags: Optional[Tags] = None,
    web_app_endpoint_policy: Optional[WebAppEndpointPolicy] = None,
    endpoint_details: Optional[WebAppEndpointDetails] = None,
) -> CreateWebAppResponse

Creates a web app based on specified parameters, and returns the ID for the new web app. You can configure the web app to be publicly accessible or hosted within a VPC.

For more information about using VPC endpoints with Transfer Family, see Create a Transfer Family web app in a VPC.

Parameters:

  • identity_provider_details (WebAppIdentityProviderDetails) –

    You can provide a structure that contains the details for the identity provider to use with your web app.

    For more details about this parameter, see Configure your identity provider for Transfer Family web apps.

  • access_endpoint (Optional[WebAppAccessEndpoint], default: None ) –

    The AccessEndpoint is the URL that you provide to your users for them to interact with the Transfer Family web app. You can specify a custom URL or use the default value.

    Before you enter a custom URL for this parameter, follow the steps described in Update your access endpoint with a custom URL.

  • web_app_units (Optional[WebAppUnits], default: None ) –

    A union that contains the value for number of concurrent connections or the user sessions on your web app.

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

    Key-value pairs that can be used to group and search for web apps.

  • web_app_endpoint_policy (Optional[WebAppEndpointPolicy], default: None ) –

    Setting for the type of endpoint policy for the web app. The default value is STANDARD.

    If you are creating the web app in an Amazon Web Services GovCloud (US) Region, you can set this parameter to FIPS.

  • endpoint_details (Optional[WebAppEndpointDetails], default: None ) –

    The endpoint configuration for the web app. You can specify whether the web app endpoint is publicly accessible or hosted within a VPC.

Raises:

Source code in docs_src/capo_transfer/_services/transfer.py
def create_web_app(
    self,
    identity_provider_details: "capo_transfer.types.web_app_identity_provider_details.WebAppIdentityProviderDetails",
    *,
    config_overrides: Optional[TransferClientConfig] = None,
    access_endpoint: Optional[
        "capo_transfer.types.web_app_access_endpoint.WebAppAccessEndpoint"
    ] = None,
    web_app_units: Optional["capo_transfer.types.web_app_units.WebAppUnits"] = None,
    tags: Optional["capo_transfer.types.tags.Tags"] = None,
    web_app_endpoint_policy: Optional[
        "capo_transfer.types.web_app_endpoint_policy.WebAppEndpointPolicy"
    ] = None,
    endpoint_details: Optional[
        "capo_transfer.types.web_app_endpoint_details.WebAppEndpointDetails"
    ] = None,
) -> "capo_transfer.types.create_web_app_response.CreateWebAppResponse":
    """<p>Creates a web app based on specified parameters, and returns the ID for the new web app. You can configure the web app to be publicly accessible or hosted within a VPC.</p> <p>For more information about using VPC endpoints with Transfer Family, see <a href="https://docs.aws.amazon.com/transfer/latest/userguide/create-webapp-in-vpc.html">Create a Transfer Family web app in a VPC</a>.</p>

    Args:
        identity_provider_details: <p>You can provide a structure that contains the details for the identity provider to use with your web app.</p> <p>For more details about this parameter, see <a href="https://docs.aws.amazon.com/transfer/latest/userguide/webapp-identity-center.html">Configure your identity provider for Transfer Family web apps</a>.</p>
        access_endpoint: <p>The <code>AccessEndpoint</code> is the URL that you provide to your users for them to interact with the Transfer Family web app. You can specify a custom URL or use the default value.</p> <p>Before you enter a custom URL for this parameter, follow the steps described in <a href="https://docs.aws.amazon.com/transfer/latest/userguide/webapp-customize.html">Update your access endpoint with a custom URL</a>.</p>
        web_app_units: <p>A union that contains the value for number of concurrent connections or the user sessions on your web app.</p>
        tags: <p>Key-value pairs that can be used to group and search for web apps.</p>
        web_app_endpoint_policy: <p> Setting for the type of endpoint policy for the web app. The default value is <code>STANDARD</code>. </p> <p>If you are creating the web app in an Amazon Web Services GovCloud (US) Region, you can set this parameter to <code>FIPS</code>.</p>
        endpoint_details: <p>The endpoint configuration for the web app. You can specify whether the web app endpoint is publicly accessible or hosted within a VPC.</p>

    Raises:
        capo_transfer.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_transfer.errors.internal_service_error.InternalServiceError: <p>This exception is thrown when an error occurs in the Transfer Family service.</p>
        capo_transfer.errors.invalid_request_exception.InvalidRequestException: <p>This exception is thrown when the client submits a malformed request.</p>
        capo_transfer.errors.resource_not_found_exception.ResourceNotFoundException: <p>This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.</p>
        capo_transfer.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_transfer.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_transfer.types.create_web_app_request.CreateWebAppRequest]",
    ) -> OperationResponse[
        "capo_transfer.types.create_web_app_response.CreateWebAppResponse"
    ]:
        import capo_transfer._operations.transfer_service.create_web_app

        output, http_response = (
            capo_transfer._operations.transfer_service.create_web_app.create_web_app(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateWebApp")
    )
    input_: capo_transfer.types.create_web_app_request.CreateWebAppRequest = {
        "identity_provider_details": identity_provider_details
    }
    if access_endpoint is not None:
        input_["access_endpoint"] = access_endpoint
    if web_app_units is not None:
        input_["web_app_units"] = web_app_units
    if tags is not None:
        input_["tags"] = tags
    if web_app_endpoint_policy is not None:
        input_["web_app_endpoint_policy"] = web_app_endpoint_policy
    if endpoint_details is not None:
        input_["endpoint_details"] = endpoint_details

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