product_subscriptions
Creates, updates, deletes or gets a product_subscription
resource or lists product_subscriptions
in a region
Overview
Name | product_subscriptions |
Type | Resource |
Description | The AWS::SecurityHub::ProductSubscription resource represents a subscription to a service that is allowed to generate findings for your Security Hub account. One product subscription resource is created for each product enabled. |
Id | aws.securityhub.product_subscriptions |
Fields
Name | Datatype | Description |
---|---|---|
product_arn | string | The generic ARN of the product being subscribed to |
product_subscription_arn | string | The ARN of the product subscription for the account |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ProductArn, region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all product_subscriptions
in a region.
SELECT
region,
product_arn,
product_subscription_arn
FROM aws.securityhub.product_subscriptions
WHERE region = 'us-east-1';
Gets all properties from an individual product_subscription
.
SELECT
region,
product_arn,
product_subscription_arn
FROM aws.securityhub.product_subscriptions
WHERE region = 'us-east-1' AND data__Identifier = '<ProductSubscriptionArn>';
INSERT
example
Use the following StackQL query and manifest file to create a new product_subscription
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.securityhub.product_subscriptions (
ProductArn,
region
)
SELECT
'{{ ProductArn }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.securityhub.product_subscriptions (
ProductArn,
region
)
SELECT
'{{ ProductArn }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: product_subscription
props:
- name: ProductArn
value: '{{ ProductArn }}'
DELETE
example
/*+ delete */
DELETE FROM aws.securityhub.product_subscriptions
WHERE data__Identifier = '<ProductSubscriptionArn>'
AND region = 'us-east-1';
Permissions
To operate on the product_subscriptions
resource, the following permissions are required:
Create
securityhub:EnableImportFindingsForProduct
Read
securityhub:ListEnabledProductsForImport
Delete
securityhub:ListEnabledProductsForImport,
securityhub:DisableImportFindingsForProduct
List
securityhub:ListEnabledProductsForImport