Skip to main content

Policy

Resource Policy in pulumi-better-uptime.
12 min read

Resource Policy in pulumi-better-uptime.

Pulumi type: better-uptime:index/policy:Policy.

name is the Pulumi resource name. Nested object fields are documented under that object. They are not arguments of this resource.

Example#

Only required arguments are set. A string in angle brackets stands in for that argument. Any other value is an option or example written in the SDK description.

Arguments#

PropertyTypeRequiredDescription
fallbackPolicyIdnumbernoSet this to escalate to another escalation policy once this policy has run all its steps and repeats without being acknowledged. The fallback policy must belong to the same organization.
namestringnoThe name of this Policy.
policyGroupIdnumbernoSet this attribute if you want to add this policy to a policy group.
repeatCountnumbernoHow many times should the entire policy be repeated if no one acknowledges the incident.
repeatDelaynumbernoHow long in seconds to wait before each repetition.
stepsPolicyStep (input)[]noAn array of escalation policy steps. May be empty to create a silent policy that only collects incidents without alerting anyone.
teamNamestringnoUsed to specify the team the resource should be created in when using global tokens. You can't update this value later.

Outputs#

Computed outputs are produced by the provider. They are not constructor arguments.

PropertyTypeComputedDescription
fallbackPolicyIdnumbernoSet this to escalate to another escalation policy once this policy has run all its steps and repeats without being acknowledged. The fallback policy must belong to the same organization.
incidentTokenstringyesIncident token that can be used for manually reporting incidents.
namestringnoThe name of this Policy.
policyGroupIdnumbernoSet this attribute if you want to add this policy to a policy group.
repeatCountnumbernoHow many times should the entire policy be repeated if no one acknowledges the incident.
repeatDelaynumbernoHow long in seconds to wait before each repetition.
stepsPolicyStep (output)[]noAn array of escalation policy steps. May be empty to create a silent policy that only collects incidents without alerting anyone.
teamNamestringnoUsed to specify the team the resource should be created in when using global tokens. You can't update this value later.

PolicyStep (input)#

Input object PolicyStep. Fields below belong to this object, not to the parent.

PropertyTypeRequiredDescription
actionTypestringnoThe action to take. Required when step type is resolveRemove- use resolveIncident or remove_incident. Optional when step type is timeBranching or metadataBranching- use escalate_to_policy, resolve_incident, remove_incident, or do_not_escalate. When omitted on branching steps, the action defaults to escalateToPolicy if policyId or policyMetadataKey is set, and to doNotEscalate otherwise; the resolved value is stored in state, so change it by setting an explicit value.
commentstringnoPost instructions as a comment into the incident timeline. You can use Markdown, reference metadata as {server_region}, and interactive checkboxes like - [ ] Step 1. Used when step type is instructions.
daysstring[]noAn array of days during which the branching rule will be executed. Valid values are ["mon", "tue", "wed", "thu", "fri", "sat", "sun"]. Used when step type is branching.
metadataKeystringnoA metadata field key to check. Used when step type is metadata_branching.
metadataValuePolicyStepMetadataValue (input)[]noAn array of typed metadata values which will cause the branching rule to be executed. Used when step type is metadata_branching.
metadataValuesstring[]noAn array of metadata String values which will cause the branching rule to be executed. Used when step type is metadata_branching.
policyIdnumbernoA policy to executed if the branching rule matches the time of an incident. Used when step type is timeBranching or metadata_branching.
policyMetadataKeystringnoA metadata key from which to extract the policy to executed if the branching rule matches the time of an incident. Used when step type is timeBranching or metadata_branching.
reminderEnabledbooleannoWhether we should followup periodically unless all checkboxes are checked. Used when step type is instructions.
reminderIntervalHoursnumbernoTime interval in hours we should use for periodical follow-ups. Used when step type is instructions.
stepMembersPolicyStepStepMember (input)[]noAn array of escalation policy steps members. Used when step type is escalation.
timeFromstringnoA time from which the branching rule will be executed. Use HH:MM format. Used when step type is time_branching.
timeTostringnoA time at which the branching rule will step being executed. Use HH:MM format. Used when step type is time_branching.
timezonestringnoWhat timezone to use when evaluating time based branching rules. Used when step type is time_branching. The accepted values can be found in the Rails TimeZone documentation. https://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html
typestringyesThe type of the step. Can be either escalation, time_branching, metadata_branching, instructions, or resolve_remove.
urgencyIdnumbernoWhich severity to use for this step. Used when step type is escalation.
waitBeforenumbernoHow long to wait in seconds before executing this step since previous step. Omit if waitUntilTime is set.
waitUntilTimestringnoExecute this step at the specified time. Use HH:MM format. Omit if waitBefore is set.
waitUntilTimezonestringnoTimezone to use when interpreting wait_until_time. Omit if waitBefore is set.

