1. Packages
  2. New Relic
  3. API Docs
  4. NotificationDestination
New Relic v5.22.0 published on Wednesday, Mar 27, 2024 by Pulumi

newrelic.NotificationDestination

Explore with Pulumi AI

newrelic logo
New Relic v5.22.0 published on Wednesday, Mar 27, 2024 by Pulumi

    Import

    Destination id can be found in the Destinations page -> three dots at the right of the chosen destination -> copy destination id to clipboard.

    This example is especially useful for slack destinations which must be imported.

    1. Add an empty resource to your terraform file:

    terraform

    resource “newrelic_notification_destination” “foo” {

    }

    $ pulumi import newrelic:index/notificationDestination:NotificationDestination  Run import command: `newrelic_notification_destination.foo <destination_id>`
    
    1. Run the following command after the import successfully done and copy the information to your resource:

    terraform state show newrelic_notification_destination.foo

    1. Add ignore_changes attribute on auth_token in your imported resource:

    terraform

    lifecycle {

    ignore_changes = [auth_token]
    

    }

    Your imported destination should look like that:

    terraform

    resource “newrelic_notification_destination” “foo” {

    lifecycle {

    ignore_changes = [auth_token]
    

    }

    name = “*********”

    type = “SLACK”

    auth_token {

    prefix = "Bearer"
    

    }

    property {

      key   = "teamName"
    
      label = "Team Name"
    
      value = "******"
    

    }

    }

    Create NotificationDestination Resource

    new NotificationDestination(name: string, args: NotificationDestinationArgs, opts?: CustomResourceOptions);
    @overload
    def NotificationDestination(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                account_id: Optional[int] = None,
                                active: Optional[bool] = None,
                                auth_basic: Optional[NotificationDestinationAuthBasicArgs] = None,
                                auth_token: Optional[NotificationDestinationAuthTokenArgs] = None,
                                name: Optional[str] = None,
                                properties: Optional[Sequence[NotificationDestinationPropertyArgs]] = None,
                                type: Optional[str] = None)
    @overload
    def NotificationDestination(resource_name: str,
                                args: NotificationDestinationArgs,
                                opts: Optional[ResourceOptions] = None)
    func NewNotificationDestination(ctx *Context, name string, args NotificationDestinationArgs, opts ...ResourceOption) (*NotificationDestination, error)
    public NotificationDestination(string name, NotificationDestinationArgs args, CustomResourceOptions? opts = null)
    public NotificationDestination(String name, NotificationDestinationArgs args)
    public NotificationDestination(String name, NotificationDestinationArgs args, CustomResourceOptions options)
    
    type: newrelic:NotificationDestination
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args NotificationDestinationArgs
    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 NotificationDestinationArgs
    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 NotificationDestinationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NotificationDestinationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NotificationDestinationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    NotificationDestination Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The NotificationDestination resource accepts the following input properties:

    Properties List<Pulumi.NewRelic.Inputs.NotificationDestinationProperty>
    A nested block that describes a notification destination property. See Nested property blocks below for details.
    Type string
    (Required) The type of the destination. One of: (WEBHOOK, EMAIL, SERVICE_NOW, PAGERDUTY_ACCOUNT_INTEGRATION, PAGERDUTY_SERVICE_INTEGRATION, JIRA, SLACK, SLACK_COLLABORATION, SLACK_LEGACY, MOBILE_PUSH, EVENT_BRIDGE).
    AccountId int
    Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
    Active bool
    Indicates whether the destination is active.
    AuthBasic Pulumi.NewRelic.Inputs.NotificationDestinationAuthBasic
    A nested block that describes a basic username and password authentication credentials. Only one auth_basic block is permitted per notification destination definition. See Nested auth_basic blocks below for details.
    AuthToken Pulumi.NewRelic.Inputs.NotificationDestinationAuthToken
    A nested block that describes a token authentication credentials. Only one auth_token block is permitted per notification destination definition. See Nested auth_token blocks below for details.
    Name string
    The name of the destination.
    Properties []NotificationDestinationPropertyArgs
    A nested block that describes a notification destination property. See Nested property blocks below for details.
    Type string
    (Required) The type of the destination. One of: (WEBHOOK, EMAIL, SERVICE_NOW, PAGERDUTY_ACCOUNT_INTEGRATION, PAGERDUTY_SERVICE_INTEGRATION, JIRA, SLACK, SLACK_COLLABORATION, SLACK_LEGACY, MOBILE_PUSH, EVENT_BRIDGE).
    AccountId int
    Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
    Active bool
    Indicates whether the destination is active.
    AuthBasic NotificationDestinationAuthBasicArgs
    A nested block that describes a basic username and password authentication credentials. Only one auth_basic block is permitted per notification destination definition. See Nested auth_basic blocks below for details.
    AuthToken NotificationDestinationAuthTokenArgs
    A nested block that describes a token authentication credentials. Only one auth_token block is permitted per notification destination definition. See Nested auth_token blocks below for details.
    Name string
    The name of the destination.
    properties List<NotificationDestinationProperty>
    A nested block that describes a notification destination property. See Nested property blocks below for details.
    type String
    (Required) The type of the destination. One of: (WEBHOOK, EMAIL, SERVICE_NOW, PAGERDUTY_ACCOUNT_INTEGRATION, PAGERDUTY_SERVICE_INTEGRATION, JIRA, SLACK, SLACK_COLLABORATION, SLACK_LEGACY, MOBILE_PUSH, EVENT_BRIDGE).
    accountId Integer
    Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
    active Boolean
    Indicates whether the destination is active.
    authBasic NotificationDestinationAuthBasic
    A nested block that describes a basic username and password authentication credentials. Only one auth_basic block is permitted per notification destination definition. See Nested auth_basic blocks below for details.
    authToken NotificationDestinationAuthToken
    A nested block that describes a token authentication credentials. Only one auth_token block is permitted per notification destination definition. See Nested auth_token blocks below for details.
    name String
    The name of the destination.
    properties NotificationDestinationProperty[]
    A nested block that describes a notification destination property. See Nested property blocks below for details.
    type string
    (Required) The type of the destination. One of: (WEBHOOK, EMAIL, SERVICE_NOW, PAGERDUTY_ACCOUNT_INTEGRATION, PAGERDUTY_SERVICE_INTEGRATION, JIRA, SLACK, SLACK_COLLABORATION, SLACK_LEGACY, MOBILE_PUSH, EVENT_BRIDGE).
    accountId number
    Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
    active boolean
    Indicates whether the destination is active.
    authBasic NotificationDestinationAuthBasic
    A nested block that describes a basic username and password authentication credentials. Only one auth_basic block is permitted per notification destination definition. See Nested auth_basic blocks below for details.
    authToken NotificationDestinationAuthToken
    A nested block that describes a token authentication credentials. Only one auth_token block is permitted per notification destination definition. See Nested auth_token blocks below for details.
    name string
    The name of the destination.
    properties Sequence[NotificationDestinationPropertyArgs]
    A nested block that describes a notification destination property. See Nested property blocks below for details.
    type str
    (Required) The type of the destination. One of: (WEBHOOK, EMAIL, SERVICE_NOW, PAGERDUTY_ACCOUNT_INTEGRATION, PAGERDUTY_SERVICE_INTEGRATION, JIRA, SLACK, SLACK_COLLABORATION, SLACK_LEGACY, MOBILE_PUSH, EVENT_BRIDGE).
    account_id int
    Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
    active bool
    Indicates whether the destination is active.
    auth_basic NotificationDestinationAuthBasicArgs
    A nested block that describes a basic username and password authentication credentials. Only one auth_basic block is permitted per notification destination definition. See Nested auth_basic blocks below for details.
    auth_token NotificationDestinationAuthTokenArgs
    A nested block that describes a token authentication credentials. Only one auth_token block is permitted per notification destination definition. See Nested auth_token blocks below for details.
    name str
    The name of the destination.
    properties List<Property Map>
    A nested block that describes a notification destination property. See Nested property blocks below for details.
    type String
    (Required) The type of the destination. One of: (WEBHOOK, EMAIL, SERVICE_NOW, PAGERDUTY_ACCOUNT_INTEGRATION, PAGERDUTY_SERVICE_INTEGRATION, JIRA, SLACK, SLACK_COLLABORATION, SLACK_LEGACY, MOBILE_PUSH, EVENT_BRIDGE).
    accountId Number
    Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
    active Boolean
    Indicates whether the destination is active.
    authBasic Property Map
    A nested block that describes a basic username and password authentication credentials. Only one auth_basic block is permitted per notification destination definition. See Nested auth_basic blocks below for details.
    authToken Property Map
    A nested block that describes a token authentication credentials. Only one auth_token block is permitted per notification destination definition. See Nested auth_token blocks below for details.
    name String
    The name of the destination.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NotificationDestination resource produces the following output properties:

    Guid string
    The unique entity identifier of the destination in New Relic.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastSent string
    The last time a notification was sent.
    Status string
    The status of the destination.
    Guid string
    The unique entity identifier of the destination in New Relic.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastSent string
    The last time a notification was sent.
    Status string
    The status of the destination.
    guid String
    The unique entity identifier of the destination in New Relic.
    id String
    The provider-assigned unique ID for this managed resource.
    lastSent String
    The last time a notification was sent.
    status String
    The status of the destination.
    guid string
    The unique entity identifier of the destination in New Relic.
    id string
    The provider-assigned unique ID for this managed resource.
    lastSent string
    The last time a notification was sent.
    status string
    The status of the destination.
    guid str
    The unique entity identifier of the destination in New Relic.
    id str
    The provider-assigned unique ID for this managed resource.
    last_sent str
    The last time a notification was sent.
    status str
    The status of the destination.
    guid String
    The unique entity identifier of the destination in New Relic.
    id String
    The provider-assigned unique ID for this managed resource.
    lastSent String
    The last time a notification was sent.
    status String
    The status of the destination.

    Look up Existing NotificationDestination Resource

    Get an existing NotificationDestination 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?: NotificationDestinationState, opts?: CustomResourceOptions): NotificationDestination
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[int] = None,
            active: Optional[bool] = None,
            auth_basic: Optional[NotificationDestinationAuthBasicArgs] = None,
            auth_token: Optional[NotificationDestinationAuthTokenArgs] = None,
            guid: Optional[str] = None,
            last_sent: Optional[str] = None,
            name: Optional[str] = None,
            properties: Optional[Sequence[NotificationDestinationPropertyArgs]] = None,
            status: Optional[str] = None,
            type: Optional[str] = None) -> NotificationDestination
    func GetNotificationDestination(ctx *Context, name string, id IDInput, state *NotificationDestinationState, opts ...ResourceOption) (*NotificationDestination, error)
    public static NotificationDestination Get(string name, Input<string> id, NotificationDestinationState? state, CustomResourceOptions? opts = null)
    public static NotificationDestination get(String name, Output<String> id, NotificationDestinationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    AccountId int
    Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
    Active bool
    Indicates whether the destination is active.
    AuthBasic Pulumi.NewRelic.Inputs.NotificationDestinationAuthBasic
    A nested block that describes a basic username and password authentication credentials. Only one auth_basic block is permitted per notification destination definition. See Nested auth_basic blocks below for details.
    AuthToken Pulumi.NewRelic.Inputs.NotificationDestinationAuthToken
    A nested block that describes a token authentication credentials. Only one auth_token block is permitted per notification destination definition. See Nested auth_token blocks below for details.
    Guid string
    The unique entity identifier of the destination in New Relic.
    LastSent string
    The last time a notification was sent.
    Name string
    The name of the destination.
    Properties List<Pulumi.NewRelic.Inputs.NotificationDestinationProperty>
    A nested block that describes a notification destination property. See Nested property blocks below for details.
    Status string
    The status of the destination.
    Type string
    (Required) The type of the destination. One of: (WEBHOOK, EMAIL, SERVICE_NOW, PAGERDUTY_ACCOUNT_INTEGRATION, PAGERDUTY_SERVICE_INTEGRATION, JIRA, SLACK, SLACK_COLLABORATION, SLACK_LEGACY, MOBILE_PUSH, EVENT_BRIDGE).
    AccountId int
    Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
    Active bool
    Indicates whether the destination is active.
    AuthBasic NotificationDestinationAuthBasicArgs
    A nested block that describes a basic username and password authentication credentials. Only one auth_basic block is permitted per notification destination definition. See Nested auth_basic blocks below for details.
    AuthToken NotificationDestinationAuthTokenArgs
    A nested block that describes a token authentication credentials. Only one auth_token block is permitted per notification destination definition. See Nested auth_token blocks below for details.
    Guid string
    The unique entity identifier of the destination in New Relic.
    LastSent string
    The last time a notification was sent.
    Name string
    The name of the destination.
    Properties []NotificationDestinationPropertyArgs
    A nested block that describes a notification destination property. See Nested property blocks below for details.
    Status string
    The status of the destination.
    Type string
    (Required) The type of the destination. One of: (WEBHOOK, EMAIL, SERVICE_NOW, PAGERDUTY_ACCOUNT_INTEGRATION, PAGERDUTY_SERVICE_INTEGRATION, JIRA, SLACK, SLACK_COLLABORATION, SLACK_LEGACY, MOBILE_PUSH, EVENT_BRIDGE).
    accountId Integer
    Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
    active Boolean
    Indicates whether the destination is active.
    authBasic NotificationDestinationAuthBasic
    A nested block that describes a basic username and password authentication credentials. Only one auth_basic block is permitted per notification destination definition. See Nested auth_basic blocks below for details.
    authToken NotificationDestinationAuthToken
    A nested block that describes a token authentication credentials. Only one auth_token block is permitted per notification destination definition. See Nested auth_token blocks below for details.
    guid String
    The unique entity identifier of the destination in New Relic.
    lastSent String
    The last time a notification was sent.
    name String
    The name of the destination.
    properties List<NotificationDestinationProperty>
    A nested block that describes a notification destination property. See Nested property blocks below for details.
    status String
    The status of the destination.
    type String
    (Required) The type of the destination. One of: (WEBHOOK, EMAIL, SERVICE_NOW, PAGERDUTY_ACCOUNT_INTEGRATION, PAGERDUTY_SERVICE_INTEGRATION, JIRA, SLACK, SLACK_COLLABORATION, SLACK_LEGACY, MOBILE_PUSH, EVENT_BRIDGE).
    accountId number
    Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
    active boolean
    Indicates whether the destination is active.
    authBasic NotificationDestinationAuthBasic
    A nested block that describes a basic username and password authentication credentials. Only one auth_basic block is permitted per notification destination definition. See Nested auth_basic blocks below for details.
    authToken NotificationDestinationAuthToken
    A nested block that describes a token authentication credentials. Only one auth_token block is permitted per notification destination definition. See Nested auth_token blocks below for details.
    guid string
    The unique entity identifier of the destination in New Relic.
    lastSent string
    The last time a notification was sent.
    name string
    The name of the destination.
    properties NotificationDestinationProperty[]
    A nested block that describes a notification destination property. See Nested property blocks below for details.
    status string
    The status of the destination.
    type string
    (Required) The type of the destination. One of: (WEBHOOK, EMAIL, SERVICE_NOW, PAGERDUTY_ACCOUNT_INTEGRATION, PAGERDUTY_SERVICE_INTEGRATION, JIRA, SLACK, SLACK_COLLABORATION, SLACK_LEGACY, MOBILE_PUSH, EVENT_BRIDGE).
    account_id int
    Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
    active bool
    Indicates whether the destination is active.
    auth_basic NotificationDestinationAuthBasicArgs
    A nested block that describes a basic username and password authentication credentials. Only one auth_basic block is permitted per notification destination definition. See Nested auth_basic blocks below for details.
    auth_token NotificationDestinationAuthTokenArgs
    A nested block that describes a token authentication credentials. Only one auth_token block is permitted per notification destination definition. See Nested auth_token blocks below for details.
    guid str
    The unique entity identifier of the destination in New Relic.
    last_sent str
    The last time a notification was sent.
    name str
    The name of the destination.
    properties Sequence[NotificationDestinationPropertyArgs]
    A nested block that describes a notification destination property. See Nested property blocks below for details.
    status str
    The status of the destination.
    type str
    (Required) The type of the destination. One of: (WEBHOOK, EMAIL, SERVICE_NOW, PAGERDUTY_ACCOUNT_INTEGRATION, PAGERDUTY_SERVICE_INTEGRATION, JIRA, SLACK, SLACK_COLLABORATION, SLACK_LEGACY, MOBILE_PUSH, EVENT_BRIDGE).
    accountId Number
    Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
    active Boolean
    Indicates whether the destination is active.
    authBasic Property Map
    A nested block that describes a basic username and password authentication credentials. Only one auth_basic block is permitted per notification destination definition. See Nested auth_basic blocks below for details.
    authToken Property Map
    A nested block that describes a token authentication credentials. Only one auth_token block is permitted per notification destination definition. See Nested auth_token blocks below for details.
    guid String
    The unique entity identifier of the destination in New Relic.
    lastSent String
    The last time a notification was sent.
    name String
    The name of the destination.
    properties List<Property Map>
    A nested block that describes a notification destination property. See Nested property blocks below for details.
    status String
    The status of the destination.
    type String
    (Required) The type of the destination. One of: (WEBHOOK, EMAIL, SERVICE_NOW, PAGERDUTY_ACCOUNT_INTEGRATION, PAGERDUTY_SERVICE_INTEGRATION, JIRA, SLACK, SLACK_COLLABORATION, SLACK_LEGACY, MOBILE_PUSH, EVENT_BRIDGE).

    Supporting Types

    NotificationDestinationAuthBasic, NotificationDestinationAuthBasicArgs

    Password string
    Specifies an authentication password for use with a destination.
    User string
    The username of the basic auth.
    Password string
    Specifies an authentication password for use with a destination.
    User string
    The username of the basic auth.
    password String
    Specifies an authentication password for use with a destination.
    user String
    The username of the basic auth.
    password string
    Specifies an authentication password for use with a destination.
    user string
    The username of the basic auth.
    password str
    Specifies an authentication password for use with a destination.
    user str
    The username of the basic auth.
    password String
    Specifies an authentication password for use with a destination.
    user String
    The username of the basic auth.

    NotificationDestinationAuthToken, NotificationDestinationAuthTokenArgs

    Token string
    Prefix string
    The prefix of the token auth.
    Token string
    Prefix string
    The prefix of the token auth.
    token String
    prefix String
    The prefix of the token auth.
    token string
    prefix string
    The prefix of the token auth.
    token str
    prefix str
    The prefix of the token auth.
    token String
    prefix String
    The prefix of the token auth.

    NotificationDestinationProperty, NotificationDestinationPropertyArgs

    Key string
    The notification property key.
    Value string
    The notification property value.
    DisplayValue string

    The notification property display value.

    Each notification destination type supports a specific set of arguments for the property block. See Additional Examples below for details:

    Label string
    The notification property label.
    Key string
    The notification property key.
    Value string
    The notification property value.
    DisplayValue string

    The notification property display value.

    Each notification destination type supports a specific set of arguments for the property block. See Additional Examples below for details:

    Label string
    The notification property label.
    key String
    The notification property key.
    value String
    The notification property value.
    displayValue String

    The notification property display value.

    Each notification destination type supports a specific set of arguments for the property block. See Additional Examples below for details:

    label String
    The notification property label.
    key string
    The notification property key.
    value string
    The notification property value.
    displayValue string

    The notification property display value.

    Each notification destination type supports a specific set of arguments for the property block. See Additional Examples below for details:

    label string
    The notification property label.
    key str
    The notification property key.
    value str
    The notification property value.
    display_value str

    The notification property display value.

    Each notification destination type supports a specific set of arguments for the property block. See Additional Examples below for details:

    label str
    The notification property label.
    key String
    The notification property key.
    value String
    The notification property value.
    displayValue String

    The notification property display value.

    Each notification destination type supports a specific set of arguments for the property block. See Additional Examples below for details:

    label String
    The notification property label.

    Package Details

    Repository
    New Relic pulumi/pulumi-newrelic
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the newrelic Terraform Provider.
    newrelic logo
    New Relic v5.22.0 published on Wednesday, Mar 27, 2024 by Pulumi