Skip to main content

vpcdhcp_options_associations

Used to retrieve a list of vpcdhcp_options_associations in a region or to create or delete a vpcdhcp_options_associations resource, use vpcdhcp_options_association to read or update an individual resource.

Overview

Namevpcdhcp_options_associations
TypeResource
DescriptionAssociates a set of DHCP options with a VPC, or associates no DHCP options with the VPC.
Idaws.ec2.vpcdhcp_options_associations

Fields

NameDatatypeDescription
dhcp_options_idstringThe ID of the DHCP options set, or default to associate no DHCP options with the VPC.
vpc_idstringThe ID of the VPC.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTVpcId, DhcpOptionsId, region
delete_resourceDELETEdata__Identifier, region
list_resourceSELECTregion

SELECT Example

SELECT
region,
dhcp_options_id,
vpc_id
FROM aws.ec2.vpcdhcp_options_associations
WHERE region = 'us-east-1';

INSERT Example

Use the following StackQL query and manifest file to create a new vpcdhcp_options_association resource, using stack-deploy.

/*+ create */
INSERT INTO aws.ec2.vpcdhcp_options_associations (
DhcpOptionsId,
VpcId,
region
)
SELECT
'{{ DhcpOptionsId }}',
'{{ VpcId }}',
'{{ region }}';

DELETE Example

/*+ delete */
DELETE FROM aws.ec2.vpcdhcp_options_associations
WHERE data__Identifier = '<DhcpOptionsId|VpcId>'
AND region = 'us-east-1';

Permissions

To operate on the vpcdhcp_options_associations resource, the following permissions are required:

Create

ec2:AssociateDhcpOptions

Delete

ec2:AssociateDhcpOptions

List

ec2:DescribeVpcs