Document toolboxDocument toolbox

Infoblox Extensions to the AWS API

AWS API extensions from Infoblox provide extensive support in AWS for both DNS and IPAM functionality in NIOS, by adding enhancements to the standard AWS API parameters.

AWS API requests are either GET or POST directives. An AWS query is embedded in the URL or may be part of the request body of a POST request.

The following table summarizes Infoblox API extension parameters for AWS. The second column indicates which AWS API Actions that each Infoblox extension parameter may be used against.

Infoblox Extension Parameters to Amazon API

Parameter

AWS Actions

Description

Parameter

AWS Actions

Description

#X-IB-EA-RE-{name}={value}

CreateVpc, CreateSubnet, RunInstances,
AssignPrivateIpAddresses, CreateNetworkInterface

Matches object with EA {name} that matches regular expression {value} (unanchored)

#X-IB-EA-LE-{name}={value}

CreateVpc, CreateSubnet, RunInstances,
AssignPrivateIpAddresses, CreateNetworkInterface

Matches object with EA {name} that is less than or equal to {value}

#X-IB-EA-GE-{name}={value}

CreateVpc, CreateSubnet, RunInstances,
AssignPrivateIpAddresses, CreateNetworkInterface

Matches object with EA {name} that is greater than or equal to {value}

#X-IB-Record-Type={'fixedaddress' OR 'ipv4reservation' OR 'Host' OR 'A' OR 'CNAME' OR 'PTR'}

RunInstances, AllocateAddress, AssignPrivateIpAddresses, AssociateAddress, CreateNetworkInterface

Suggests which type of NIOS record should be creat- ed. Can have multiple records per API. If both fixed address and ipv4reservation records are supplied, then the last one wins while parsing.

#X-IB-Host-Name={FQDN}

RunInstances, AllocateAddress, AssignPrivateIpAddresses, AssociateAddress, CreateNetworkInterface

Creates Host Record with FQDN for the object. The dns zone must already exist.

#X-IB-Host-Aliases={FQDN}

RunInstances, AllocateAddress, AssignPrivateIpAddresses, AssociateAddress, CreateNetworkInterface

Adds Aliases to the Host Record.

X-IB-Host-Usage={'DNS' OR 'DHCP' OR 'IPAM-Only'}

RunInstances, AllocateAddress, AssignPrivateIpAddresses, AssociateAddress, CreateNetworkInterface

Controls Host Record configuration. DNS will config- ure Host Record for DNS resolutions, DHCP will config- ure Host record for DHCP requests, IPAM-Only will disable both DNS and DHCP. Multiple request en- hancement allowed; if conflicting, the last one wins.

#X-IB-A-Name={FQDN}

RunInstances, AllocateAddress, AssignPrivateIpAddresses, AssociateAddress, CreateNetworkInterface

Creates address record with FQDN for the object. The DNS zone must already exist.

#X-IB-PTR-Name={FQDN}

RunInstances, AllocateAddress, AssignPrivateIpAddresses, AssociateAddress, CreateNetworkInterface

Creates address and PTR records with FQDN for the object. The DNS zone must already exist.

#X-IB-CNAME-Name={alias}

RunInstances, AllocateAddress, AssignPrivateIpAddresses, AssociateAddress, CreateNetworkInterface

Creates CNAME with alias for the object. This parame- ter requires that either #X-IB-Host-Record, #X-IB-A-Re- cord or X-IB-A-PTR-Record also be present to provide an FQDN.

#X-IB-DNS-View={view-name}

RunInstances, AllocateAddress, AssignPrivateIpAddresses, AssociateAddress, CreateNetworkInterface

Specifies DNS View name in which various DNS re- cords should be created. DNS View must exist in NIOS, if not found, an error is returned.

#X-IB-Tenant-ID={tenant-id}

CreateVpc, CreateSubnet, RunInstances, AllocateAddress,
AssignPrivateIpAddresses, CreateNetworkInterface

Specifies the Tenant ID to be used in creating corre- sponding NIOS objects.

#X-IB-Tenant-Name={tenant-name}

CreateVpc, CreateSubnet, RunInstances, AllocateAddress,
AssignPrivateIpAddresses, CreateNetworkInterface

