rebuildEnvironment method
Deletes and recreates all of the AWS resources (for example: the Auto Scaling group, load balancer, etc.) for a specified environment and forces a restart.
May throw InsufficientPrivilegesException.
Parameter environmentId
:
The ID of the environment to rebuild.
Condition: You must specify either this or an EnvironmentName, or both. If
you do not specify either, AWS Elastic Beanstalk returns
MissingRequiredParameter
error.
Parameter environmentName
:
The name of the environment to rebuild.
Condition: You must specify either this or an EnvironmentId, or both. If
you do not specify either, AWS Elastic Beanstalk returns
MissingRequiredParameter
error.
Implementation
Future<void> rebuildEnvironment({
String? environmentId,
String? environmentName,
}) async {
_s.validateStringLength(
'environmentName',
environmentName,
4,
40,
);
final $request = <String, dynamic>{};
environmentId?.also((arg) => $request['EnvironmentId'] = arg);
environmentName?.also((arg) => $request['EnvironmentName'] = arg);
await _protocol.send(
$request,
action: 'RebuildEnvironment',
version: '2010-12-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['RebuildEnvironmentMessage'],
shapes: shapes,
);
}