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.
| Source | |
|---|---|
| Type last changed |
Example
// 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'],
}],
},
};
# 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"]
)]
)
)
// 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();
// 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" }
} }
}
};
// 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 #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 #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 #Valid compliance severity levels include the following: UNSPECIFIED , CRITICAL , HIGH , MEDIUM , LOW , and INFORMATIONAL .
enableNonSecurityoptionalboolean | IResolvableenable_non_securityoptionaltyping.Union[bool, IResolvable]enableNonSecurityoptionalBooleanEnableNonSecurityoptionalboolEnableNonSecurityoptionalinterface{} = false #The default value is false . Applies to Linux managed nodes only.
patchFilterGroupoptionalIResolvable | CfnPatchBaseline.patch_filter_groupoptionaltyping.Union[IResolvable, PatchFilterGroupProperty]patchFilterGroupoptionalIResolvablePatchFilterGroupoptionalIResolvablePatchFilterGroupoptionalinterface{} #