1. Packages
  2. Datadog Provider
  3. API Docs
  4. ServiceDefinitionYaml
Datadog v4.33.2 published on Tuesday, Sep 24, 2024 by Pulumi

datadog.ServiceDefinitionYaml

Explore with Pulumi AI

datadog logo
Datadog v4.33.2 published on Tuesday, Sep 24, 2024 by Pulumi

    Provides a Datadog service definition resource. This can be used to create and manage Datadog service definitions in the service catalog using the YAML/JSON definition.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as datadog from "@pulumi/datadog";
    
    // Service Definition with v2.2 Schema Definition
    const serviceDefinitionV22 = new datadog.ServiceDefinitionYaml("service_definition_v2_2", {serviceDefinition: `schema-version: v2.2
    dd-service: shopping-cart
    team: e-commerce-team
    contacts:
      - name: Support Email
        type: email
        contact: team@shopping.com
      - name: Support Slack
        type: slack
        contact: https://www.slack.com/archives/shopping-cart
    description: shopping cart service responsible for managing shopping carts
    tier: high
    lifecycle: production
    application: e-commerce
    languages: 
      - go
      - python
    type: web 
    ci-pipeline-fingerprints:
      - fp1 
      - fp2 
    links:
      - name: shopping-cart runbook
        type: runbook
        url: https://runbook/shopping-cart
      - name: shopping-cart architecture
        type: doc
        provider: gdoc
        url: https://google.drive/shopping-cart-architecture
      - name: shopping-cart service Wiki
        type: doc
        provider: wiki
        url: https://wiki/shopping-cart
      - name: shopping-cart source code
        type: repo
        provider: github
        url: http://github/shopping-cart
    tags:
      - business-unit:retail
      - cost-center:engineering
    integrations:
      pagerduty: 
        service-url: https://www.pagerduty.com/service-directory/Pshopping-cart
    extensions:
      mycompany.com/shopping-cart:
        customField: customValue
    `});
    // Service Definition with v2.1 Schema Definition
    const serviceDefinitionV21 = new datadog.ServiceDefinitionYaml("service_definition_v2_1", {serviceDefinition: `schema-version: v2.1
    dd-service: shopping-cart
    team: e-commerce-team
    contacts:
      - name: Support Email
        type: email
        contact: team@shopping.com
      - name: Support Slack
        type: slack
        contact: https://www.slack.com/archives/shopping-cart
    description: shopping cart service responsible for managing shopping carts
    tier: high
    lifecycle: production
    application: e-commerce
    links:
      - name: shopping-cart runbook
        type: runbook
        url: https://runbook/shopping-cart
      - name: shopping-cart architecture
        type: doc
        provider: gdoc
        url: https://google.drive/shopping-cart-architecture
      - name: shopping-cart service Wiki
        type: doc
        provider: wiki
        url: https://wiki/shopping-cart
      - name: shopping-cart source code
        type: repo
        provider: github
        url: http://github/shopping-cart
    tags:
      - business-unit:retail
      - cost-center:engineering
    integrations:
      pagerduty: 
        service-url: https://www.pagerduty.com/service-directory/Pshopping-cart
    extensions:
      mycompany.com/shopping-cart:
        customField: customValue
    `});
    // Service Definition with v2 Schema Definition
    const serviceDefinitionV2 = new datadog.ServiceDefinitionYaml("service_definition_v2", {serviceDefinition: `schema-version: v2
    dd-service: shopping-cart
    team: E Commerce
    contacts:
      - name: Support Email
        type: email
        contact: team@shopping.com
      - name: Support Slack
        type: slack
        contact: https://www.slack.com/archives/shopping-cart
    repos:
      - name: shopping-cart source code
        provider: github
        url: http://github/shopping-cart
    docs:
      - name: shopping-cart architecture
        provider: gdoc
        url: https://google.drive/shopping-cart-architecture
      - name: shopping-cart service Wiki
        provider: wiki
        url: https://wiki/shopping-cart
    links:
      - name: shopping-cart runbook
        type: runbook
        url: https://runbook/shopping-cart
    tags:
      - business-unit:retail
      - cost-center:engineering
    integrations:
      pagerduty: https://www.pagerduty.com/service-directory/Pshopping-cart
    extensions:
      datadoghq.com/shopping-cart:
        customField: customValue
    `});
    // Service Definition with backstage.io Schema
    const serviceDefinitionBackstage = new datadog.ServiceDefinitionYaml("service_definition_backstage", {serviceDefinition: `apiVersion: backstage.io/v1alpha1
    kind: Component
    metadata:
      annotations:
        backstage.io/techdocs-ref: http://a/b/c
        some.annotation: value
      namespace: default
      name: shopping-cart
      title: Shopping Cart
      description: A shopping cart service
      tags: ["taga:valuea", "tagb:valueb"]
      links:
        - title: Wiki
          url: https://wiki/shopping-cart
          icon: help
      ignore-attribute:
        id: 1
        value: "value"
    spec:
      type: service
      lifecycle: production
      owner: e-commerce
      system: retail
    `});
    
    import pulumi
    import pulumi_datadog as datadog
    
    # Service Definition with v2.2 Schema Definition
    service_definition_v22 = datadog.ServiceDefinitionYaml("service_definition_v2_2", service_definition="""schema-version: v2.2
    dd-service: shopping-cart
    team: e-commerce-team
    contacts:
      - name: Support Email
        type: email
        contact: team@shopping.com
      - name: Support Slack
        type: slack
        contact: https://www.slack.com/archives/shopping-cart
    description: shopping cart service responsible for managing shopping carts
    tier: high
    lifecycle: production
    application: e-commerce
    languages: 
      - go
      - python
    type: web 
    ci-pipeline-fingerprints:
      - fp1 
      - fp2 
    links:
      - name: shopping-cart runbook
        type: runbook
        url: https://runbook/shopping-cart
      - name: shopping-cart architecture
        type: doc
        provider: gdoc
        url: https://google.drive/shopping-cart-architecture
      - name: shopping-cart service Wiki
        type: doc
        provider: wiki
        url: https://wiki/shopping-cart
      - name: shopping-cart source code
        type: repo
        provider: github
        url: http://github/shopping-cart
    tags:
      - business-unit:retail
      - cost-center:engineering
    integrations:
      pagerduty: 
        service-url: https://www.pagerduty.com/service-directory/Pshopping-cart
    extensions:
      mycompany.com/shopping-cart:
        customField: customValue
    """)
    # Service Definition with v2.1 Schema Definition
    service_definition_v21 = datadog.ServiceDefinitionYaml("service_definition_v2_1", service_definition="""schema-version: v2.1
    dd-service: shopping-cart
    team: e-commerce-team
    contacts:
      - name: Support Email
        type: email
        contact: team@shopping.com
      - name: Support Slack
        type: slack
        contact: https://www.slack.com/archives/shopping-cart
    description: shopping cart service responsible for managing shopping carts
    tier: high
    lifecycle: production
    application: e-commerce
    links:
      - name: shopping-cart runbook
        type: runbook
        url: https://runbook/shopping-cart
      - name: shopping-cart architecture
        type: doc
        provider: gdoc
        url: https://google.drive/shopping-cart-architecture
      - name: shopping-cart service Wiki
        type: doc
        provider: wiki
        url: https://wiki/shopping-cart
      - name: shopping-cart source code
        type: repo
        provider: github
        url: http://github/shopping-cart
    tags:
      - business-unit:retail
      - cost-center:engineering
    integrations:
      pagerduty: 
        service-url: https://www.pagerduty.com/service-directory/Pshopping-cart
    extensions:
      mycompany.com/shopping-cart:
        customField: customValue
    """)
    # Service Definition with v2 Schema Definition
    service_definition_v2 = datadog.ServiceDefinitionYaml("service_definition_v2", service_definition="""schema-version: v2
    dd-service: shopping-cart
    team: E Commerce
    contacts:
      - name: Support Email
        type: email
        contact: team@shopping.com
      - name: Support Slack
        type: slack
        contact: https://www.slack.com/archives/shopping-cart
    repos:
      - name: shopping-cart source code
        provider: github
        url: http://github/shopping-cart
    docs:
      - name: shopping-cart architecture
        provider: gdoc
        url: https://google.drive/shopping-cart-architecture
      - name: shopping-cart service Wiki
        provider: wiki
        url: https://wiki/shopping-cart
    links:
      - name: shopping-cart runbook
        type: runbook
        url: https://runbook/shopping-cart
    tags:
      - business-unit:retail
      - cost-center:engineering
    integrations:
      pagerduty: https://www.pagerduty.com/service-directory/Pshopping-cart
    extensions:
      datadoghq.com/shopping-cart:
        customField: customValue
    """)
    # Service Definition with backstage.io Schema
    service_definition_backstage = datadog.ServiceDefinitionYaml("service_definition_backstage", service_definition="""apiVersion: backstage.io/v1alpha1
    kind: Component
    metadata:
      annotations:
        backstage.io/techdocs-ref: http://a/b/c
        some.annotation: value
      namespace: default
      name: shopping-cart
      title: Shopping Cart
      description: A shopping cart service
      tags: ["taga:valuea", "tagb:valueb"]
      links:
        - title: Wiki
          url: https://wiki/shopping-cart
          icon: help
      ignore-attribute:
        id: 1
        value: "value"
    spec:
      type: service
      lifecycle: production
      owner: e-commerce
      system: retail
    """)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-datadog/sdk/v4/go/datadog"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Service Definition with v2.2 Schema Definition
    		_, err := datadog.NewServiceDefinitionYaml(ctx, "service_definition_v2_2", &datadog.ServiceDefinitionYamlArgs{
    			ServiceDefinition: pulumi.String(`schema-version: v2.2
    dd-service: shopping-cart
    team: e-commerce-team
    contacts:
      - name: Support Email
        type: email
        contact: team@shopping.com
      - name: Support Slack
        type: slack
        contact: https://www.slack.com/archives/shopping-cart
    description: shopping cart service responsible for managing shopping carts
    tier: high
    lifecycle: production
    application: e-commerce
    languages: 
      - go
      - python
    type: web 
    ci-pipeline-fingerprints:
      - fp1 
      - fp2 
    links:
      - name: shopping-cart runbook
        type: runbook
        url: https://runbook/shopping-cart
      - name: shopping-cart architecture
        type: doc
        provider: gdoc
        url: https://google.drive/shopping-cart-architecture
      - name: shopping-cart service Wiki
        type: doc
        provider: wiki
        url: https://wiki/shopping-cart
      - name: shopping-cart source code
        type: repo
        provider: github
        url: http://github/shopping-cart
    tags:
      - business-unit:retail
      - cost-center:engineering
    integrations:
      pagerduty: 
        service-url: https://www.pagerduty.com/service-directory/Pshopping-cart
    extensions:
      mycompany.com/shopping-cart:
        customField: customValue
    `),
    		})
    		if err != nil {
    			return err
    		}
    		// Service Definition with v2.1 Schema Definition
    		_, err = datadog.NewServiceDefinitionYaml(ctx, "service_definition_v2_1", &datadog.ServiceDefinitionYamlArgs{
    			ServiceDefinition: pulumi.String(`schema-version: v2.1
    dd-service: shopping-cart
    team: e-commerce-team
    contacts:
      - name: Support Email
        type: email
        contact: team@shopping.com
      - name: Support Slack
        type: slack
        contact: https://www.slack.com/archives/shopping-cart
    description: shopping cart service responsible for managing shopping carts
    tier: high
    lifecycle: production
    application: e-commerce
    links:
      - name: shopping-cart runbook
        type: runbook
        url: https://runbook/shopping-cart
      - name: shopping-cart architecture
        type: doc
        provider: gdoc
        url: https://google.drive/shopping-cart-architecture
      - name: shopping-cart service Wiki
        type: doc
        provider: wiki
        url: https://wiki/shopping-cart
      - name: shopping-cart source code
        type: repo
        provider: github
        url: http://github/shopping-cart
    tags:
      - business-unit:retail
      - cost-center:engineering
    integrations:
      pagerduty: 
        service-url: https://www.pagerduty.com/service-directory/Pshopping-cart
    extensions:
      mycompany.com/shopping-cart:
        customField: customValue
    `),
    		})
    		if err != nil {
    			return err
    		}
    		// Service Definition with v2 Schema Definition
    		_, err = datadog.NewServiceDefinitionYaml(ctx, "service_definition_v2", &datadog.ServiceDefinitionYamlArgs{
    			ServiceDefinition: pulumi.String(`schema-version: v2
    dd-service: shopping-cart
    team: E Commerce
    contacts:
      - name: Support Email
        type: email
        contact: team@shopping.com
      - name: Support Slack
        type: slack
        contact: https://www.slack.com/archives/shopping-cart
    repos:
      - name: shopping-cart source code
        provider: github
        url: http://github/shopping-cart
    docs:
      - name: shopping-cart architecture
        provider: gdoc
        url: https://google.drive/shopping-cart-architecture
      - name: shopping-cart service Wiki
        provider: wiki
        url: https://wiki/shopping-cart
    links:
      - name: shopping-cart runbook
        type: runbook
        url: https://runbook/shopping-cart
    tags:
      - business-unit:retail
      - cost-center:engineering
    integrations:
      pagerduty: https://www.pagerduty.com/service-directory/Pshopping-cart
    extensions:
      datadoghq.com/shopping-cart:
        customField: customValue
    `),
    		})
    		if err != nil {
    			return err
    		}
    		// Service Definition with backstage.io Schema
    		_, err = datadog.NewServiceDefinitionYaml(ctx, "service_definition_backstage", &datadog.ServiceDefinitionYamlArgs{
    			ServiceDefinition: pulumi.String(`apiVersion: backstage.io/v1alpha1
    kind: Component
    metadata:
      annotations:
        backstage.io/techdocs-ref: http://a/b/c
        some.annotation: value
      namespace: default
      name: shopping-cart
      title: Shopping Cart
      description: A shopping cart service
      tags: ["taga:valuea", "tagb:valueb"]
      links:
        - title: Wiki
          url: https://wiki/shopping-cart
          icon: help
      ignore-attribute:
        id: 1
        value: "value"
    spec:
      type: service
      lifecycle: production
      owner: e-commerce
      system: retail
    `),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Datadog = Pulumi.Datadog;
    
    return await Deployment.RunAsync(() => 
    {
        // Service Definition with v2.2 Schema Definition
        var serviceDefinitionV22 = new Datadog.ServiceDefinitionYaml("service_definition_v2_2", new()
        {
            ServiceDefinition = @"schema-version: v2.2
    dd-service: shopping-cart
    team: e-commerce-team
    contacts:
      - name: Support Email
        type: email
        contact: team@shopping.com
      - name: Support Slack
        type: slack
        contact: https://www.slack.com/archives/shopping-cart
    description: shopping cart service responsible for managing shopping carts
    tier: high
    lifecycle: production
    application: e-commerce
    languages: 
      - go
      - python
    type: web 
    ci-pipeline-fingerprints:
      - fp1 
      - fp2 
    links:
      - name: shopping-cart runbook
        type: runbook
        url: https://runbook/shopping-cart
      - name: shopping-cart architecture
        type: doc
        provider: gdoc
        url: https://google.drive/shopping-cart-architecture
      - name: shopping-cart service Wiki
        type: doc
        provider: wiki
        url: https://wiki/shopping-cart
      - name: shopping-cart source code
        type: repo
        provider: github
        url: http://github/shopping-cart
    tags:
      - business-unit:retail
      - cost-center:engineering
    integrations:
      pagerduty: 
        service-url: https://www.pagerduty.com/service-directory/Pshopping-cart
    extensions:
      mycompany.com/shopping-cart:
        customField: customValue
    ",
        });
    
        // Service Definition with v2.1 Schema Definition
        var serviceDefinitionV21 = new Datadog.ServiceDefinitionYaml("service_definition_v2_1", new()
        {
            ServiceDefinition = @"schema-version: v2.1
    dd-service: shopping-cart
    team: e-commerce-team
    contacts:
      - name: Support Email
        type: email
        contact: team@shopping.com
      - name: Support Slack
        type: slack
        contact: https://www.slack.com/archives/shopping-cart
    description: shopping cart service responsible for managing shopping carts
    tier: high
    lifecycle: production
    application: e-commerce
    links:
      - name: shopping-cart runbook
        type: runbook
        url: https://runbook/shopping-cart
      - name: shopping-cart architecture
        type: doc
        provider: gdoc
        url: https://google.drive/shopping-cart-architecture
      - name: shopping-cart service Wiki
        type: doc
        provider: wiki
        url: https://wiki/shopping-cart
      - name: shopping-cart source code
        type: repo
        provider: github
        url: http://github/shopping-cart
    tags:
      - business-unit:retail
      - cost-center:engineering
    integrations:
      pagerduty: 
        service-url: https://www.pagerduty.com/service-directory/Pshopping-cart
    extensions:
      mycompany.com/shopping-cart:
        customField: customValue
    ",
        });
    
        // Service Definition with v2 Schema Definition
        var serviceDefinitionV2 = new Datadog.ServiceDefinitionYaml("service_definition_v2", new()
        {
            ServiceDefinition = @"schema-version: v2
    dd-service: shopping-cart
    team: E Commerce
    contacts:
      - name: Support Email
        type: email
        contact: team@shopping.com
      - name: Support Slack
        type: slack
        contact: https://www.slack.com/archives/shopping-cart
    repos:
      - name: shopping-cart source code
        provider: github
        url: http://github/shopping-cart
    docs:
      - name: shopping-cart architecture
        provider: gdoc
        url: https://google.drive/shopping-cart-architecture
      - name: shopping-cart service Wiki
        provider: wiki
        url: https://wiki/shopping-cart
    links:
      - name: shopping-cart runbook
        type: runbook
        url: https://runbook/shopping-cart
    tags:
      - business-unit:retail
      - cost-center:engineering
    integrations:
      pagerduty: https://www.pagerduty.com/service-directory/Pshopping-cart
    extensions:
      datadoghq.com/shopping-cart:
        customField: customValue
    ",
        });
    
        // Service Definition with backstage.io Schema
        var serviceDefinitionBackstage = new Datadog.ServiceDefinitionYaml("service_definition_backstage", new()
        {
            ServiceDefinition = @"apiVersion: backstage.io/v1alpha1
    kind: Component
    metadata:
      annotations:
        backstage.io/techdocs-ref: http://a/b/c
        some.annotation: value
      namespace: default
      name: shopping-cart
      title: Shopping Cart
      description: A shopping cart service
      tags: [""taga:valuea"", ""tagb:valueb""]
      links:
        - title: Wiki
          url: https://wiki/shopping-cart
          icon: help
      ignore-attribute:
        id: 1
        value: ""value""
    spec:
      type: service
      lifecycle: production
      owner: e-commerce
      system: retail
    ",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.datadog.ServiceDefinitionYaml;
    import com.pulumi.datadog.ServiceDefinitionYamlArgs;
    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) {
            // Service Definition with v2.2 Schema Definition
            var serviceDefinitionV22 = new ServiceDefinitionYaml("serviceDefinitionV22", ServiceDefinitionYamlArgs.builder()
                .serviceDefinition("""
    schema-version: v2.2
    dd-service: shopping-cart
    team: e-commerce-team
    contacts:
      - name: Support Email
        type: email
        contact: team@shopping.com
      - name: Support Slack
        type: slack
        contact: https://www.slack.com/archives/shopping-cart
    description: shopping cart service responsible for managing shopping carts
    tier: high
    lifecycle: production
    application: e-commerce
    languages: 
      - go
      - python
    type: web 
    ci-pipeline-fingerprints:
      - fp1 
      - fp2 
    links:
      - name: shopping-cart runbook
        type: runbook
        url: https://runbook/shopping-cart
      - name: shopping-cart architecture
        type: doc
        provider: gdoc
        url: https://google.drive/shopping-cart-architecture
      - name: shopping-cart service Wiki
        type: doc
        provider: wiki
        url: https://wiki/shopping-cart
      - name: shopping-cart source code
        type: repo
        provider: github
        url: http://github/shopping-cart
    tags:
      - business-unit:retail
      - cost-center:engineering
    integrations:
      pagerduty: 
        service-url: https://www.pagerduty.com/service-directory/Pshopping-cart
    extensions:
      mycompany.com/shopping-cart:
        customField: customValue
                """)
                .build());
    
            // Service Definition with v2.1 Schema Definition
            var serviceDefinitionV21 = new ServiceDefinitionYaml("serviceDefinitionV21", ServiceDefinitionYamlArgs.builder()
                .serviceDefinition("""
    schema-version: v2.1
    dd-service: shopping-cart
    team: e-commerce-team
    contacts:
      - name: Support Email
        type: email
        contact: team@shopping.com
      - name: Support Slack
        type: slack
        contact: https://www.slack.com/archives/shopping-cart
    description: shopping cart service responsible for managing shopping carts
    tier: high
    lifecycle: production
    application: e-commerce
    links:
      - name: shopping-cart runbook
        type: runbook
        url: https://runbook/shopping-cart
      - name: shopping-cart architecture
        type: doc
        provider: gdoc
        url: https://google.drive/shopping-cart-architecture
      - name: shopping-cart service Wiki
        type: doc
        provider: wiki
        url: https://wiki/shopping-cart
      - name: shopping-cart source code
        type: repo
        provider: github
        url: http://github/shopping-cart
    tags:
      - business-unit:retail
      - cost-center:engineering
    integrations:
      pagerduty: 
        service-url: https://www.pagerduty.com/service-directory/Pshopping-cart
    extensions:
      mycompany.com/shopping-cart:
        customField: customValue
                """)
                .build());
    
            // Service Definition with v2 Schema Definition
            var serviceDefinitionV2 = new ServiceDefinitionYaml("serviceDefinitionV2", ServiceDefinitionYamlArgs.builder()
                .serviceDefinition("""
    schema-version: v2
    dd-service: shopping-cart
    team: E Commerce
    contacts:
      - name: Support Email
        type: email
        contact: team@shopping.com
      - name: Support Slack
        type: slack
        contact: https://www.slack.com/archives/shopping-cart
    repos:
      - name: shopping-cart source code
        provider: github
        url: http://github/shopping-cart
    docs:
      - name: shopping-cart architecture
        provider: gdoc
        url: https://google.drive/shopping-cart-architecture
      - name: shopping-cart service Wiki
        provider: wiki
        url: https://wiki/shopping-cart
    links:
      - name: shopping-cart runbook
        type: runbook
        url: https://runbook/shopping-cart
    tags:
      - business-unit:retail
      - cost-center:engineering
    integrations:
      pagerduty: https://www.pagerduty.com/service-directory/Pshopping-cart
    extensions:
      datadoghq.com/shopping-cart:
        customField: customValue
                """)
                .build());
    
            // Service Definition with backstage.io Schema
            var serviceDefinitionBackstage = new ServiceDefinitionYaml("serviceDefinitionBackstage", ServiceDefinitionYamlArgs.builder()
                .serviceDefinition("""
    apiVersion: backstage.io/v1alpha1
    kind: Component
    metadata:
      annotations:
        backstage.io/techdocs-ref: http://a/b/c
        some.annotation: value
      namespace: default
      name: shopping-cart
      title: Shopping Cart
      description: A shopping cart service
      tags: ["taga:valuea", "tagb:valueb"]
      links:
        - title: Wiki
          url: https://wiki/shopping-cart
          icon: help
      ignore-attribute:
        id: 1
        value: "value"
    spec:
      type: service
      lifecycle: production
      owner: e-commerce
      system: retail
                """)
                .build());
    
        }
    }
    
    resources:
      # Service Definition with v2.2 Schema Definition
      serviceDefinitionV22:
        type: datadog:ServiceDefinitionYaml
        name: service_definition_v2_2
        properties:
          serviceDefinition: "schema-version: v2.2\ndd-service: shopping-cart\nteam: e-commerce-team\ncontacts:\n  - name: Support Email\n    type: email\n    contact: team@shopping.com\n  - name: Support Slack\n    type: slack\n    contact: https://www.slack.com/archives/shopping-cart\ndescription: shopping cart service responsible for managing shopping carts\ntier: high\nlifecycle: production\napplication: e-commerce\nlanguages: \n  - go\n  - python\ntype: web \nci-pipeline-fingerprints:\n  - fp1 \n  - fp2 \nlinks:\n  - name: shopping-cart runbook\n    type: runbook\n    url: https://runbook/shopping-cart\n  - name: shopping-cart architecture\n    type: doc\n    provider: gdoc\n    url: https://google.drive/shopping-cart-architecture\n  - name: shopping-cart service Wiki\n    type: doc\n    provider: wiki\n    url: https://wiki/shopping-cart\n  - name: shopping-cart source code\n    type: repo\n    provider: github\n    url: http://github/shopping-cart\ntags:\n  - business-unit:retail\n  - cost-center:engineering\nintegrations:\n  pagerduty: \n    service-url: https://www.pagerduty.com/service-directory/Pshopping-cart\nextensions:\n  mycompany.com/shopping-cart:\n    customField: customValue\n"
      # Service Definition with v2.1 Schema Definition
      serviceDefinitionV21:
        type: datadog:ServiceDefinitionYaml
        name: service_definition_v2_1
        properties:
          serviceDefinition: "schema-version: v2.1\ndd-service: shopping-cart\nteam: e-commerce-team\ncontacts:\n  - name: Support Email\n    type: email\n    contact: team@shopping.com\n  - name: Support Slack\n    type: slack\n    contact: https://www.slack.com/archives/shopping-cart\ndescription: shopping cart service responsible for managing shopping carts\ntier: high\nlifecycle: production\napplication: e-commerce\nlinks:\n  - name: shopping-cart runbook\n    type: runbook\n    url: https://runbook/shopping-cart\n  - name: shopping-cart architecture\n    type: doc\n    provider: gdoc\n    url: https://google.drive/shopping-cart-architecture\n  - name: shopping-cart service Wiki\n    type: doc\n    provider: wiki\n    url: https://wiki/shopping-cart\n  - name: shopping-cart source code\n    type: repo\n    provider: github\n    url: http://github/shopping-cart\ntags:\n  - business-unit:retail\n  - cost-center:engineering\nintegrations:\n  pagerduty: \n    service-url: https://www.pagerduty.com/service-directory/Pshopping-cart\nextensions:\n  mycompany.com/shopping-cart:\n    customField: customValue\n"
      # Service Definition with v2 Schema Definition
      serviceDefinitionV2:
        type: datadog:ServiceDefinitionYaml
        name: service_definition_v2
        properties:
          serviceDefinition: |
            schema-version: v2
            dd-service: shopping-cart
            team: E Commerce
            contacts:
              - name: Support Email
                type: email
                contact: team@shopping.com
              - name: Support Slack
                type: slack
                contact: https://www.slack.com/archives/shopping-cart
            repos:
              - name: shopping-cart source code
                provider: github
                url: http://github/shopping-cart
            docs:
              - name: shopping-cart architecture
                provider: gdoc
                url: https://google.drive/shopping-cart-architecture
              - name: shopping-cart service Wiki
                provider: wiki
                url: https://wiki/shopping-cart
            links:
              - name: shopping-cart runbook
                type: runbook
                url: https://runbook/shopping-cart
            tags:
              - business-unit:retail
              - cost-center:engineering
            integrations:
              pagerduty: https://www.pagerduty.com/service-directory/Pshopping-cart
            extensions:
              datadoghq.com/shopping-cart:
                customField: customValue        
      # Service Definition with backstage.io Schema
      serviceDefinitionBackstage:
        type: datadog:ServiceDefinitionYaml
        name: service_definition_backstage
        properties:
          serviceDefinition: |
            apiVersion: backstage.io/v1alpha1
            kind: Component
            metadata:
              annotations:
                backstage.io/techdocs-ref: http://a/b/c
                some.annotation: value
              namespace: default
              name: shopping-cart
              title: Shopping Cart
              description: A shopping cart service
              tags: ["taga:valuea", "tagb:valueb"]
              links:
                - title: Wiki
                  url: https://wiki/shopping-cart
                  icon: help
              ignore-attribute:
                id: 1
                value: "value"
            spec:
              type: service
              lifecycle: production
              owner: e-commerce
              system: retail        
    

    Create ServiceDefinitionYaml Resource

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

    Constructor syntax

    new ServiceDefinitionYaml(name: string, args: ServiceDefinitionYamlArgs, opts?: CustomResourceOptions);
    @overload
    def ServiceDefinitionYaml(resource_name: str,
                              args: ServiceDefinitionYamlArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServiceDefinitionYaml(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              service_definition: Optional[str] = None)
    func NewServiceDefinitionYaml(ctx *Context, name string, args ServiceDefinitionYamlArgs, opts ...ResourceOption) (*ServiceDefinitionYaml, error)
    public ServiceDefinitionYaml(string name, ServiceDefinitionYamlArgs args, CustomResourceOptions? opts = null)
    public ServiceDefinitionYaml(String name, ServiceDefinitionYamlArgs args)
    public ServiceDefinitionYaml(String name, ServiceDefinitionYamlArgs args, CustomResourceOptions options)
    
    type: datadog:ServiceDefinitionYaml
    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 ServiceDefinitionYamlArgs
    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 ServiceDefinitionYamlArgs
    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 ServiceDefinitionYamlArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServiceDefinitionYamlArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServiceDefinitionYamlArgs
    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 serviceDefinitionYamlResource = new Datadog.ServiceDefinitionYaml("serviceDefinitionYamlResource", new()
    {
        ServiceDefinition = "string",
    });
    
    example, err := datadog.NewServiceDefinitionYaml(ctx, "serviceDefinitionYamlResource", &datadog.ServiceDefinitionYamlArgs{
    	ServiceDefinition: pulumi.String("string"),
    })
    
    var serviceDefinitionYamlResource = new ServiceDefinitionYaml("serviceDefinitionYamlResource", ServiceDefinitionYamlArgs.builder()
        .serviceDefinition("string")
        .build());
    
    service_definition_yaml_resource = datadog.ServiceDefinitionYaml("serviceDefinitionYamlResource", service_definition="string")
    
    const serviceDefinitionYamlResource = new datadog.ServiceDefinitionYaml("serviceDefinitionYamlResource", {serviceDefinition: "string"});
    
    type: datadog:ServiceDefinitionYaml
    properties:
        serviceDefinition: string
    

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

    ServiceDefinition string
    The YAML/JSON formatted definition of the service
    ServiceDefinition string
    The YAML/JSON formatted definition of the service
    serviceDefinition String
    The YAML/JSON formatted definition of the service
    serviceDefinition string
    The YAML/JSON formatted definition of the service
    service_definition str
    The YAML/JSON formatted definition of the service
    serviceDefinition String
    The YAML/JSON formatted definition of the service

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ServiceDefinitionYaml 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 ServiceDefinitionYaml Resource

    Get an existing ServiceDefinitionYaml 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?: ServiceDefinitionYamlState, opts?: CustomResourceOptions): ServiceDefinitionYaml
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            service_definition: Optional[str] = None) -> ServiceDefinitionYaml
    func GetServiceDefinitionYaml(ctx *Context, name string, id IDInput, state *ServiceDefinitionYamlState, opts ...ResourceOption) (*ServiceDefinitionYaml, error)
    public static ServiceDefinitionYaml Get(string name, Input<string> id, ServiceDefinitionYamlState? state, CustomResourceOptions? opts = null)
    public static ServiceDefinitionYaml get(String name, Output<String> id, ServiceDefinitionYamlState 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:
    ServiceDefinition string
    The YAML/JSON formatted definition of the service
    ServiceDefinition string
    The YAML/JSON formatted definition of the service
    serviceDefinition String
    The YAML/JSON formatted definition of the service
    serviceDefinition string
    The YAML/JSON formatted definition of the service
    service_definition str
    The YAML/JSON formatted definition of the service
    serviceDefinition String
    The YAML/JSON formatted definition of the service

    Import

    $ pulumi import datadog:index/serviceDefinitionYaml:ServiceDefinitionYaml service_definition "<dd-service>"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Datadog pulumi/pulumi-datadog
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the datadog Terraform Provider.
    datadog logo
    Datadog v4.33.2 published on Tuesday, Sep 24, 2024 by Pulumi