ns1.Alert
Explore with Pulumi AI
Provides a NS1 Alert resource. This can be used to create, modify, and delete alerts.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ns1 from "@pulumi/ns1";
const example = new ns1.Alert("example", {
name: "Example Alert",
type: "zone",
subtype: "transfer_failed",
notificationLists: [],
zoneNames: [],
recordIds: [],
});
import pulumi
import pulumi_ns1 as ns1
example = ns1.Alert("example",
name="Example Alert",
type="zone",
subtype="transfer_failed",
notification_lists=[],
zone_names=[],
record_ids=[])
package main
import (
"github.com/pulumi/pulumi-ns1/sdk/v3/go/ns1"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ns1.NewAlert(ctx, "example", &ns1.AlertArgs{
Name: pulumi.String("Example Alert"),
Type: pulumi.String("zone"),
Subtype: pulumi.String("transfer_failed"),
NotificationLists: pulumi.StringArray{},
ZoneNames: pulumi.StringArray{},
RecordIds: pulumi.StringArray{},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ns1 = Pulumi.Ns1;
return await Deployment.RunAsync(() =>
{
var example = new Ns1.Alert("example", new()
{
Name = "Example Alert",
Type = "zone",
Subtype = "transfer_failed",
NotificationLists = new[] {},
ZoneNames = new[] {},
RecordIds = new[] {},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ns1.Alert;
import com.pulumi.ns1.AlertArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Alert("example", AlertArgs.builder()
.name("Example Alert")
.type("zone")
.subtype("transfer_failed")
.notificationLists()
.zoneNames()
.recordIds()
.build());
}
}
resources:
example:
type: ns1:Alert
properties:
name: Example Alert
type: zone
subtype: transfer_failed
notificationLists: []
zoneNames: []
recordIds: []
NS1 Documentation
Create Alert Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Alert(name: string, args: AlertArgs, opts?: CustomResourceOptions);
@overload
def Alert(resource_name: str,
args: AlertArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Alert(resource_name: str,
opts: Optional[ResourceOptions] = None,
subtype: Optional[str] = None,
type: Optional[str] = None,
name: Optional[str] = None,
notification_lists: Optional[Sequence[str]] = None,
record_ids: Optional[Sequence[str]] = None,
zone_names: Optional[Sequence[str]] = None)
func NewAlert(ctx *Context, name string, args AlertArgs, opts ...ResourceOption) (*Alert, error)
public Alert(string name, AlertArgs args, CustomResourceOptions? opts = null)
type: ns1:Alert
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AlertArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AlertArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AlertArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AlertArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AlertArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var alertResource = new Ns1.Alert("alertResource", new()
{
Subtype = "string",
Type = "string",
Name = "string",
NotificationLists = new[]
{
"string",
},
RecordIds = new[]
{
"string",
},
ZoneNames = new[]
{
"string",
},
});
example, err := ns1.NewAlert(ctx, "alertResource", &ns1.AlertArgs{
Subtype: pulumi.String("string"),
Type: pulumi.String("string"),
Name: pulumi.String("string"),
NotificationLists: pulumi.StringArray{
pulumi.String("string"),
},
RecordIds: pulumi.StringArray{
pulumi.String("string"),
},
ZoneNames: pulumi.StringArray{
pulumi.String("string"),
},
})
var alertResource = new Alert("alertResource", AlertArgs.builder()
.subtype("string")
.type("string")
.name("string")
.notificationLists("string")
.recordIds("string")
.zoneNames("string")
.build());
alert_resource = ns1.Alert("alertResource",
subtype="string",
type="string",
name="string",
notification_lists=["string"],
record_ids=["string"],
zone_names=["string"])
const alertResource = new ns1.Alert("alertResource", {
subtype: "string",
type: "string",
name: "string",
notificationLists: ["string"],
recordIds: ["string"],
zoneNames: ["string"],
});
type: ns1:Alert
properties:
name: string
notificationLists:
- string
recordIds:
- string
subtype: string
type: string
zoneNames:
- string
Alert Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Alert resource accepts the following input properties:
- Subtype string
- The type of the alert.
- Type string
- The type of the alert.
- Name string
- The free-form display name for the alert.
- Notification
Lists List<string> - A list of id's for notification lists whose notifiers will be triggered by the alert.
- Record
Ids List<string> - A list of record id's this alert applies to.
- Zone
Names List<string> - A list of zones this alert applies to.
- Subtype string
- The type of the alert.
- Type string
- The type of the alert.
- Name string
- The free-form display name for the alert.
- Notification
Lists []string - A list of id's for notification lists whose notifiers will be triggered by the alert.
- Record
Ids []string - A list of record id's this alert applies to.
- Zone
Names []string - A list of zones this alert applies to.
- subtype String
- The type of the alert.
- type String
- The type of the alert.
- name String
- The free-form display name for the alert.
- notification
Lists List<String> - A list of id's for notification lists whose notifiers will be triggered by the alert.
- record
Ids List<String> - A list of record id's this alert applies to.
- zone
Names List<String> - A list of zones this alert applies to.
- subtype string
- The type of the alert.
- type string
- The type of the alert.
- name string
- The free-form display name for the alert.
- notification
Lists string[] - A list of id's for notification lists whose notifiers will be triggered by the alert.
- record
Ids string[] - A list of record id's this alert applies to.
- zone
Names string[] - A list of zones this alert applies to.
- subtype str
- The type of the alert.
- type str
- The type of the alert.
- name str
- The free-form display name for the alert.
- notification_
lists Sequence[str] - A list of id's for notification lists whose notifiers will be triggered by the alert.
- record_
ids Sequence[str] - A list of record id's this alert applies to.
- zone_
names Sequence[str] - A list of zones this alert applies to.
- subtype String
- The type of the alert.
- type String
- The type of the alert.
- name String
- The free-form display name for the alert.
- notification
Lists List<String> - A list of id's for notification lists whose notifiers will be triggered by the alert.
- record
Ids List<String> - A list of record id's this alert applies to.
- zone
Names List<String> - A list of zones this alert applies to.
Outputs
All input properties are implicitly available as output properties. Additionally, the Alert resource produces the following output properties:
- Created
At int - (Read Only) The Unix timestamp representing when the alert configuration was created.
- Created
By string - (Read Only) The user or apikey that created this alert.
- Id string
- The provider-assigned unique ID for this managed resource.
- Updated
At int - (Read Only) The Unix timestamp representing when the alert configuration was last modified.
- Updated
By string - (Read Only) The user or apikey that last modified this alert.
- Created
At int - (Read Only) The Unix timestamp representing when the alert configuration was created.
- Created
By string - (Read Only) The user or apikey that created this alert.
- Id string
- The provider-assigned unique ID for this managed resource.
- Updated
At int - (Read Only) The Unix timestamp representing when the alert configuration was last modified.
- Updated
By string - (Read Only) The user or apikey that last modified this alert.
- created
At Integer - (Read Only) The Unix timestamp representing when the alert configuration was created.
- created
By String - (Read Only) The user or apikey that created this alert.
- id String
- The provider-assigned unique ID for this managed resource.
- updated
At Integer - (Read Only) The Unix timestamp representing when the alert configuration was last modified.
- updated
By String - (Read Only) The user or apikey that last modified this alert.
- created
At number - (Read Only) The Unix timestamp representing when the alert configuration was created.
- created
By string - (Read Only) The user or apikey that created this alert.
- id string
- The provider-assigned unique ID for this managed resource.
- updated
At number - (Read Only) The Unix timestamp representing when the alert configuration was last modified.
- updated
By string - (Read Only) The user or apikey that last modified this alert.
- created_
at int - (Read Only) The Unix timestamp representing when the alert configuration was created.
- created_
by str - (Read Only) The user or apikey that created this alert.
- id str
- The provider-assigned unique ID for this managed resource.
- updated_
at int - (Read Only) The Unix timestamp representing when the alert configuration was last modified.
- updated_
by str - (Read Only) The user or apikey that last modified this alert.
- created
At Number - (Read Only) The Unix timestamp representing when the alert configuration was created.
- created
By String - (Read Only) The user or apikey that created this alert.
- id String
- The provider-assigned unique ID for this managed resource.
- updated
At Number - (Read Only) The Unix timestamp representing when the alert configuration was last modified.
- updated
By String - (Read Only) The user or apikey that last modified this alert.
Look up Existing Alert Resource
Get an existing Alert resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AlertState, opts?: CustomResourceOptions): Alert
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[int] = None,
created_by: Optional[str] = None,
name: Optional[str] = None,
notification_lists: Optional[Sequence[str]] = None,
record_ids: Optional[Sequence[str]] = None,
subtype: Optional[str] = None,
type: Optional[str] = None,
updated_at: Optional[int] = None,
updated_by: Optional[str] = None,
zone_names: Optional[Sequence[str]] = None) -> Alert
func GetAlert(ctx *Context, name string, id IDInput, state *AlertState, opts ...ResourceOption) (*Alert, error)
public static Alert Get(string name, Input<string> id, AlertState? state, CustomResourceOptions? opts = null)
public static Alert get(String name, Output<String> id, AlertState state, CustomResourceOptions options)
resources: _: type: ns1:Alert get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Created
At int - (Read Only) The Unix timestamp representing when the alert configuration was created.
- Created
By string - (Read Only) The user or apikey that created this alert.
- Name string
- The free-form display name for the alert.
- Notification
Lists List<string> - A list of id's for notification lists whose notifiers will be triggered by the alert.
- Record
Ids List<string> - A list of record id's this alert applies to.
- Subtype string
- The type of the alert.
- Type string
- The type of the alert.
- Updated
At int - (Read Only) The Unix timestamp representing when the alert configuration was last modified.
- Updated
By string - (Read Only) The user or apikey that last modified this alert.
- Zone
Names List<string> - A list of zones this alert applies to.
- Created
At int - (Read Only) The Unix timestamp representing when the alert configuration was created.
- Created
By string - (Read Only) The user or apikey that created this alert.
- Name string
- The free-form display name for the alert.
- Notification
Lists []string - A list of id's for notification lists whose notifiers will be triggered by the alert.
- Record
Ids []string - A list of record id's this alert applies to.
- Subtype string
- The type of the alert.
- Type string
- The type of the alert.
- Updated
At int - (Read Only) The Unix timestamp representing when the alert configuration was last modified.
- Updated
By string - (Read Only) The user or apikey that last modified this alert.
- Zone
Names []string - A list of zones this alert applies to.
- created
At Integer - (Read Only) The Unix timestamp representing when the alert configuration was created.
- created
By String - (Read Only) The user or apikey that created this alert.
- name String
- The free-form display name for the alert.
- notification
Lists List<String> - A list of id's for notification lists whose notifiers will be triggered by the alert.
- record
Ids List<String> - A list of record id's this alert applies to.
- subtype String
- The type of the alert.
- type String
- The type of the alert.
- updated
At Integer - (Read Only) The Unix timestamp representing when the alert configuration was last modified.
- updated
By String - (Read Only) The user or apikey that last modified this alert.
- zone
Names List<String> - A list of zones this alert applies to.
- created
At number - (Read Only) The Unix timestamp representing when the alert configuration was created.
- created
By string - (Read Only) The user or apikey that created this alert.
- name string
- The free-form display name for the alert.
- notification
Lists string[] - A list of id's for notification lists whose notifiers will be triggered by the alert.
- record
Ids string[] - A list of record id's this alert applies to.
- subtype string
- The type of the alert.
- type string
- The type of the alert.
- updated
At number - (Read Only) The Unix timestamp representing when the alert configuration was last modified.
- updated
By string - (Read Only) The user or apikey that last modified this alert.
- zone
Names string[] - A list of zones this alert applies to.
- created_
at int - (Read Only) The Unix timestamp representing when the alert configuration was created.
- created_
by str - (Read Only) The user or apikey that created this alert.
- name str
- The free-form display name for the alert.
- notification_
lists Sequence[str] - A list of id's for notification lists whose notifiers will be triggered by the alert.
- record_
ids Sequence[str] - A list of record id's this alert applies to.
- subtype str
- The type of the alert.
- type str
- The type of the alert.
- updated_
at int - (Read Only) The Unix timestamp representing when the alert configuration was last modified.
- updated_
by str - (Read Only) The user or apikey that last modified this alert.
- zone_
names Sequence[str] - A list of zones this alert applies to.
- created
At Number - (Read Only) The Unix timestamp representing when the alert configuration was created.
- created
By String - (Read Only) The user or apikey that created this alert.
- name String
- The free-form display name for the alert.
- notification
Lists List<String> - A list of id's for notification lists whose notifiers will be triggered by the alert.
- record
Ids List<String> - A list of record id's this alert applies to.
- subtype String
- The type of the alert.
- type String
- The type of the alert.
- updated
At Number - (Read Only) The Unix timestamp representing when the alert configuration was last modified.
- updated
By String - (Read Only) The user or apikey that last modified this alert.
- zone
Names List<String> - A list of zones this alert applies to.
Import
$ pulumi import ns1:index/alert:Alert <name> <alert_id>`
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- NS1 pulumi/pulumi-ns1
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ns1
Terraform Provider.