Disables the standards specified by the provided StandardsSubscriptionArns.
For more information, see Security Standards section of the Security Hub CSPM User Guide.
Parameters:
Raises:
-
AccessDeniedException
–
You don't have permission to perform the action specified in the request.
-
InternalException
–
-
InvalidAccessException
–
The account doesn't have permission to perform this action.
-
InvalidInputException
–
The request was rejected because you supplied an invalid or out-of-range value for an input parameter.
-
LimitExceededException
–
The request was rejected because it attempted to create resources beyond the current Amazon Web Services account or throttling limits. The error code describes the limit exceeded.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
To disable one or more security standards
The following example disables a security standard in Security Hub.
>>> client.batch_disable_standards(standards_subscription_arns=['arn:aws:securityhub:us-west-1:123456789012:subscription/pci-dss/v/3.2.1'])
Source code in docs_src/capo_securityhub/_services/security_hub.py
| def batch_disable_standards(
self,
*,
config_overrides: Optional[SecurityHubClientConfig] = None,
standards_subscription_arns: Optional[
"capo_securityhub.types.standards_subscription_arns.StandardsSubscriptionArns"
] = None,
) -> "capo_securityhub.types.batch_disable_standards_response.BatchDisableStandardsResponse":
"""<p>Disables the standards specified by the provided <code>StandardsSubscriptionArns</code>.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-standards.html">Security Standards</a> section of the <i>Security Hub CSPM User Guide</i>.</p>
Args:
standards_subscription_arns: <p>The ARNs of the standards subscriptions to disable.</p>
Raises:
capo_securityhub.errors.access_denied_exception.AccessDeniedException: <p>You don't have permission to perform the action specified in the request.</p>
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.limit_exceeded_exception.LimitExceededException: <p>The request was rejected because it attempted to create resources beyond the current Amazon Web Services account or throttling limits. The error code describes the limit exceeded.</p>
capo_securityhub.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To disable one or more security standards
The following example disables a security standard in Security Hub.
>>> client.batch_disable_standards(standards_subscription_arns=['arn:aws:securityhub:us-west-1:123456789012:subscription/pci-dss/v/3.2.1'])
"""
def _handler(
req: "OperationRequest[capo_securityhub.types.batch_disable_standards_request.BatchDisableStandardsRequest]",
) -> OperationResponse[
"capo_securityhub.types.batch_disable_standards_response.BatchDisableStandardsResponse"
]:
import capo_securityhub._operations.security_hub_api_service.batch_disable_standards
output, http_response = (
capo_securityhub._operations.security_hub_api_service.batch_disable_standards.batch_disable_standards(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("BatchDisableStandards")
)
input_: capo_securityhub.types.batch_disable_standards_request.BatchDisableStandardsRequest = {}
if standards_subscription_arns is not None:
input_["standards_subscription_arns"] = standards_subscription_arns
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|