Class CfnRule
Creates a listener rule.
Inherited Members
Namespace: Amazon.CDK.AWS.VpcLattice
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnRule : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnRule
Inherits CfnResource
Implements IInspectable, ITaggable
Remarks
Each listener has a default rule for checking connection requests, but you can define additional rules. Each rule consists of a priority, one or more actions, and one or more conditions. For more information, see Listener rules in the Amazon VPC Lattice User Guide .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-rule.html
CloudformationResource: AWS::VpcLattice::Rule
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.AWS.VpcLattice;
var cfnRule = new CfnRule(this, "MyCfnRule", new CfnRuleProps {
Action = new ActionProperty {
FixedResponse = new FixedResponseProperty {
StatusCode = 123
},
Forward = new ForwardProperty {
TargetGroups = new [] { new WeightedTargetGroupProperty {
TargetGroupIdentifier = "targetGroupIdentifier",
// the properties below are optional
Weight = 123
} }
}
},
Match = new MatchProperty {
HttpMatch = new HttpMatchProperty {
HeaderMatches = new [] { new HeaderMatchProperty {
Match = new HeaderMatchTypeProperty {
Contains = "contains",
Exact = "exact",
Prefix = "prefix"
},
Name = "name",
// the properties below are optional
CaseSensitive = false
} },
Method = "method",
PathMatch = new PathMatchProperty {
Match = new PathMatchTypeProperty {
Exact = "exact",
Prefix = "prefix"
},
// the properties below are optional
CaseSensitive = false
}
}
},
Priority = 123,
// the properties below are optional
ListenerIdentifier = "listenerIdentifier",
Name = "name",
ServiceIdentifier = "serviceIdentifier",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Synopsis
Constructors
CfnRule(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnRule(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnRule(Construct, String, ICfnRuleProps) |
Properties
Action | Describes the action for a rule. |
AttrArn | The Amazon Resource Name (ARN) of the rule. |
AttrId | The ID of the listener. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
ListenerIdentifier | The ID or Amazon Resource Name (ARN) of the listener. |
Match | The rule match. |
Name | The name of the rule. |
Priority | The priority assigned to the rule. |
ServiceIdentifier | The ID or Amazon Resource Name (ARN) of the service. |
Tags | Tag Manager which manages the tags for this resource. |
TagsRaw | The tags for the rule. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnRule(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnRule(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnRule(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnRule(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnRule(Construct, String, ICfnRuleProps)
public CfnRule(Construct scope, string id, ICfnRuleProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnRuleProps
Resource properties.
Properties
Action
Describes the action for a rule.
public virtual object Action { get; set; }
Property Value
System.Object
AttrArn
The Amazon Resource Name (ARN) of the rule.
public virtual string AttrArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Arn
AttrId
The ID of the listener.
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
ListenerIdentifier
The ID or Amazon Resource Name (ARN) of the listener.
public virtual string ListenerIdentifier { get; set; }
Property Value
System.String
Match
The rule match.
public virtual object Match { get; set; }
Property Value
System.Object
Name
The name of the rule.
public virtual string Name { get; set; }
Property Value
System.String
Priority
The priority assigned to the rule.
public virtual double Priority { get; set; }
Property Value
System.Double
ServiceIdentifier
The ID or Amazon Resource Name (ARN) of the service.
public virtual string ServiceIdentifier { get; set; }
Property Value
System.String
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>