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 | awscc.ec2.ipam_resource_discoveries |
Fields
- get (all properties)
- list (identifiers only)
| 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 | |
organizational_unit_exclusions | array | A set of organizational unit (OU) exclusions for this resource. |
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. |
| Name | Datatype | Description |
|---|---|---|
ipam_resource_discovery_id | string | Id of the IPAM Pool. |
region | string | AWS region. |
For more information, see AWS::EC2::IPAMResourceDiscovery.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | ipam_resource_discoveries | INSERT | , region |
delete_resource | ipam_resource_discoveries | DELETE | Identifier, region |
update_resource | ipam_resource_discoveries | UPDATE | Identifier, PatchDocument, region |
list_resources | ipam_resource_discoveries_list_only | SELECT | region |
get_resource | ipam_resource_discoveries | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual ipam_resource_discovery.
SELECT
region,
ipam_resource_discovery_id,
owner_id,
operating_regions,
ipam_resource_discovery_region,
description,
organizational_unit_exclusions,
is_default,
ipam_resource_discovery_arn,
state,
tags
FROM awscc.ec2.ipam_resource_discoveries
WHERE
region = '{{ region }}' AND
Identifier = '{{ ipam_resource_discovery_id }}';
Lists all ipam_resource_discoveries in a region.
SELECT
region,
ipam_resource_discovery_id
FROM awscc.ec2.ipam_resource_discoveries_list_only
WHERE
region = '{{ region }}';
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 awscc.ec2.ipam_resource_discoveries (
,
region
)
SELECT
'{{ }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.ec2.ipam_resource_discoveries (
OperatingRegions,
Description,
OrganizationalUnitExclusions,
Tags,
region
)
SELECT
'{{ operating_regions }}',
'{{ description }}',
'{{ organizational_unit_exclusions }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: ipam_resource_discovery
props:
- name: operating_regions
value:
- region_name: '{{ region_name }}'
- name: description
value: '{{ description }}'
- name: organizational_unit_exclusions
value:
- organizations_entity_path: '{{ organizations_entity_path }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a ipam_resource_discovery resource, using stack-deploy.
/*+ update */
UPDATE awscc.ec2.ipam_resource_discoveries
SET PatchDocument = string('{{ {
"OperatingRegions": operating_regions,
"Description": description,
"OrganizationalUnitExclusions": organizational_unit_exclusions,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ ipam_resource_discovery_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.ec2.ipam_resource_discoveries
WHERE
Identifier = '{{ ipam_resource_discovery_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the ipam_resource_discoveries resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
ec2:CreateIpamResourceDiscovery,
ec2:DescribeIpamResourceDiscoveries,
ec2:ModifyIpamResourceDiscovery,
ec2:CreateTags,
iam:CreateServiceLinkedRole
ec2:DescribeIpamResourceDiscoveries
ec2:ModifyIpamResourceDiscovery,
ec2:DescribeIpamResourceDiscoveries,
ec2:CreateTags,
ec2:DeleteTags
ec2:DeleteIpamResourceDiscovery,
ec2:DescribeIpamResourceDiscoveries,
ec2:DeleteTags
ec2:DescribeIpamResourceDiscoveries