pagerduty.BusinessServiceSubscriber

Explore with Pulumi AI

A business service subscriber allows you to subscribe users or teams to automatically receive updates about key business services.

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Pagerduty = Pulumi.Pagerduty;

return await Deployment.RunAsync(() => 
{
    var exampleBusinessService = new Pagerduty.BusinessService("exampleBusinessService", new()
    {
        Description = "A very descriptive description of this business service",
        PointOfContact = "PagerDuty Admin",
        Team = "P37RSRS",
    });

    var engteam = new Pagerduty.Team("engteam");

    var exampleUser = new Pagerduty.User("exampleUser", new()
    {
        Email = "125.greenholt.earline@graham.name",
    });

    var teamExample = new Pagerduty.BusinessServiceSubscriber("teamExample", new()
    {
        SubscriberId = engteam.Id,
        SubscriberType = "team",
        BusinessServiceId = exampleBusinessService.Id,
    });

    var userExample = new Pagerduty.BusinessServiceSubscriber("userExample", new()
    {
        SubscriberId = exampleUser.Id,
        SubscriberType = "user",
        BusinessServiceId = exampleBusinessService.Id,
    });

});
package main

import (
	"github.com/pulumi/pulumi-pagerduty/sdk/v3/go/pagerduty"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleBusinessService, err := pagerduty.NewBusinessService(ctx, "exampleBusinessService", &pagerduty.BusinessServiceArgs{
			Description:    pulumi.String("A very descriptive description of this business service"),
			PointOfContact: pulumi.String("PagerDuty Admin"),
			Team:           pulumi.String("P37RSRS"),
		})
		if err != nil {
			return err
		}
		engteam, err := pagerduty.NewTeam(ctx, "engteam", nil)
		if err != nil {
			return err
		}
		exampleUser, err := pagerduty.NewUser(ctx, "exampleUser", &pagerduty.UserArgs{
			Email: pulumi.String("125.greenholt.earline@graham.name"),
		})
		if err != nil {
			return err
		}
		_, err = pagerduty.NewBusinessServiceSubscriber(ctx, "teamExample", &pagerduty.BusinessServiceSubscriberArgs{
			SubscriberId:      engteam.ID(),
			SubscriberType:    pulumi.String("team"),
			BusinessServiceId: exampleBusinessService.ID(),
		})
		if err != nil {
			return err
		}
		_, err = pagerduty.NewBusinessServiceSubscriber(ctx, "userExample", &pagerduty.BusinessServiceSubscriberArgs{
			SubscriberId:      exampleUser.ID(),
			SubscriberType:    pulumi.String("user"),
			BusinessServiceId: exampleBusinessService.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.pagerduty.BusinessService;
import com.pulumi.pagerduty.BusinessServiceArgs;
import com.pulumi.pagerduty.Team;
import com.pulumi.pagerduty.User;
import com.pulumi.pagerduty.UserArgs;
import com.pulumi.pagerduty.BusinessServiceSubscriber;
import com.pulumi.pagerduty.BusinessServiceSubscriberArgs;
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 exampleBusinessService = new BusinessService("exampleBusinessService", BusinessServiceArgs.builder()        
            .description("A very descriptive description of this business service")
            .pointOfContact("PagerDuty Admin")
            .team("P37RSRS")
            .build());

        var engteam = new Team("engteam");

        var exampleUser = new User("exampleUser", UserArgs.builder()        
            .email("125.greenholt.earline@graham.name")
            .build());

        var teamExample = new BusinessServiceSubscriber("teamExample", BusinessServiceSubscriberArgs.builder()        
            .subscriberId(engteam.id())
            .subscriberType("team")
            .businessServiceId(exampleBusinessService.id())
            .build());

        var userExample = new BusinessServiceSubscriber("userExample", BusinessServiceSubscriberArgs.builder()        
            .subscriberId(exampleUser.id())
            .subscriberType("user")
            .businessServiceId(exampleBusinessService.id())
            .build());

    }
}
import pulumi
import pulumi_pagerduty as pagerduty

example_business_service = pagerduty.BusinessService("exampleBusinessService",
    description="A very descriptive description of this business service",
    point_of_contact="PagerDuty Admin",
    team="P37RSRS")
engteam = pagerduty.Team("engteam")
example_user = pagerduty.User("exampleUser", email="125.greenholt.earline@graham.name")
team_example = pagerduty.BusinessServiceSubscriber("teamExample",
    subscriber_id=engteam.id,
    subscriber_type="team",
    business_service_id=example_business_service.id)
user_example = pagerduty.BusinessServiceSubscriber("userExample",
    subscriber_id=example_user.id,
    subscriber_type="user",
    business_service_id=example_business_service.id)
import * as pulumi from "@pulumi/pulumi";
import * as pagerduty from "@pulumi/pagerduty";

const exampleBusinessService = new pagerduty.BusinessService("exampleBusinessService", {
    description: "A very descriptive description of this business service",
    pointOfContact: "PagerDuty Admin",
    team: "P37RSRS",
});
const engteam = new pagerduty.Team("engteam", {});
const exampleUser = new pagerduty.User("exampleUser", {email: "125.greenholt.earline@graham.name"});
const teamExample = new pagerduty.BusinessServiceSubscriber("teamExample", {
    subscriberId: engteam.id,
    subscriberType: "team",
    businessServiceId: exampleBusinessService.id,
});
const userExample = new pagerduty.BusinessServiceSubscriber("userExample", {
    subscriberId: exampleUser.id,
    subscriberType: "user",
    businessServiceId: exampleBusinessService.id,
});
resources:
  exampleBusinessService:
    type: pagerduty:BusinessService
    properties:
      description: A very descriptive description of this business service
      pointOfContact: PagerDuty Admin
      team: P37RSRS
  engteam:
    type: pagerduty:Team
  exampleUser:
    type: pagerduty:User
    properties:
      email: 125.greenholt.earline@graham.name
  teamExample:
    type: pagerduty:BusinessServiceSubscriber
    properties:
      subscriberId: ${engteam.id}
      subscriberType: team
      businessServiceId: ${exampleBusinessService.id}
  userExample:
    type: pagerduty:BusinessServiceSubscriber
    properties:
      subscriberId: ${exampleUser.id}
      subscriberType: user
      businessServiceId: ${exampleBusinessService.id}

Create BusinessServiceSubscriber Resource

new BusinessServiceSubscriber(name: string, args: BusinessServiceSubscriberArgs, opts?: CustomResourceOptions);
@overload
def BusinessServiceSubscriber(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              business_service_id: Optional[str] = None,
                              subscriber_id: Optional[str] = None,
                              subscriber_type: Optional[str] = None)
@overload
def BusinessServiceSubscriber(resource_name: str,
                              args: BusinessServiceSubscriberArgs,
                              opts: Optional[ResourceOptions] = None)
func NewBusinessServiceSubscriber(ctx *Context, name string, args BusinessServiceSubscriberArgs, opts ...ResourceOption) (*BusinessServiceSubscriber, error)
public BusinessServiceSubscriber(string name, BusinessServiceSubscriberArgs args, CustomResourceOptions? opts = null)
public BusinessServiceSubscriber(String name, BusinessServiceSubscriberArgs args)
public BusinessServiceSubscriber(String name, BusinessServiceSubscriberArgs args, CustomResourceOptions options)
type: pagerduty:BusinessServiceSubscriber
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args BusinessServiceSubscriberArgs
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 BusinessServiceSubscriberArgs
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 BusinessServiceSubscriberArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args BusinessServiceSubscriberArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args BusinessServiceSubscriberArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

BusinessServiceSubscriber 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 BusinessServiceSubscriber resource accepts the following input properties:

BusinessServiceId string

The ID of the business service to subscribe to.

SubscriberId string

The ID of the subscriber entity.

SubscriberType string

Type of subscriber entity in the subscriber assignment. Possible values can be user and team.

BusinessServiceId string

The ID of the business service to subscribe to.

SubscriberId string

The ID of the subscriber entity.

SubscriberType string

Type of subscriber entity in the subscriber assignment. Possible values can be user and team.

businessServiceId String

The ID of the business service to subscribe to.

subscriberId String

The ID of the subscriber entity.

subscriberType String

Type of subscriber entity in the subscriber assignment. Possible values can be user and team.

businessServiceId string

The ID of the business service to subscribe to.

subscriberId string

The ID of the subscriber entity.

subscriberType string

Type of subscriber entity in the subscriber assignment. Possible values can be user and team.

business_service_id str

The ID of the business service to subscribe to.

subscriber_id str

The ID of the subscriber entity.

subscriber_type str

Type of subscriber entity in the subscriber assignment. Possible values can be user and team.

businessServiceId String

The ID of the business service to subscribe to.

subscriberId String

The ID of the subscriber entity.

subscriberType String

Type of subscriber entity in the subscriber assignment. Possible values can be user and team.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing BusinessServiceSubscriber Resource

Get an existing BusinessServiceSubscriber 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?: BusinessServiceSubscriberState, opts?: CustomResourceOptions): BusinessServiceSubscriber
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        business_service_id: Optional[str] = None,
        subscriber_id: Optional[str] = None,
        subscriber_type: Optional[str] = None) -> BusinessServiceSubscriber
