putAppLaunchConfiguration method

Future<void> putAppLaunchConfiguration({
  1. String? appId,
  2. bool? autoLaunch,
  3. String? roleName,
  4. List<ServerGroupLaunchConfiguration>? serverGroupLaunchConfigurations,
})

Creates or updates the launch configuration for the specified application.

May throw UnauthorizedOperationException. May throw InvalidParameterException. May throw MissingRequiredParameterException. May throw InternalError. May throw OperationNotPermittedException.

Parameter appId : The ID of the application.

Parameter autoLaunch : Indicates whether the application is configured to launch automatically after replication is complete.

Parameter roleName : The name of service role in the customer's account that AWS CloudFormation uses to launch the application.

Parameter serverGroupLaunchConfigurations : Information about the launch configurations for server groups in the application.

Implementation

Future<void> putAppLaunchConfiguration({
  String? appId,
  bool? autoLaunch,
  String? roleName,
  List<ServerGroupLaunchConfiguration>? serverGroupLaunchConfigurations,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target':
        'AWSServerMigrationService_V2016_10_24.PutAppLaunchConfiguration'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (appId != null) 'appId': appId,
      if (autoLaunch != null) 'autoLaunch': autoLaunch,
      if (roleName != null) 'roleName': roleName,
      if (serverGroupLaunchConfigurations != null)
        'serverGroupLaunchConfigurations': serverGroupLaunchConfigurations,
    },
  );
}