---
title: "Create tenancy config"
method: POST
path: "/api/v2/integration/oci/tenancies"
tags: ["OCI Integration"]
---

# Create tenancy config

`POST /api/v2/integration/oci/tenancies`

Create a new tenancy config to establish monitoring and data collection from your OCI environment. Requires OCI authentication credentials and tenancy details. Warning: Datadog recommends interacting with this endpoint only through the Datadog web UI to ensure all necessary OCI resources have been created and configured properly.

## Request body

- CreateTenancyConfigRequest — Request body for creating a new OCI tenancy integration configuration.
  - `data` CreateTenancyConfigData, required — The data object for creating a new OCI tenancy integration configuration, including the tenancy ID, type, and configuration attributes.
    - `attributes` CreateTenancyConfigDataAttributes — Attributes for creating a new OCI tenancy integration configuration, including credentials, region settings, and collection options.
      - `auth_credentials` CreateTenancyConfigDataAttributesAuthCredentials, required — OCI API signing key credentials used to authenticate the Datadog integration with the OCI tenancy.
        - `fingerprint` string — The fingerprint of the OCI API signing key used for authentication.
        - `private_key` string, required — The PEM-encoded private key corresponding to the OCI API signing key fingerprint.
      - `config_version` integer, nullable — Version number of the integration the tenancy is integrated with
      - `cost_collection_enabled` boolean — Whether cost data collection from OCI is enabled for the tenancy.
      - `dd_compartment_id` string — The OCID of the OCI compartment used by the Datadog integration stack.
      - `dd_stack_id` string — The OCID of the OCI Resource Manager stack used by the Datadog integration.
      - `home_region` string, required — The home region of the OCI tenancy (for example, us-ashburn-1).
      - `logs_config` CreateTenancyConfigDataAttributesLogsConfig — Log collection configuration for an OCI tenancy, controlling which compartments and services have log collection enabled.
        - `compartment_tag_filters` string[] — List of compartment tag filters to scope log collection to specific compartments.
        - `enabled` boolean — Whether log collection is enabled for the tenancy.
        - `enabled_services` string[] — List of OCI service names for which log collection is enabled.
      - `metrics_config` CreateTenancyConfigDataAttributesMetricsConfig — Metrics collection configuration for an OCI tenancy, controlling which compartments and services are included or excluded.
        - `compartment_tag_filters` string[] — List of compartment tag filters to scope metrics collection to specific compartments.
        - `enabled` boolean — Whether metrics collection is enabled for the tenancy.
        - `excluded_services` string[] — List of OCI service names to exclude from metrics collection.
      - `regions_config` CreateTenancyConfigDataAttributesRegionsConfig — Region configuration for an OCI tenancy, specifying which regions are available, enabled, or disabled for data collection.
        - `available` string[] — List of OCI regions available for data collection in the tenancy.
        - `disabled` string[] — List of OCI regions explicitly disabled for data collection.
        - `enabled` string[] — List of OCI regions enabled for data collection.
      - `resource_collection_enabled` boolean — Whether resource collection from OCI is enabled for the tenancy.
      - `user_ocid` string, required — The OCID of the OCI user used by the Datadog integration for authentication.
    - `id` string, required — The OCID of the OCI tenancy to configure.
    - `type` 'oci_tenancy', required — OCI tenancy resource type.

## Response `201`

Created

- TenancyConfig — Response containing a single OCI tenancy integration configuration.
  - `data` TenancyConfigData — A single OCI tenancy integration configuration resource object containing the tenancy ID, type, and configuration attributes.
    - `attributes` TenancyConfigDataAttributes — Attributes of an OCI tenancy integration configuration, including authentication details, region settings, and collection options.
      - `billing_plan_id` integer — The identifier of the billing plan associated with the OCI tenancy.
      - `config_version` integer — Version number of the integration the tenancy is integrated with
      - `cost_collection_enabled` boolean — Whether cost data collection from OCI is enabled for the tenancy.
      - `dd_compartment_id` string — The OCID of the OCI compartment used by the Datadog integration stack.
      - `dd_stack_id` string — The OCID of the OCI Resource Manager stack used by the Datadog integration.
      - `home_region` string — The home region of the OCI tenancy (for example, us-ashburn-1).
      - `logs_config` TenancyConfigDataAttributesLogsConfig — Log collection configuration for an OCI tenancy, indicating which compartments and services have log collection enabled.
        - `compartment_tag_filters` string[] — List of compartment tag filters scoping log collection to specific compartments.
        - `enabled` boolean — Whether log collection is enabled for the tenancy.
        - `enabled_services` string[] — List of OCI service names for which log collection is enabled.
      - `metrics_config` TenancyConfigDataAttributesMetricsConfig — Metrics collection configuration for an OCI tenancy, indicating which compartments and services are included or excluded.
        - `compartment_tag_filters` string[] — List of compartment tag filters scoping metrics collection to specific compartments.
        - `enabled` boolean — Whether metrics collection is enabled for the tenancy.
        - `excluded_services` string[] — List of OCI service names excluded from metrics collection.
      - `parent_tenancy_name` string — The name of the parent OCI tenancy, if applicable.
      - `regions_config` TenancyConfigDataAttributesRegionsConfig — Region configuration for an OCI tenancy, indicating which regions are available, enabled, or disabled for data collection.
        - `available` string[] — List of OCI regions available for data collection in the tenancy.
        - `disabled` string[] — List of OCI regions explicitly disabled for data collection.
        - `enabled` string[] — List of OCI regions enabled for data collection.
      - `resource_collection_enabled` boolean — Whether resource collection from OCI is enabled for the tenancy.
      - `tenancy_name` string — The human-readable name of the OCI tenancy.
      - `user_ocid` string — The OCID of the OCI user used by the Datadog integration for authentication.
    - `id` string — The OCID of the OCI tenancy.
    - `type` 'oci_tenancy', required — OCI tenancy resource type.

## Other responses

- `429` — Too many requests

---

[API](https://skmtc.net/datadog/apis/api-v2.md) · [All operations](https://skmtc.net/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v2/revisions/da68bf029e4c/schema)
