AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Disables Security Hub in your account only in the current Amazon Web Services Region. To disable Security Hub in all Regions, you must submit one request per Region where you have enabled Security Hub.

You can't disable Security Hub in an account that is currently the Security Hub administrator.

When you disable Security Hub, your existing findings and insights and any Security Hub configuration settings are deleted after 90 days and cannot be recovered. Any standards that were enabled are disabled, and your administrator and member account associations are removed.

If you want to save your existing findings, you must export them before you disable Security Hub.

Note:

For .NET Core this operation is only available in asynchronous form. Please refer to DisableSecurityHubAsync.

Namespace: Amazon.SecurityHub
Assembly: AWSSDK.SecurityHub.dll
Version: 3.x.y.z

Syntax

C#
public virtual DisableSecurityHubResponse DisableSecurityHub(
         DisableSecurityHubRequest request
)

Parameters

request
Type: Amazon.SecurityHub.Model.DisableSecurityHubRequest

Container for the necessary parameters to execute the DisableSecurityHub service method.

Return Value


The response from the DisableSecurityHub service method, as returned by SecurityHub.

Exceptions

ExceptionCondition
AccessDeniedException You don't have permission to perform the action specified in the request.
InternalException Internal server error.
InvalidAccessException The account doesn't have permission to perform this action.
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.
ResourceNotFoundException The request was rejected because we can't find the specified resource.

Examples

The following example deactivates Security Hub for the current account and Region.

To deactivate Security Hub


var client = new AmazonSecurityHubClient();
var response = client.DisableSecurityHub(new DisableSecurityHubRequest 
{
});


            

Version Information

.NET Framework:
Supported in: 4.5 and newer, 3.5

See Also