ipam_resource_discoveries
Creates, updates, deletes or gets an ipam_resource_discovery
resource or lists ipam_resource_discoveries
in a region
Overview
Name | ipam_resource_discoveries |
Type | Resource |
Description | Resource Schema of AWS::EC2::IPAMResourceDiscovery Type |
Id | aws.ec2.ipam_resource_discoveries |
Fields
Name | Datatype | Description |
---|---|---|
ipam_resource_discovery_id | string | Id of the IPAM Pool. |
owner_id | string | Owner Account ID of the Resource Discovery |
operating_regions | array | The regions Resource Discovery is enabled for. Allows resource discoveries to be created in these regions, as well as enabling monitoring |
ipam_resource_discovery_region | string | The region the resource discovery is setup in. |
description | string | |
is_default | boolean | Determines whether or not address space from this pool is publicly advertised. Must be set if and only if the pool is IPv6. |
ipam_resource_discovery_arn | string | Amazon Resource Name (Arn) for the Resource Discovery. |
state | string | The state of this Resource Discovery. |
tags | array | An array of key-value pairs to apply to this resource. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | , region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all ipam_resource_discoveries
in a region.
SELECT
region,
ipam_resource_discovery_id,
owner_id,
operating_regions,
ipam_resource_discovery_region,
description,
is_default,
ipam_resource_discovery_arn,
state,
tags
FROM aws.ec2.ipam_resource_discoveries
WHERE region = 'us-east-1';
Gets all properties from an individual ipam_resource_discovery
.
SELECT
region,
ipam_resource_discovery_id,
owner_id,
operating_regions,
ipam_resource_discovery_region,
description,
is_default,
ipam_resource_discovery_arn,
state,
tags
FROM aws.ec2.ipam_resource_discoveries
WHERE region = 'us-east-1' AND data__Identifier = '<IpamResourceDiscoveryId>';
INSERT
example
Use the following StackQL query and manifest file to create a new ipam_resource_discovery
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.ec2.ipam_resource_discoveries (
,
region
)
SELECT
'{{ }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.ec2.ipam_resource_discoveries (
OperatingRegions,
Description,
Tags,
region
)
SELECT
'{{ OperatingRegions }}',
'{{ Description }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: ipam_resource_discovery
props:
- name: OperatingRegions
value:
- RegionName: '{{ RegionName }}'
- name: Description
value: '{{ Description }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.ec2.ipam_resource_discoveries
WHERE data__Identifier = '<IpamResourceDiscoveryId>'
AND region = 'us-east-1';
Permissions
To operate on the ipam_resource_discoveries
resource, the following permissions are required:
Create
ec2:CreateIpamResourceDiscovery,
ec2:DescribeIpamResourceDiscoveries,
ec2:CreateTags
Read
ec2:DescribeIpamResourceDiscoveries
Update
ec2:ModifyIpamResourceDiscovery,
ec2:DescribeIpamResourceDiscoveries,
ec2:CreateTags,
ec2:DeleteTags
Delete
ec2:DeleteIpamResourceDiscovery,
ec2:DescribeIpamResourceDiscoveries,
ec2:DeleteTags
List
ec2:DescribeIpamResourceDiscoveries