updateService method

Future<UpdateServiceResponse> updateService({
  1. required String serviceArn,
  2. List<AssociatedSystem>? associatedSystems,
  3. DependencyDiscoveryInput? dependencyDiscovery,
  4. String? description,
  5. PermissionModel? permissionModel,
  6. String? policyArn,
  7. List<String>? regions,
  8. ServiceReportConfiguration? reportConfiguration,
})

Updates an existing service.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ValidationException.

Parameter associatedSystems : The updated systems to associate with the service.

Parameter permissionModel : The updated permission model for the service.

Parameter regions : The updated AWS Regions where the service operates.

Implementation

Future<UpdateServiceResponse> updateService({
  required String serviceArn,
  List<AssociatedSystem>? associatedSystems,
  DependencyDiscoveryInput? dependencyDiscovery,
  String? description,
  PermissionModel? permissionModel,
  String? policyArn,
  List<String>? regions,
  ServiceReportConfiguration? reportConfiguration,
}) async {
  final $payload = <String, dynamic>{
    'serviceArn': serviceArn,
    if (associatedSystems != null) 'associatedSystems': associatedSystems,
    if (dependencyDiscovery != null)
      'dependencyDiscovery': dependencyDiscovery.value,
    if (description != null) 'description': description,
    if (permissionModel != null) 'permissionModel': permissionModel,
    if (policyArn != null) 'policyArn': policyArn,
    if (regions != null) 'regions': regions,
    if (reportConfiguration != null)
      'reportConfiguration': reportConfiguration,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/v2/update-service',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateServiceResponse.fromJson(response);
}