Fastly Integration

Manage your Datadog Fastly integration accounts and services directly through the Datadog API. See the Fastly integration page for more information.

GET https://api.ap1.datadoghq.com/api/v2/integrations/fastly/accountshttps://api.datadoghq.eu/api/v2/integrations/fastly/accountshttps://api.ddog-gov.com/api/v2/integrations/fastly/accountshttps://api.datadoghq.com/api/v2/integrations/fastly/accountshttps://api.us3.datadoghq.com/api/v2/integrations/fastly/accountshttps://api.us5.datadoghq.com/api/v2/integrations/fastly/accounts

概要

List Fastly accounts. This endpoint requires the integrations_read permission.

応答

OK

The expected response schema when getting Fastly accounts.

Expand All

フィールド

種類

説明

data

[object]

The JSON:API data schema.

attributes [required]

object

Attributes object of a Fastly account.

name [required]

string

The name of the Fastly account.

services

[object]

A list of services belonging to the parent account.

id [required]

string

The ID of the Fastly service

tags

[string]

A list of tags for the Fastly service.

id [required]

string

The ID of the Fastly account, a hash of the account name.

type [required]

enum

The JSON:API type for this API. Should always be fastly-accounts. Allowed enum values: fastly-accounts

default: fastly-accounts

{
  "data": [
    {
      "attributes": {
        "name": "test-name",
        "services": [
          {
            "id": "6abc7de6893AbcDe9fghIj",
            "tags": [
              "myTag",
              "myTag2:myValue"
            ]
          }
        ]
      },
      "id": "abc123",
      "type": "fastly-accounts"
    }
  ]
}

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

// List Fastly accounts returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewFastlyIntegrationApi(apiClient)
	resp, r, err := api.ListFastlyAccounts(ctx)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `FastlyIntegrationApi.ListFastlyAccounts`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `FastlyIntegrationApi.ListFastlyAccounts`:\n%s\n", responseContent)
}

Instructions

First install the library and its dependencies and then save the example to main.go 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>" go run "main.go"

POST https://api.ap1.datadoghq.com/api/v2/integrations/fastly/accountshttps://api.datadoghq.eu/api/v2/integrations/fastly/accountshttps://api.ddog-gov.com/api/v2/integrations/fastly/accountshttps://api.datadoghq.com/api/v2/integrations/fastly/accountshttps://api.us3.datadoghq.com/api/v2/integrations/fastly/accountshttps://api.us5.datadoghq.com/api/v2/integrations/fastly/accounts

概要

Create a Fastly account. This endpoint requires the manage_integrations permission.

リクエスト

Body Data (required)

Expand All

フィールド

種類

説明

data [required]

object

Data object for creating a Fastly account.

attributes [required]

object

Attributes object for creating a Fastly account.

api_key [required]

string

The API key for the Fastly account.

name [required]

string

The name of the Fastly account.

services

[object]

A list of services belonging to the parent account.

id [required]

string

The ID of the Fastly service

tags

[string]

A list of tags for the Fastly service.

type [required]

enum

The JSON:API type for this API. Should always be fastly-accounts. Allowed enum values: fastly-accounts

default: fastly-accounts

{
  "data": {
    "attributes": {
      "api_key": "ExampleFastlyIntegration",
      "name": "Example-Fastly-Integration",
      "services": []
    },
    "type": "fastly-accounts"
  }
}

応答

CREATED

The expected response schema when getting a Fastly account.

Expand All

フィールド

種類

説明

data

object

Data object of a Fastly account.

attributes [required]

object

Attributes object of a Fastly account.

name [required]

string

The name of the Fastly account.

services

[object]

A list of services belonging to the parent account.

id [required]

string

The ID of the Fastly service

tags

[string]

A list of tags for the Fastly service.

id [required]

string

The ID of the Fastly account, a hash of the account name.

type [required]

enum

The JSON:API type for this API. Should always be fastly-accounts. Allowed enum values: fastly-accounts

