applyEnvironmentManagedAction method

Future<ApplyEnvironmentManagedActionResult> applyEnvironmentManagedAction({
  1. required String actionId,
  2. String? environmentId,
  3. String? environmentName,
})

Applies a scheduled managed action immediately. A managed action can be applied only if its status is Scheduled. Get the status and action ID of a managed action with DescribeEnvironmentManagedActions.

May throw ElasticBeanstalkServiceException. May throw ManagedActionInvalidStateException.

Parameter actionId : The action ID of the scheduled managed action to execute.

Parameter environmentId : The environment ID of the target environment.

Parameter environmentName : The name of the target environment.

Implementation

Future<ApplyEnvironmentManagedActionResult> applyEnvironmentManagedAction({
  required String actionId,
  String? environmentId,
  String? environmentName,
}) async {
  final $request = <String, String>{
    'ActionId': actionId,
    if (environmentId != null) 'EnvironmentId': environmentId,
    if (environmentName != null) 'EnvironmentName': environmentName,
  };
  final $result = await _protocol.send(
    $request,
    action: 'ApplyEnvironmentManagedAction',
    version: '2010-12-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    resultWrapper: 'ApplyEnvironmentManagedActionResult',
  );
  return ApplyEnvironmentManagedActionResult.fromXml($result);
}