@@ -1973,7 +1973,127 @@ onInstall:
19731973}
19741974` ` `
19751975@@!
1976+
1977+ # ## onBeforeMoveProduct
1978+ The event is executed before switching subscriptions (migrating a subscription item to a different service plan).
1979+
1980+ **Event Placeholders:**
1981+
1982+ - `${event.params.}` :
1983+ - ` subscriptionid` - unique identifier of the source subscription
1984+ - ` itemid` - unique identifier of the source subscription item
1985+ - ` itemresourceid` - unique identifier of the source subscription item resource
1986+ - ` itemresourceuniquename` - name of the source subscription item resource
1987+ - ` serviceplanid` - unique identifier of the source service plan
1988+ - ` productname` - name of the source subscription product
1989+ - ` serviceplanname` - name of the source service plan
1990+ - ` targetsubscriptionid` - unique identifier of the target subscription
1991+ - ` targetitemid` - unique identifier of the target subscription item
1992+ - ` targetserviceplanid` - unique identifier of the target service plan
1993+ - ` targetproductname` - name of the target subscription product
1994+ - ` targetserviceplanname` - name of the target service plan
1995+ - `${event.response.}` :
1996+ - ` result` - result code. The successful action result is '0'
1997+
1998+ # ## onAfterMoveProduct
1999+ The event is executed after switching subscriptions (migrating a subscription item to a different service plan).
2000+
2001+ **Event Placeholders:**
2002+
2003+ - `${event.params.}` :
2004+ - ` subscriptionid` - unique identifier of the source subscription
2005+ - ` itemid` - unique identifier of the source subscription item
2006+ - ` itemresourceid` - unique identifier of the source subscription item resource
2007+ - ` itemresourceuniquename` - name of the source subscription item resource
2008+ - ` serviceplanid` - unique identifier of the source service plan
2009+ - ` productname` - name of the source subscription product
2010+ - ` serviceplanname` - name of the source service plan
2011+ - ` targetsubscriptionid` - unique identifier of the target subscription
2012+ - ` targetitemid` - unique identifier of the target subscription item
2013+ - ` targetserviceplanid` - unique identifier of the target service plan
2014+ - ` targetproductname` - name of the target subscription product
2015+ - ` targetserviceplanname` - name of the target service plan
2016+ - `${event.response.}` :
2017+ - ` result` - result code. The successful action result is '0'
2018+
2019+ # ## onApplySubscriptionSettings
2020+ This event provides a possibility to execute actions required to adjust a subscription item after migration to a different service plan.
2021+
2022+ **Event Placeholders:**
2023+
2024+ - `${event.params.}` :
2025+ - ` subscriptionId` - unique identifier of the new subscription
2026+ - ` subscriptionItemId` - unique identifier of the new subscription item
2027+ - ` subscriptionItemResourceId` - unique identifier of the new subscription item resource
2028+ - ` servicePlanId` - unique identifier of the new service plan
2029+ - ` appUniqueName` - unique identifier of the package installation in the platform's Marketplace
2030+ - ` targetAppid` - unique identifier of the related environment(s)
2031+ - ` settings` - JSON object with custom settings provided for subscription item adjustment
2032+ - ` servicePlanData` - JSON object with new service plan data
2033+ - ` overrideRegions` - defines whether to configure the service plan's regions differently from the user group's default ones (true) or not (false)
2034+ - ` regionPricing` - JSON object with a list of available regions and custom pricing models for them
2035+ - `${event.response.}` :
2036+ - ` result` - result code. The successful action result is '0'
2037+
2038+ # ## onCustomNodeEvent
2039+ This event is executed when the **environment > Node > SendEvent** API method is called with the `eventName=CUSTOM_NODE_EVENT` parameter.
2040+
2041+ **Event Placeholders:**
2042+
2043+ - `${event.params.}` :
2044+ - ` NODE_NAME` - target container name
2045+ - ` NODE_GROUP` - unique identifier of the target node group (layer), e.g. "cp" for the default application server layer
2046+ - ` ENV_INFO` - environment information
2047+ - ` name` - name of the event (for filtering)
2048+ - ` ENV_NAME` - target environment name
2049+ - ` NODE_ID` - unique identifier of the target node
2050+ - ` USER_NAME` - target user name (email)
2051+ - ` envName` - target environment name
2052+ - ` nodeId` - unique identifier of the target node
2053+ - `${event.response.}` :
2054+ - ` result` - result code. The successful action result is '0'
2055+
2056+ Events Subscription Example :
19762057
2058+ @@@
2059+ ` ` ` yaml
2060+ type: update
2061+ name: Test Custom Node Events
2062+ targetNodes: any
2063+
2064+ onCustomNodeEvent [name:test]:
2065+ log: "filter by custom parameter. Event: ${event}"
2066+
2067+ onCustomNodeEvent [${targetNodes.nodeGroup}]:
2068+ log: "filter by nodeGroup. Event: ${event}"
2069+ ` ` `
2070+ ` ` ` json
2071+ {
2072+ "type": "update",
2073+ "name": "Test Custom Node Events",
2074+ "targetNodes": "any",
2075+ "onCustomNodeEvent [name:test]": {
2076+ "log": "filter by custom parameter. Event: ${event}"
2077+ },
2078+ "onCustomNodeEvent [${targetNodes.nodeGroup}]": {
2079+ "log": "filter by nodeGroup. Event: ${event}"
2080+ }
2081+ }
2082+ ` ` `
2083+ @@!
2084+
2085+ Triggering :
2086+
2087+ ` ` `
2088+ curl --location --request POST ‘https://{platformDomain}/1.0/environment/node/rest/sendevent’ --data-urlencode ‘params=\{ “name”: “test”}’
2089+ ` ` `
2090+
2091+ or
2092+
2093+ ```
2094+ jem api apicall [ API_DOMAIN] /1.0/environment/node/rest/sendevent --data-urlencode params={"name":"test"}
2095+ ```
2096+
19772097<br>
19782098
19792099<h2>What’s next?</h2>
0 commit comments