create_gateway_route
async
¶
create_gateway_route(
gateway_route_name: ResourceName,
mesh_name: ResourceName,
virtual_gateway_name: ResourceName,
spec: GatewayRouteSpec,
*,
config_overrides: Optional[AsyncAppMeshClientConfig] = None,
tags: Optional[TagList] = None,
client_token: Optional[str] = None,
mesh_owner: Optional[AccountId] = None,
) -> CreateGatewayRouteOutput
Creates a gateway route.
A gateway route is attached to a virtual gateway and routes traffic to an existing virtual service. If a route matches a request, it can distribute traffic to a target virtual service.
For more information about gateway routes, see Gateway routes.
Parameters:
-
gateway_route_name(ResourceName) –The name to use for the gateway route.
-
mesh_name(ResourceName) –The name of the service mesh to create the gateway route in.
-
virtual_gateway_name(ResourceName) –The name of the virtual gateway to associate the gateway route with. If the virtual gateway is in a shared mesh, then you must be the owner of the virtual gateway resource.
-
spec(GatewayRouteSpec) –The gateway route specification to apply.
-
tags(Optional[TagList], default:None) –Optional metadata that you can apply to the gateway route to assist with categorization and organization. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
-
client_token(Optional[str], default:None) –Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Up to 36 letters, numbers, hyphens, and underscores are allowed.
-
mesh_owner(Optional[AccountId], default:None) –The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then the account that you specify must share the mesh with your account before you can create the resource in the service mesh. For more information about mesh sharing, see Working with shared meshes.
Raises:
-
BadRequestException–The request syntax was malformed. Check your request syntax and try again.
-
ConflictException–The request contains a client token that was used for a previous update resource call with different specifications. Try the request again with a new client token.
-
ForbiddenException–You don't have permissions to perform this action.
-
InternalServerErrorException–The request processing has failed because of an unknown error, exception, or failure.
-
LimitExceededException–You have exceeded a service limit for your account. For more information, see Service Limits in the App Mesh User Guide.
-
NotFoundException–The specified resource doesn't exist. Check your request syntax and try again.
-
ServiceUnavailableException–The request has failed due to a temporary failure of the service.
-
TooManyRequestsException–The maximum request rate permitted by the App Mesh APIs has been exceeded for your account. For best results, use an increasing or variable sleep interval between requests.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_app_mesh/_services/async_app_mesh.py
1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 | |