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
8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 | |