Skip to content

delete_remediation_configuration

delete_remediation_configuration(
    config_rule_name: ConfigRuleName,
    *,
    config_overrides: Optional[ConfigServiceClientConfig] = None,
    resource_type: Optional[String] = None,
) -> DeleteRemediationConfigurationResponse

Deletes the remediation configuration.

Parameters:

  • config_rule_name (ConfigRuleName) –

    The name of the Config rule for which you want to delete remediation configuration.

  • resource_type (Optional[String], default: None ) –

    The type of a resource.

Raises:

  • InsufficientPermissionsException –

    Indicates one of the following errors:

    • For PutConfigRule, the rule cannot be created because the IAM role assigned to Config lacks permissions to perform the config:Put* action.

    • For PutConfigRule, the Lambda function cannot be invoked. Check the function ARN, and check the function's permissions.

    • For PutOrganizationConfigRule, organization Config rule cannot be created because you do not have permissions to call IAM GetRole action or create a service-linked role.

    • For PutConformancePack and PutOrganizationConformancePack, a conformance pack cannot be created because you do not have the following permissions:

      • You do not have permission to call IAM GetRole action or create a service-linked role.

      • You do not have permission to read Amazon S3 bucket or call SSM:GetDocument.

    • For PutServiceLinkedConfigurationRecorder, a service-linked configuration recorder cannot be created because you do not have the following permissions: IAM CreateServiceLinkedRole.

    • For PutConnector, a connector cannot be created because you do not have the following permissions: IAM CreateServiceLinkedRole.

  • InvalidParameterValueException –

    One or more of the specified parameters are not valid. Verify that your parameters are valid and try again.

  • NoSuchRemediationConfigurationException –

    You specified an Config rule without a remediation configuration.

  • RemediationInProgressException –

    Remediation action is in progress. You can either cancel execution in Amazon Web Services Systems Manager or wait and try again later.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_config_service/_services/config_service.py
def delete_remediation_configuration(
    self,
    config_rule_name: "capo_config_service.types.config_rule_name.ConfigRuleName",
    *,
    config_overrides: Optional[ConfigServiceClientConfig] = None,
    resource_type: Optional["capo_config_service.types.string.String"] = None,
) -> "capo_config_service.types.delete_remediation_configuration_response.DeleteRemediationConfigurationResponse":
    """<p>Deletes the remediation configuration.</p>

    Args:
        config_rule_name: <p>The name of the Config rule for which you want to delete remediation configuration.</p>
        resource_type: <p>The type of a resource.</p>

    Raises:
        capo_config_service.errors.insufficient_permissions_exception.InsufficientPermissionsException: <p>Indicates one of the following errors:</p> <ul> <li> <p>For <a href="https://docs.aws.amazon.com/config/latest/APIReference/API_PutConfigRule.html">PutConfigRule</a>, the rule cannot be created because the IAM role assigned to Config lacks permissions to perform the config:Put* action.</p> </li> <li> <p>For <a href="https://docs.aws.amazon.com/config/latest/APIReference/API_PutConfigRule.html">PutConfigRule</a>, the Lambda function cannot be invoked. Check the function ARN, and check the function's permissions.</p> </li> <li> <p>For <a href="https://docs.aws.amazon.com/config/latest/APIReference/API_PutOrganizationConfigRule.html">PutOrganizationConfigRule</a>, organization Config rule cannot be created because you do not have permissions to call IAM <code>GetRole</code> action or create a service-linked role.</p> </li> <li> <p>For <a href="https://docs.aws.amazon.com/config/latest/APIReference/API_PutConformancePack.html">PutConformancePack</a> and <a href="https://docs.aws.amazon.com/config/latest/APIReference/API_PutOrganizationConformancePack.html">PutOrganizationConformancePack</a>, a conformance pack cannot be created because you do not have the following permissions: </p> <ul> <li> <p>You do not have permission to call IAM <code>GetRole</code> action or create a service-linked role.</p> </li> <li> <p>You do not have permission to read Amazon S3 bucket or call SSM:GetDocument.</p> </li> </ul> </li> <li> <p>For <a href="https://docs.aws.amazon.com/config/latest/APIReference/API_PutServiceLinkedConfigurationRecorder.html">PutServiceLinkedConfigurationRecorder</a>, a service-linked configuration recorder cannot be created because you do not have the following permissions: IAM <code>CreateServiceLinkedRole</code>.</p> </li> <li> <p>For <a href="https://docs.aws.amazon.com/config/latest/APIReference/API_PutConnector.html">PutConnector</a>, a connector cannot be created because you do not have the following permissions: IAM <code>CreateServiceLinkedRole</code>.</p> </li> </ul>
        capo_config_service.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One or more of the specified parameters are not valid. Verify that your parameters are valid and try again.</p>
        capo_config_service.errors.no_such_remediation_configuration_exception.NoSuchRemediationConfigurationException: <p>You specified an Config rule without a remediation configuration.</p>
        capo_config_service.errors.remediation_in_progress_exception.RemediationInProgressException: <p>Remediation action is in progress. You can either cancel execution in Amazon Web Services Systems Manager or wait and try again later. </p>
        capo_config_service.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_config_service.types.delete_remediation_configuration_request.DeleteRemediationConfigurationRequest]",
    ) -> OperationResponse[
        "capo_config_service.types.delete_remediation_configuration_response.DeleteRemediationConfigurationResponse"
    ]:
        import capo_config_service._operations.starling_dove_service.delete_remediation_configuration

        output, http_response = (
            capo_config_service._operations.starling_dove_service.delete_remediation_configuration.delete_remediation_configuration(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteRemediationConfiguration")
    )
    input_: capo_config_service.types.delete_remediation_configuration_request.DeleteRemediationConfigurationRequest = {
        "config_rule_name": config_rule_name
    }
    if resource_type is not None:
        input_["resource_type"] = resource_type

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output