1. Packages
  2. PagerDuty
  3. API Docs
  4. ServiceDependency
PagerDuty v4.10.1 published on Wednesday, Mar 27, 2024 by Pulumi

pagerduty.ServiceDependency

Explore with Pulumi AI

pagerduty logo
PagerDuty v4.10.1 published on Wednesday, Mar 27, 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: pagerduty_business_service.foo.id,
            type: pagerduty_business_service.foo.type,
        }],
        supportingServices: [{
            id: pagerduty_service.foo.id,
            type: pagerduty_service.foo.type,
        }],
    }});
    const bar = new pagerduty.ServiceDependency("bar", {dependency: {
        dependentServices: [{
            id: pagerduty_business_service.foo.id,
            type: pagerduty_business_service.foo.type,
        }],
        supportingServices: [{
            id: pagerduty_service.two.id,
            type: pagerduty_service.two.type,
        }],
    }});
    
    import pulumi
    import pulumi_pagerduty as pagerduty
    
    foo = pagerduty.ServiceDependency("foo", dependency=pagerduty.ServiceDependencyDependencyArgs(
        dependent_services=[pagerduty.ServiceDependencyDependencyDependentServiceArgs(
            id=pagerduty_business_service["foo"]["id"],
            type=pagerduty_business_service["foo"]["type"],
        )],
        supporting_services=[pagerduty.ServiceDependencyDependencySupportingServiceArgs(
            id=pagerduty_service["foo"]["id"],
            type=pagerduty_service["foo"]["type"],
        )],
    ))
    bar = pagerduty.ServiceDependency("bar", dependency=pagerduty.ServiceDependencyDependencyArgs(
        dependent_services=[pagerduty.ServiceDependencyDependencyDependentServiceArgs(
            id=pagerduty_business_service["foo"]["id"],
            type=pagerduty_business_service["foo"]["type"],
        )],
        supporting_services=[pagerduty.ServiceDependencyDependencySupportingServiceArgs(
            id=pagerduty_service["two"]["id"],
            type=pagerduty_service["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(pagerduty_business_service.Foo.Id),
    						Type: pulumi.Any(pagerduty_business_service.Foo.Type),
    					},
    				},
    				SupportingServices: pagerduty.ServiceDependencyDependencySupportingServiceArray{
    					&pagerduty.ServiceDependencyDependencySupportingServiceArgs{
    						Id:   pulumi.Any(pagerduty_service.Foo.Id),
    						Type: pulumi.Any(pagerduty_service.Foo.Type),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = pagerduty.NewServiceDependency(ctx, "bar", &pagerduty.ServiceDependencyArgs{
    			Dependency: &pagerduty.ServiceDependencyDependencyArgs{
    				DependentServices: pagerduty.ServiceDependencyDependencyDependentServiceArray{
    					&pagerduty.ServiceDependencyDependencyDependentServiceArgs{
    						Id:   pulumi.Any(pagerduty_business_service.Foo.Id),
    						Type: pulumi.Any(pagerduty_business_service.Foo.Type),
    					},
    				},
    				SupportingServices: pagerduty.ServiceDependencyDependencySupportingServiceArray{
    					&pagerduty.ServiceDependencyDependencySupportingServiceArgs{
    						Id:   pulumi.Any(pagerduty_service.Two.Id),
    						Type: pulumi.Any(pagerduty_service.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 = pagerduty_business_service.Foo.Id,
                        Type = pagerduty_business_service.Foo.Type,
                    },
                },
                SupportingServices = new[]
                {
                    new Pagerduty.Inputs.ServiceDependencyDependencySupportingServiceArgs
                    {
                        Id = pagerduty_service.Foo.Id,
                        Type = pagerduty_service.Foo.Type,
                    },
                },
            },
        });
    
        var bar = new Pagerduty.ServiceDependency("bar", new()
        {
            Dependency = new Pagerduty.Inputs.ServiceDependencyDependencyArgs
            {
                DependentServices = new[]
                {
                    new Pagerduty.Inputs.ServiceDependencyDependencyDependentServiceArgs
                    {
                        Id = pagerduty_business_service.Foo.Id,
                        Type = pagerduty_business_service.Foo.Type,
                    },
                },
                SupportingServices = new[]
                {
                    new Pagerduty.Inputs.ServiceDependencyDependencySupportingServiceArgs
                    {
                        Id = pagerduty_service.Two.Id,
                        Type = pagerduty_service.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(pagerduty_business_service.foo().id())
                        .type(pagerduty_business_service.foo().type())
                        .build())
                    .supportingServices(ServiceDependencyDependencySupportingServiceArgs.builder()
                        .id(pagerduty_service.foo().id())
                        .type(pagerduty_service.foo().type())
                        .build())
                    .build())
                .build());
    
            var bar = new ServiceDependency("bar", ServiceDependencyArgs.builder()        
                .dependency(ServiceDependencyDependencyArgs.builder()
                    .dependentServices(ServiceDependencyDependencyDependentServiceArgs.builder()
                        .id(pagerduty_business_service.foo().id())
                        .type(pagerduty_business_service.foo().type())
                        .build())
                    .supportingServices(ServiceDependencyDependencySupportingServiceArgs.builder()
                        .id(pagerduty_service.two().id())
                        .type(pagerduty_service.two().type())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      foo:
        type: pagerduty:ServiceDependency
        properties:
          dependency:
            dependentServices:
              - id: ${pagerduty_business_service.foo.id}
                type: ${pagerduty_business_service.foo.type}
            supportingServices:
              - id: ${pagerduty_service.foo.id}
                type: ${pagerduty_service.foo.type}
      bar:
        type: pagerduty:ServiceDependency
        properties:
          dependency:
            dependentServices:
              - id: ${pagerduty_business_service.foo.id}
                type: ${pagerduty_business_service.foo.type}
            supportingServices:
              - id: ${pagerduty_service.two.id}
                type: ${pagerduty_service.two.type}
    

    Create ServiceDependency Resource

    new ServiceDependency(name: string, args: ServiceDependencyArgs, opts?: CustomResourceOptions);
    @overload
    def ServiceDependency(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          dependency: Optional[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)
    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.
    
    
    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.

    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
    

    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.10.1 published on Wednesday, Mar 27, 2024 by Pulumi