func GetBusinessServiceSubscriber(ctx *Context, name string, id IDInput, state *BusinessServiceSubscriberState, opts ...ResourceOption) (*BusinessServiceSubscriber, error)
public static BusinessServiceSubscriber Get(string name, Input<string> id, BusinessServiceSubscriberState? state, CustomResourceOptions? opts = null)
public static BusinessServiceSubscriber get(String name, Output<String> id, BusinessServiceSubscriberState 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:
BusinessServiceId string

The ID of the business service to subscribe to.

SubscriberId string

The ID of the subscriber entity.

SubscriberType string

Type of subscriber entity in the subscriber assignment. Possible values can be user and team.

BusinessServiceId string

The ID of the business service to subscribe to.

SubscriberId string

The ID of the subscriber entity.

SubscriberType string

Type of subscriber entity in the subscriber assignment. Possible values can be user and team.

businessServiceId String

The ID of the business service to subscribe to.

subscriberId String

The ID of the subscriber entity.

subscriberType String

Type of subscriber entity in the subscriber assignment. Possible values can be user and team.

businessServiceId string

The ID of the business service to subscribe to.

subscriberId string

The ID of the subscriber entity.

subscriberType string

Type of subscriber entity in the subscriber assignment. Possible values can be user and team.

business_service_id str

The ID of the business service to subscribe to.

subscriber_id str

The ID of the subscriber entity.

subscriber_type str

Type of subscriber entity in the subscriber assignment. Possible values can be user and team.

businessServiceId String

The ID of the business service to subscribe to.

subscriberId String

The ID of the subscriber entity.

subscriberType String

Type of subscriber entity in the subscriber assignment. Possible values can be user and team.

Import

Services can be imported using the id using the related business service ID, the subscriber type and the subscriber ID separated by a dot, e.g.

 $ pulumi import pagerduty:index/businessServiceSubscriber:BusinessServiceSubscriber main PLBP09X.team.PLBP09X

Package Details

Repository
PagerDuty pulumi/pulumi-pagerduty
License
Apache-2.0
Notes

This Pulumi package is based on the pagerduty Terraform Provider.