Specifies the Tenant Name for the Tenant ID. Will up- date the Tenant Name if it's different.

#X-IB-Network-View={view-name}

CreateVpc

Specifies the Network View Name where VPC (Net- work Container) must be created. If the specified Net- work View doesn't exist, then returns an error to client.

#X-IB-SET-EA-{name}={value}

CreateVpc, CreateSubnet, RunInstances, AllocateAddress,
AssignPrivateIpAddresses, CreateNetworkInterface

Attaches EA with {name} and {value} to object. Note that EAs may be set with the AllocateAddress action.

#X-IB-EA-EQ-{name}={value}

CreateVpc, CreateSubnet, RunInstances,
AssignPrivateIpAddresses, CreateNetworkInterface

Matches object with EA {name} that is equal (case in- sensitive) to {value}.

#X-IB-EA-EX-{name}={value}

CreateVpc, CreateSubnet, RunInstances,
AssignPrivateIpAddresses, CreateNetworkInterface

Matches object with EA {name} that is equal (exact match) to {value}

#X-IB-EA-NE-{name}={value}

CreateVpc, CreateSubnet, RunInstances,
AssignPrivateIpAddresses, CreateNetworkInterface

Matches object with EA {name} that is not equal to
{value}

Setting and Searching Extensible Attributes

Setting and searching extensible attributes is an important part of the Infoblox enhancements to AWS API parameters. The most important Amazon API workflows, including CreateVpc, CreateSubnet and RunInstances, allow you to set extensible attribute values for the object when it is created in NIOS after the AWS workflow executes. In the Infoblox Extension Parameters to Amazon API table, you simply use the following request parameter:

#X-IB-Set-EA-{name}={value}

For searching extensible attribute values, use:

#X-IB-EA-{EQ|EC|NE|RE|LE|GE}-{name}={value}

The six search criteria are the following:

EQ    Equal
EX    Equal Case Sensitive (Exact)
NE    Not Equal
RE    Regular Expression
LE    Less than or Equal
GE    Greater than or Equal

The extensible attributes must be defined and widely used in the NIOS Grid to be meaningful in the AWS context. Extensible attributes that are expected to be used in AWS workflows also must be set as Cloud Extensible Attributes under NIOS. For information, see the Infoblox NIOS Documentation.

A search example, showing a search across two extensible attributes where a match only occurs if both values match:

https://ec2.amazonaws.com/?Action=RunInstances
&ImageId=ami-60a54009#X-IB-EA-EX-Department=Engineering#X-IB-EA-EX-Location=California
...

All Extensible Attribute searches use a logical AND construct, in which the positive match occurs only when all specified EAs match.

Specifying a Network View API Parameter

By default, the AWS API Proxy creates new virtual private clouds (VPC) in the NIOS default network view, which is named default. Doing so disallows the creation of overlapping IP address spaces in VPCs, which is supported by AWS. To avoid this, you can use a custom Infoblox API parameter to specify a different NIOS network view for each new virtual private cloud. (The network view must be defined under NIOS before specifying it in AWS API calls.) For the CreateVpc API workflow, an example:

resp = conn.create_subnet(vpc_id='vpc-67b36602#X-IB-Network-View=foo', cidr_block='10.10.10.0/28')

NIOS-to-AWS Object Correlations

The following lists the mappings of AWS API actions to Infoblox NIOS workflows.

AWS API Mappings to Infoblox NIOS Workflows

AWS API Action

Input Parameters (Inc. Infoblox)

Input Examples

Effect in NIOS

AWS API Action

Input Parameters (Inc. Infoblox)

Input Examples

Effect in NIOS

RunInstances

SubnetId={id} &PrivateIpAddress={ip}

SubnetId=subnet-1a2b3c4d
&PrivateIpAddress=172.16.42.42

Creates FIXEDADDRESS re- cord for IP addresses with instance information as EAs.



SubnetId={id}

SubnetId=subnet-1a2b3c4d

Allocates next available IP address from the network with provided SubnetId. Creates FIXEDADDRESS re- cord with instance informa- tion as EAs.



SubnetId=None
#X-IB-EA-EQ-{name}={value}

