updateGatewayRoute method
Updates an existing gateway route that is associated to a specified virtual gateway in a service mesh.
May throw NotFoundException. May throw BadRequestException. May throw ConflictException. May throw TooManyRequestsException. May throw ForbiddenException. May throw ServiceUnavailableException. May throw InternalServerErrorException. May throw LimitExceededException.
Parameter gatewayRouteName
:
The name of the gateway route to update.
Parameter meshName
:
The name of the service mesh that the gateway route resides in.
Parameter spec
:
The new gateway route specification to apply. This overwrites the existing
data.
Parameter virtualGatewayName
:
The name of the virtual gateway that the gateway route is associated with.
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 AWS 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<UpdateGatewayRouteOutput> updateGatewayRoute({
required String gatewayRouteName,
required String meshName,
required GatewayRouteSpec spec,
required String virtualGatewayName,
String? clientToken,
String? meshOwner,
}) async {
ArgumentError.checkNotNull(gatewayRouteName, 'gatewayRouteName');
_s.validateStringLength(
'gatewayRouteName',
gatewayRouteName,
1,
255,
isRequired: true,
);
ArgumentError.checkNotNull(meshName, 'meshName');
_s.validateStringLength(
'meshName',
meshName,
1,
255,
isRequired: true,
);
ArgumentError.checkNotNull(spec, 'spec');
ArgumentError.checkNotNull(virtualGatewayName, 'virtualGatewayName');
_s.validateStringLength(
'virtualGatewayName',
virtualGatewayName,
1,
255,
isRequired: true,
);
_s.validateStringLength(
'meshOwner',
meshOwner,
12,
12,
);
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)}/virtualGateway/${Uri.encodeComponent(virtualGatewayName)}/gatewayRoutes/${Uri.encodeComponent(gatewayRouteName)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
final $json = await _s.jsonFromResponse(response);
return UpdateGatewayRouteOutput(
gatewayRoute: GatewayRouteData.fromJson($json),
);
}