PolicyStepMetadataValue (input)#

Input object PolicyStepMetadataValue. Fields below belong to this object, not to the parent.

PropertyTypeRequiredDescription
emailstringnoEmail of the referenced user when type is User.
itemIdstringnoID of the referenced item when type is different than String.
namestringnoName of the referenced item when type is different than String. Not available for Endpoint, SlackIntegration, and ZapierWebhook, which are referenced by itemId.
typestringnoValue types can be grouped into 2 main categories: - Scalar: String - Reference: User, Team, Policy, Schedule, Endpoint, Source, SlackIntegration, LinearIntegration, JiraIntegration, MicrosoftTeamsWebhook, ZapierWebhook, NativeWebhook, PagerDutyWebhook The value of a Scalar type is defined using the value field. The value of a Reference type is defined using one of the following fields: - itemId - great choice when you know the ID of the target item. - email - your go-to choice when you're referencing users. - name - can be used to reference other items like teams, policies, etc. Not available for Endpoint, SlackIntegration, and ZapierWebhook, which are referenced by itemId. The reference types require the presence of at least one of the three fields: itemId, name, email. Policy metadataBranching steps additionally accept noValue, which matches incidents whose metadata field is absent or blank.
valuestringnoValue when type is String.

PolicyStepStepMember (input)#

Input object PolicyStepStepMember. Fields below belong to this object, not to the parent.

PropertyTypeRequiredDescription
emailstringnoThe e-mail address of the user to notify during an incident. Can be used instead of id when member type is user - it is resolved to the user's ID automatically. Only one of id and email can be set.
idnumbernoThe ID of the resource to notify during an incident. Required for user, webhook, slack_integration, microsoft_teams_integration, zapier_webhook,pagerdutyIntegration and policy member types. This is e.g. the ID of the user to notify when member type is user, the on-call calendar ID when member type is current_on_call, or the chained escalation policy ID when member type is policy. When member type is user, you can set email instead.
metadataKeystringnoThe metadata key to use to retrieve the escalation target from the incident's metadata. Required when type is incident_metadata.
teamIdnumbernoThe ID of the team to notify when member team is entire_team. When left empty, the default team for the incident is used. This field is deprecated, use id instead.
typestringyesType type of the member to notify during an incident. Can be one of current_on_call, entire_team, all_slack_integrations, all_microsoft_teams_integrations, all_zapier_integrations, all_webhook_integrations, all_splunk_on_call_integrations, incident_metadata, user, webhook, slack_integration, microsoft_teams_integration, zapier_webhook,pagerdutyIntegration or policy.

PolicyStep (output)#

Output object PolicyStep. Fields below belong to this object.

