1. Packages
  2. PagerDuty
  3. API Docs
  4. ServiceDependency
PagerDuty v4.14.6 published on Tuesday, Sep 24, 2024 by Pulumi

pagerduty.ServiceDependency

Explore with Pulumi AI

pagerduty logo
PagerDuty v4.14.6 published on Tuesday, Sep 24, 2024 by Pulumi

    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

    import * as pulumi from "@pulumi/pulumi";
    import * as pagerduty from "@pulumi/pagerduty";
    
    const foo = new pagerduty.ServiceDependency("foo", {dependency: {
        dependentServices: [{
            id: fooPagerdutyBusinessService.id,
            type: fooPagerdutyBusinessService.type,
        }],
        supportingServices: [{
            id: fooPagerdutyService.id,
            type: fooPagerdutyService.type,
        }],
    }});
    const bar = new pagerduty.ServiceDependency("bar", {dependency: {
        dependentServices: [{
            id: fooPagerdutyBusinessService.id,
            type: fooPagerdutyBusinessService.type,
        }],
        supportingServices: [{
            id: two.id,
            type: two.type,
        }],
    }});
    
    import pulumi
    import pulumi_pagerduty as pagerduty
    
    foo = pagerduty.ServiceDependency("foo", dependency={
        "dependent_services": [{
            "id": foo_pagerduty_business_service["id"],
            "type": foo_pagerduty_business_service["type"],
        }],
        "supporting_services": [{
            "id": foo_pagerduty_service["id"],
            "type": foo_pagerduty_service["type"],
        }],
    })
    bar = pagerduty.ServiceDependency("bar", dependency={
        "dependent_services": [{
            "id": foo_pagerduty_business_service["id"],
            "type": foo_pagerduty_business_service["type"],
        }],
        "supporting_services": [{
            "id": two["id"],
            "type": two["type"],
        }],
    })
    
    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 {
    		_, err := pagerduty.NewServiceDependency(ctx, "foo", &pagerduty.ServiceDependencyArgs{
    			Dependency: &pagerduty.ServiceDependencyDependencyArgs{
    				DependentServices: pagerduty.ServiceDependencyDependencyDependentServiceArray{
    					&pagerduty.ServiceDependencyDependencyDependentServiceArgs{
    						Id:   pulumi.Any(fooPagerdutyBusinessService.Id),
    						Type: pulumi.Any(fooPagerdutyBusinessService.Type),
    					},
    				},
    				SupportingServices: pagerduty.ServiceDependencyDependencySupportingServiceArray{
    					&pagerduty.ServiceDependencyDependencySupportingServiceArgs{
    						Id:   pulumi.Any(fooPagerdutyService.Id),
    						Type: pulumi.Any(fooPagerdutyService.Type),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = pagerduty.NewServiceDependency(ctx, "bar", &pagerduty.ServiceDependencyArgs{
    			Dependency: &pagerduty.ServiceDependencyDependencyArgs{
    				DependentServices: pagerduty.ServiceDependencyDependencyDependentServiceArray{
    					&pagerduty.ServiceDependencyDependencyDependentServiceArgs{
    						Id:   pulumi.Any(fooPagerdutyBusinessService.Id),
    						Type: pulumi.Any(fooPagerdutyBusinessService.Type),
    					},
    				},
    				SupportingServices: pagerduty.ServiceDependencyDependencySupportingServiceArray{
    					&pagerduty.ServiceDependencyDependencySupportingServiceArgs{
    						Id:   pulumi.Any(two.Id),
    						Type: pulumi.Any(two.Type),
    					},
    				},
    			},
    		})
    		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 foo = new Pagerduty.ServiceDependency("foo", new()
        {
            Dependency = new Pagerduty.Inputs.ServiceDependencyDependencyArgs
            {
                DependentServices = new[]
                {
                    new Pagerduty.Inputs.ServiceDependencyDependencyDependentServiceArgs
                    {
                        Id = fooPagerdutyBusinessService.Id,
                        Type = fooPagerdutyBusinessService.Type,
                    },
                },
                SupportingServices = new[]
                {
                    new Pagerduty.Inputs.ServiceDependencyDependencySupportingServiceArgs
                    {
                        Id = fooPagerdutyService.Id,
                        Type = fooPagerdutyService.Type,
                    },
                },
            },
        });
    
        var bar = new Pagerduty.ServiceDependency("bar", new()
        {
            Dependency = new Pagerduty.Inputs.ServiceDependencyDependencyArgs
            {
                DependentServices = new[]
                {
                    new Pagerduty.Inputs.ServiceDependencyDependencyDependentServiceArgs
                    {
                        Id = fooPagerdutyBusinessService.Id,
                        Type = fooPagerdutyBusinessService.Type,
                    },
                },
                SupportingServices = new[]
                {
                    new Pagerduty.Inputs.ServiceDependencyDependencySupportingServiceArgs
                    {
                        Id = two.Id,
                        Type = two.Type,
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.pagerduty.ServiceDependency;
    import com.pulumi.pagerduty.ServiceDependencyArgs;
    import com.pulumi.pagerduty.inputs.ServiceDependencyDependencyArgs;
    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 foo = new ServiceDependency("foo", ServiceDependencyArgs.builder()
                .dependency(ServiceDependencyDependencyArgs.builder()
                    .dependentServices(ServiceDependencyDependencyDependentServiceArgs.builder()
                        .id(fooPagerdutyBusinessService.id())
                        .type(fooPagerdutyBusinessService.type())
                        .build())
                    .supportingServices(ServiceDependencyDependencySupportingServiceArgs.builder()
                        .id(fooPagerdutyService.id())
                        .type(fooPagerdutyService.type())
                        .build())
                    .build())
                .build());
    
            var bar = new ServiceDependency("bar", ServiceDependencyArgs.builder()
                .dependency(ServiceDependencyDependencyArgs.builder()
                    .dependentServices(ServiceDependencyDependencyDependentServiceArgs.builder()
                        .id(fooPagerdutyBusinessService.id())
                        .type(fooPagerdutyBusinessService.type())
                        .build())
                    .supportingServices(ServiceDependencyDependencySupportingServiceArgs.builder()
                        .id(two.id())
                        .type(two.type())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      foo:
        type: pagerduty:ServiceDependency
        properties:
          dependency:
            dependentServices:
              - id: ${fooPagerdutyBusinessService.id}
                type: ${fooPagerdutyBusinessService.type}
            supportingServices:
              - id: ${fooPagerdutyService.id}
                type: ${fooPagerdutyService.type}
      bar:
        type: pagerduty:ServiceDependency
        properties:
          dependency:
            dependentServices:
              - id: ${fooPagerdutyBusinessService.id}
                type: ${fooPagerdutyBusinessService.type}
            supportingServices:
              - id: ${two.id}
                type: ${two.type}
    

    Create ServiceDependency Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ServiceDependency(name: string, args: ServiceDependencyArgs, opts?: CustomResourceOptions);
    @overload
    def ServiceDependency(resource_name: str,
                          args: ServiceDependencyArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServiceDependency(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          dependency: Optional[ServiceDependencyDependencyArgs] = None)
    func NewServiceDependency(ctx *Context, name string, args ServiceDependencyArgs, opts ...ResourceOption) (*ServiceDependency, error)
    public ServiceDependency(string name, ServiceDependencyArgs args, CustomResourceOptions? opts = null)
    public ServiceDependency(String name, ServiceDependencyArgs args)
    public ServiceDependency(String name, ServiceDependencyArgs args, CustomResourceOptions options)
    
    type: pagerduty:ServiceDependency
    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 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.
    name String
    The unique name of the resource.
    args ServiceDependencyArgs
    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 serviceDependencyResource = new Pagerduty.ServiceDependency("serviceDependencyResource", new()
    {
        Dependency = new Pagerduty.Inputs.ServiceDependencyDependencyArgs
        {
            DependentServices = new[]
            {
                new Pagerduty.Inputs.ServiceDependencyDependencyDependentServiceArgs
                {
                    Id = "string",
                    Type = "string",
                },
            },
            SupportingServices = new[]
            {
                new Pagerduty.Inputs.ServiceDependencyDependencySupportingServiceArgs
                {
                    Id = "string",
                    Type = "string",
                },
            },
            Type = "string",
        },
    });
    
    example, err := pagerduty.NewServiceDependency(ctx, "serviceDependencyResource", &pagerduty.ServiceDependencyArgs{
    	Dependency: &pagerduty.ServiceDependencyDependencyArgs{
    		DependentServices: pagerduty.ServiceDependencyDependencyDependentServiceArray{
    			&pagerduty.ServiceDependencyDependencyDependentServiceArgs{
    				Id:   pulumi.String("string"),
    				Type: pulumi.String("string"),
    			},
    		},
    		SupportingServices: pagerduty.ServiceDependencyDependencySupportingServiceArray{
    			&pagerduty.ServiceDependencyDependencySupportingServiceArgs{
    				Id:   pulumi.String("string"),
    				Type: pulumi.String("string"),
    			},
    		},
    		Type: pulumi.String("string"),
    	},
    })
    
    var serviceDependencyResource = new ServiceDependency("serviceDependencyResource", ServiceDependencyArgs.builder()
        .dependency(ServiceDependencyDependencyArgs.builder()
            .dependentServices(ServiceDependencyDependencyDependentServiceArgs.builder()
                .id("string")
                .type("string")
                .build())
            .supportingServices(ServiceDependencyDependencySupportingServiceArgs.builder()
                .id("string")
                .type("string")
                .build())
            .type("string")
            .build())
        .build());
    
    service_dependency_resource = pagerduty.ServiceDependency("serviceDependencyResource", dependency=pagerduty.ServiceDependencyDependencyArgs(
        dependent_services=[pagerduty.ServiceDependencyDependencyDependentServiceArgs(
            id="string",
            type="string",
        )],
        supporting_services=[pagerduty.ServiceDependencyDependencySupportingServiceArgs(
            id="string",
            type="string",
        )],
        type="string",
    ))
    
    const serviceDependencyResource = new pagerduty.ServiceDependency("serviceDependencyResource", {dependency: {
        dependentServices: [{
            id: "string",
            type: "string",
        }],
        supportingServices: [{
            id: "string",
            type: "string",
        }],
        type: "string",
    }});
    
    type: pagerduty:ServiceDependency
    properties:
        dependency:
            dependentServices:
                - id: string
                  type: string
            supportingServices:
                - id: string
                  type: string
            type: string
    

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

    Dependency ServiceDependencyDependency
    The relationship between the supporting_service and dependent_service. One and only one dependency block must be defined.
    Dependency ServiceDependencyDependencyArgs
    The relationship between the supporting_service and dependent_service. One and only one dependency block must be defined.
    dependency ServiceDependencyDependency
    The relationship between the supporting_service and dependent_service. One and only one dependency block must be defined.
    dependency ServiceDependencyDependency
    The relationship between the supporting_service and dependent_service. One and only one dependency block must be defined.
    dependency ServiceDependencyDependencyArgs
    The relationship between the supporting_service and dependent_service. One and only one dependency block must be defined.
    dependency Property Map
    The relationship between the supporting_service and dependent_service. One and only one dependency block must be defined.

    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 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 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,
            dependency: Optional[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)
    public static ServiceDependency get(String name, Output<String> id, ServiceDependencyState 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:
    Dependency ServiceDependencyDependency
    The relationship between the supporting_service and dependent_service. One and only one dependency block must be defined.
    Dependency ServiceDependencyDependencyArgs
    The relationship between the supporting_service and dependent_service. One and only one dependency block must be defined.
    dependency ServiceDependencyDependency
    The relationship between the supporting_service and dependent_service. One and only one dependency block must be defined.
    dependency ServiceDependencyDependency
    The relationship between the supporting_service and dependent_service. One and only one dependency block must be defined.
    dependency ServiceDependencyDependencyArgs
    The relationship between the supporting_service and dependent_service. One and only one dependency block must be defined.
    dependency Property Map
    The relationship between the supporting_service and dependent_service. One and only one dependency block must be defined.

    Supporting Types

    ServiceDependencyDependency, ServiceDependencyDependencyArgs

    DependentServices List<ServiceDependencyDependencyDependentService>
    The service that dependents on the supporting service. Dependency dependent service documented below.
    SupportingServices List<ServiceDependencyDependencySupportingService>
    The service that supports the dependent service. Dependency supporting service documented below.
    Type string
    Can be business_service, service, business_service_reference or technical_service_reference.
    DependentServices []ServiceDependencyDependencyDependentService
    The service that dependents on the supporting service. Dependency dependent service documented below.
    SupportingServices []ServiceDependencyDependencySupportingService
    The service that supports the dependent service. Dependency supporting service documented below.
    Type string
    Can be business_service, service, business_service_reference or technical_service_reference.
    dependentServices List<ServiceDependencyDependencyDependentService>
    The service that dependents on the supporting service. Dependency dependent service documented below.
    supportingServices List<ServiceDependencyDependencySupportingService>
    The service that supports the dependent service. Dependency supporting service documented below.
    type String
    Can be business_service, service, business_service_reference or technical_service_reference.
    dependentServices ServiceDependencyDependencyDependentService[]
    The service that dependents on the supporting service. Dependency dependent service documented below.
    supportingServices ServiceDependencyDependencySupportingService[]
    The service that supports the dependent service. Dependency supporting service documented below.
    type string
    Can be business_service, service, business_service_reference or technical_service_reference.
    dependent_services Sequence[ServiceDependencyDependencyDependentService]
    The service that dependents on the supporting service. Dependency dependent service documented below.
    supporting_services Sequence[ServiceDependencyDependencySupportingService]
    The service that supports the dependent service. Dependency supporting service documented below.
    type str
    Can be business_service, service, business_service_reference or technical_service_reference.
    dependentServices List<Property Map>
    The service that dependents on the supporting service. Dependency dependent service documented below.
    supportingServices List<Property Map>
    The service that supports the dependent service. Dependency supporting service documented below.
    type String
    Can be business_service, service, business_service_reference or technical_service_reference.

    ServiceDependencyDependencyDependentService, ServiceDependencyDependencyDependentServiceArgs

    Id string
    The ID of the service dependency.
    Type string
    Can be business_service, service, business_service_reference or technical_service_reference.
    Id string
    The ID of the service dependency.
    Type string
    Can be business_service, service, business_service_reference or technical_service_reference.
    id String
    The ID of the service dependency.
    type String
    Can be business_service, service, business_service_reference or technical_service_reference.
    id string
    The ID of the service dependency.
    type string
    Can be business_service, service, business_service_reference or technical_service_reference.
    id str
    The ID of the service dependency.
    type str
    Can be business_service, service, business_service_reference or technical_service_reference.
    id String
    The ID of the service dependency.
    type String
    Can be business_service, service, business_service_reference or technical_service_reference.

    ServiceDependencyDependencySupportingService, ServiceDependencyDependencySupportingServiceArgs

    Id string
    The ID of the service dependency.
    Type string
    Can be business_service, service, business_service_reference or technical_service_reference.
    Id string
    The ID of the service dependency.
    Type string
    Can be business_service, service, business_service_reference or technical_service_reference.
    id String
    The ID of the service dependency.
    type String
    Can be business_service, service, business_service_reference or technical_service_reference.
    id string
    The ID of the service dependency.
    type string
    Can be business_service, service, business_service_reference or technical_service_reference.
    id str
    The ID of the service dependency.
    type str
    Can be business_service, service, business_service_reference or technical_service_reference.
    id String
    The ID of the service dependency.
    type String
    Can be business_service, service, business_service_reference or technical_service_reference.

    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
    

    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.
    pagerduty logo
    PagerDuty v4.14.6 published on Tuesday, Sep 24, 2024 by Pulumi