Skip to content

create_application

create_application(
    name: ApplicationName,
    namespace: ApplicationNamespace,
    application_source_config: ApplicationSourceConfig,
    *,
    config_overrides: Optional[AppIntegrationsClientConfig] = None,
    description: Optional[Description] = None,
    subscriptions: Optional[SubscriptionList] = None,
    publications: Optional[PublicationList] = None,
    client_token: Optional[IdempotencyToken] = None,
    tags: Optional[TagMap] = None,
    permissions: Optional[PermissionList] = None,
    is_service: Optional[Boolean] = None,
    initialization_timeout: Optional[InitializationTimeout] = None,
    application_config: Optional[ApplicationConfig] = None,
    iframe_config: Optional[IframeConfig] = None,
    application_type: Optional[ApplicationType] = None,
    auth_config: Optional[AuthConfig] = None,
) -> CreateApplicationResponse

Creates and persists an Application resource.

Parameters:

  • name (ApplicationName) –

    The name of the application.

  • namespace (ApplicationNamespace) –

    The namespace of the application.

  • description (Optional[Description], default: None ) –

    The description of the application.

  • application_source_config (ApplicationSourceConfig) –

    The configuration for where the application should be loaded from.

  • subscriptions (Optional[SubscriptionList], default: None ) –

    The events that the application subscribes.

  • publications (Optional[PublicationList], default: None ) –

    The events that the application publishes.

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

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.

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

    The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.

  • permissions (Optional[PermissionList], default: None ) –

    The configuration of events or requests that the application has access to.

  • is_service (Optional[Boolean], default: None ) –

    Indicates whether the application is a service.

  • initialization_timeout (Optional[InitializationTimeout], default: None ) –

    The maximum time in milliseconds allowed to establish a connection with the workspace.

  • application_config (Optional[ApplicationConfig], default: None ) –

    The configuration settings for the application.

  • iframe_config (Optional[IframeConfig], default: None ) –

    The iframe configuration for the application.

  • application_type (Optional[ApplicationType], default: None ) –

    The type of application.

  • auth_config (Optional[AuthConfig], default: None ) –

    The authentication settings that Connect Customer uses when calling the external application.

Raises:

Examples:

To create an application The following creates an application named My Application with access url https://example.com.

>>> client.create_application(name='My Application', namespace='myapplication', description='My first application.', application_source_config={'ExternalUrlConfig': {'AccessUrl': 'https://example.com'}})
Source code in docs_src/capo_appintegrations/_services/app_integrations.py
def create_application(
    self,
    name: "capo_appintegrations.types.application_name.ApplicationName",
    namespace: "capo_appintegrations.types.application_namespace.ApplicationNamespace",
    application_source_config: "capo_appintegrations.types.application_source_config.ApplicationSourceConfig",
    *,
    config_overrides: Optional[AppIntegrationsClientConfig] = None,
    description: Optional[
        "capo_appintegrations.types.description.Description"
    ] = None,
    subscriptions: Optional[
        "capo_appintegrations.types.subscription_list.SubscriptionList"
    ] = None,
    publications: Optional[
        "capo_appintegrations.types.publication_list.PublicationList"
    ] = None,
    client_token: Optional[
        "capo_appintegrations.types.idempotency_token.IdempotencyToken"
    ] = None,
    tags: Optional["capo_appintegrations.types.tag_map.TagMap"] = None,
    permissions: Optional[
        "capo_appintegrations.types.permission_list.PermissionList"
    ] = None,
    is_service: Optional["capo_appintegrations.types.boolean.Boolean"] = None,
    initialization_timeout: Optional[
        "capo_appintegrations.types.initialization_timeout.InitializationTimeout"
    ] = None,
    application_config: Optional[
        "capo_appintegrations.types.application_config.ApplicationConfig"
    ] = None,
    iframe_config: Optional[
        "capo_appintegrations.types.iframe_config.IframeConfig"
    ] = None,
    application_type: Optional[
        "capo_appintegrations.types.application_type.ApplicationType"
    ] = None,
    auth_config: Optional[
        "capo_appintegrations.types.auth_config.AuthConfig"
    ] = None,
) -> "capo_appintegrations.types.create_application_response.CreateApplicationResponse":
    """<p>Creates and persists an Application resource.</p>

    Args:
        name: <p>The name of the application.</p>
        namespace: <p>The namespace of the application.</p>
        description: <p>The description of the application.</p>
        application_source_config: <p>The configuration for where the application should be loaded from.</p>
        subscriptions: <p>The events that the application subscribes.</p>
        publications: <p>The events that the application publishes.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
        tags: <p>The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.</p>
        permissions: <p>The configuration of events or requests that the application has access to.</p>
        is_service: <p>Indicates whether the application is a service.</p>
        initialization_timeout: <p>The maximum time in milliseconds allowed to establish a connection with the workspace.</p>
        application_config: <p>The configuration settings for the application.</p>
        iframe_config: <p>The iframe configuration for the application.</p>
        application_type: <p>The type of application.</p>
        auth_config: <p>The authentication settings that Connect Customer uses when calling the external application.</p>

    Raises:
        capo_appintegrations.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_appintegrations.errors.duplicate_resource_exception.DuplicateResourceException: <p>A resource with the specified name already exists.</p>
        capo_appintegrations.errors.internal_service_error.InternalServiceError: <p>Request processing failed due to an error or failure with the service.</p>
        capo_appintegrations.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid. </p>
        capo_appintegrations.errors.resource_quota_exceeded_exception.ResourceQuotaExceededException: <p>The allowed quota for the resource has been exceeded.</p>
        capo_appintegrations.errors.throttling_exception.ThrottlingException: <p>The throttling limit has been exceeded.</p>
        capo_appintegrations.errors.unsupported_operation_exception.UnsupportedOperationException: <p>The operation is not supported.</p>
        capo_appintegrations.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To create an application
        The following creates an application named My Application with access url https://example.com.

        >>> client.create_application(name='My Application', namespace='myapplication', description='My first application.', application_source_config={'ExternalUrlConfig': {'AccessUrl': 'https://example.com'}})
    """

    def _handler(
        req: "OperationRequest[capo_appintegrations.types.create_application_request.CreateApplicationRequest]",
    ) -> OperationResponse[
        "capo_appintegrations.types.create_application_response.CreateApplicationResponse"
    ]:
        import capo_appintegrations._operations.amazon_app_integration_service.create_application

        output, http_response = (
            capo_appintegrations._operations.amazon_app_integration_service.create_application.create_application(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateApplication")
    )
    input_: capo_appintegrations.types.create_application_request.CreateApplicationRequest = {
        "name": name,
        "namespace": namespace,
        "application_source_config": application_source_config,
    }
    if description is not None:
        input_["description"] = description
    if subscriptions is not None:
        input_["subscriptions"] = subscriptions
    if publications is not None:
        input_["publications"] = publications
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if tags is not None:
        input_["tags"] = tags
    if permissions is not None:
        input_["permissions"] = permissions
    if is_service is not None:
        input_["is_service"] = is_service
    if initialization_timeout is not None:
        input_["initialization_timeout"] = initialization_timeout
    if application_config is not None:
        input_["application_config"] = application_config
    if iframe_config is not None:
        input_["iframe_config"] = iframe_config
    if application_type is not None:
        input_["application_type"] = application_type
    if auth_config is not None:
        input_["auth_config"] = auth_config

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