PropertyTypeAlways presentDescription
actionTypestringyesThe action to take. Required when step type is resolveRemove- use resolveIncident or remove_incident. Optional when step type is timeBranching or metadataBranching- use escalate_to_policy, resolve_incident, remove_incident, or do_not_escalate. When omitted on branching steps, the action defaults to escalateToPolicy if policyId or policyMetadataKey is set, and to doNotEscalate otherwise; the resolved value is stored in state, so change it by setting an explicit value.
commentstringnoPost instructions as a comment into the incident timeline. You can use Markdown, reference metadata as {server_region}, and interactive checkboxes like - [ ] Step 1. Used when step type is instructions.
daysstring[]noAn array of days during which the branching rule will be executed. Valid values are ["mon", "tue", "wed", "thu", "fri", "sat", "sun"]. Used when step type is branching.
metadataKeystringnoA metadata field key to check. Used when step type is metadata_branching.
metadataValuePolicyStepMetadataValue (output)[]noAn array of typed metadata values which will cause the branching rule to be executed. Used when step type is metadata_branching.
metadataValuesstring[]noAn array of metadata String values which will cause the branching rule to be executed. Used when step type is metadata_branching.
policyIdnumbernoA policy to executed if the branching rule matches the time of an incident. Used when step type is timeBranching or metadata_branching.
policyMetadataKeystringnoA metadata key from which to extract the policy to executed if the branching rule matches the time of an incident. Used when step type is timeBranching or metadata_branching.
reminderEnabledbooleanyesWhether we should followup periodically unless all checkboxes are checked. Used when step type is instructions.
reminderIntervalHoursnumberyesTime interval in hours we should use for periodical follow-ups. Used when step type is instructions.
stepMembersPolicyStepStepMember (output)[]noAn array of escalation policy steps members. Used when step type is escalation.
timeFromstringnoA time from which the branching rule will be executed. Use HH:MM format. Used when step type is time_branching.
timeTostringnoA time at which the branching rule will step being executed. Use HH:MM format. Used when step type is time_branching.
timezonestringnoWhat timezone to use when evaluating time based branching rules. Used when step type is time_branching. The accepted values can be found in the Rails TimeZone documentation. https://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html
typestringyesThe type of the step. Can be either escalation, time_branching, metadata_branching, instructions, or resolve_remove.
urgencyIdnumbernoWhich severity to use for this step. Used when step type is escalation.
waitBeforenumbernoHow long to wait in seconds before executing this step since previous step. Omit if waitUntilTime is set.
waitUntilTimestringnoExecute this step at the specified time. Use HH:MM format. Omit if waitBefore is set.
waitUntilTimezonestringnoTimezone to use when interpreting wait_until_time. Omit if waitBefore is set.

PolicyStepMetadataValue (output)#

Output object PolicyStepMetadataValue. Fields below belong to this object.

PropertyTypeAlways presentDescription
emailstringnoEmail of the referenced user when type is User.
itemIdstringnoID of the referenced item when type is different than String.
namestringnoName of the referenced item when type is different than String. Not available for Endpoint, SlackIntegration, and ZapierWebhook, which are referenced by itemId.
typestringnoValue types can be grouped into 2 main categories: - Scalar: String - Reference: User, Team, Policy, Schedule, Endpoint, Source, SlackIntegration, LinearIntegration, JiraIntegration, MicrosoftTeamsWebhook, ZapierWebhook, NativeWebhook, PagerDutyWebhook The value of a Scalar type is defined using the value field. The value of a Reference type is defined using one of the following fields: - itemId - great choice when you know the ID of the target item. - email - your go-to choice when you're referencing users. - name - can be used to reference other items like teams, policies, etc. Not available for Endpoint, SlackIntegration, and ZapierWebhook, which are referenced by itemId. The reference types require the presence of at least one of the three fields: itemId, name, email. Policy metadataBranching steps additionally accept noValue, which matches incidents whose metadata field is absent or blank.
valuestringnoValue when type is String.

PolicyStepStepMember (output)#

Output object PolicyStepStepMember. Fields below belong to this object.

PropertyTypeAlways presentDescription
emailstringnoThe e-mail address of the user to notify during an incident. Can be used instead of id when member type is user - it is resolved to the user's ID automatically. Only one of id and email can be set.
idnumbernoThe ID of the resource to notify during an incident. Required for user, webhook, slack_integration, microsoft_teams_integration, zapier_webhook,pagerdutyIntegration and policy member types. This is e.g. the ID of the user to notify when member type is user, the on-call calendar ID when member type is current_on_call, or the chained escalation policy ID when member type is policy. When member type is user, you can set email instead.
metadataKeystringnoThe metadata key to use to retrieve the escalation target from the incident's metadata. Required when type is incident_metadata.
teamIdnumbernoThe ID of the team to notify when member team is entire_team. When left empty, the default team for the incident is used. This field is deprecated, use id instead.
typestringyesType type of the member to notify during an incident. Can be one of current_on_call, entire_team, all_slack_integrations, all_microsoft_teams_integrations, all_zapier_integrations, all_webhook_integrations, all_splunk_on_call_integrations, incident_metadata, user, webhook, slack_integration, microsoft_teams_integration, zapier_webhook,pagerdutyIntegration or policy.