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/update-tenancy-config.md. A documentation index is available at /llms.txt.
Language
Datadog site

Mettre à jour une configuration de location

PATCHhttps://api.datadoghq.com/api/v2/integration/oci/tenancies/{tenancy_ocid}https://api.us3.datadoghq.com/api/v2/integration/oci/tenancies/{tenancy_ocid}https://api.us5.datadoghq.com/api/v2/integration/oci/tenancies/{tenancy_ocid}https://api.datadoghq.eu/api/v2/integration/oci/tenancies/{tenancy_ocid}https://api.ap1.datadoghq.com/api/v2/integration/oci/tenancies/{tenancy_ocid}https://api.ap2.datadoghq.com/api/v2/integration/oci/tenancies/{tenancy_ocid}https://api.uk1.datadoghq.com/api/v2/integration/oci/tenancies/{tenancy_ocid}https://api.ddog-gov.com/api/v2/integration/oci/tenancies/{tenancy_ocid}https://api.us2.ddog-gov.com/api/v2/integration/oci/tenancies/{tenancy_ocid}

Présentation

Mettre à jour une configuration de location existante. Vous pouvez modifier les identifiants d'authentification, activer/désactiver les types de collecte, mettre à jour les filtres de service et modifier les paramètres de région. Avertissement : nous recommandons d'utiliser l'interface web Datadog pour éviter des effets de mise à jour non souhaités.

Arguments

Paramètres du chemin

Name
Type
Description
tenancy_ocid [required]
string

The OCID of the tenancy config to update.

Requête

Body Data (required)

Champ
Type
Description
data [required]
object

Réponse

OK

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

Mettre à jour une configuration de location
# Path parameters
export tenancy_ocid="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/integration/oci/tenancies/${tenancy_ocid}" \
-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,
      "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
# Path parameters
export tenancy_ocid="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/integration/oci/tenancies/${tenancy_ocid}" \
-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,
      "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
# Path parameters
export tenancy_ocid="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/integration/oci/tenancies/${tenancy_ocid}" \
-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,
      "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
# Path parameters
export tenancy_ocid="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/integration/oci/tenancies/${tenancy_ocid}" \
-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,
      "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
# Path parameters
export tenancy_ocid="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/integration/oci/tenancies/${tenancy_ocid}" \
-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,
      "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
# Path parameters
export tenancy_ocid="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/integration/oci/tenancies/${tenancy_ocid}" \
-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,
      "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
# Path parameters
export tenancy_ocid="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/integration/oci/tenancies/${tenancy_ocid}" \
-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,
      "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
# Path parameters
export tenancy_ocid="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/integration/oci/tenancies/${tenancy_ocid}" \
-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,
      "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
# Path parameters
export tenancy_ocid="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/integration/oci/tenancies/${tenancy_ocid}" \
-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,
      "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