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 | awscc.securityhub.product_subscriptions |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
| Name | Datatype | Description |
|---|---|---|
product_subscription_arn | string | The ARN of the product subscription for the account |
region | string | AWS region. |
For more information, see AWS::SecurityHub::ProductSubscription.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | product_subscriptions | INSERT | ProductArn, region |
delete_resource | product_subscriptions | DELETE | Identifier, region |
list_resources | product_subscriptions_list_only | SELECT | region |
get_resource | product_subscriptions | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual product_subscription.
SELECT
region,
product_arn,
product_subscription_arn
FROM awscc.securityhub.product_subscriptions
WHERE
region = '{{ region }}' AND
Identifier = '{{ product_subscription_arn }}';
Lists all product_subscriptions in a region.
SELECT
region,
product_subscription_arn
FROM awscc.securityhub.product_subscriptions_list_only
WHERE
region = '{{ region }}';
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 awscc.securityhub.product_subscriptions (
ProductArn,
region
)
SELECT
'{{ product_arn }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.securityhub.product_subscriptions (
ProductArn,
region
)
SELECT
'{{ product_arn }}',
'{{ 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: product_subscription
props:
- name: product_arn
value: '{{ product_arn }}'
DELETE example
/*+ delete */
DELETE FROM awscc.securityhub.product_subscriptions
WHERE
Identifier = '{{ product_subscription_arn }}' 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 product_subscriptions resource, the following permissions are required:
- Create
- Read
- Delete
- List
securityhub:EnableImportFindingsForProduct
securityhub:ListEnabledProductsForImport
securityhub:ListEnabledProductsForImport,
securityhub:DisableImportFindingsForProduct
securityhub:ListEnabledProductsForImport