updateServiceFunction method

Future<UpdateServiceFunctionResponse> updateServiceFunction({
  1. required String serviceArn,
  2. required String serviceFunctionId,
  3. ServiceFunctionCriticality? criticality,
  4. String? description,
  5. String? name,
})

Updates a service function.

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

Parameter serviceFunctionId : The identifier of the service function to update.

Parameter criticality : The updated criticality level of the service function.

Implementation

Future<UpdateServiceFunctionResponse> updateServiceFunction({
  required String serviceArn,
  required String serviceFunctionId,
  ServiceFunctionCriticality? criticality,
  String? description,
  String? name,
}) async {
  final $payload = <String, dynamic>{
    'serviceArn': serviceArn,
    'serviceFunctionId': serviceFunctionId,
    if (criticality != null) 'criticality': criticality.value,
    if (description != null) 'description': description,
    if (name != null) 'name': name,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/v2/update-function',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateServiceFunctionResponse.fromJson(response);
}