ServiceDependency

A service dependency is a relationship between two services that this service uses, or that are used by this service, and are critical for successful operation.

Example Usage

using Pulumi;
using Pagerduty = Pulumi.Pagerduty;

class MyStack : Stack
{
    public MyStack()
    {
        var foo = new Pagerduty.ServiceDependency("foo", new Pagerduty.ServiceDependencyArgs
        {
            Dependencies = 
            {
                new Pagerduty.Inputs.ServiceDependencyDependencyArgs
                {
                    DependentServices = 
                    {
                        new Pagerduty.Inputs.ServiceDependencyDependencyDependentServiceArgs
                        {
                            Id = pagerduty_business_service.Foo.Id,
                            Type = "business_service",
                        },
                    },
                    SupportingServices = 
                    {
                        new Pagerduty.Inputs.ServiceDependencyDependencySupportingServiceArgs
                        {
                            Id = pagerduty_service.Foo.Id,
                            Type = "service",
                        },
                    },
                },
            },
        });
        var bar = new Pagerduty.ServiceDependency("bar", new Pagerduty.ServiceDependencyArgs
        {
            Dependencies = 
            {
                new Pagerduty.Inputs.ServiceDependencyDependencyArgs
                {
                    DependentServices = 
                    {
                        new Pagerduty.Inputs.ServiceDependencyDependencyDependentServiceArgs
                        {
                            Id = pagerduty_business_service.Foo.Id,
                            Type = "business_service",
                        },
                    },
                    SupportingServices = 
                    {
                        new Pagerduty.Inputs.ServiceDependencyDependencySupportingServiceArgs
                        {
                            Id = pagerduty_service.Two.Id,
                            Type = "service",
                        },
                    },
                },
            },
        });
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := pagerduty.NewServiceDependency(ctx, "foo", &pagerduty.ServiceDependencyArgs{
			Dependencies: pagerduty.ServiceDependencyDependencyArray{
				&pagerduty.ServiceDependencyDependencyArgs{
					DependentServices: pagerduty.ServiceDependencyDependencyDependentServiceArray{
						&pagerduty.ServiceDependencyDependencyDependentServiceArgs{
							Id:   pulumi.Any(pagerduty_business_service.Foo.Id),
							Type: pulumi.String("business_service"),
						},
					},
					SupportingServices: pagerduty.ServiceDependencyDependencySupportingServiceArray{
						&pagerduty.ServiceDependencyDependencySupportingServiceArgs{
							Id:   pulumi.Any(pagerduty_service.Foo.Id),
							Type: pulumi.String("service"),
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = pagerduty.NewServiceDependency(ctx, "bar", &pagerduty.ServiceDependencyArgs{
			Dependencies: pagerduty.ServiceDependencyDependencyArray{
				&pagerduty.ServiceDependencyDependencyArgs{
					DependentServices: pagerduty.ServiceDependencyDependencyDependentServiceArray{
						&pagerduty.ServiceDependencyDependencyDependentServiceArgs{
							Id:   pulumi.Any(pagerduty_business_service.Foo.Id),
							Type: pulumi.String("business_service"),
						},
					},
					SupportingServices: pagerduty.ServiceDependencyDependencySupportingServiceArray{
						&pagerduty.ServiceDependencyDependencySupportingServiceArgs{
							Id:   pulumi.Any(pagerduty_service.Two.Id),
							Type: pulumi.String("service"),
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_pagerduty as pagerduty

foo = pagerduty.ServiceDependency("foo", dependencies=[pagerduty.ServiceDependencyDependencyArgs(
    dependent_services=[pagerduty.ServiceDependencyDependencyDependentServiceArgs(
        id=pagerduty_business_service["foo"]["id"],
        type="business_service",
    )],
    supporting_services=[pagerduty.ServiceDependencyDependencySupportingServiceArgs(
        id=pagerduty_service["foo"]["id"],
        type="service",
    )],
)])
bar = pagerduty.ServiceDependency("bar", dependencies=[pagerduty.ServiceDependencyDependencyArgs(
    dependent_services=[pagerduty.ServiceDependencyDependencyDependentServiceArgs(
        id=pagerduty_business_service["foo"]["id"],
        type="business_service",
    )],
    supporting_services=[pagerduty.ServiceDependencyDependencySupportingServiceArgs(
        id=pagerduty_service["two"]["id"],
        type="service",
    )],
)])
import * as pulumi from "@pulumi/pulumi";
import * as pagerduty from "@pulumi/pagerduty";

const foo = new pagerduty.ServiceDependency("foo", {dependencies: [{
    dependentServices: [{
        id: pagerduty_business_service.foo.id,
        type: "business_service",
    }],
    supportingServices: [{
        id: pagerduty_service.foo.id,
        type: "service",
    }],
}]});
const bar = new pagerduty.ServiceDependency("bar", {dependencies: [{
    dependentServices: [{
        id: pagerduty_business_service.foo.id,
        type: "business_service",
    }],
    supportingServices: [{
        id: pagerduty_service.two.id,
        type: "service",
    }],
}]});

Create a ServiceDependency Resource

new ServiceDependency(name: string, args: ServiceDependencyArgs, opts?: CustomResourceOptions);
@overload
def ServiceDependency(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      dependencies: Optional[Sequence[ServiceDependencyDependencyArgs]] = None)
@overload
def ServiceDependency(resource_name: str,
                      args: ServiceDependencyArgs,
                      opts: Optional[ResourceOptions] = None)
func NewServiceDependency(ctx *Context, name string, args ServiceDependencyArgs, opts ...ResourceOption) (*ServiceDependency, error)
public ServiceDependency(string name, ServiceDependencyArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ServiceDependencyArgs
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 ServiceDependencyArgs
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 ServiceDependencyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ServiceDependencyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ServiceDependency Resource Properties

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

Inputs

The ServiceDependency resource accepts the following input properties:

Dependencies List<ServiceDependencyDependencyArgs>
The relationship between the supporting_service and dependent_service.
Dependencies []ServiceDependencyDependency
The relationship between the supporting_service and dependent_service.
dependencies ServiceDependencyDependencyArgs[]
The relationship between the supporting_service and dependent_service.
dependencies Sequence[ServiceDependencyDependencyArgs]
The relationship between the supporting_service and dependent_service.

Outputs

All input properties are implicitly available as output properties. Additionally, the ServiceDependency 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing ServiceDependency Resource

Get an existing ServiceDependency 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?: ServiceDependencyState, opts?: CustomResourceOptions): ServiceDependency
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        dependencies: Optional[Sequence[ServiceDependencyDependencyArgs]] = None) -> ServiceDependency
func GetServiceDependency(ctx *Context, name string, id IDInput, state *ServiceDependencyState, opts ...ResourceOption) (*ServiceDependency, error)
public static ServiceDependency Get(string name, Input<string> id, ServiceDependencyState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Dependencies List<ServiceDependencyDependencyArgs>
The relationship between the supporting_service and dependent_service.
Dependencies []ServiceDependencyDependency
The relationship between the supporting_service and dependent_service.
dependencies ServiceDependencyDependencyArgs[]
The relationship between the supporting_service and dependent_service.
dependencies Sequence[ServiceDependencyDependencyArgs]
The relationship between the supporting_service and dependent_service.

Supporting Types

ServiceDependencyDependency

DependentServices List<ServiceDependencyDependencyDependentServiceArgs>
The service that id dependent on the supporting service.
SupportingServices List<ServiceDependencyDependencySupportingServiceArgs>
The service that supports the dependent service.
Type string
DependentServices []ServiceDependencyDependencyDependentService
The service that id dependent on the supporting service.
SupportingServices []ServiceDependencyDependencySupportingService
The service that supports the dependent service.
Type string
dependentServices ServiceDependencyDependencyDependentServiceArgs[]
The service that id dependent on the supporting service.
supportingServices ServiceDependencyDependencySupportingServiceArgs[]
The service that supports the dependent service.
type string
dependent_services Sequence[ServiceDependencyDependencyDependentServiceArgs]
The service that id dependent on the supporting service.
supporting_services Sequence[ServiceDependencyDependencySupportingServiceArgs]
The service that supports the dependent service.
type str

ServiceDependencyDependencyDependentService

Id string
The ID of the service dependency.
Type string
Id string
The ID of the service dependency.
Type string
id string
The ID of the service dependency.
type string
id str
The ID of the service dependency.
type str

ServiceDependencyDependencySupportingService

Id string
The ID of the service dependency.
Type string
Id string
The ID of the service dependency.
Type string
id string
The ID of the service dependency.
type string
id str
The ID of the service dependency.
type str

Import

Service dependencies can be imported using the related supporting service id, supporting service type (business_service or service) and the dependency id separated by a dot, e.g.

 $ pulumi import pagerduty:index/serviceDependency:ServiceDependency main P4B2Z7G.business_service.D5RTHKRNGU4PYE90PJ

Package Details

Repository
https://github.com/pulumi/pulumi-pagerduty
License
Apache-2.0
Notes
This Pulumi package is based on the pagerduty Terraform Provider.