Skip to content

Commit

Permalink
Add return value documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tremble committed Feb 25, 2021
1 parent 17e6887 commit 668fd81
Showing 1 changed file with 139 additions and 2 deletions.
141 changes: 139 additions & 2 deletions plugins/modules/ec2_vpc_route_table_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
__metaclass__ = type


DOCUMENTATION = '''
DOCUMENTATION = r'''
---
module: ec2_vpc_route_table_info
version_added: 1.0.0
Expand All @@ -29,7 +29,7 @@
'''

EXAMPLES = '''
EXAMPLES = r'''
# Note: These examples do not set authentication details, see the AWS Guide for details.
- name: Gather information about all VPC route tables
Expand All @@ -49,7 +49,144 @@
community.aws.ec2_vpc_route_table_info:
filters:
vpc-id: vpc-abcdef00
'''

RETURN = r'''
route_tables:
description:
- A list of dictionarys describing route tables
- See also U(https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html#EC2.Client.describe_route_tables)
returned: always
type: complex
contains:
associations:
description: List of subnets associated with the route table
returned: always
type: complex
contains:
main:
description: Whether this is the main route table
returned: always
type: bool
sample: false
id:
description: ID of association between route table and subnet
returned: always
type: str
sample: rtbassoc-ab47cfc3
route_table_association_id:
description: ID of association between route table and subnet
returned: always
type: str
sample: rtbassoc-ab47cfc3
route_table_id:
description: ID of the route table
returned: always
type: str
sample: rtb-bf779ed7
subnet_id:
description: ID of the subnet
returned: always
type: str
sample: subnet-82055af9
association_state:
description: The state of the association
returned: always
type: complex
contains:
state:
description: The state of the association
returned: always
type: str
sample: associated
state_message:
description: Additional information about the state of the association
returned: when available
type: str
sample: 'Creating association'
id:
description: ID of the route table (same as route_table_id for backwards compatibility)
returned: always
type: str
sample: rtb-bf779ed7
owner_id:
description: ID of the account which owns the route table
returned: always
type: str
sample: '012345678912'
propagating_vgws:
description: List of Virtual Private Gateways propagating routes
returned: always
type: list
sample: []
route_table_id:
description: ID of the route table
returned: always
type: str
sample: rtb-bf779ed7
routes:
description: List of routes in the route table
returned: always
type: complex
contains:
destination_cidr_block:
description: CIDR block of destination
returned: always
type: str
sample: 10.228.228.0/22
gateway_id:
description: ID of the gateway
returned: when gateway is local or internet gateway
type: str
sample: local
instance_id:
description:
- ID of a NAT instance.
- Empty unless the route is via an EC2 instance
returned: always
type: str
sample: i-abcd123456789
instance_owner_id:
description:
- AWS account owning the NAT instance
- Empty unless the route is via an EC2 instance
returned: always
type: str
sample: 123456789012
network_interface_id:
description:
- The ID of the network interface
- Empty unless the route is via an EC2 instance
returned: always
type: str
sample: 123456789012
nat_gateway_id:
description: ID of the NAT gateway
returned: when the route is via a NAT gateway
type: str
sample: local
origin:
description: mechanism through which the route is in the table
returned: always
type: str
sample: CreateRouteTable
state:
description: state of the route
returned: always
type: str
sample: active
tags:
description: Tags applied to the route table
returned: always
type: dict
sample:
Name: Public route table
Public: 'true'
vpc_id:
description: ID for the VPC in which the route lives
returned: always
type: str
sample: vpc-6e2d2407
'''

try:
Expand Down

0 comments on commit 668fd81

Please sign in to comment.