dhcp_option_association#

hub.exec.boto3.client.ec2.associate_dhcp_options

async idem_aws.states.aws.ec2.dhcp_option_association.present(hub, ctx, *, name: str, vpc_id: str, dhcp_id: str, resource_id: str = None) Dict[str, Any][source]#

Associates a set of DHCP options (that you’ve previously created) with the specified VPC, or associates no DHCP options with the VPC.

After you associate the options with the VPC, any existing instances and all new instances that you launch in that VPC use the options. You don’t need to restart or relaunch the instances. They automatically pick up the changes within a few hours, depending on how frequently the instance renews its DHCP lease. You can explicitly renew the lease using the operating system on the instance.

Parameters:
  • name (str) – An Idem name to identify the dhcp option resource.

  • vpc_id (str) – The list of AWS VPC ID that needs to be associated with dhcp options set.

  • dhcp_id (str) – AWS DHCP Option Set ID.

  • resource_id (str, Optional) – Vpc ID and DHCP Options ID with a separator ‘-’. Format: [dhcp_id]-[vpc_id]

Request Syntax:
[dhcp_option-name]:
  aws.ec2.dhcp_option_association.present:
    - resource_id: 'string'
    - vpc_id: 'string'
    - dhcp_id: 'string'
    - name: 'string'
Returns:

Dict[str, Any]

Examples

my-dhcp-option:
  aws.ec2.dhcp_option_association.present:
    - resource_id: dhcp-8dh27j-vpc-76db75b8
    - vpc_id: vpc-76db75b8
    - dhcp_id: dhcp-8dh27j
    - name: my-dhcp-option
async idem_aws.states.aws.ec2.dhcp_option_association.absent(hub, ctx, *, name: str, vpc_id: str = None, dhcp_id: str = None, resource_id: str = None) Dict[str, Any][source]#

Deletes/disassociates association of DHCP options with VPC.

Parameters:
  • name (str) – An Idem name to identify the dhcp option resource.

  • vpc_id (str, Optional) – AWS VPC ID that needs to be associated with dhcp options set.

  • dhcp_id (str, Optional) – AWS DHCP Option Set ID.

  • resource_id (str, Optional) – Vpc ID and DHCP Options ID with a separator ‘-’. Format: [dhcp_id]-[vpc_id]

Request Syntax:
[dhcp_option-name]:
  aws.ec2.dhcp_option_association.absent:
    - resource_id: 'string'
    - vpc_id: 'string'
    - dhcp_id: 'string'
    - name: 'string'
Returns:

Dict[str, Any]

Examples

my-dhcp-option:
  aws.ec2.dhcp_option_association.absent:
    - resource_id: dhcp-8dh27j-vpc-76db75b8
    - vpc_id: vpc-76db75b8
    - dhcp_id: dhcp-8dh27j
    - name: my-dhcp-option
async idem_aws.states.aws.ec2.dhcp_option_association.describe(hub, ctx) Dict[str, Dict[str, Any]][source]#

Lists out all DHCP Options to VPC associations.

Returns:

Dict[str, Any]

Examples

$ idem describe aws.ec2.dhcp_option_association