"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ServiceDefinitionYaml = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("./utilities"));
/**
 * 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
 *
 * ```typescript
 * 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
 *
 * The `pulumi import` command can be used, for example:
 *
 * ```sh
 * $ pulumi import datadog:index/serviceDefinitionYaml:ServiceDefinitionYaml service_definition "<dd-service>"
 * ```
 */
class ServiceDefinitionYaml extends pulumi.CustomResource {
    /**
     * Get an existing ServiceDefinitionYaml resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param state Any extra arguments used during the lookup.
     * @param opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name, id, state, opts) {
        return new ServiceDefinitionYaml(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'datadog:index/serviceDefinitionYaml:ServiceDefinitionYaml';
    /**
     * Returns true if the given object is an instance of ServiceDefinitionYaml.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    static isInstance(obj) {
        if (obj === undefined || obj === null) {
            return false;
        }
        return obj['__pulumiType'] === ServiceDefinitionYaml.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["serviceDefinition"] = state?.serviceDefinition;
        }
        else {
            const args = argsOrState;
            if (args?.serviceDefinition === undefined && !opts.urn) {
                throw new Error("Missing required property 'serviceDefinition'");
            }
            resourceInputs["serviceDefinition"] = args?.serviceDefinition;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(ServiceDefinitionYaml.__pulumiType, name, resourceInputs, opts);
    }
}
exports.ServiceDefinitionYaml = ServiceDefinitionYaml;
//# sourceMappingURL=serviceDefinitionYaml.js.map