SubnetId=None
#X-IB-EA-EQ-Site=London
#X-IB-EA-EQ-AvailabilityZone= us-east-1b

Allocates next available IP address from the network with provided EAs. Creates FIXEDADDRESS record with VM-ID provided by Ama- zon.



SubnetId={id} &PrivateIpAddress=
{ip} #X-IB-Host-Record={FQDN}

SubnetId=subnet-1a2b3c4d &Pri- vateIpAddress=172.16.42.42
#X-IB-Host-Record=mail.infob- lox.com OR SubnetId=sub- net-1a2b3c4d
&PrivateIpAddress=172.16.42.42
#X-IB-Host-Record=mail.infoblox
.com
#X-IB-CNAME=webmail.infoblox
.com OR SubnetId=sub-
net-1a2b3c4d &PrivateIpAd- dress=172.16.42.42
#X-IB-Host-Record=mail.infoblox
.com #X-IB-DNS-View=Internal

Creates Host Record (and/or other various DNS records) using the FQDN supplied in request.
Creates a FIXEDADDRESS record with VM-ID provided by Amazon.



SubnetId={id} #X-IB-Host-Re- cord={FQDN}

SubnetId=subnet-1a2b3c4d
#X-IB-Host-Record=mail.infob- lox.com OR SubnetId=sub- net-1a2b3c4d
#X-IB-Host-Record=mail.infob- lox.com #X-IB-DNS-View=Internal

Allocates next available IP address from the network with provided SubnetId. Creates Host Record using the FQDN supplied in re- quest. Creates FIXEDAD- DRESS record with VM-ID provided by Amazon. Note that only one Instance can be created with this re- quest (MaxCount=1).

RunInstances (cont.)

SubnetId=None
#X-IB-EA-EQ-{name}={value}
#X-IB-Host-Recodr={FQDN}

SubnetId=None
#X-IB-EA-EQ-Site=London
#X-IB-EA-EQ-AvailabilityZone= us-east-1b #X-IB-Host-Re-
cord=mail.infoblox.com OR Subnet- Id=None #X-IB-EA-EQ-Site=London
#X-IB-EA-EQ-AvailabilityZone= us-east-1b #X-IB-Host-Re- cord=mail.infoblox
.com #X-IB-DNS-View=Internal

Allocates next available IP address from the network with provided EAs. Creates Host Record using the FQDN supplied by client. Creates a FIXEDADDRESS record with VM-ID provided by Amazon. Note that only one Instance can be creat- ed with this request (Max- Count=1).

AllocateAddress

Domain=vpc

Domain=vpc

