route#

Exec functions for AWS API Gateway v2 API resources.

async idem_aws.exec.aws.apigatewayv2.route.get(hub, ctx, name: str, api_id: str, route_id: str) Dict[str, Any][source]#

Get a route resource from AWS.

Parameters:
  • name (str) – The name of the Idem state.

  • api_id (str) – The API identifier.

  • route_id (str) – The route ID.

Returns:

Returns a route.

Return type:

Dict[str, Any]

Examples

Call from the CLI:

idem exec aws.apigatewayv2.route.get name="my_resource" api_id="api_id" route_id="route_id"

Call from code:

async def my_func(hub, ctx, name:str, api_id:str, route_id:str):
    await hub.exec.aws.apigatewayv2.route.get(ctx, name, api_id, route_id)

Using in a state:

my_unmanaged_resource:
  exec.run:
    - path: aws.apigatewayv2.route.get
    - kwargs:
        name: my_resource
        api_id: api_id
        route_id: route_id
async idem_aws.exec.aws.apigatewayv2.route.list_(hub, ctx, api_id: str) Dict[str, Any][source]#

Get a list of route resources from AWS.

Parameters:

api_id (str) – The API identifier.

Returns:

Returns a route.

Return type:

Dict[str, Any]

Examples

Call from the CLI:

idem exec aws.apigatewayv2.route.get name="my_resource" api_id="api_id"

Call from code:

async def my_func(hub, ctx, name:str, api_id:str):
    await hub.exec.aws.apigatewayv2.route.get(ctx, name, api_id)

Using in a state:

my_unmanaged_resource:
  exec.run:
    - path: aws.apigatewayv2.route.get
    - kwargs:
        name: my_resource
        api_id: api_id