ip_routes
Creates, updates, deletes, gets or lists an ip_routes resource.
Overview
| Name | ip_routes |
| Type | Resource |
| Id | aws.ds.ip_routes |
Fields
The following fields are returned by SELECT queries:
- list_ip_routes
| Name | Datatype | Description |
|---|---|---|
added_date_time | string (date-time) | The date and time the address block was added to the directory. |
cidr_ip | string | IP 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_6 | string | IPv6 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>) |
description | string | Description of the IpRouteInfo. (pattern: <code>^([a-zA-Z0-9_])[\a-zA-Z0-9_@#%+=:?./!\s-]$</code>) |
directory_id | string | Identifier (ID) of the directory associated with the IP addresses. (pattern: <code>^d-[0-9a-f]{10}$</code>) |
ip_route_status_msg | string | The status of the IP address block. (Adding, Added, Removing, Removed, AddFailed, RemoveFailed) |
ip_route_status_reason | string | The reason for the IpRouteStatusMsg. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_ip_routes | select | region | Lists the address blocks that you have added to a directory. | |
add_ip_routes | update | region, DirectoryId, IpRoutes | 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. | |
remove_ip_routes | update | region, DirectoryId | Removes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- list_ip_routes
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
- add_ip_routes
- remove_ip_routes
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;
Removes IP address blocks from a directory.
UPDATE aws.ds.ip_routes
SET
DirectoryId = '{{ DirectoryId }}',
CidrIps = '{{ CidrIps }}',
CidrIpv6s = '{{ CidrIpv6s }}'
WHERE
region = '{{ region }}' --required
AND DirectoryId = '{{ DirectoryId }}' --required;