Skip to content
v2.278.0

RuleProperty Struct ​

The Rule property type specifies an approval rule for a Systems Manager patch baseline.

The PatchRules property of the RuleGroup property type contains a list of Rule property types.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ssm as ssm } from 'aws-cdk-lib';
const ruleProperty: ssm.CfnPatchBaseline.RuleProperty = {
  approveAfterDays: 123,
  approveUntilDate: 'approveUntilDate',
  complianceLevel: 'complianceLevel',
  enableNonSecurity: false,
  patchFilterGroup: {
    patchFilters: [{
      key: 'key',
      values: ['values'],
    }],
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ssm as ssm

rule_property = ssm.CfnPatchBaseline.RuleProperty(
    approve_after_days=123,
    approve_until_date="approveUntilDate",
    compliance_level="complianceLevel",
    enable_non_security=False,
    patch_filter_group=ssm.CfnPatchBaseline.PatchFilterGroupProperty(
        patch_filters=[ssm.CfnPatchBaseline.PatchFilterProperty(
            key="key",
            values=["values"]
        )]
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ssm.*;

RuleProperty ruleProperty = RuleProperty.builder()
        .approveAfterDays(123)
        .approveUntilDate("approveUntilDate")
        .complianceLevel("complianceLevel")
        .enableNonSecurity(false)
        .patchFilterGroup(PatchFilterGroupProperty.builder()
                .patchFilters(List.of(PatchFilterProperty.builder()
                        .key("key")
                        .values(List.of("values"))
                        .build()))
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.SSM;

var ruleProperty = new RuleProperty {
    ApproveAfterDays = 123,
    ApproveUntilDate = "approveUntilDate",
    ComplianceLevel = "complianceLevel",
    EnableNonSecurity = false,
    PatchFilterGroup = new PatchFilterGroupProperty {
        PatchFilters = new [] { new PatchFilterProperty {
            Key = "key",
            Values = new [] { "values" }
        } }
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

ruleProperty := &RuleProperty{
	ApproveAfterDays: jsii.Number(123),
	ApproveUntilDate: jsii.String("approveUntilDate"),
	ComplianceLevel: jsii.String("complianceLevel"),
	EnableNonSecurity: jsii.Boolean(false),
	PatchFilterGroup: &PatchFilterGroupProperty{
		PatchFilters: []interface{}{
			&PatchFilterProperty{
				Key: jsii.String("key"),
				Values: []*string{
					jsii.String("values"),
				},
			},
		},
	},
}

Properties ​

approveAfterDaysoptionalnumberapprove_after_daysoptionalint | floatapproveAfterDaysoptionalNumberApproveAfterDaysoptionaldoubleApproveAfterDaysoptional*float64 #
The number of days after the release date of each patch matched by the rule that the patch is marked as approved in the patch baseline.
notes

For example, a value of 7 means that patches are approved seven days after they are released.

Patch Manager evaluates patch release dates using Coordinated Universal Time (UTC). If the day represented by 7 is 2025-11-16 , patches released between 2025-11-16T00:00:00Z and 2025-11-16T23:59:59Z will be included in the approval.

This parameter is marked as Required: No , but your request must include a value for either ApproveAfterDays or ApproveUntilDate .

Not supported for Debian Server or Ubuntu Server.

Use caution when setting this value for Windows Server patch baselines. Because patch updates that are replaced by later updates are removed, setting too broad a value for this parameter can result in crucial patches not being installed. For more information, see the Windows Server tab in the topic How security patches are selected in the AWS Systems Manager User Guide .

approveUntilDateoptionalstringapprove_until_dateoptionalstrapproveUntilDateoptionalStringApproveUntilDateoptionalstringApproveUntilDateoptional*string #
The cutoff date for auto approval of released patches.
notes

Any patches released on or before this date are installed automatically.

Enter dates in the format YYYY-MM-DD . For example, 2025-11-16 .

Patch Manager evaluates patch release dates using Coordinated Universal Time (UTC). If you enter the date 2025-11-16 , patches released between 2025-11-16T00:00:00Z and 2025-11-16T23:59:59Z will be included in the approval.

This parameter is marked as Required: No , but your request must include a value for either ApproveUntilDate or ApproveAfterDays .

Not supported for Debian Server or Ubuntu Server.

Use caution when setting this value for Windows Server patch baselines. Because patch updates that are replaced by later updates are removed, setting too broad a value for this parameter can result in crucial patches not being installed. For more information, see the Windows Server tab in the topic How security patches are selected in the AWS Systems Manager User Guide .

complianceLeveloptionalstringcompliance_leveloptionalstrcomplianceLeveloptionalStringComplianceLeveloptionalstringComplianceLeveloptional*string #
A compliance severity level for all approved patches in a patch baseline.

Valid compliance severity levels include the following: UNSPECIFIED , CRITICAL , HIGH , MEDIUM , LOW , and INFORMATIONAL .

enableNonSecurityoptionalboolean | IResolvableenable_non_securityoptionaltyping.Union[bool, IResolvable]enableNonSecurityoptionalBooleanEnableNonSecurityoptionalboolEnableNonSecurityoptionalinterface{} = false #
For managed nodes identified by the approval rule filters, enables a patch baseline to apply non-security updates available in the specified repository.

The default value is false . Applies to Linux managed nodes only.

patchFilterGroupoptionalIResolvable | CfnPatchBaseline.PatchFilterGroupPropertypatch_filter_groupoptionaltyping.Union[IResolvable, PatchFilterGroupProperty]patchFilterGroupoptionalIResolvablePatchFilterGroupoptionalIResolvablePatchFilterGroupoptionalinterface{} #
The patch filter group that defines the criteria for the rule.