updateApplication method

Future<UpdateApplicationResponse> updateApplication({
  1. required String resourceGroupName,
  2. bool? attachMissingPermission,
  3. bool? autoConfigEnabled,
  4. bool? cWEMonitorEnabled,
  5. bool? opsCenterEnabled,
  6. String? opsItemSNSTopicArn,
  7. bool? removeSNSTopic,
  8. String? sNSNotificationArn,
})

Updates the application.

May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter resourceGroupName : The name of the resource group.

Parameter attachMissingPermission : If set to true, the managed policies for SSM and CW will be attached to the instance roles if they are missing.

Parameter autoConfigEnabled : Turns auto-configuration on or off.

Parameter cWEMonitorEnabled : Indicates whether Application Insights can listen to CloudWatch events for the application resources, such as instance terminated, failed deployment, and others.

Parameter opsCenterEnabled : When set to true, creates opsItems for any problems detected on an application.

Parameter opsItemSNSTopicArn : The SNS topic provided to Application Insights that is associated to the created opsItem. Allows you to receive notifications for updates to the opsItem.

Parameter removeSNSTopic : Disassociates the SNS topic from the opsItem created for detected problems.

Parameter sNSNotificationArn : The SNS topic ARN. Allows you to receive SNS notifications for updates and issues with an application.

Implementation

Future<UpdateApplicationResponse> updateApplication({
  required String resourceGroupName,
  bool? attachMissingPermission,
  bool? autoConfigEnabled,
  bool? cWEMonitorEnabled,
  bool? opsCenterEnabled,
  String? opsItemSNSTopicArn,
  bool? removeSNSTopic,
  String? sNSNotificationArn,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'EC2WindowsBarleyService.UpdateApplication'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ResourceGroupName': resourceGroupName,
      if (attachMissingPermission != null)
        'AttachMissingPermission': attachMissingPermission,
      if (autoConfigEnabled != null) 'AutoConfigEnabled': autoConfigEnabled,
      if (cWEMonitorEnabled != null) 'CWEMonitorEnabled': cWEMonitorEnabled,
      if (opsCenterEnabled != null) 'OpsCenterEnabled': opsCenterEnabled,
      if (opsItemSNSTopicArn != null)
        'OpsItemSNSTopicArn': opsItemSNSTopicArn,
      if (removeSNSTopic != null) 'RemoveSNSTopic': removeSNSTopic,
      if (sNSNotificationArn != null)
        'SNSNotificationArn': sNSNotificationArn,
    },
  );

  return UpdateApplicationResponse.fromJson(jsonResponse.body);
}