In this case, FQDN is not provided under any Infob- lox request enhancement, so we make this a pass-th- ru request.

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="d41a91ec-9a05-4155-80aa-f94314f0fe6a"><ac:plain-text-body><![CDATA[



Domain=vpc[#X-IB-Tenant-ID={id}]
]]></ac:plain-text-body></ac:structured-macro>
#X-IB-Network-View={view-name}
#X-IB-Host-Record={FQDN}

 

Domain=vpc #X-IB-Net- work-View=public-eips
#X-IB-Host-Record=mail.infoblox
.com OR Domain=vpc #X-IB-Net- work-View=public-ips
#X-IB-Host-Record=mail.infoblox
.com #X-IB-DNS-View=Internal
#X-IB-Tenant-ID=12012

 

Creates a Host Record us- ing the Elastic IP address provided by EC2 and the FQDN supplied by client. Note that we require client to provide Network View name and FQDN. If not provided, request be- comes pass-thru.

AssignPrivateIpAddresses

NetworkInterfaceId={id} &PrivateIpAd- dress.{N}={ip}

NetworkInterfaceId=eni-d83388b1
&PrivateIpAddress.1=10.0.2.1
&PrivateIpAddress.2=10.0.2.11

Creates FIXEDADDRESS re- cord with given IP address for the interface (potential- ly an instance) provided in request.



NetworkInterfaceId=&Secondary PrivateIpAddressCount={N}

NetworkInterfaceId=eni-d83388b1
&SecondaryPrivateIpAddress- Count=2

Obtains IP address from the Subnet of primary IP address of the interface provided in the request. Creates FIXEDADDRESS re- cord with given IP address for the interface (potential- ly an instance) provided in request.



NetworkInterfaceId=&Secondary PrivateIpAddressCount={N}
#X-IB-EA-EQ-{name}={value}

NetworkInterfaceId=eni-d83388b1
&SecondaryPrivateIpAddress- Count=2
#X-IB-EA-EQ-Site=New-York

Searches Network using EAs provided in request, Obtains IP address from Network. Creates FIXEDAD- DRESS record with given IP address for the interface (potentially an instance) provided in request.

AssociateAddress

AllocationId={id}

AllocationId=eipalloc-5723d13e

Updates Host Record of Elastic IP with various EAs.



AllocationId={id} #X-IB-Host-Re- cord={FQDN}

AllocationId=eipalloc-5723d13e
#X-IB-Host-Record=poll.customer- portal.infoblox.com

Updates Host Record of Elastic IP with various EAs.

AttachNetworkInterface

InstanceId={id} &NetworkInterfa- ceId={id}

InstanceId=i-9cc316fe &NetworkIn- terfaceId=eni-ffda3197

Updates FIXEDADDRESS re- cord with Attachment ID EA.

CreateNetworkInterface

SubnetId={id} &PrivateIpAddress={ip}

SubnetId=subnet-b2a249da &Pri- vateIpAddress=10.0.2.140

Creates FIXEDADDRESS re- cord with given IP address for the interface provided in request.

CreateNetworkInterface

SubnetId={id}

SubnetId=subnet-b2a249da

Obtains IP address from the Network of SubnetId provided in the request. Creates FIXEDADDRESS with IP address for the in- terface.



SubnetId=None
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="1fc26dbc-3bfb-4c2c-8e67-a4d3186c1891"><ac:plain-text-body><![CDATA[#X-IB-EA={name}={value} [&Second- aryPrivateIpAddressCount
]]></ac:plain-text-body></ac:structured-macro>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="a9b412f3-ae19-4da7-bef5-8af690e386ee"><ac:plain-text-body><![CDATA[={N}]

SubnetId=None #X-IB-EA-EQ-Build- ing=Bldg-A [&SecondaryPrivateI- pAddressCount=3]

Searches Network using EAs provided in request, Obtains IP address(es) from Network. Creates FIXEDADDRESS with IP ad-
]]></ac:plain-text-body></ac:structured-macro>
dress(es) for the interface.



SubnetId={id} &PrivateIpAddress=
{ip} #X-IB-Host-Record={FQDN}

SubnetId=subnet-1a2b3c4d &Pri- vateIpAddress=172.16.42.42
#X-IB-Host-Record=mail.infoblox
.com OR SubnetId=sub-
net-1a2b3c4d &PrivateIpAd- dress=172.16.42.42
#X-IB-Host-Record=mail.infoblox
.com #X-IB-CNAME=webmail.infob- lox
.com OR SubnetId=sub-
net-1a2b3c4d &PrivateIpAd- dress=172.16.42.42
#X-IB-Host-Record=mail.infoblox
.com #X-IB-DNS-View=Internal

Creates Host Record (and/or other various DNS records) using the FQDN supplied in request. Cre- ates a FIXEDADDRESS re- cord with IP address(es) for the interface.



SubnetId=None
#X-IB-EA-EQ-{name}={value}
#X-IB-Host-Recodr={FQDN}

SubnetId=None
#X-IB-EA-EQ-Site=London
#X-IB-EA-EQ-AvailabilityZone= us-east-1b #X-IB-Host-Re-
cord=mail.infoblox.com OR Subnet- Id=None #X-IB-EA-EQ-Site=London
#X-IB-EA-EQ-AvailabilityZone= us-east-1b #X-IB-Host-Re- cord=mail.infoblox
.com #X-IB-DNS-View=Internal

Allocates next available IP address from the network with provided EAs. Creates Host Record using the FQDN supplied by client. Creates a FIXEDADDRESS record with IP address(es) for the interface.

CreateTags

ResourceId.{N}={resource_id}
&Tag.{N}...