default: fastly-accounts

{
  "data": {
    "attributes": {
      "name": "test-name",
      "services": [
        {
          "id": "6abc7de6893AbcDe9fghIj",
          "tags": [
            "myTag",
            "myTag2:myValue"
          ]
        }
      ]
    },
    "id": "abc123",
    "type": "fastly-accounts"
  }
}

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

// Add Fastly account returns "CREATED" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	body := datadogV2.FastlyAccountCreateRequest{
		Data: datadogV2.FastlyAccountCreateRequestData{
			Attributes: datadogV2.FastlyAccountCreateRequestAttributes{
				ApiKey:   "ExampleFastlyIntegration",
				Name:     "Example-Fastly-Integration",
				Services: []datadogV2.FastlyService{},
			},
			Type: datadogV2.FASTLYACCOUNTTYPE_FASTLY_ACCOUNTS,
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewFastlyIntegrationApi(apiClient)
	resp, r, err := api.CreateFastlyAccount(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `FastlyIntegrationApi.CreateFastlyAccount`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `FastlyIntegrationApi.CreateFastlyAccount`:\n%s\n", responseContent)
}

Instructions

First install the library and its dependencies and then save the example to main.go 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>" go run "main.go"

GET https://api.ap1.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}https://api.datadoghq.eu/api/v2/integrations/fastly/accounts/{account_id}https://api.ddog-gov.com/api/v2/integrations/fastly/accounts/{account_id}https://api.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}https://api.us3.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}https://api.us5.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}

概要

Get a Fastly account. This endpoint requires the integrations_read permission.

引数

パスパラメーター

名前

種類

説明

account_id [required]

string

Fastly Account id.

応答

OK

The expected response schema when getting a Fastly account.

Expand All

フィールド

種類

説明

data

object

Data object of a Fastly account.

attributes [required]

object

Attributes object of a Fastly account.

name [required]

string

The name of the Fastly account.

services

[object]

A list of services belonging to the parent account.

id [required]

string

The ID of the Fastly service

tags

[string]

A list of tags for the Fastly service.

id [required]

string

The ID of the Fastly account, a hash of the account name.

type [required]

enum

The JSON:API type for this API. Should always be fastly-accounts. Allowed enum values: fastly-accounts

default: fastly-accounts

{
  "data": {
    "attributes": {
      "name": "test-name",
      "services": [
        {
          "id": "6abc7de6893AbcDe9fghIj",
          "tags": [
            "myTag",
            "myTag2:myValue"
          ]
        }
      ]
    },
    "id": "abc123",
    "type": "fastly-accounts"
  }
}

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

// Get Fastly account returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	// there is a valid "fastly_account" in the system
	FastlyAccountDataID := os.Getenv("FASTLY_ACCOUNT_DATA_ID")

	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewFastlyIntegrationApi(apiClient)
	resp, r, err := api.GetFastlyAccount(ctx, FastlyAccountDataID)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `FastlyIntegrationApi.GetFastlyAccount`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `FastlyIntegrationApi.GetFastlyAccount`:\n%s\n", responseContent)
}

Instructions

First install the library and its dependencies and then save the example to main.go 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>" go run "main.go"

PATCH https://api.ap1.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}https://api.datadoghq.eu/api/v2/integrations/fastly/accounts/{account_id}https://api.ddog-gov.com/api/v2/integrations/fastly/accounts/{account_id}https://api.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}https://api.us3.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}https://api.us5.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}

概要

Update a Fastly account. This endpoint requires the manage_integrations permission.

引数

パスパラメーター

名前

種類

説明

account_id [required]

string

Fastly Account id.

リクエスト

Body Data (required)

Expand All

フィールド

種類

説明

data [required]

object

Data object for updating a Fastly account.

attributes

object

Attributes object for updating a Fastly account.

api_key

string

The API key of the Fastly account.

name

string

The name of the Fastly account.

type

enum

