CapabilitiesProperty Struct
Automated AWS DevOps Agent capabilities for the repository in this association.
Code change risk analysis analyzes pull requests and merge requests for deployment risk, and automated testing extends that analysis by running tests against the change. Capabilities are supported for GitHub and GitLab associations. When this property is set, it fully defines both capabilities below: a capability omitted here is removed from the association. Removing this property from a template that previously set it disables both capabilities. Capabilities configured outside CloudFormation are left unchanged only while this property has never been set. On rollback, both capabilities are restored to the previous template's values, not to settings made outside CloudFormation. Other capabilities on the association are not affected. Updates read and rewrite the association's full capability set, so a capability change made outside CloudFormation while a stack update is in progress may be overwritten.
| 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_devopsagent as devopsagent } from 'aws-cdk-lib';
const capabilitiesProperty: devopsagent.CfnAssociation.CapabilitiesProperty = {
codeChangeRiskAnalysis: {
enabled: false,
triggerFilterGroups: [{
events: ['events'],
targetBranches: {
patterns: ['patterns'],
},
}],
},
codeChangeRiskAnalysisAutomatedTesting: {
enabled: false,
},
};
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_devopsagent as devopsagent
capabilities_property = devopsagent.CfnAssociation.CapabilitiesProperty(
code_change_risk_analysis=devopsagent.CfnAssociation.CapabilityConfigurationProperty(
enabled=False,
trigger_filter_groups=[devopsagent.CfnAssociation.TriggerFilterGroupProperty(
events=["events"],
target_branches=devopsagent.CfnAssociation.PatternFilterProperty(
patterns=["patterns"]
)
)]
),
code_change_risk_analysis_automated_testing=devopsagent.CfnAssociation.AutomatedTestingCapabilityConfigurationProperty(
enabled=False
)
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.devopsagent.*;
CapabilitiesProperty capabilitiesProperty = CapabilitiesProperty.builder()
.codeChangeRiskAnalysis(CapabilityConfigurationProperty.builder()
.enabled(false)
.triggerFilterGroups(List.of(TriggerFilterGroupProperty.builder()
.events(List.of("events"))
.targetBranches(PatternFilterProperty.builder()
.patterns(List.of("patterns"))
.build())
.build()))
.build())
.codeChangeRiskAnalysisAutomatedTesting(AutomatedTestingCapabilityConfigurationProperty.builder()
.enabled(false)
.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.DevOpsAgent;
var capabilitiesProperty = new CapabilitiesProperty {
CodeChangeRiskAnalysis = new CapabilityConfigurationProperty {
Enabled = false,
TriggerFilterGroups = new [] { new TriggerFilterGroupProperty {
Events = new [] { "events" },
TargetBranches = new PatternFilterProperty {
Patterns = new [] { "patterns" }
}
} }
},
CodeChangeRiskAnalysisAutomatedTesting = new AutomatedTestingCapabilityConfigurationProperty {
Enabled = false
}
};
// 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"
capabilitiesProperty := &CapabilitiesProperty{
CodeChangeRiskAnalysis: &CapabilityConfigurationProperty{
Enabled: jsii.Boolean(false),
TriggerFilterGroups: []interface{}{
&TriggerFilterGroupProperty{
Events: []*string{
jsii.String("events"),
},
TargetBranches: &PatternFilterProperty{
Patterns: []*string{
jsii.String("patterns"),
},
},
},
},
},
CodeChangeRiskAnalysisAutomatedTesting: &AutomatedTestingCapabilityConfigurationProperty{
Enabled: jsii.Boolean(false),
},
}
Properties
codeChangeRiskAnalysisoptionalIResolvable | CfnAssociation.code_change_risk_analysisoptionaltyping.Union[IResolvable, CapabilityConfigurationProperty]codeChangeRiskAnalysisoptionalIResolvableCodeChangeRiskAnalysisoptionalIResolvableCodeChangeRiskAnalysisoptionalinterface{} #codeChangeRiskAnalysisAutomatedTestingoptionalIResolvable | CfnAssociation.code_change_risk_analysis_automated_testingoptionaltyping.Union[IResolvable, AutomatedTestingCapabilityConfigurationProperty]codeChangeRiskAnalysisAutomatedTestingoptionalIResolvableCodeChangeRiskAnalysisAutomatedTestingoptionalIResolvableCodeChangeRiskAnalysisAutomatedTestingoptionalinterface{} #This capability does not support trigger filter groups.