Skip to content

compose_environments

compose_environments(
    *,
    config_overrides: Optional[ElasticBeanstalkClientConfig] = None,
    application_name: Optional[ApplicationName] = None,
    group_name: Optional[GroupName] = None,
    version_labels: Optional[VersionLabels] = None,
) -> EnvironmentDescriptionsMessage

Create or update a group of environments that each run a separate component of a single application. Takes a list of version labels that specify application source bundles for each of the environments to create or update. The name of each environment and other required information must be included in the source bundles in an environment manifest named env.yaml. See Compose Environments for details.

Parameters:

  • application_name (Optional[ApplicationName], default: None ) –

    The name of the application to which the specified source bundles belong.

  • group_name (Optional[GroupName], default: None ) –

    The name of the group to which the target environments belong. Specify a group name only if the environment name defined in each target environment's manifest ends with a + (plus) character. See Environment Manifest (env.yaml) for details.

  • version_labels (Optional[VersionLabels], default: None ) –

    A list of version labels, specifying one or more application source bundles that belong to the target application. Each source bundle must include an environment manifest that specifies the name of the environment and the name of the solution stack to use, and optionally can specify environment links to create.

Raises:

Source code in docs_src/capo_elastic_beanstalk/_services/elastic_beanstalk.py
def compose_environments(
    self,
    *,
    config_overrides: Optional[ElasticBeanstalkClientConfig] = None,
    application_name: Optional[
        "capo_elastic_beanstalk.types.application_name.ApplicationName"
    ] = None,
    group_name: Optional[
        "capo_elastic_beanstalk.types.group_name.GroupName"
    ] = None,
    version_labels: Optional[
        "capo_elastic_beanstalk.types.version_labels.VersionLabels"
    ] = None,
) -> "capo_elastic_beanstalk.types.environment_descriptions_message.EnvironmentDescriptionsMessage":
    """<p>Create or update a group of environments that each run a separate component of a single application. Takes a list of version labels that specify application source bundles for each of the environments to create or update. The name of each environment and other required information must be included in the source bundles in an environment manifest named <code>env.yaml</code>. See <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-mgmt-compose.html">Compose Environments</a> for details.</p>

    Args:
        application_name: <p>The name of the application to which the specified source bundles belong.</p>
        group_name: <p>The name of the group to which the target environments belong. Specify a group name only if the environment name defined in each target environment's manifest ends with a + (plus) character. See <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-cfg-manifest.html">Environment Manifest (env.yaml)</a> for details.</p>
        version_labels: <p>A list of version labels, specifying one or more application source bundles that belong to the target application. Each source bundle must include an environment manifest that specifies the name of the environment and the name of the solution stack to use, and optionally can specify environment links to create.</p>

    Raises:
        capo_elastic_beanstalk.errors.insufficient_privileges_exception.InsufficientPrivilegesException: <p>The specified account does not have sufficient privileges for one or more Amazon Web Services services.</p>
        capo_elastic_beanstalk.errors.too_many_environments_exception.TooManyEnvironmentsException: <p>The specified account has reached its limit of environments.</p>
        capo_elastic_beanstalk.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_elastic_beanstalk.types.compose_environments_message.ComposeEnvironmentsMessage]",
    ) -> OperationResponse[
        "capo_elastic_beanstalk.types.environment_descriptions_message.EnvironmentDescriptionsMessage"
    ]:
        import capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.compose_environments

        output, http_response = (
            capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.compose_environments.compose_environments(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ComposeEnvironments")
    )
    input_: capo_elastic_beanstalk.types.compose_environments_message.ComposeEnvironmentsMessage = {}
    if application_name is not None:
        input_["application_name"] = application_name
    if group_name is not None:
        input_["group_name"] = group_name
    if version_labels is not None:
        input_["version_labels"] = version_labels

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