standards
Creates, updates, deletes, gets or lists a standards resource.
Overview
| Name | standards |
| Type | Resource |
| Id | aws.securityhub.standards |
Fields
The following fields are returned by SELECT queries:
- describe_standards
| Name | Datatype | Description |
|---|---|---|
description | string | A description of the standard. (pattern: <code>.\S.</code>) |
enabled_by_default | boolean | Whether the standard is enabled by default. When Security Hub CSPM is enabled from the console, if a standard is enabled by default, the check box for that standard is selected by default. When Security Hub CSPM is enabled using the EnableSecurityHub API operation, the standard is enabled by default unless EnableDefaultStandards is set to false. |
name | string | The name of the standard. (pattern: <code>.\S.</code>) |
provider | string | The cloud provider whose resources the standard evaluates. For example, AWS or Azure. (AWS, Azure) |
standards_arn | string | The ARN of the standard. (pattern: <code>.\S.</code>) |
standards_managed_by | object | Provides details about the management of a standard. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_standards | select | region | NextToken, MaxResults, Providers | Returns a list of the available standards in Security Hub CSPM. For each standard, the results include the standard ARN, the name, and a description. |
batch_disable_standards | exec | region, StandardsSubscriptionArns | Disables the standards specified by the provided StandardsSubscriptionArns. For more information, see Security Standards section of the Security Hub CSPM User Guide. | |
batch_enable_standards | exec | region, StandardsSubscriptionRequests | Enables the standards specified by the provided StandardsArn. To obtain the ARN for a standard, use the DescribeStandards operation. For more information, see the Security Standards section of the Security Hub CSPM User Guide. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
MaxResults | integer | The maximum number of standards to return. |
NextToken | string | The token that is required for pagination. On your first call to the DescribeStandards operation, set the value of this parameter to NULL. For subsequent calls to the operation, to continue listing data, set the value of this parameter to the value returned from the previous response. |
Providers | array | A list of cloud providers to filter the standards by. For example, specify Azure to return only standards that evaluate Azure resources. |
SELECT examples
- describe_standards
Returns a list of the available standards in Security Hub CSPM. For each standard, the results include the standard ARN, the name, and a description.
SELECT
description,
enabled_by_default,
name,
provider,
standards_arn,
standards_managed_by
FROM aws.securityhub.standards
WHERE region = '{{ region }}' -- required
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
AND Providers = '{{ Providers }}'
;
Lifecycle Methods
- batch_disable_standards
- batch_enable_standards
Disables the standards specified by the provided StandardsSubscriptionArns. For more information, see Security Standards section of the Security Hub CSPM User Guide.
EXEC aws.securityhub.standards.batch_disable_standards
@region='{{ region }}' --required
@@json=
'{
"StandardsSubscriptionArns": "{{ StandardsSubscriptionArns }}"
}'
;
Enables the standards specified by the provided StandardsArn. To obtain the ARN for a standard, use the DescribeStandards operation. For more information, see the Security Standards section of the Security Hub CSPM User Guide.
EXEC aws.securityhub.standards.batch_enable_standards
@region='{{ region }}' --required
@@json=
'{
"StandardsSubscriptionRequests": "{{ StandardsSubscriptionRequests }}"
}'
;