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
import * as pulumi from "@pulumi/pulumi";
import * as pagerduty from "@pulumi/pagerduty";
const example = new pagerduty.BusinessService("example", {
name: "My Web App",
description: "A very descriptive description of this business service",
pointOfContact: "PagerDuty Admin",
team: "P37RSRS",
});
const engteam = new pagerduty.Team("engteam", {name: "Engineering"});
const exampleUser = new pagerduty.User("example", {
name: "Earline Greenholt",
email: "125.greenholt.earline@graham.name",
});
const teamExample = new pagerduty.BusinessServiceSubscriber("team_example", {
subscriberId: engteam.id,
subscriberType: "team",
businessServiceId: example.id,
});
const userExample = new pagerduty.BusinessServiceSubscriber("user_example", {
subscriberId: exampleUser.id,
subscriberType: "user",
businessServiceId: example.id,
});
import pulumi
import pulumi_pagerduty as pagerduty
example = pagerduty.BusinessService("example",
name="My Web App",
description="A very descriptive description of this business service",
point_of_contact="PagerDuty Admin",
team="P37RSRS")
engteam = pagerduty.Team("engteam", name="Engineering")
example_user = pagerduty.User("example",
name="Earline Greenholt",
email="125.greenholt.earline@graham.name")
team_example = pagerduty.BusinessServiceSubscriber("team_example",
subscriber_id=engteam.id,
subscriber_type="team",
business_service_id=example.id)
user_example = pagerduty.BusinessServiceSubscriber("user_example",
subscriber_id=example_user.id,
subscriber_type="user",
business_service_id=example.id)
package main
import (
"github.com/pulumi/pulumi-pagerduty/sdk/v4/go/pagerduty"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := pagerduty.NewBusinessService(ctx, "example", &pagerduty.BusinessServiceArgs{
Name: pulumi.String("My Web App"),
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", &pagerduty.TeamArgs{
Name: pulumi.String("Engineering"),
})
if err != nil {
return err
}
exampleUser, err := pagerduty.NewUser(ctx, "example", &pagerduty.UserArgs{
Name: pulumi.String("Earline Greenholt"),
Email: pulumi.String("125.greenholt.earline@graham.name"),
})
if err != nil {
return err
}
_, err = pagerduty.NewBusinessServiceSubscriber(ctx, "team_example", &pagerduty.BusinessServiceSubscriberArgs{
SubscriberId: engteam.ID(),
SubscriberType: pulumi.String("team"),
BusinessServiceId: example.ID(),
})
if err != nil {
return err
}
_, err = pagerduty.NewBusinessServiceSubscriber(ctx, "user_example", &pagerduty.BusinessServiceSubscriberArgs{
SubscriberId: exampleUser.ID(),
SubscriberType: pulumi.String("user"),
BusinessServiceId: example.ID(),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Pagerduty = Pulumi.Pagerduty;
return await Deployment.RunAsync(() =>
{
var example = new Pagerduty.BusinessService("example", new()
{
Name = "My Web App",
Description = "A very descriptive description of this business service",
PointOfContact = "PagerDuty Admin",
Team = "P37RSRS",
});
var engteam = new Pagerduty.Team("engteam", new()
{
Name = "Engineering",
});
var exampleUser = new Pagerduty.User("example", new()
{
Name = "Earline Greenholt",
Email = "125.greenholt.earline@graham.name",
});
var teamExample = new Pagerduty.BusinessServiceSubscriber("team_example", new()
{
SubscriberId = engteam.Id,
SubscriberType = "team",
BusinessServiceId = example.Id,
});
var userExample = new Pagerduty.BusinessServiceSubscriber("user_example", new()
{
SubscriberId = exampleUser.Id,
SubscriberType = "user",
BusinessServiceId = example.Id,
});
});
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.TeamArgs;
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 example = new BusinessService("example", BusinessServiceArgs.builder()
.name("My Web App")
.description("A very descriptive description of this business service")
.pointOfContact("PagerDuty Admin")
.team("P37RSRS")
.build());
var engteam = new Team("engteam", TeamArgs.builder()
.name("Engineering")
.build());
var exampleUser = new User("exampleUser", UserArgs.builder()
.name("Earline Greenholt")
.email("125.greenholt.earline@graham.name")
.build());
var teamExample = new BusinessServiceSubscriber("teamExample", BusinessServiceSubscriberArgs.builder()
.subscriberId(engteam.id())
.subscriberType("team")
.businessServiceId(example.id())
.build());
var userExample = new BusinessServiceSubscriber("userExample", BusinessServiceSubscriberArgs.builder()
.subscriberId(exampleUser.id())
.subscriberType("user")
.businessServiceId(example.id())
.build());
}
}
resources:
example:
type: pagerduty:BusinessService
properties:
name: My Web App
description: A very descriptive description of this business service
pointOfContact: PagerDuty Admin
team: P37RSRS
engteam:
type: pagerduty:Team
properties:
name: Engineering
exampleUser:
type: pagerduty:User
name: example
properties:
name: Earline Greenholt
email: 125.greenholt.earline@graham.name
teamExample:
type: pagerduty:BusinessServiceSubscriber
name: team_example
properties:
subscriberId: ${engteam.id}
subscriberType: team
businessServiceId: ${example.id}
userExample:
type: pagerduty:BusinessServiceSubscriber
name: user_example
properties:
subscriberId: ${exampleUser.id}
subscriberType: user
businessServiceId: ${example.id}
Create BusinessServiceSubscriber Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BusinessServiceSubscriber(name: string, args: BusinessServiceSubscriberArgs, opts?: CustomResourceOptions);
@overload
def BusinessServiceSubscriber(resource_name: str,
args: BusinessServiceSubscriberArgs,
opts: Optional[ResourceOptions] = None)
@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)
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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var businessServiceSubscriberResource = new Pagerduty.BusinessServiceSubscriber("businessServiceSubscriberResource", new()
{
BusinessServiceId = "string",
SubscriberId = "string",
SubscriberType = "string",
});
example, err := pagerduty.NewBusinessServiceSubscriber(ctx, "businessServiceSubscriberResource", &pagerduty.BusinessServiceSubscriberArgs{
BusinessServiceId: pulumi.String("string"),
SubscriberId: pulumi.String("string"),
SubscriberType: pulumi.String("string"),
})
var businessServiceSubscriberResource = new BusinessServiceSubscriber("businessServiceSubscriberResource", BusinessServiceSubscriberArgs.builder()
.businessServiceId("string")
.subscriberId("string")
.subscriberType("string")
.build());
business_service_subscriber_resource = pagerduty.BusinessServiceSubscriber("businessServiceSubscriberResource",
business_service_id="string",
subscriber_id="string",
subscriber_type="string")
const businessServiceSubscriberResource = new pagerduty.BusinessServiceSubscriber("businessServiceSubscriberResource", {
businessServiceId: "string",
subscriberId: "string",
subscriberType: "string",
});
type: pagerduty:BusinessServiceSubscriber
properties:
businessServiceId: string
subscriberId: string
subscriberType: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The BusinessServiceSubscriber resource accepts the following input properties:
- Business
Service stringId - The ID of the business service to subscribe to.
- Subscriber
Id string - The ID of the subscriber entity.
- Subscriber
Type string - Type of subscriber entity in the subscriber assignment. Possible values can be
user
andteam
.
- Business
Service stringId - The ID of the business service to subscribe to.
- Subscriber
Id string - The ID of the subscriber entity.
- Subscriber
Type string - Type of subscriber entity in the subscriber assignment. Possible values can be
user
andteam
.
- business
Service StringId - The ID of the business service to subscribe to.
- subscriber
Id String - The ID of the subscriber entity.
- subscriber
Type String - Type of subscriber entity in the subscriber assignment. Possible values can be
user
andteam
.
- business
Service stringId - The ID of the business service to subscribe to.
- subscriber
Id string - The ID of the subscriber entity.
- subscriber
Type string - Type of subscriber entity in the subscriber assignment. Possible values can be
user
andteam
.
- business_
service_ strid - 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
andteam
.
- business
Service StringId - The ID of the business service to subscribe to.
- subscriber
Id String - The ID of the subscriber entity.
- subscriber
Type String - Type of subscriber entity in the subscriber assignment. Possible values can be
user
andteam
.
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.
- Business
Service stringId - The ID of the business service to subscribe to.
- Subscriber
Id string - The ID of the subscriber entity.
- Subscriber
Type string - Type of subscriber entity in the subscriber assignment. Possible values can be
user
andteam
.
- Business
Service stringId - The ID of the business service to subscribe to.
- Subscriber
Id string - The ID of the subscriber entity.
- Subscriber
Type string - Type of subscriber entity in the subscriber assignment. Possible values can be
user
andteam
.
- business
Service StringId - The ID of the business service to subscribe to.
- subscriber
Id String - The ID of the subscriber entity.
- subscriber
Type String - Type of subscriber entity in the subscriber assignment. Possible values can be
user
andteam
.
- business
Service stringId - The ID of the business service to subscribe to.
- subscriber
Id string - The ID of the subscriber entity.
- subscriber
Type string - Type of subscriber entity in the subscriber assignment. Possible values can be
user
andteam
.
- business_
service_ strid - 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
andteam
.
- business
Service StringId - The ID of the business service to subscribe to.
- subscriber
Id String - The ID of the subscriber entity.
- subscriber
Type String - Type of subscriber entity in the subscriber assignment. Possible values can be
user
andteam
.
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
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- PagerDuty pulumi/pulumi-pagerduty
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
pagerduty
Terraform Provider.