For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/fr/api/latest/oci-integration/create-tenancy-config.md. A documentation index is available at /llms.txt.
Language
Datadog site

Créer une configuration de location

POSThttps://api.datadoghq.com/api/v2/integration/oci/tenancieshttps://api.us3.datadoghq.com/api/v2/integration/oci/tenancieshttps://api.us5.datadoghq.com/api/v2/integration/oci/tenancieshttps://api.datadoghq.eu/api/v2/integration/oci/tenancieshttps://api.ap1.datadoghq.com/api/v2/integration/oci/tenancieshttps://api.ap2.datadoghq.com/api/v2/integration/oci/tenancieshttps://api.uk1.datadoghq.com/api/v2/integration/oci/tenancieshttps://api.ddog-gov.com/api/v2/integration/oci/tenancieshttps://api.us2.ddog-gov.com/api/v2/integration/oci/tenancies

Présentation

Créer une nouvelle configuration de location pour établir la surveillance et la collecte de données depuis votre environnement OCI. Nécessite des identifiants d'authentification OCI et les détails de la location. Avertissement : Datadog recommande d'interagir avec cet endpoint uniquement via l'interface web Datadog pour s'assurer que toutes les ressources OCI nécessaires ont été créées et configurées correctement.

Requête

Body Data (required)

Champ
Type
Description
data [required]
object

Réponse

Created

Response containing a single OCI tenancy integration configuration.

Champ
Type
Description
data
object

A single OCI tenancy integration configuration resource object containing the tenancy ID, type, and configuration attributes.

Exemple de code

