Skip to main content

product_subscriptions

Creates, updates, deletes or gets a product_subscription resource or lists product_subscriptions in a region

Overview

Nameproduct_subscriptions
TypeResource
DescriptionThe 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.
Idawscc.securityhub.product_subscriptions

Fields

NameDatatypeDescription
product_arnstringThe generic ARN of the product being subscribed to
product_subscription_arnstringThe ARN of the product subscription for the account
regionstringAWS region.

For more information, see AWS::SecurityHub::ProductSubscription.

Methods

NameResourceAccessible byRequired Params
create_resourceproduct_subscriptionsINSERTProductArn, region
delete_resourceproduct_subscriptionsDELETEIdentifier, region
list_resourcesproduct_subscriptions_list_onlySELECTregion
get_resourceproduct_subscriptionsSELECTIdentifier, region

SELECT examples

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 }}';

INSERT example

Use the following StackQL query and manifest file to create a new product_subscription resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.securityhub.product_subscriptions (
ProductArn,
region
)
SELECT
'{{ product_arn }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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:

ParameterDescription
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:

securityhub:EnableImportFindingsForProduct