Skip to content

Commit

Permalink
fix(oncall): change Route constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-bauer committed Jan 2, 2025
1 parent a733ef0 commit 39908f7
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions grafanaplane/oncall/integration.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -65,25 +65,23 @@ local forProvider = integration.spec.parameters.forProvider;

route: {
local forProvider = route.spec.parameters.forProvider,
'#chain':: d.func.new(
'#new':: d.func.new(
|||
`chain` configures a Route to reference an Escalation Chain.
`new` configures a Route with a given `routingRegex`.
|||,
[d.argument.new('name', d.T.string)]
[d.argument.new('routingRegex', d.T.string)]
),
chain(name)::
forProvider.escalationChainRef.withName(name),
new(routingRegex)::
forProvider.withRoutingRegex(routingRegex),


'#withRoutingRegex':: d.func.new(
'#withEscalationChain':: d.func.new(
|||
`withRoutingRegex` configures a Route to have routing type `regex` and
use the supplied regex.
`withEscalationChain` configures a Route with a destination Escalation
Chain. `escalationChainName` is the resource name of the chain.
|||,
[d.argument.new('regex', d.T.string)]
[d.argument.new('escalationChainName', d.T.string)]
),
withRoutingRegex(regex)::
forProvider.withRoutingType('regex')
+ forProvider.withRoutingRegex(regex),
withEscalationChain(escalationChainName)::
forProvider.escalationChainRef.withName(escalationChainName),
},
}

0 comments on commit 39908f7

Please sign in to comment.