Créer une configuration de location
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/integration/oci/tenancies" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "auth_credentials": {
        "fingerprint": "",
        "private_key": "<PRIVATE_KEY>"
      },
      "cost_collection_enabled": true,
      "dd_compartment_id": "ocid.compartment.test",
      "dd_stack_id": "ocid.stack.test",
      "home_region": "us-ashburn-1",
      "logs_config": {
        "compartment_tag_filters": [
          "datadog:true",
          "env:prod"
        ],
        "enabled": true,
        "enabled_services": [
          "service_1",
          "service_2"
        ]
      },
      "metrics_config": {
        "compartment_tag_filters": [
          "datadog:true",
          "env:prod"
        ],
        "enabled": true,
        "excluded_services": [
          "service_1",
          "service_2"
        ]
      },
      "regions_config": {
        "available": [
          "us-ashburn-1",
          "us-phoenix-1"
        ],
        "disabled": [
          "us-phoenix-1"
        ],
        "enabled": [
          "us-ashburn-1"
        ]
      },
      "resource_collection_enabled": true,
      "user_ocid": "ocid.user.test"
    },
    "id": "ocid.tenancy.test",
    "type": "oci_tenancy"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/integration/oci/tenancies" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "auth_credentials": {
        "fingerprint": "",
        "private_key": "<PRIVATE_KEY>"
      },
      "cost_collection_enabled": true,
      "dd_compartment_id": "ocid.compartment.test",
      "dd_stack_id": "ocid.stack.test",
      "home_region": "us-ashburn-1",
      "logs_config": {
        "compartment_tag_filters": [
          "datadog:true",
          "env:prod"
        ],
        "enabled": true,
        "enabled_services": [
          "service_1",
          "service_2"
        ]
      },
      "metrics_config": {
        "compartment_tag_filters": [
          "datadog:true",
          "env:prod"
        ],
        "enabled": true,
        "excluded_services": [
          "service_1",
          "service_2"
        ]
      },
      "regions_config": {
        "available": [
          "us-ashburn-1",
          "us-phoenix-1"
        ],
        "disabled": [
          "us-phoenix-1"
        ],
        "enabled": [
          "us-ashburn-1"
        ]
      },
      "resource_collection_enabled": true,
      "user_ocid": "ocid.user.test"
    },
    "id": "ocid.tenancy.test",
    "type": "oci_tenancy"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/integration/oci/tenancies" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "auth_credentials": {
        "fingerprint": "",
        "private_key": "<PRIVATE_KEY>"
      },
      "cost_collection_enabled": true,
      "dd_compartment_id": "ocid.compartment.test",
      "dd_stack_id": "ocid.stack.test",
      "home_region": "us-ashburn-1",
      "logs_config": {
        "compartment_tag_filters": [
          "datadog:true",
          "env:prod"
        ],
        "enabled": true,
        "enabled_services": [
          "service_1",
          "service_2"
        ]
      },
      "metrics_config": {
        "compartment_tag_filters": [
          "datadog:true",
          "env:prod"
        ],
        "enabled": true,
        "excluded_services": [
          "service_1",
          "service_2"
        ]
      },
      "regions_config": {
        "available": [
          "us-ashburn-1",
          "us-phoenix-1"
        ],
        "disabled": [
          "us-phoenix-1"
        ],
        "enabled": [
          "us-ashburn-1"
        ]
      },
      "resource_collection_enabled": true,
      "user_ocid": "ocid.user.test"
    },
    "id": "ocid.tenancy.test",
    "type": "oci_tenancy"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/integration/oci/tenancies" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "auth_credentials": {
        "fingerprint": "",
        "private_key": "<PRIVATE_KEY>"
      },
      "cost_collection_enabled": true,
      "dd_compartment_id": "ocid.compartment.test",
      "dd_stack_id": "ocid.stack.test",
      "home_region": "us-ashburn-1",
      "logs_config": {
        "compartment_tag_filters": [
          "datadog:true",
          "env:prod"
        ],
        "enabled": true,
        "enabled_services": [
          "service_1",
          "service_2"
        ]
      },
      "metrics_config": {
        "compartment_tag_filters": [
          "datadog:true",
          "env:prod"
        ],
        "enabled": true,
        "excluded_services": [
          "service_1",
          "service_2"
        ]
      },
      "regions_config": {
        "available": [
          "us-ashburn-1",
          "us-phoenix-1"
        ],
        "disabled": [
          "us-phoenix-1"
        ],
        "enabled": [
          "us-ashburn-1"
        ]
      },
      "resource_collection_enabled": true,
      "user_ocid": "ocid.user.test"
    },
    "id": "ocid.tenancy.test",
    "type": "oci_tenancy"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/integration/oci/tenancies" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "auth_credentials": {
        "fingerprint": "",
        "private_key": "<PRIVATE_KEY>"
      },
      "cost_collection_enabled": true,
      "dd_compartment_id": "ocid.compartment.test",
      "dd_stack_id": "ocid.stack.test",
      "home_region": "us-ashburn-1",
      "logs_config": {
        "compartment_tag_filters": [
          "datadog:true",
          "env:prod"
        ],
        "enabled": true,
        "enabled_services": [
          "service_1",
          "service_2"
        ]
      },
      "metrics_config": {
        "compartment_tag_filters": [
          "datadog:true",
          "env:prod"
        ],
        "enabled": true,
        "excluded_services": [
          "service_1",
          "service_2"
        ]
      },
      "regions_config": {
        "available": [
          "us-ashburn-1",
          "us-phoenix-1"
        ],
        "disabled": [
          "us-phoenix-1"
        ],
        "enabled": [
          "us-ashburn-1"
        ]
      },
      "resource_collection_enabled": true,
      "user_ocid": "ocid.user.test"
    },
    "id": "ocid.tenancy.test",
    "type": "oci_tenancy"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/integration/oci/tenancies" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "auth_credentials": {
        "fingerprint": "",
        "private_key": "<PRIVATE_KEY>"
      },
      "cost_collection_enabled": true,
      "dd_compartment_id": "ocid.compartment.test",
      "dd_stack_id": "ocid.stack.test",
      "home_region": "us-ashburn-1",
      "logs_config": {
        "compartment_tag_filters": [
          "datadog:true",
          "env:prod"
        ],
        "enabled": true,
        "enabled_services": [
          "service_1",
          "service_2"
        ]
      },
      "metrics_config": {
        "compartment_tag_filters": [
          "datadog:true",
          "env:prod"
        ],
        "enabled": true,
        "excluded_services": [
          "service_1",
          "service_2"
        ]
      },
      "regions_config": {
        "available": [
          "us-ashburn-1",
          "us-phoenix-1"
        ],
        "disabled": [
          "us-phoenix-1"
        ],
        "enabled": [
          "us-ashburn-1"
        ]
      },
      "resource_collection_enabled": true,
      "user_ocid": "ocid.user.test"
    },
    "id": "ocid.tenancy.test",
    "type": "oci_tenancy"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/integration/oci/tenancies" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "auth_credentials": {
        "fingerprint": "",
        "private_key": "<PRIVATE_KEY>"
      },
      "cost_collection_enabled": true,
      "dd_compartment_id": "ocid.compartment.test",
      "dd_stack_id": "ocid.stack.test",
      "home_region": "us-ashburn-1",
      "logs_config": {
        "compartment_tag_filters": [
          "datadog:true",
          "env:prod"
        ],
        "enabled": true,
        "enabled_services": [
          "service_1",
          "service_2"
        ]
      },
      "metrics_config": {
        "compartment_tag_filters": [
          "datadog:true",
          "env:prod"
        ],
        "enabled": true,
        "excluded_services": [
          "service_1",
          "service_2"
        ]
      },
      "regions_config": {
        "available": [
          "us-ashburn-1",
          "us-phoenix-1"
        ],
        "disabled": [
          "us-phoenix-1"
        ],
        "enabled": [
          "us-ashburn-1"
        ]
      },
      "resource_collection_enabled": true,
      "user_ocid": "ocid.user.test"
    },
    "id": "ocid.tenancy.test",
    "type": "oci_tenancy"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/integration/oci/tenancies" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "auth_credentials": {
        "fingerprint": "",
        "private_key": "<PRIVATE_KEY>"
      },
      "cost_collection_enabled": true,
      "dd_compartment_id": "ocid.compartment.test",
      "dd_stack_id": "ocid.stack.test",
      "home_region": "us-ashburn-1",
      "logs_config": {
        "compartment_tag_filters": [
          "datadog:true",
          "env:prod"
        ],
        "enabled": true,
        "enabled_services": [
          "service_1",
          "service_2"
        ]
      },
      "metrics_config": {
        "compartment_tag_filters": [
          "datadog:true",
          "env:prod"
        ],
        "enabled": true,
        "excluded_services": [
          "service_1",
          "service_2"
        ]
      },
      "regions_config": {
        "available": [
          "us-ashburn-1",
          "us-phoenix-1"
        ],
        "disabled": [
          "us-phoenix-1"
        ],
        "enabled": [
          "us-ashburn-1"
        ]
      },
      "resource_collection_enabled": true,
      "user_ocid": "ocid.user.test"
    },
    "id": "ocid.tenancy.test",
    "type": "oci_tenancy"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/integration/oci/tenancies" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "auth_credentials": {
        "fingerprint": "",
        "private_key": "<PRIVATE_KEY>"
      },
      "cost_collection_enabled": true,
      "dd_compartment_id": "ocid.compartment.test",
      "dd_stack_id": "ocid.stack.test",
      "home_region": "us-ashburn-1",
      "logs_config": {
        "compartment_tag_filters": [
          "datadog:true",
          "env:prod"
        ],
        "enabled": true,
        "enabled_services": [
          "service_1",
          "service_2"
        ]
      },
      "metrics_config": {
        "compartment_tag_filters": [
          "datadog:true",
          "env:prod"
        ],
        "enabled": true,
        "excluded_services": [
          "service_1",
          "service_2"
        ]
      },
      "regions_config": {
        "available": [
          "us-ashburn-1",
          "us-phoenix-1"
        ],
        "disabled": [
          "us-phoenix-1"
        ],
        "enabled": [
          "us-ashburn-1"
        ]
      },
      "resource_collection_enabled": true,
      "user_ocid": "ocid.user.test"
    },
    "id": "ocid.tenancy.test",
    "type": "oci_tenancy"
  }
}
EOF