route_tables#

State module for managing Route Tables.

async idem_azure.states.azure.network.route_tables.present(hub, ctx, name: str, resource_group_name: str, route_table_name: str, location: str, routes: List[RouteSet] = None, disable_bgp_route_propagation: bool = None, tags: Dict = None, subscription_id: str = None, resource_id: str = None) dict[source]#

Create or update Route Tables.

Parameters:
  • name (str) – The identifier for this state.

  • resource_group_name (str) – The name of the resource group.

  • route_table_name (str) – The name of the route table.

  • location (str) – Resource location. This field can not be updated.

  • routes (list, Optional) –

    An array of routes on the route table. Collection of routes contained within a route table. Defaults to None.

    • route_name(str):

      The name of the resource that is unique within a resource group.

    • address_prefix(str):

      The destination CIDR to which the route applies.

    • next_hop_type(str):

      The type of Azure hop the packet should be sent to.

    • next_hop_ip_address(str, Optional):

      The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.

  • disable_bgp_route_propagation (bool, Optional) – Whether to disable the routes learned by BGP on that route table. True means disable.

  • tags (dict[str, str], Optional) – Resource tags.

  • subscription_id – Subscription Unique id.

  • resource_id – Route table resource id on Azure.

Returns:

dict

Examples

resource_is_present:
  azure.network.route_tables.present:
  - name: resource_name
  - resource_group_name: my-resource-group
  - route_table_name: my-route-table
  - location: southindia
  - tags:
      environment: scaleperf
  - disable_bgp_route_propagation: false
  - routes:
    - address_prefix: 10.0.0.0/26
      next_hop_ip_address: 10.0.1.0
      next_hop_type: VirtualAppliance
      route_name: my-route
    - address_prefix: 10.0.0.0/25
      next_hop_type: None
      route_name: my-route-2
async idem_azure.states.azure.network.route_tables.absent(hub, ctx, name: str, resource_group_name: str, route_table_name: str, subscription_id: str = None) dict[source]#

Delete Route Tables.

Parameters:
  • name (str) – The identifier for this state.

  • resource_group_name (str) – The name of the resource group.

  • route_table_name (str) – The name of the route table.

  • subscription_id (str, Optional) – Subscription Unique id.

Returns:

dict

Examples

resource_is_absent:
  azure.network.route_tables.absent:
    - name: my-resource
    - resource_group_name: my-resource-group-name
    - route_table_name: my-route-table
async idem_azure.states.azure.network.route_tables.describe(hub, ctx) Dict[str, Dict[str, Any]][source]#

Describe the resource in a way that can be recreated/managed with the corresponding “present” function.

Lists all Route Tables under the same subscription.

Returns:

Dict[str, Any]

Examples

$ idem describe azure.network.route_tables