ResourceId.1=vpc-11223344
&Tag.1.Key=Name &Tag.1.Val- ue=TestLab OR ResourceId.1=sub- net-11223344 &Tag.1.Key=Site
&Tag.1.Value=Chicago OR Re- sourceId.1=i-11223344
&Tag.1.Key=Name &Tag.1.Val- ue=MyVM1

If name of the 'Key' match- es with any defined EA in NIOS, update/create EA of the corresponding re- source (Network Container, Network or FIXEDADDRSS record) in NIOS

DeleteNetworkInterface

NetworkInterfaceId={id}

NetworkInterfaceId=eni-11223344

Deletes the Host records and frees addresses asso- ciated with the interface

DeleteSubnet

SubnetId={id}

SubnetId=subnet-600D600D

Deletes Network

DeleteTags

ResourceId.{N}={resource_id}
&Tag.{N}...

ResourceId.1=vpc-11223344
&Tag.1.Key=Name

Reset EA value of Network Container or Network or FIXEDADDRESS record if tag Name is a defined EA in NIOS

DeleteVpc

VpcId={id}

VpcId=vpc-11223344

Deletes Network Container

DetachNetworkInterface

AttachmentId={id}

AttachmentId=eni-at- tach-d94b09b0

Updates Host Records with instance specific informa- tion

DisassociateAddress

AssociationId={id}

AssociationId=eipassoc-aa7486c3

Update Host Record of EIP and remove association EAs



PublicIp

PublicIp=54.43.32.21

Passthru - EC2 classic not supported

ReleaseAddress

AllocationId={id}

AllocationId=eipalloc-5723d13e

Deletes Host Record corre- sponding to the Elastic IP

StartInstances

N/A

N/A

Triggers vDiscovery to see status of public and private IP associations with the in- stance

StopInstances

N/A

N/A

Triggers vDiscovery to see status of public and private IP associations with the in- stance

TerminateInstance

InstanceId.{N}={id}

InstanceId.1=i-11223344

Deletes Host Records for all IPs owned by this instance.

UnassignPrivateIpAd- dresses

NetworkInterfaceId={id} &PrivateIpAd- dress.{N}={ip}

NetworkInterfaceId=eni-11223344
&PrivateIpAddress.1=10.0.0.6

Delete FIXEDADDRESS and DNS records for given IP addresses

CreateVpc

CidrBlock={network-ip}/{subnet}

CidrBlock=10.1.1.0/24

Creates a Network Contain- er in the default Network View with Tenant ID sug- gested by Amazon user ac- count ID.



CidrBlock={network-ip}/{subnet}
#X-IB-Network-View={view-name}

CidrBlock=10.1.1.0/24 #X-IB-Net- work-View=Engineering OR CidrBlock=10.1.1.0/24 #X-IB-Net- work-View=Engineering
#X-IB-Tenant-ID=42

Creates a Network Contain- er in the Network View name provided in request ID.



CidrBlock=next-available-network/
{subnet} #X-IB-EA-EQ-{name}={value}

CidrBlock=next-available- network/26 #X-IB-EA-EQ-Site= Bombay #X-IB-EA-GE-netsize=26

Creates a Network Contain- er with next available network with provided subnet and set of EAs in re- quest. If the Network View is provided, then create Network Container in the given View. The specified Network Container must exist in NIOS. If container not found, returns error to client.

CreateSubnet

VpcId={vpc-id} &CidrBlock={net- work-ip}/{subnet}

VpcId=vpc-6a7b8c9d
&CidrBlock=10.1.1.0/26

Create Network with pro- vided subnet within a Net- work Container identified by VPC ID EA.



VpcId={vpc-id} &CidrBlock=next-avail- able-network/{subnet}

VpcId=vpc-6a7b8c9d &Ci- drBlock=next-available-net- work/26

Creates Network in the Network Container speci- fied by VPC ID EA using get-next-network with provided subnet.



VpcId=None &CidrBlock=next-avail- able-network/{subnet}
#X-IB-EA-EQ-{name}={value}

VpcId=None &Ci- drBlock=next-available-net-
work/16 #X-IB-EA-EQ-Site=Bombay
#X-IB-EA-EQ-Department=finance

Creates Network with provided subnet mask in a Network Container that matches given set of EAs.

Â