resource_sets
Creates, updates, deletes or gets a resource_set
resource or lists resource_sets
in a region
Overview
Name | resource_sets |
Type | Resource |
Description | Creates an AWS Firewall Manager resource set. |
Id | aws.fms.resource_sets |
Fields
Name | Datatype | Description |
---|---|---|
id | string | A Base62 ID |
name | string | |
description | string | |
resource_type_list | array | |
resources | array | |
tags | array | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, ResourceTypeList, 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 resource_sets
in a region.
SELECT
region,
id,
name,
description,
resource_type_list,
resources,
tags
FROM aws.fms.resource_sets
WHERE region = 'us-east-1';
Gets all properties from an individual resource_set
.
SELECT
region,
id,
name,
description,
resource_type_list,
resources,
tags
FROM aws.fms.resource_sets
WHERE region = 'us-east-1' AND data__Identifier = '<Id>';
INSERT
example
Use the following StackQL query and manifest file to create a new resource_set
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.fms.resource_sets (
Name,
ResourceTypeList,
region
)
SELECT
'{{ Name }}',
'{{ ResourceTypeList }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.fms.resource_sets (
Name,
Description,
ResourceTypeList,
Resources,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ ResourceTypeList }}',
'{{ Resources }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: resource_set
props:
- name: Name
value: '{{ Name }}'
- name: Description
value: '{{ Description }}'
- name: ResourceTypeList
value:
- '{{ ResourceTypeList[0] }}'
- name: Resources
value:
- '{{ Resources[0] }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.fms.resource_sets
WHERE data__Identifier = '<Id>'
AND region = 'us-east-1';
Permissions
To operate on the resource_sets
resource, the following permissions are required:
Create
fms:PutResourceSet,
fms:BatchAssociateResource,
fms:ListResourceSetResources,
fms:TagResource
Update
fms:PutResourceSet,
fms:BatchAssociateResource,
fms:BatchDisassociateResource,
fms:GetResourceSet,
fms:ListResourceSetResources,
fms:TagResource,
fms:UntagResource,
fms:ListTagsForResource
Read
fms:GetResourceSet,
fms:ListResourceSetResources,
fms:ListTagsForResource
Delete
fms:DeleteResourceSet
List
fms:ListResourceSets