Skip to main content

ip_routes

Creates, updates, deletes, gets or lists an ip_routes resource.

Overview

Nameip_routes
TypeResource
Idaws.ds.ip_routes

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
added_date_timestring (date-time)The date and time the address block was added to the directory.
cidr_ipstringIP address block in the IpRoute. (pattern: <code>^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(/([1-9]|[1-2][0-9]|3[0-2]))$</code>)
cidr_ipv_6stringIPv6 address block in the IpRoute. (pattern: <code>^((([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4})|(([0-9a-fA-F]{1,4}:){1,7}:)|(([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4})|(([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2})|(([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3})|(([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4})|(([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5})|([0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6}))|(:((:[0-9a-fA-F]{1,4}){1,7}|:)))/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$</code>)
descriptionstringDescription of the IpRouteInfo. (pattern: <code>^([a-zA-Z0-9_])[\a-zA-Z0-9_@#%+=:?./!\s-]$</code>)
directory_idstringIdentifier (ID) of the directory associated with the IP addresses. (pattern: <code>^d-[0-9a-f]{10}$</code>)
ip_route_status_msgstringThe status of the IP address block. (Adding, Added, Removing, Removed, AddFailed, RemoveFailed)
ip_route_status_reasonstringThe reason for the IpRouteStatusMsg.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_ip_routesselectregionLists the address blocks that you have added to a directory.
add_ip_routesupdateregion, DirectoryId, IpRoutesIf the DNS server for your self-managed domain uses a publicly addressable IP address, you must add a CIDR address block to correctly route traffic to and from your Microsoft AD on Amazon Web Services. AddIpRoutes adds this address block. You can also use AddIpRoutes to facilitate routing traffic that uses public IP ranges from your Microsoft AD on Amazon Web Services to a peer VPC. Before you call AddIpRoutes, ensure that all of the required permissions have been explicitly granted through a policy. For details about what permissions are required to run the AddIpRoutes operation, see Directory Service API Permissions: Actions, Resources, and Conditions Reference.
remove_ip_routesupdateregion, DirectoryIdRemoves IP address blocks from a directory.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Lists the address blocks that you have added to a directory.

SELECT
added_date_time,
cidr_ip,
cidr_ipv_6,
description,
directory_id,
ip_route_status_msg,
ip_route_status_reason
FROM aws.ds.ip_routes
WHERE region = '{{ region }}' -- required
;

UPDATE examples

If the DNS server for your self-managed domain uses a publicly addressable IP address, you must add a CIDR address block to correctly route traffic to and from your Microsoft AD on Amazon Web Services. AddIpRoutes adds this address block. You can also use AddIpRoutes to facilitate routing traffic that uses public IP ranges from your Microsoft AD on Amazon Web Services to a peer VPC. Before you call AddIpRoutes, ensure that all of the required permissions have been explicitly granted through a policy. For details about what permissions are required to run the AddIpRoutes operation, see Directory Service API Permissions: Actions, Resources, and Conditions Reference.

UPDATE aws.ds.ip_routes
SET
DirectoryId = '{{ DirectoryId }}',
IpRoutes = '{{ IpRoutes }}',
UpdateSecurityGroupForDirectoryControllers = {{ UpdateSecurityGroupForDirectoryControllers }}
WHERE
region = '{{ region }}' --required
AND DirectoryId = '{{ DirectoryId }}' --required
AND IpRoutes = '{{ IpRoutes }}' --required;