update_configuration_policy
¶
update_configuration_policy(
identifier: NonEmptyString,
*,
config_overrides: Optional[SecurityHubClientConfig] = None,
name: Optional[NonEmptyString] = None,
description: Optional[NonEmptyString] = None,
updated_reason: Optional[NonEmptyString] = None,
configuration_policy: Optional[Policy] = None,
) -> UpdateConfigurationPolicyResponse
Updates a configuration policy. Only the Security Hub CSPM delegated administrator can invoke this operation from the home Region.
Parameters:
-
identifier(NonEmptyString) –The Amazon Resource Name (ARN) or universally unique identifier (UUID) of the configuration policy.
-
name(Optional[NonEmptyString], default:None) –The name of the configuration policy. Alphanumeric characters and the following ASCII characters are permitted:
-, ., !, *, /. -
description(Optional[NonEmptyString], default:None) –The description of the configuration policy.
-
updated_reason(Optional[NonEmptyString], default:None) –The reason for updating the configuration policy.
-
configuration_policy(Optional[Policy], default:None) –An object that defines how Security Hub CSPM is configured. It includes whether Security Hub CSPM is enabled or disabled, a list of enabled security standards, a list of enabled or disabled security controls, and a list of custom parameter values for specified controls. If you provide a list of security controls that are enabled in the configuration policy, Security Hub CSPM disables all other controls (including newly released controls). If you provide a list of security controls that are disabled in the configuration policy, Security Hub CSPM enables all other controls (including newly released controls).
When updating a configuration policy, provide a complete list of standards that you want to enable and a complete list of controls that you want to enable or disable. The updated configuration replaces the current configuration.
Raises:
-
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.
-
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.
-
ResourceConflictException–The resource specified in the request conflicts with an existing resource.
-
ResourceNotFoundException–The request was rejected because we can't find the specified resource.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To update a configuration policy This operation updates the specified configuration policy.
>>> client.update_configuration_policy(identifier='arn:aws:securityhub:us-east-1:123456789012:configuration-policy/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111', name='TestConfigurationPolicy', description='Updated configuration policy for testing FSBP and CIS', updated_reason='Enabling ACM.2', configuration_policy={'SecurityHub': {'ServiceEnabled': True, 'EnabledStandardIdentifiers': ['arn:aws:securityhub:us-east-1::standards/aws-foundational-security-best-practices/v/1.0.0', 'arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0'], 'SecurityControlsConfiguration': {'DisabledSecurityControlIdentifiers': ['CloudWatch.1', 'CloudWatch.2'], 'SecurityControlCustomParameters': [{'SecurityControlId': 'ACM.1', 'Parameters': {'daysToExpiration': {'ValueType': 'CUSTOM', 'Value': {'Integer': 21}}}}]}}})
Source code in docs_src/capo_securityhub/_services/security_hub.py
8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 | |