ServiceNow CMDB CI relationship sync: faster, more complete →
Mods
Turbot

Policy: Turbot > Firehose > AWS SNS > Notification Template > Notification Subject Deleted

Configures the subject for SNS notification for deleted notifications.

Resource Types

This policy targets the following resource types:

Primary Policy

This policy is used with the following primary policy:

Policy Specification

Schema Type
string
Default
{% input %}
query notificationGet($id: ID!) {
  notification(id: $id) {
    notificationType
    control {
      turbot {
        id
      }
    }
    policySetting {
      type {
        title
        uri
        turbot {
          id
        }
        trunk {
          title
        }
      }
      turbot {
        id
      }
    }
    oldPolicySetting {
      type {
        title
        uri
        turbot {
          id
        }
        trunk {
          title
        }
      }
      turbot {
        id
      }
    }

    policyValue {
      precedence
      value
      turbot {
        id
      }
    }

    oldPolicyValue {
      precedence
      value
      turbot {
        id
      }
    }

    resource {
      turbot {
        title
      }
    }
    oldResource {
      turbot {
        title
      }
    }
    grant{
      identity {
        turbot {
          title
        }
      }
      level {
        turbot {
          title
        }
      }
    }
    oldGrant {
      type {
        title
        trunk { title }
      }
      level {
        turbot {
          title
        }
      }
      identity {
        title
      }
    }
    activeGrant {
      grant {
        identity {
          turbot {
            title
          }
        }
        resource {
          turbot {
            title
          }
        }
        level {
          turbot {
            title
          }
        }
        type {
          turbot {
            title
          }
        }
      }
    }
    oldActiveGrant {
      grant {
        identity {
          turbot {
            title
          }
        }
        resource {
          turbot {
            title
          }
        }
        level {
          turbot {
            title
          }
        }
        type {
          turbot {
            title
          }
        }
      }
    }

    favorite {
      name
      turbot {
        id
      }
    }

    actor {
      identity {
        title
        turbot {
          title
        }
      }
    }
    turbot {
      createTimestamp
    }
  }
}
{% endinput %}

{%- set notificationTitle = "" -%}
{%- if $.notification.notificationType === "policy_setting_deleted" -%}
{%- set notificationTitle -%}
Policy setting {{ $.notification.policySetting.type.trunk.title}} deleted by {{ $.notification.actor.identity.turbot.title }}
{%- endset -%}

{%- elif $.notification.notificationType === "resource_deleted" -%}
{%- set notificationTitle -%}
Resource {{ $.notification.resource.turbot.id }} deleted by {{ $.notification.actor.identity.turbot.title }}
{%- endset -%}

{%- elif $.notification.notificationType === "grant_deleted" -%}
{%- set notificationTitle -%}
{{ $.notification.oldGrant.type.title}}/{{ $.notification.oldGrant.level.turbot.title}} grant deleted at {{ $.notification.grant.resource.turbot.title }} for {{ $.notification.grant.identity.turbot.title }} by {{ $.notification.actor.identity.turbot.title }}
{%- endset -%}

{%- elif $.notification.notificationType === "active_grants_deleted" -%}
{%- set notificationTitle -%}
{{ $.notification.oldActiveGrant.grant.type.turbot.title}}/{{ $.notification.oldActiveGrant.grant.level.turbot.title}} grant deactivated at {{ $.notification.oldActiveGrant.grant.resource.turbot.title }} for {{ $.notification.oldActiveGrant.grant.identity.turbot.title }} by {{ $.notification.actor.identity.turbot.title }}
{%- endset -%}

{%- elif $.notification.notificationType === "control_deleted" -%}
{%- set notificationTitle -%}
Control {{ $.notification.control.turbot.id }} deleted by {{ $.notification.actor.identity.turbot.title }}
{%- endset -%}

{%- elif $.notification.notificationType === "policy_value_deleted" -%}
{%- set notificationTitle -%}
Policy value {{ $.notification.oldPolicyValue.turbot.id }} in {{ $.notification.resource.type.turbot.title }} {{ $.notification.resource.turbot.title }} deleted by {{ $.notification.actor.identity.turbot.title }}
{%- endset -%}

{%- elif $.notification.notificationType === "favorite_deleted" -%}
{%- set notificationTitle -%}
Favorite for {{ $.notification.resource.turbot.title }} deleted {{ $.notification.actor.identity.turbot.title }}
{%- endset -%}

{%- elif $.notification.notificationType === "watch_deleted" -%}
{%- set notificationTitle -%}
Watch for {{ $.notification.resource.turbot.title }} deleted by {{ $.notification.actor.identity.turbot.title }}
{%- endset -%}

{%- endif -%}
[{{ tenant.name }}] {{ notificationTitle }}

Category

In Your Workspace

Developers