ipam_resource_discovery_associations
Used to retrieve a list of ipam_resource_discovery_associations
in a region or to create or delete a ipam_resource_discovery_associations
resource, use ipam_resource_discovery_association
to read or update an individual resource.
Overview
Name | ipam_resource_discovery_associations |
Type | Resource |
Description | Resource Schema of AWS::EC2::IPAMResourceDiscoveryAssociation Type |
Id | aws.ec2.ipam_resource_discovery_associations |
Fields
Name | Datatype | Description |
---|---|---|
ipam_resource_discovery_association_id | string | Id of the IPAM Resource Discovery Association. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | IpamId, IpamResourceDiscoveryId, region |
delete_resource | DELETE | data__Identifier, region |
list_resource | SELECT | region |
SELECT
Example
SELECT
region,
ipam_resource_discovery_association_id
FROM aws.ec2.ipam_resource_discovery_associations
WHERE region = 'us-east-1';
INSERT
Example
Use the following StackQL query and manifest file to create a new ipam_resource_discovery_association
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.ec2.ipam_resource_discovery_associations (
IpamResourceDiscoveryId,
IpamId,
region
)
SELECT
'{{ IpamResourceDiscoveryId }}',
'{{ IpamId }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.ec2.ipam_resource_discovery_associations (
IpamResourceDiscoveryId,
IpamId,
Tags,
region
)
SELECT
'{{ IpamResourceDiscoveryId }}',
'{{ IpamId }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: ipam_resource_discovery_association
props:
- name: IpamResourceDiscoveryId
value: '{{ IpamResourceDiscoveryId }}'
- name: IpamId
value: '{{ IpamId }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
Example
/*+ delete */
DELETE FROM aws.ec2.ipam_resource_discovery_associations
WHERE data__Identifier = '<IpamResourceDiscoveryAssociationId>'
AND region = 'us-east-1';
Permissions
To operate on the ipam_resource_discovery_associations
resource, the following permissions are required:
Create
ec2:AssociateIpamResourceDiscovery,
ec2:DescribeIpamResourceDiscoveryAssociations,
ec2:CreateTags
Delete
ec2:DisassociateIpamResourceDiscovery,
ec2:DescribeIpamResourceDiscoveryAssociations,
ec2:DeleteTags
List
ec2:DescribeIpamResourceDiscoveryAssociations