Skip to content

describe_standards_controls async

describe_standards_controls(
    standards_subscription_arn: NonEmptyString,
    *,
    config_overrides: Optional[AsyncSecurityHubClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> DescribeStandardsControlsResponse

Returns a list of security standards controls.

For each control, the results include information about whether it is currently enabled, the severity, and a link to remediation information.

This operation returns an empty list for standard subscriptions where StandardsControlsUpdatable has value NOT_READY_FOR_UPDATES.

Parameters:

  • standards_subscription_arn (NonEmptyString) –

    The ARN of a resource that represents your subscription to a supported standard. To get the subscription ARNs of the standards you have enabled, use the GetEnabledStandards operation.

  • next_token (Optional[NextToken], default: None ) –

    The token that is required for pagination. On your first call to the DescribeStandardsControls 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.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of security standard controls to return.

Raises:

Source code in docs_src/capo_securityhub/_services/async_security_hub.py
async def describe_standards_controls(
    self,
    standards_subscription_arn: "capo_securityhub.types.non_empty_string.NonEmptyString",
    *,
    config_overrides: Optional[AsyncSecurityHubClientConfig] = None,
    next_token: Optional["capo_securityhub.types.next_token.NextToken"] = None,
    max_results: Optional["capo_securityhub.types.max_results.MaxResults"] = None,
) -> "capo_securityhub.types.describe_standards_controls_response.DescribeStandardsControlsResponse":
    """<p>Returns a list of security standards controls.</p> <p>For each control, the results include information about whether it is currently enabled, the severity, and a link to remediation information.</p> <p>This operation returns an empty list for standard subscriptions where <code>StandardsControlsUpdatable</code> has value <code>NOT_READY_FOR_UPDATES</code>.</p>

    Args:
        standards_subscription_arn: <p>The ARN of a resource that represents your subscription to a supported standard. To get the subscription ARNs of the standards you have enabled, use the <code>GetEnabledStandards</code> operation.</p>
        next_token: <p>The token that is required for pagination. On your first call to the <code>DescribeStandardsControls</code> operation, set the value of this parameter to <code>NULL</code>.</p> <p>For subsequent calls to the operation, to continue listing data, set the value of this parameter to the value returned from the previous response.</p>
        max_results: <p>The maximum number of security standard controls to return.</p>

    Raises:
        capo_securityhub.errors.internal_exception.InternalException: <p>Internal server error.</p>
        capo_securityhub.errors.invalid_access_exception.InvalidAccessException: <p>The account doesn't have permission to perform this action.</p>
        capo_securityhub.errors.invalid_input_exception.InvalidInputException: <p>The request was rejected because you supplied an invalid or out-of-range value for an input parameter.</p>
        capo_securityhub.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request was rejected because we can't find the specified resource.</p>
        capo_securityhub.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_securityhub.types.describe_standards_controls_request.DescribeStandardsControlsRequest]",
    ) -> AsyncOperationResponse[
        "capo_securityhub.types.describe_standards_controls_response.DescribeStandardsControlsResponse"
    ]:
        import capo_securityhub._operations.security_hub_api_service.describe_standards_controls

        (
            output,
            http_response,
        ) = await capo_securityhub._operations.security_hub_api_service.describe_standards_controls.async_describe_standards_controls(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeStandardsControls")
    )
    input_: capo_securityhub.types.describe_standards_controls_request.DescribeStandardsControlsRequest = {
        "standards_subscription_arn": standards_subscription_arn
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output