Skip to content

create_application

create_application(
    name: Name,
    *,
    config_overrides: Optional[AppConfigClientConfig] = None,
    description: Optional[Description] = None,
    tags: Optional[TagMap] = None,
) -> Application

Creates an application. In AppConfig, an application is simply an organizational construct like a folder. This organizational construct has a relationship with some unit of executable code. For example, you could create an application called MyMobileApp to organize and manage configuration data for a mobile application installed by your users.

Parameters:

  • name (Name) –

    A name for the application.

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

    A description of the application.

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

    Metadata to assign to the application. Tags help organize and categorize your AppConfig resources. Each tag consists of a key and an optional value, both of which you define.

Raises:

  • BadRequestException –

    The input fails to satisfy the constraints specified by an Amazon Web Services service.

  • InternalServerException –

    There was an internal failure in the AppConfig service.

  • ServiceQuotaExceededException –

    The number of one more AppConfig resources exceeds the maximum allowed. Verify that your environment doesn't exceed the following service quotas:

    Applications: 100 max

    To resolve this issue, you can delete one or more resources and try again. Or, you can request a quota increase. For more information about quotas and to request an increase, see Service quotas for AppConfig in the Amazon Web Services General Reference.

  • UnknownServiceError –

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

Examples:

To create an application The following create-application example creates an application in AWS AppConfig.

>>> client.create_application(name='example-application', description='An application used for creating an example.')
Source code in docs_src/capo_appconfig/_services/app_config.py
def create_application(
    self,
    name: "capo_appconfig.types.name.Name",
    *,
    config_overrides: Optional[AppConfigClientConfig] = None,
    description: Optional["capo_appconfig.types.description.Description"] = None,
    tags: Optional["capo_appconfig.types.tag_map.TagMap"] = None,
) -> "capo_appconfig.types.application.Application":
    """<p>Creates an application. In AppConfig, an application is simply an organizational construct like a folder. This organizational construct has a relationship with some unit of executable code. For example, you could create an application called MyMobileApp to organize and manage configuration data for a mobile application installed by your users.</p>

    Args:
        name: <p>A name for the application.</p>
        description: <p>A description of the application.</p>
        tags: <p>Metadata to assign to the application. Tags help organize and categorize your AppConfig resources. Each tag consists of a key and an optional value, both of which you define.</p>

    Raises:
        capo_appconfig.errors.bad_request_exception.BadRequestException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_appconfig.errors.internal_server_exception.InternalServerException: <p>There was an internal failure in the AppConfig service.</p>
        capo_appconfig.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The number of one more AppConfig resources exceeds the maximum allowed. Verify that your environment doesn't exceed the following service quotas:</p> <p>Applications: 100 max</p> <p>To resolve this issue, you can delete one or more resources and try again. Or, you can request a quota increase. For more information about quotas and to request an increase, see <a href="https://docs.aws.amazon.com/general/latest/gr/appconfig.html#limits_appconfig">Service quotas for AppConfig</a> in the Amazon Web Services General Reference.</p>
        capo_appconfig.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To create an application
        The following create-application example creates an application in AWS AppConfig.

        >>> client.create_application(name='example-application', description='An application used for creating an example.')
    """

    def _handler(
        req: "OperationRequest[capo_appconfig.types.create_application_request.CreateApplicationRequest]",
    ) -> OperationResponse["capo_appconfig.types.application.Application"]:
        import capo_appconfig._operations.amazon_app_config.create_application

        output, http_response = (
            capo_appconfig._operations.amazon_app_config.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_appconfig.types.create_application_request.CreateApplicationRequest = {
        "name": name
    }
    if description is not None:
        input_["description"] = description
    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