Skip to main content

standards

Creates, updates, deletes or gets a standard resource or lists standards in a region

Overview

Namestandards
TypeResource
Description
The AWS::SecurityHub::Standard resource specifies the enablement of a security standard. The standard is identified by the StandardsArn property. To view a list of ASH standards and their Amazon Resource Names (ARNs), use the DescribeStandards API operation.You must create a separate AWS::SecurityHub::Standard resource for each standard that you want to enable.
For more information about ASH standards, see standards reference in the User Guide.
Idawscc.securityhub.standards

Fields

NameDatatypeDescription
standards_subscription_arnstring
standards_arnstringThe ARN of the standard that you want to enable. To view a list of available ASH standards and their ARNs, use the DescribeStandards API operation.
disabled_standards_controlsarray
Specifies which controls are to be disabled in a standard.Maximum: 100
regionstringAWS region.

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

Methods

NameResourceAccessible byRequired Params
create_resourcestandardsINSERTStandardsArn, region
delete_resourcestandardsDELETEIdentifier, region
update_resourcestandardsUPDATEIdentifier, PatchDocument, region
list_resourcesstandards_list_onlySELECTregion
get_resourcestandardsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual standard.

SELECT
region,
standards_subscription_arn,
standards_arn,
disabled_standards_controls
FROM awscc.securityhub.standards
WHERE
region = '{{ region }}' AND
Identifier = '{{ standards_subscription_arn }}';

INSERT example

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

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

UPDATE example

Use the following StackQL query and manifest file to update a standard resource, using stack-deploy.

/*+ update */
UPDATE awscc.securityhub.standards
SET PatchDocument = string('{{ {
"DisabledStandardsControls": disabled_standards_controls
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ standards_subscription_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.securityhub.standards
WHERE
Identifier = '{{ standards_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 standards resource, the following permissions are required:

securityhub:GetEnabledStandards,
securityhub:BatchEnableStandards,
securityhub:UpdateStandardsControl