updateService method
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.
Parameter idleTimeoutSeconds :
The amount of time, in seconds, that a connection can remain idle (no data
sent) before VPC Lattice closes it. The valid range is 60 to 600 seconds.
If you don't specify a value, the default is 60 seconds. This setting does
not change the maximum connection duration of 10 minutes; connections are
still closed when they reach that limit.
Implementation
Future<UpdateServiceResponse> updateService({
required String serviceIdentifier,
AuthType? authType,
String? certificateArn,
int? idleTimeoutSeconds,
}) async {
_s.validateNumRange(
'idleTimeoutSeconds',
idleTimeoutSeconds,
60,
600,
);
final $payload = <String, dynamic>{
if (authType != null) 'authType': authType.value,
if (certificateArn != null) 'certificateArn': certificateArn,
if (idleTimeoutSeconds != null) 'idleTimeoutSeconds': idleTimeoutSeconds,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri: '/services/${Uri.encodeComponent(serviceIdentifier)}',
exceptionFnMap: _exceptionFns,
);
return UpdateServiceResponse.fromJson(response);
}