standards
Creates, updates, deletes or gets a standard resource or lists standards in a region
Overview
| Name | standards |
| Type | Resource |
| Description | The You must create a separate |
| Id | awscc.securityhub.standards |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
standards_subscription_arn | string | |
standards_arn | string | The 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_controls | array | Specifies which controls are to be disabled in a standard.Maximum:100 |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
standards_subscription_arn | string | |
region | string | AWS region. |
For more information, see AWS::SecurityHub::Standard.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | standards | INSERT | StandardsArn, region |
delete_resource | standards | DELETE | Identifier, region |
update_resource | standards | UPDATE | Identifier, PatchDocument, region |
list_resources | standards_list_only | SELECT | region |
get_resource | standards | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 }}';
Lists all standards in a region.
SELECT
region,
standards_subscription_arn
FROM awscc.securityhub.standards_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new standard resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.securityhub.standards (
StandardsArn,
region
)
SELECT
'{{ standards_arn }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.securityhub.standards (
StandardsArn,
DisabledStandardsControls,
region
)
SELECT
'{{ standards_arn }}',
'{{ disabled_standards_controls }}',
'{{ 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: standard
props:
- name: standards_arn
value: '{{ standards_arn }}'
- name: disabled_standards_controls
value:
- standards_control_arn: '{{ standards_control_arn }}'
reason: '{{ reason }}'
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:
| 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 standards resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
securityhub:GetEnabledStandards,
securityhub:BatchEnableStandards,
securityhub:UpdateStandardsControl
securityhub:GetEnabledStandards,
securityhub:DescribeStandardsControls
securityhub:GetEnabledStandards,
securityhub:UpdateStandardsControl
securityhub:GetEnabledStandards,
securityhub:BatchDisableStandards
securityhub:GetEnabledStandards