updateService method

Future<UpdateServiceResponse> updateService({
  1. required String serviceIdentifier,
  2. AuthType? authType,
  3. String? certificateArn,
})

Updates the specified service.

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

Parameter serviceIdentifier : The ID or ARN of the service.

Parameter authType : The type of IAM policy.

  • NONE: The resource does not use an IAM policy. This is the default.
  • AWS_IAM: The resource uses an IAM policy. When this type is used, auth is enabled and an auth policy is required.

Parameter certificateArn : The Amazon Resource Name (ARN) of the certificate.

Implementation

Future<UpdateServiceResponse> updateService({
  required String serviceIdentifier,
  AuthType? authType,
  String? certificateArn,
}) async {
  final $payload = <String, dynamic>{
    if (authType != null) 'authType': authType.value,
    if (certificateArn != null) 'certificateArn': certificateArn,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri: '/services/${Uri.encodeComponent(serviceIdentifier)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateServiceResponse.fromJson(response);
}