PagerDuty インテグレーション

Datadog-PagerDuty インテグレーションを Datadog API を介して直接構成します。

POST https://api.ap1.datadoghq.com/api/v1/integration/pagerduty/configuration/serviceshttps://api.datadoghq.eu/api/v1/integration/pagerduty/configuration/serviceshttps://api.ddog-gov.com/api/v1/integration/pagerduty/configuration/serviceshttps://api.datadoghq.com/api/v1/integration/pagerduty/configuration/serviceshttps://api.us3.datadoghq.com/api/v1/integration/pagerduty/configuration/serviceshttps://api.us5.datadoghq.com/api/v1/integration/pagerduty/configuration/services

概要

PagerDuty インテグレーションに新しいサービスオブジェクトを作成します。 This endpoint requires the manage_integrations permission.

リクエスト

Body Data (required)

新しいサービスオブジェクトのリクエスト本文を作成します。

Expand All

フィールド

種類

説明

service_key [required]

string

Your service key in PagerDuty.

service_name [required]

string

Your service name associated with a service key in PagerDuty.

{
  "service_key": "",
  "service_name": ""
}

応答

OK

PagerDuty service object name.

Expand All

フィールド

種類

説明

service_name [required]

string

Your service name associated service key in PagerDuty.

{
  "service_name": ""
}

Bad Request

Error response object.

Expand All

フィールド

種類

説明

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Authentication error

Error response object.

Expand All

フィールド

種類

説明

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

Error response object.

Expand All

フィールド

種類

説明

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

コード例

// Create a new service object returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_pager_duty_integration::PagerDutyIntegrationAPI;
use datadog_api_client::datadogV1::model::PagerDutyService;

#[tokio::main]
async fn main() {
    let body = PagerDutyService::new("".to_string(), "".to_string());
    let configuration = datadog::Configuration::new();
    let api = PagerDutyIntegrationAPI::with_config(configuration);
    let resp = api.create_pager_duty_integration_service(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}

Instructions

First install the library and its dependencies and then save the example to src/main.rs and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo run

GET https://api.ap1.datadoghq.com/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.datadoghq.eu/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.ddog-gov.com/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.datadoghq.com/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.us3.datadoghq.com/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.us5.datadoghq.com/api/v1/integration/pagerduty/configuration/services/{service_name}

概要

Datadog-PagerDuty インテグレーションのサービス名を取得します。 This endpoint requires the integrations_read permission.

引数

パスパラメーター

名前

種類

説明

service_name [required]

string

The service name.

応答

OK

PagerDuty service object name.

Expand All

フィールド

種類

説明

service_name [required]

string

Your service name associated service key in PagerDuty.

{
  "service_name": ""
}

Authentication error

Error response object.

Expand All

フィールド

種類

説明

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Item Not Found

Error response object.

Expand All

フィールド

種類

説明

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

Error response object.

Expand All

フィールド

種類

説明

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

コード例

// Get a single service object returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_pager_duty_integration::PagerDutyIntegrationAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = PagerDutyIntegrationAPI::with_config(configuration);
    let resp = api
        .get_pager_duty_integration_service("service_name".to_string())
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}

Instructions

First install the library and its dependencies and then save the example to src/main.rs and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo run

PUT https://api.ap1.datadoghq.com/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.datadoghq.eu/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.ddog-gov.com/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.datadoghq.com/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.us3.datadoghq.com/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.us5.datadoghq.com/api/v1/integration/pagerduty/configuration/services/{service_name}

概要

Datadog-PagerDuty インテグレーションの単一のサービスオブジェクトを更新します。 This endpoint requires the manage_integrations permission.

引数

パスパラメーター

名前

種類

説明

service_name [required]

string

The service name

リクエスト

Body Data (required)

既存サービスオブジェクトのリクエスト本文を更新します。

Expand All

フィールド

種類

説明

service_key [required]

string

Your service key in PagerDuty.

{
  "service_key": ""
}

応答

OK

Bad Request

Error response object.

Expand All

フィールド

種類

説明

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Authentication error

Error response object.

Expand All

フィールド

種類

説明

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Item Not Found

Error response object.

Expand All

フィールド

種類

説明

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

Error response object.

Expand All

フィールド

種類

説明

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

コード例

// Update a single service object returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_pager_duty_integration::PagerDutyIntegrationAPI;
use datadog_api_client::datadogV1::model::PagerDutyServiceKey;

#[tokio::main]
async fn main() {
    let body = PagerDutyServiceKey::new("".to_string());
    let configuration = datadog::Configuration::new();
    let api = PagerDutyIntegrationAPI::with_config(configuration);
    let resp = api
        .update_pager_duty_integration_service("service_name".to_string(), body)
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}

Instructions

First install the library and its dependencies and then save the example to src/main.rs and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo run

DELETE https://api.ap1.datadoghq.com/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.datadoghq.eu/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.ddog-gov.com/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.datadoghq.com/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.us3.datadoghq.com/api/v1/integration/pagerduty/configuration/services/{service_name}https://api.us5.datadoghq.com/api/v1/integration/pagerduty/configuration/services/{service_name}

概要

Datadog-PagerDuty インテグレーションの単一のサービスオブジェクトを削除します。 This endpoint requires the manage_integrations permission.

引数

パスパラメーター

名前

種類

説明

service_name [required]

string

The service name

応答

No Content

Authentication error

Error response object.

Expand All

フィールド

種類

説明

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Item Not Found

Error response object.

Expand All

フィールド

種類

説明

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

Error response object.

Expand All

フィールド

種類

説明

errors [required]

[string]

Array of errors returned by the API.

{
  "errors": [
    "Bad Request"
  ]
}

コード例

// Delete a single service object returns "No Content" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_pager_duty_integration::PagerDutyIntegrationAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = PagerDutyIntegrationAPI::with_config(configuration);
    let resp = api
        .delete_pager_duty_integration_service("service_name".to_string())
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}

Instructions

First install the library and its dependencies and then save the example to src/main.rs and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo run

PREVIEWING: watson/nodejs-docs-update