Sha256: beff8be1b88fa558a0eee25baa882f16260aeb4b433c4bfb2ab001a0719f2356

Contents?: true

Size: 755 Bytes

Versions: 2

Compression:

Stored size: 755 Bytes

Contents

# Create an incident type returns "CREATED" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
  config.unstable_operations["v2.create_incident_type".to_sym] = true
end
api_instance = DatadogAPIClient::V2::IncidentsAPI.new

body = DatadogAPIClient::V2::IncidentTypeCreateRequest.new({
  data: DatadogAPIClient::V2::IncidentTypeCreateData.new({
    attributes: DatadogAPIClient::V2::IncidentTypeAttributes.new({
      description: "Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.",
      is_default: false,
      name: "Security Incident",
    }),
    type: DatadogAPIClient::V2::IncidentTypeType::INCIDENT_TYPES,
  }),
})
p api_instance.create_incident_type(body)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
datadog_api_client-2.29.1 examples/v2/incidents/CreateIncidentType.rb
datadog_api_client-2.28.1 examples/v2/incidents/CreateIncidentType.rb