updateVirtualRouter method
Updates an existing virtual router in a specified service mesh.
May throw BadRequestException.
May throw ConflictException.
May throw ForbiddenException.
May throw InternalServerErrorException.
May throw LimitExceededException.
May throw NotFoundException.
May throw ServiceUnavailableException.
May throw TooManyRequestsException.
Parameter meshName :
The name of the service mesh that the virtual router resides in.
Parameter spec :
The new virtual router specification to apply. This overwrites the
existing data.
Parameter virtualRouterName :
The name of the virtual router to update.
Parameter clientToken :
Unique, case-sensitive identifier that you provide to ensure the
idempotency of the request. Up to 36 letters, numbers, hyphens, and
underscores are allowed.
Parameter meshOwner :
The Amazon Web Services IAM account ID of the service mesh owner. If the
account ID is not your own, then it's the ID of the account that shared
the mesh with your account. For more information about mesh sharing, see
Working
with shared meshes.
Implementation
Future<UpdateVirtualRouterOutput> updateVirtualRouter({
required String meshName,
required VirtualRouterSpec spec,
required String virtualRouterName,
String? clientToken,
String? meshOwner,
}) async {
final $query = <String, List<String>>{
if (meshOwner != null) 'meshOwner': [meshOwner],
};
final $payload = <String, dynamic>{
'spec': spec,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
};
final response = await _protocol.sendRaw(
payload: $payload,
method: 'PUT',
requestUri:
'/v20190125/meshes/${Uri.encodeComponent(meshName)}/virtualRouters/${Uri.encodeComponent(virtualRouterName)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
final $json = await _s.jsonFromResponse(response);
return UpdateVirtualRouterOutput(
virtualRouter: VirtualRouterData.fromJson($json),
);
}