Sha256: 9fbe1b26f5acb69413eacaa47cc4c78134fce6c1661f9c21aa380952bdbb7fe9
Contents?: true
Size: 1.65 KB
Versions: 1
Compression:
Stored size: 1.65 KB
Contents
# Create or update service definition returns "CREATED" response require "datadog_api_client" api_instance = DatadogAPIClient::V2::ServiceDefinitionAPI.new body = DatadogAPIClient::V2::ServiceDefinitionV2Dot2.new({ application: "my-app", contacts: [ DatadogAPIClient::V2::ServiceDefinitionV2Dot2Contact.new({ contact: "https://teams.microsoft.com/myteam", name: "My team channel", type: "slack", }), ], dd_service: "my-service", description: "My service description", extensions: { "myorg/extension": "extensionValue", }, integrations: DatadogAPIClient::V2::ServiceDefinitionV2Dot2Integrations.new({ opsgenie: DatadogAPIClient::V2::ServiceDefinitionV2Dot2Opsgenie.new({ region: DatadogAPIClient::V2::ServiceDefinitionV2Dot2OpsgenieRegion::US, service_url: "https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000", }), pagerduty: DatadogAPIClient::V2::ServiceDefinitionV2Dot2Pagerduty.new({ service_url: "https://my-org.pagerduty.com/service-directory/PMyService", }), }), langauges: [ "dotnet", "go", "java", "js", "php", "python", "ruby", "c++", ], lifecycle: "sandbox", links: [ DatadogAPIClient::V2::ServiceDefinitionV2Dot2Link.new({ name: "Runbook", provider: "Github", type: "runbook", url: "https://my-runbook", }), ], schema_version: DatadogAPIClient::V2::ServiceDefinitionV2Dot2Version::V2_2, tags: [ "my:tag", "service:tag", ], team: "my-team", tier: "High", type: DatadogAPIClient::V2::ServiceDefinitionV2Dot2Type::WEB, }) p api_instance.create_or_update_service_definitions(body)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
datadog_api_client-2.16.0 | examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb |