Class PolicyViolationBeta1
Violation produced by the validation plugin.
Implements
Inherited Members
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class PolicyViolationBeta1 : IPolicyViolationBeta1
Syntax (vb)
Public Class PolicyViolationBeta1 Implements IPolicyViolationBeta1
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
var policyViolationBeta1 = new PolicyViolationBeta1 {
Description = "description",
RuleName = "ruleName",
ViolatingResources = new [] { new PolicyViolatingResourceBeta1 {
Locations = new [] { "locations" },
ResourceLogicalId = "resourceLogicalId",
TemplatePath = "templatePath"
} },
// the properties below are optional
Fix = "fix",
RuleMetadata = new Dictionary<string, string> {
{ "ruleMetadataKey", "ruleMetadata" }
},
Severity = "severity"
};
Synopsis
Constructors
| PolicyViolationBeta1() | Violation produced by the validation plugin. |
Properties
| Description | The description of the violation. |
| Fix | How to fix the violation. |
| RuleMetadata | Additional metadata to include with the rule results. |
| RuleName | The name of the rule. |
| Severity | The severity of the violation, only used for reporting purposes. |
| ViolatingResources | The resources violating this rule. |
Constructors
PolicyViolationBeta1()
Violation produced by the validation plugin.
public PolicyViolationBeta1()
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
var policyViolationBeta1 = new PolicyViolationBeta1 {
Description = "description",
RuleName = "ruleName",
ViolatingResources = new [] { new PolicyViolatingResourceBeta1 {
Locations = new [] { "locations" },
ResourceLogicalId = "resourceLogicalId",
TemplatePath = "templatePath"
} },
// the properties below are optional
Fix = "fix",
RuleMetadata = new Dictionary<string, string> {
{ "ruleMetadataKey", "ruleMetadata" }
},
Severity = "severity"
};
Properties
Description
The description of the violation.
public string Description { get; set; }
Property Value
Remarks
ExampleMetadata: fixture=_generated
Fix
How to fix the violation.
public string? Fix { get; set; }
Property Value
Remarks
Default: - no fix is provided
RuleMetadata
Additional metadata to include with the rule results.
public IDictionary<string, string>? RuleMetadata { get; set; }
Property Value
Remarks
This can be used to provide additional information that is plugin specific. The data provided here will be rendered as is.
Default: - no rule metadata
RuleName
The name of the rule.
public string RuleName { get; set; }
Property Value
Remarks
ExampleMetadata: fixture=_generated
Severity
The severity of the violation, only used for reporting purposes.
public string? Severity { get; set; }
Property Value
Remarks
This is useful for helping the user discriminate between warnings, errors, information, etc.
Default: - no severity
ViolatingResources
The resources violating this rule.
public IPolicyViolatingResourceBeta1[] ViolatingResources { get; set; }
Property Value
IPolicyViolatingResourceBeta1[]
Remarks
ExampleMetadata: fixture=_generated