update_configuration_policy
async
¶
update_configuration_policy(
identifier: NonEmptyString,
*,
config_overrides: Optional[AsyncSecurityHubClientConfig] = 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.
>>> await 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/async_security_hub.py
8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 | |