composeEnvironments method

Future<EnvironmentDescriptionsMessage> composeEnvironments({
  1. String? applicationName,
  2. String? groupName,
  3. List<String>? versionLabels,
})

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.

May throw TooManyEnvironmentsException. May throw InsufficientPrivilegesException.

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

Parameter groupName : 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.

Parameter versionLabels : 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.

Implementation

Future<EnvironmentDescriptionsMessage> composeEnvironments({
  String? applicationName,
  String? groupName,
  List<String>? versionLabels,
}) async {
  _s.validateStringLength(
    'applicationName',
    applicationName,
    1,
    100,
  );
  _s.validateStringLength(
    'groupName',
    groupName,
    1,
    19,
  );
  final $request = <String, dynamic>{};
  applicationName?.also((arg) => $request['ApplicationName'] = arg);
  groupName?.also((arg) => $request['GroupName'] = arg);
  versionLabels?.also((arg) => $request['VersionLabels'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'ComposeEnvironments',
    version: '2010-12-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['ComposeEnvironmentsMessage'],
    shapes: shapes,
    resultWrapper: 'ComposeEnvironmentsResult',
  );
  return EnvironmentDescriptionsMessage.fromXml($result);
}