Skip to main content

Pyrae::Observer::MatchingRule Reference

Quick Type Reference

export interface PyraeObserverMatchingRule {
Name?: string;
ObserverUrn: string;
MatchAccountType?: string;
MatchUrnPartition?: string;
MatchUrnService?: string;
MatchUrnRegion?: string;
MatchUrnAccountId?: string;
MatchUrnResourceType?: string;

TemporalPolicy?: {
ExprType?: string;
ExprString?: string;
};
}

PyraeObserverMatchingRule

ObserverMatchingRule associates with a specific Observer. Its Match fields are logically ANDed together, and dictate when a Resource can be scanned by that Observer. Each field, if absent, defaults to 'match all'.

Name

Description: The resourceName of the URN. By default, one will be generated based on the logical ID with randomness appended to the end

Required: No

Location: $.PyraeObserverMatchingRule.Name

Type: export type Name = string;

ObserverUrn

Description: The observer URN that this matching rule attaches to. When a matching resource is updated, this is the observer that gets executed.

Required: Yes

Location: $.PyraeObserverMatchingRule.ObserverUrn

Type: export type ObserverUrn = string;

MatchAccountType

Description: The only supported value of for this field is aws

Required: No

Location: $.PyraeObserverMatchingRule.MatchAccountType

Type: export type MatchAccountType = string;

MatchUrnPartition

Description: This matches the partition (aws) of the URN. arn:>aws<:lambda:us-west-2:123456789012:function:myFn

Required: No

Location: $.PyraeObserverMatchingRule.MatchUrnPartition

Type: export type MatchUrnPartition = string;

MatchUrnService

Description: This matches the service (lambda) of the URN. arn:aws:>lambda<:us-west-2:123456789012:function:myFn

Required: No

Location: $.PyraeObserverMatchingRule.MatchUrnService

Type: export type MatchUrnService = string;

MatchUrnRegion

Description: This matches the region (us-west-2) of the URN. arn:aws:lambda:>us-west-2<:123456789012:function:myFn

Required: No

Location: $.PyraeObserverMatchingRule.MatchUrnRegion

Type: export type MatchUrnRegion = string;

MatchUrnAccountId

Description: This matches the account (123456789012) of the URN. arn:aws:lambda:us-west-2:>123456789012<:function:myFn

Required: No

Location: $.PyraeObserverMatchingRule.MatchUrnAccountId

Type: export type MatchUrnAccountId = string;

MatchUrnResourceType

Description: This matches the resource type (function) of the URN. arn:aws:lambda:us-west-2:123456789012:>function<:myFn

Required: No

Location: $.PyraeObserverMatchingRule.MatchUrnResourceType

Type: export type MatchUrnResourceType = string;

TemporalPolicy

Description: If this field is not provided, the resource is reactive, which means that it only executes either when the resource is changed, or on-demand. If this section is provided, it becomes a temporal rule, which runs on a regular schedule.

Required: No

Location: $.PyraeObserverMatchingRule.TemporalPolicy

Type:

/** If this field is not provided, the resource is reactive, which means that it only executes either when the resource is changed, or on-demand. If this section is provided, it becomes a temporal rule, which runs on a regular schedule. */
export interface TemporalPolicy {
ExprType?: string;
ExprString?: string;
}

JSON Schema

{
"$ref": "#/definitions/PyraeObserverMatchingRule",
"definitions": {
"PyraeObserverMatchingRule": {
"type": "object",
"properties": {
"Name": {
"anyOf": [
{
"type": "string"
}
],
"description": "The resourceName of the URN. By default, one will be generated based on the logical ID with randomness appended to the end"
},
"ObserverUrn": {
"anyOf": [
{
"type": "string"
}
],
"description": "The observer URN that this matching rule attaches to. When a matching resource is updated, this is the observer that gets executed."
},
"MatchAccountType": {
"anyOf": [
{
"type": "string"
}
],
"description": "The only supported value of for this field is `aws`"
},
"MatchUrnPartition": {
"anyOf": [
{
"type": "string"
}
],
"description": "This matches the partition (`aws`) of the URN. `arn:>aws<:lambda:us-west-2:123456789012:function:myFn`"
},
"MatchUrnService": {
"anyOf": [
{
"type": "string"
}
],
"description": "This matches the service (`lambda`) of the URN. `arn:aws:>lambda<:us-west-2:123456789012:function:myFn`"
},
"MatchUrnRegion": {
"anyOf": [
{
"type": "string"
}
],
"description": "This matches the region (`us-west-2`) of the URN. `arn:aws:lambda:>us-west-2<:123456789012:function:myFn`"
},
"MatchUrnAccountId": {
"anyOf": [
{
"type": "string"
}
],
"description": "This matches the account (`123456789012`) of the URN. `arn:aws:lambda:us-west-2:>123456789012<:function:myFn`"
},
"MatchUrnResourceType": {
"anyOf": [
{
"type": "string"
}
],
"description": "This matches the resource type (`function`) of the URN. `arn:aws:lambda:us-west-2:123456789012:>function<:myFn`"
},
"TemporalPolicy": {
"type": "object",
"properties": {
"ExprType": {
"anyOf": [
{
"type": "string"
}
]
},
"ExprString": {
"anyOf": [
{
"type": "string"
}
]
}
},
"additionalProperties": false,
"description": "If this field is not provided, the resource is reactive, which means that it only executes either when the resource is changed, or on-demand. If this section is provided, it becomes a temporal rule, which runs on a regular schedule."
}
},
"required": [
"ObserverUrn"
],
"additionalProperties": false,
"description": "ObserverMatchingRule associates with a specific Observer. Its `Match` fields are logically ANDed together, and dictate when a Resource can be scanned by that Observer. Each field, if absent, defaults to 'match all'."
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}