// Code generated by smithy-go-codegen DO NOT EDIT. package securityhub import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/securityhub/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates configuration options for Security Hub. func (c *Client) UpdateSecurityHubConfiguration(ctx context.Context, params *UpdateSecurityHubConfigurationInput, optFns ...func(*Options)) (*UpdateSecurityHubConfigurationOutput, error) { if params == nil { params = &UpdateSecurityHubConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateSecurityHubConfiguration", params, optFns, c.addOperationUpdateSecurityHubConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*UpdateSecurityHubConfigurationOutput) out.ResultMetadata = metadata return out, nil } type UpdateSecurityHubConfigurationInput struct { // Whether to automatically enable new controls when they are added to standards // that are enabled. By default, this is set to true , and new controls are enabled // automatically. To not automatically enable new controls, set this to false . AutoEnableControls bool // Updates whether the calling account has consolidated control findings turned // on. If the value for this field is set to SECURITY_CONTROL , Security Hub // generates a single finding for a control check even when the check applies to // multiple enabled standards. If the value for this field is set to // STANDARD_CONTROL , Security Hub generates separate findings for a control check // when the check applies to multiple enabled standards. For accounts that are part // of an organization, this value can only be updated in the administrator account. ControlFindingGenerator types.ControlFindingGenerator noSmithyDocumentSerde } type UpdateSecurityHubConfigurationOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateSecurityHubConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateSecurityHubConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateSecurityHubConfiguration{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack, options); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSecurityHubConfiguration(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateSecurityHubConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "securityhub", OperationName: "UpdateSecurityHubConfiguration", } }