updateMesh method
Updates an existing service mesh.
May throw BadRequestException.
May throw ConflictException.
May throw ForbiddenException.
May throw InternalServerErrorException.
May throw NotFoundException.
May throw ServiceUnavailableException.
May throw TooManyRequestsException.
Parameter meshName :
The name of the service mesh 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 spec :
The service mesh specification to apply.
Implementation
Future<UpdateMeshOutput> updateMesh({
required String meshName,
String? clientToken,
MeshSpec? spec,
}) async {
final $payload = <String, dynamic>{
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (spec != null) 'spec': spec,
};
final response = await _protocol.sendRaw(
payload: $payload,
method: 'PUT',
requestUri: '/v20190125/meshes/${Uri.encodeComponent(meshName)}',
exceptionFnMap: _exceptionFns,
);
final $json = await _s.jsonFromResponse(response);
return UpdateMeshOutput(
mesh: MeshData.fromJson($json),
);
}