The JSON:API type for this API. Should always be fastly-accounts. Allowed enum values: fastly-accounts

default: fastly-accounts

{
  "data": {
    "attributes": {
      "api_key": "update-secret"
    },
    "type": "fastly-accounts"
  }
}

応答

OK

The expected response schema when getting a Fastly account.

Expand All

フィールド

種類

説明

data

object

Data object of a Fastly account.

attributes [required]

object

Attributes object of a Fastly account.

name [required]

string

The name of the Fastly account.

services

[object]

A list of services belonging to the parent account.

id [required]

string

The ID of the Fastly service

tags

[string]

A list of tags for the Fastly service.

id [required]

string

The ID of the Fastly account, a hash of the account name.

type [required]

enum

The JSON:API type for this API. Should always be fastly-accounts. Allowed enum values: fastly-accounts

default: fastly-accounts

{
  "data": {
    "attributes": {
      "name": "test-name",
      "services": [
        {
          "id": "6abc7de6893AbcDe9fghIj",
          "tags": [
            "myTag",
            "myTag2:myValue"
          ]
        }
      ]
    },
    "id": "abc123",
    "type": "fastly-accounts"
  }
}

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

// Update Fastly account returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	// there is a valid "fastly_account" in the system
	FastlyAccountDataID := os.Getenv("FASTLY_ACCOUNT_DATA_ID")

	body := datadogV2.FastlyAccountUpdateRequest{
		Data: datadogV2.FastlyAccountUpdateRequestData{
			Attributes: &datadogV2.FastlyAccountUpdateRequestAttributes{
				ApiKey: datadog.PtrString("update-secret"),
			},
			Type: datadogV2.FASTLYACCOUNTTYPE_FASTLY_ACCOUNTS.Ptr(),
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewFastlyIntegrationApi(apiClient)
	resp, r, err := api.UpdateFastlyAccount(ctx, FastlyAccountDataID, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `FastlyIntegrationApi.UpdateFastlyAccount`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `FastlyIntegrationApi.UpdateFastlyAccount`:\n%s\n", responseContent)
}

Instructions

First install the library and its dependencies and then save the example to main.go 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>" go run "main.go"

DELETE https://api.ap1.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}https://api.datadoghq.eu/api/v2/integrations/fastly/accounts/{account_id}https://api.ddog-gov.com/api/v2/integrations/fastly/accounts/{account_id}https://api.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}https://api.us3.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}https://api.us5.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}

概要

Delete a Fastly account. This endpoint requires the manage_integrations permission.

引数

パスパラメーター

名前

種類

説明

account_id [required]

string

Fastly Account id.

応答

OK

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

// Delete Fastly account returns "OK" response

package main

import (
	"context"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewFastlyIntegrationApi(apiClient)
	r, err := api.DeleteFastlyAccount(ctx, "account_id")

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `FastlyIntegrationApi.DeleteFastlyAccount`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Instructions

First install the library and its dependencies and then save the example to main.go 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>" go run "main.go"

GET https://api.ap1.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}/serviceshttps://api.datadoghq.eu/api/v2/integrations/fastly/accounts/{account_id}/serviceshttps://api.ddog-gov.com/api/v2/integrations/fastly/accounts/{account_id}/serviceshttps://api.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}/serviceshttps://api.us3.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}/serviceshttps://api.us5.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}/services

概要

List Fastly services for an account. This endpoint requires the integrations_read permission.

引数

パスパラメーター

名前

種類

説明

account_id [required]

string

Fastly Account id.

応答

OK

The expected response schema when getting Fastly services.

Expand All

フィールド

種類

説明

data

[object]

The JSON:API data schema.

attributes

object

Attributes object for Fastly service requests.

tags

[string]

A list of tags for the Fastly service.

id [required]

string

The ID of the Fastly service.

type [required]

enum

The JSON:API type for this API. Should always be fastly-services. Allowed enum values: fastly-services

default: fastly-services

{
  "data": [
    {
      "attributes": {
        "tags": [
          "myTag",
          "myTag2:myValue"
        ]
      },
      "id": "abc123",
      "type": "fastly-services"
    }
  ]
}

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

// List Fastly services returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewFastlyIntegrationApi(apiClient)
	resp, r, err := api.ListFastlyServices(ctx, "account_id")

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `FastlyIntegrationApi.ListFastlyServices`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `FastlyIntegrationApi.ListFastlyServices`:\n%s\n", responseContent)
}

Instructions

First install the library and its dependencies and then save the example to main.go 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>" go run "main.go"

POST https://api.ap1.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}/serviceshttps://api.datadoghq.eu/api/v2/integrations/fastly/accounts/{account_id}/serviceshttps://api.ddog-gov.com/api/v2/integrations/fastly/accounts/{account_id}/serviceshttps://api.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}/serviceshttps://api.us3.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}/serviceshttps://api.us5.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}/services

概要

Create a Fastly service for an account. This endpoint requires the manage_integrations permission.

引数

パスパラメーター

名前

種類

説明

account_id [required]

string

Fastly Account id.

リクエスト

Body Data (required)

Expand All

フィールド

種類

説明

data [required]

object

Data object for Fastly service requests.

attributes

object

Attributes object for Fastly service requests.

tags

[string]

A list of tags for the Fastly service.

id [required]

string

The ID of the Fastly service.

type [required]

enum

The JSON:API type for this API. Should always be fastly-services. Allowed enum values: fastly-services

default: fastly-services

{
  "data": {
    "attributes": {
      "tags": [
        "myTag",
        "myTag2:myValue"
      ]
    },
    "id": "abc123",
    "type": "fastly-services"
  }
}

応答

CREATED

The expected response schema when getting a Fastly service.

Expand All

フィールド

種類

説明

data

object

Data object for Fastly service requests.

attributes

object

Attributes object for Fastly service requests.

tags

[string]

A list of tags for the Fastly service.

id [required]

string

The ID of the Fastly service.

type [required]

enum

The JSON:API type for this API. Should always be fastly-services. Allowed enum values: fastly-services

default: fastly-services

{
  "data": {
    "attributes": {
      "tags": [
        "myTag",
        "myTag2:myValue"
      ]
    },
    "id": "abc123",
    "type": "fastly-services"
  }
}

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

// Add Fastly service returns "CREATED" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	body := datadogV2.FastlyServiceRequest{
		Data: datadogV2.FastlyServiceData{
			Attributes: &datadogV2.FastlyServiceAttributes{
				Tags: []string{
					"myTag",
					"myTag2:myValue",
				},
			},
			Id:   "abc123",
			Type: datadogV2.FASTLYSERVICETYPE_FASTLY_SERVICES,
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewFastlyIntegrationApi(apiClient)
	resp, r, err := api.CreateFastlyService(ctx, "account_id", body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `FastlyIntegrationApi.CreateFastlyService`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `FastlyIntegrationApi.CreateFastlyService`:\n%s\n", responseContent)
}

Instructions

First install the library and its dependencies and then save the example to main.go 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>" go run "main.go"

GET https://api.ap1.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}https://api.datadoghq.eu/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}https://api.ddog-gov.com/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}https://api.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}https://api.us3.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}https://api.us5.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}

概要

Get a Fastly service for an account. This endpoint requires the integrations_read permission.

引数

パスパラメーター

名前

種類

説明

account_id [required]

string

Fastly Account id.

service_id [required]

string

Fastly Service ID.

応答

OK

The expected response schema when getting a Fastly service.

Expand All

フィールド

種類

説明

data

object

Data object for Fastly service requests.

attributes

object

Attributes object for Fastly service requests.

tags

[string]

A list of tags for the Fastly service.

id [required]

string

The ID of the Fastly service.

type [required]

enum

The JSON:API type for this API. Should always be fastly-services. Allowed enum values: fastly-services

default: fastly-services

{
  "data": {
    "attributes": {
      "tags": [
        "myTag",
        "myTag2:myValue"
      ]
    },
    "id": "abc123",
    "type": "fastly-services"
  }
}

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

// Get Fastly service returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewFastlyIntegrationApi(apiClient)
	resp, r, err := api.GetFastlyService(ctx, "account_id", "service_id")

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `FastlyIntegrationApi.GetFastlyService`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `FastlyIntegrationApi.GetFastlyService`:\n%s\n", responseContent)
}

Instructions

First install the library and its dependencies and then save the example to main.go 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>" go run "main.go"

PATCH https://api.ap1.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}https://api.datadoghq.eu/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}https://api.ddog-gov.com/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}https://api.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}https://api.us3.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}https://api.us5.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}

概要

Update a Fastly service for an account. This endpoint requires the manage_integrations permission.

引数

パスパラメーター

名前

種類

説明

account_id [required]

string

Fastly Account id.

service_id [required]

string

Fastly Service ID.

リクエスト

Body Data (required)

Expand All

フィールド

種類

説明

data [required]

object

Data object for Fastly service requests.

attributes

object

Attributes object for Fastly service requests.

tags

[string]

A list of tags for the Fastly service.

id [required]

string

The ID of the Fastly service.

type [required]

enum

The JSON:API type for this API. Should always be fastly-services. Allowed enum values: fastly-services

default: fastly-services

{
  "data": {
    "attributes": {
      "tags": [
        "myTag",
        "myTag2:myValue"
      ]
    },
    "id": "abc123",
    "type": "fastly-services"
  }
}

応答

OK

The expected response schema when getting a Fastly service.

Expand All

フィールド

種類

説明

data

object

Data object for Fastly service requests.

attributes

object

Attributes object for Fastly service requests.

tags

[string]

A list of tags for the Fastly service.

id [required]

string

The ID of the Fastly service.

type [required]

enum

The JSON:API type for this API. Should always be fastly-services. Allowed enum values: fastly-services

default: fastly-services

{
  "data": {
    "attributes": {
      "tags": [
        "myTag",
        "myTag2:myValue"
      ]
    },
    "id": "abc123",
    "type": "fastly-services"
  }
}

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

// Update Fastly service returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	body := datadogV2.FastlyServiceRequest{
		Data: datadogV2.FastlyServiceData{
			Attributes: &datadogV2.FastlyServiceAttributes{
				Tags: []string{
					"myTag",
					"myTag2:myValue",
				},
			},
			Id:   "abc123",
			Type: datadogV2.FASTLYSERVICETYPE_FASTLY_SERVICES,
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewFastlyIntegrationApi(apiClient)
	resp, r, err := api.UpdateFastlyService(ctx, "account_id", "service_id", body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `FastlyIntegrationApi.UpdateFastlyService`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `FastlyIntegrationApi.UpdateFastlyService`:\n%s\n", responseContent)
}

Instructions

First install the library and its dependencies and then save the example to main.go 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>" go run "main.go"

DELETE https://api.ap1.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}https://api.datadoghq.eu/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}https://api.ddog-gov.com/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}https://api.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}https://api.us3.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}https://api.us5.datadoghq.com/api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}

概要

Delete a Fastly service for an account. This endpoint requires the manage_integrations permission.

引数

パスパラメーター

名前

種類

説明

account_id [required]

string

Fastly Account id.

service_id [required]

string

Fastly Service ID.

応答

OK

Bad Request

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

フィールド

種類

説明

errors [required]

[string]

A list of errors.

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

コード例

// Delete Fastly service returns "OK" response

package main

import (
	"context"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewFastlyIntegrationApi(apiClient)
	r, err := api.DeleteFastlyService(ctx, "account_id", "service_id")

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `FastlyIntegrationApi.DeleteFastlyService`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Instructions

First install the library and its dependencies and then save the example to main.go 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>" go run "main.go"

PREVIEWING: deforest/fix-tls-ciphers-link