Show / Hide Table of Contents

Class PolicyViolationBeta1

Violation produced by the validation plugin.

Inheritance
object
PolicyViolationBeta1
Implements
IPolicyViolationBeta1
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
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

string

Remarks

ExampleMetadata: fixture=_generated

Fix

How to fix the violation.

public string? Fix { get; set; }
Property Value

string

Remarks

Default: - no fix is provided

RuleMetadata

Additional metadata to include with the rule results.

public IDictionary<string, string>? RuleMetadata { get; set; }
Property Value

IDictionary<string, string>

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

string

Remarks

ExampleMetadata: fixture=_generated

Severity

The severity of the violation, only used for reporting purposes.

public string? Severity { get; set; }
Property Value

string

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

Implements

IPolicyViolationBeta1
Back to top Generated by DocFX