- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
Datadog API를 통해 Datadog-Google Cloud Platform(GCP) 통합을 구성하세요. 자세한 내용은 Datadog-Google Cloud Platform 통합을 참고하세요.
GET https://api.ap1.datadoghq.com/api/v1/integration/gcphttps://api.datadoghq.eu/api/v1/integration/gcphttps://api.ddog-gov.com/api/v1/integration/gcphttps://api.datadoghq.com/api/v1/integration/gcphttps://api.us3.datadoghq.com/api/v1/integration/gcphttps://api.us5.datadoghq.com/api/v1/integration/gcp
This endpoint is deprecated – use the V2 endpoints instead. List all Datadog-GCP integrations configured in your Datadog account.
This endpoint requires the gcp_configuration_read
permission.
OK
Array of GCP account responses.
{
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"automute": false,
"client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com",
"client_id": "123456712345671234567",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL",
"cloud_run_revision_filters": [
"$KEY:$VALUE"
],
"errors": [
"*"
],
"host_filters": "key:value,filter:example",
"is_cspm_enabled": true,
"is_resource_change_collection_enabled": true,
"is_security_command_center_enabled": true,
"private_key": "private_key",
"private_key_id": "123456789abcdefghi123456789abcdefghijklm",
"project_id": "datadog-apitest",
"resource_collection_enabled": true,
"token_uri": "https://accounts.google.com/o/oauth2/token",
"type": "service_account"
}
Bad Request
Error response object.
{
"errors": [
"Bad Request"
]
}
Authentication error
Error response object.
{
"errors": [
"Bad Request"
]
}
Too many requests
Error response object.
{
"errors": [
"Bad Request"
]
}
"""
List all GCP integrations returns "OK" response
"""
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.gcp_integration_api import GCPIntegrationApi
configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = GCPIntegrationApi(api_client)
response = api_instance.list_gcp_integration()
print(response)
First install the library and its dependencies and then save the example to example.py
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>" python3 "example.py"
GET https://api.ap1.datadoghq.com/api/v2/integration/gcp/accountshttps://api.datadoghq.eu/api/v2/integration/gcp/accountshttps://api.ddog-gov.com/api/v2/integration/gcp/accountshttps://api.datadoghq.com/api/v2/integration/gcp/accountshttps://api.us3.datadoghq.com/api/v2/integration/gcp/accountshttps://api.us5.datadoghq.com/api/v2/integration/gcp/accounts
List all GCP STS-enabled service accounts configured in your Datadog account.
This endpoint requires the gcp_configuration_read
permission.
OK
Object containing all your STS enabled accounts.
항목
유형
설명
data
[object]
Array of GCP STS enabled service accounts.
attributes
object
Attributes associated with your service account.
account_tags
[string]
Tags to be associated with GCP metrics and service checks from your account.
automute
boolean
Silence monitors for expected GCE instance shutdowns.
client_email
string
Your service account email address.
cloud_run_revision_filters
[string]
List of filters to limit the Cloud Run revisions that are pulled into Datadog by using tags. Only Cloud Run revision resources that apply to specified filters are imported into Datadog.
host_filters
[string]
Your Host Filters.
is_cspm_enabled
boolean
When enabled, Datadog will activate the Cloud Security Monitoring product for this service account. Note: This requires resource_collection_enabled to be set to true.
is_per_project_quota_enabled
boolean
When enabled, Datadog applies the X-Goog-User-Project
header, attributing Google Cloud billing and quota usage to the project being monitored rather than the default service account project.
is_resource_change_collection_enabled
boolean
When enabled, Datadog scans for all resource change data in your Google Cloud environment.
is_security_command_center_enabled
boolean
When enabled, Datadog will attempt to collect Security Command Center Findings. Note: This requires additional permissions on the service account.
metric_namespace_configs
[object]
Configurations for GCP metric namespaces.
disabled
boolean
When disabled, Datadog does not collect metrics that are related to this GCP metric namespace.
id
string
The id of the GCP metric namespace.
resource_collection_enabled
boolean
When enabled, Datadog scans for all resources in your GCP environment.
id
string
Your service account's unique ID.
meta
object
Additional information related to your service account.
accessible_projects
[string]
The current list of projects accessible from your service account.
type
enum
The type of account.
Allowed enum values: gcp_service_account
default: gcp_service_account
{
"data": [
{
"attributes": {
"account_tags": [],
"automute": false,
"client_email": "datadog-service-account@test-project.iam.gserviceaccount.com",
"cloud_run_revision_filters": [
"$KEY:$VALUE"
],
"host_filters": [],
"is_cspm_enabled": false,
"is_per_project_quota_enabled": true,
"is_resource_change_collection_enabled": true,
"is_security_command_center_enabled": true,
"metric_namespace_configs": [
{
"disabled": true,
"id": "aiplatform"
}
],
"resource_collection_enabled": false
},
"id": "d291291f-12c2-22g4-j290-123456678897",
"meta": {
"accessible_projects": []
},
"type": "gcp_service_account"
}
]
}
Not Authorized
API error response.
{
"errors": [
"Bad Request"
]
}
Not Found
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
"""
List all GCP STS-enabled service accounts returns "OK" response
"""
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.gcp_integration_api import GCPIntegrationApi
configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = GCPIntegrationApi(api_client)
response = api_instance.list_gcpsts_accounts()
print(response)
First install the library and its dependencies and then save the example to example.py
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>" python3 "example.py"
POST https://api.ap1.datadoghq.com/api/v1/integration/gcphttps://api.datadoghq.eu/api/v1/integration/gcphttps://api.ddog-gov.com/api/v1/integration/gcphttps://api.datadoghq.com/api/v1/integration/gcphttps://api.us3.datadoghq.com/api/v1/integration/gcphttps://api.us5.datadoghq.com/api/v1/integration/gcp
This endpoint is deprecated – use the V2 endpoints instead. Create a Datadog-GCP integration.
This endpoint requires the gcp_configurations_manage
permission.
Create a Datadog-GCP integration.
{
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"client_email": "252bf553ef04b351@example.com",
"client_id": "163662907116366290710",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL",
"host_filters": "key:value,filter:example",
"cloud_run_revision_filters": [
"dr:dre"
],
"is_cspm_enabled": true,
"is_security_command_center_enabled": true,
"is_resource_change_collection_enabled": true,
"private_key": "private_key",
"private_key_id": "123456789abcdefghi123456789abcdefghijklm",
"project_id": "datadog-apitest",
"resource_collection_enabled": true,
"token_uri": "https://accounts.google.com/o/oauth2/token",
"type": "service_account"
}
OK
{}
Bad Request
Error response object.
{
"errors": [
"Bad Request"
]
}
Authentication error
Error response object.
{
"errors": [
"Bad Request"
]
}
Too many requests
Error response object.
{
"errors": [
"Bad Request"
]
}
"""
Create a GCP integration returns "OK" response
"""
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.gcp_integration_api import GCPIntegrationApi
from datadog_api_client.v1.model.gcp_account import GCPAccount
body = GCPAccount(
auth_provider_x509_cert_url="https://www.googleapis.com/oauth2/v1/certs",
auth_uri="https://accounts.google.com/o/oauth2/auth",
client_email="252bf553ef04b351@example.com",
client_id="163662907116366290710",
client_x509_cert_url="https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL",
host_filters="key:value,filter:example",
cloud_run_revision_filters=[
"dr:dre",
],
is_cspm_enabled=True,
is_security_command_center_enabled=True,
is_resource_change_collection_enabled=True,
private_key="private_key",
private_key_id="123456789abcdefghi123456789abcdefghijklm",
project_id="datadog-apitest",
resource_collection_enabled=True,
token_uri="https://accounts.google.com/o/oauth2/token",
type="service_account",
)
configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = GCPIntegrationApi(api_client)
response = api_instance.create_gcp_integration(body=body)
print(response)
First install the library and its dependencies and then save the example to example.py
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>" python3 "example.py"
POST https://api.ap1.datadoghq.com/api/v2/integration/gcp/accountshttps://api.datadoghq.eu/api/v2/integration/gcp/accountshttps://api.ddog-gov.com/api/v2/integration/gcp/accountshttps://api.datadoghq.com/api/v2/integration/gcp/accountshttps://api.us3.datadoghq.com/api/v2/integration/gcp/accountshttps://api.us5.datadoghq.com/api/v2/integration/gcp/accounts
Create a new entry within Datadog for your STS enabled service account.
This endpoint requires the gcp_configurations_manage
permission.
항목
유형
설명
data
object
Additional metadata on your generated service account.
attributes
object
Attributes associated with your service account.
account_tags
[string]
Tags to be associated with GCP metrics and service checks from your account.
automute
boolean
Silence monitors for expected GCE instance shutdowns.
client_email
string
Your service account email address.
cloud_run_revision_filters
[string]
List of filters to limit the Cloud Run revisions that are pulled into Datadog by using tags. Only Cloud Run revision resources that apply to specified filters are imported into Datadog.
host_filters
[string]
Your Host Filters.
is_cspm_enabled
boolean
When enabled, Datadog will activate the Cloud Security Monitoring product for this service account. Note: This requires resource_collection_enabled to be set to true.
is_per_project_quota_enabled
boolean
When enabled, Datadog applies the X-Goog-User-Project
header, attributing Google Cloud billing and quota usage to the project being monitored rather than the default service account project.
is_resource_change_collection_enabled
boolean
When enabled, Datadog scans for all resource change data in your Google Cloud environment.
is_security_command_center_enabled
boolean
When enabled, Datadog will attempt to collect Security Command Center Findings. Note: This requires additional permissions on the service account.
metric_namespace_configs
[object]
Configurations for GCP metric namespaces.
disabled
boolean
When disabled, Datadog does not collect metrics that are related to this GCP metric namespace.
id
string
The id of the GCP metric namespace.
resource_collection_enabled
boolean
When enabled, Datadog scans for all resources in your GCP environment.
type
enum
The type of account.
Allowed enum values: gcp_service_account
default: gcp_service_account
{
"data": {
"attributes": {
"client_email": "Test-252bf553ef04b351@test-project.iam.gserviceaccount.com",
"host_filters": []
},
"type": "gcp_service_account"
}
}
{
"data": {
"attributes": {
"account_tags": [
"lorem",
"ipsum"
],
"client_email": "Test-252bf553ef04b351@test-project.iam.gserviceaccount.com",
"host_filters": []
},
"type": "gcp_service_account"
}
}
{
"data": {
"attributes": {
"cloud_run_revision_filters": [
"meh:bleh"
],
"client_email": "Test-252bf553ef04b351@test-project.iam.gserviceaccount.com",
"host_filters": []
},
"type": "gcp_service_account"
}
}
OK
The account creation response.
항목
유형
설명
data
object
Info on your service account.
attributes
object
Attributes associated with your service account.
account_tags
[string]
Tags to be associated with GCP metrics and service checks from your account.
automute
boolean
Silence monitors for expected GCE instance shutdowns.
client_email
string
Your service account email address.
cloud_run_revision_filters
[string]
List of filters to limit the Cloud Run revisions that are pulled into Datadog by using tags. Only Cloud Run revision resources that apply to specified filters are imported into Datadog.
host_filters
[string]
Your Host Filters.
is_cspm_enabled
boolean
When enabled, Datadog will activate the Cloud Security Monitoring product for this service account. Note: This requires resource_collection_enabled to be set to true.
is_per_project_quota_enabled
boolean
When enabled, Datadog applies the X-Goog-User-Project
header, attributing Google Cloud billing and quota usage to the project being monitored rather than the default service account project.
is_resource_change_collection_enabled
boolean
When enabled, Datadog scans for all resource change data in your Google Cloud environment.
is_security_command_center_enabled
boolean
When enabled, Datadog will attempt to collect Security Command Center Findings. Note: This requires additional permissions on the service account.
metric_namespace_configs
[object]
Configurations for GCP metric namespaces.
disabled
boolean
When disabled, Datadog does not collect metrics that are related to this GCP metric namespace.
id
string
The id of the GCP metric namespace.
resource_collection_enabled
boolean
When enabled, Datadog scans for all resources in your GCP environment.
id
string
Your service account's unique ID.
meta
object
Additional information related to your service account.
accessible_projects
[string]
The current list of projects accessible from your service account.
type
enum
The type of account.
Allowed enum values: gcp_service_account
default: gcp_service_account
{
"data": {
"attributes": {
"account_tags": [],
"automute": false,
"client_email": "datadog-service-account@test-project.iam.gserviceaccount.com",
"cloud_run_revision_filters": [
"$KEY:$VALUE"
],
"host_filters": [],
"is_cspm_enabled": false,
"is_per_project_quota_enabled": true,
"is_resource_change_collection_enabled": true,
"is_security_command_center_enabled": true,
"metric_namespace_configs": [
{
"disabled": true,
"id": "aiplatform"
}
],
"resource_collection_enabled": false
},
"id": "d291291f-12c2-22g4-j290-123456678897",
"meta": {
"accessible_projects": []
},
"type": "gcp_service_account"
}
}
Bad Request
API error response.
{
"errors": [
"Bad Request"
]
}
Unauthorized
API error response.
{
"errors": [
"Bad Request"
]
}
Not Authorized
API error response.
{
"errors": [
"Bad Request"
]
}
Conflict
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
"""
Create a new entry for your service account returns "OK" response
"""
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.gcp_integration_api import GCPIntegrationApi
from datadog_api_client.v2.model.gcp_service_account_type import GCPServiceAccountType
from datadog_api_client.v2.model.gcpsts_service_account_attributes import GCPSTSServiceAccountAttributes
from datadog_api_client.v2.model.gcpsts_service_account_create_request import GCPSTSServiceAccountCreateRequest
from datadog_api_client.v2.model.gcpsts_service_account_data import GCPSTSServiceAccountData
body = GCPSTSServiceAccountCreateRequest(
data=GCPSTSServiceAccountData(
attributes=GCPSTSServiceAccountAttributes(
client_email="Test-252bf553ef04b351@test-project.iam.gserviceaccount.com",
host_filters=[],
),
type=GCPServiceAccountType.GCP_SERVICE_ACCOUNT,
),
)
configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = GCPIntegrationApi(api_client)
response = api_instance.create_gcpsts_account(body=body)
print(response)
"""
Create a new entry for your service account with account_tags returns "OK" response
"""
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.gcp_integration_api import GCPIntegrationApi
from datadog_api_client.v2.model.gcp_service_account_type import GCPServiceAccountType
from datadog_api_client.v2.model.gcpsts_service_account_attributes import GCPSTSServiceAccountAttributes
from datadog_api_client.v2.model.gcpsts_service_account_create_request import GCPSTSServiceAccountCreateRequest
from datadog_api_client.v2.model.gcpsts_service_account_data import GCPSTSServiceAccountData
body = GCPSTSServiceAccountCreateRequest(
data=GCPSTSServiceAccountData(
attributes=GCPSTSServiceAccountAttributes(
account_tags=[
"lorem",
"ipsum",
],
client_email="Test-252bf553ef04b351@test-project.iam.gserviceaccount.com",
host_filters=[],
),
type=GCPServiceAccountType.GCP_SERVICE_ACCOUNT,
),
)
configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = GCPIntegrationApi(api_client)
response = api_instance.create_gcpsts_account(body=body)
print(response)
"""
Create a new entry for your service account with cloud run revision filters enabled returns "OK" response
"""
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.gcp_integration_api import GCPIntegrationApi
from datadog_api_client.v2.model.gcp_service_account_type import GCPServiceAccountType
from datadog_api_client.v2.model.gcpsts_service_account_attributes import GCPSTSServiceAccountAttributes
from datadog_api_client.v2.model.gcpsts_service_account_create_request import GCPSTSServiceAccountCreateRequest
from datadog_api_client.v2.model.gcpsts_service_account_data import GCPSTSServiceAccountData
body = GCPSTSServiceAccountCreateRequest(
data=GCPSTSServiceAccountData(
attributes=GCPSTSServiceAccountAttributes(
cloud_run_revision_filters=[
"meh:bleh",
],
client_email="Test-252bf553ef04b351@test-project.iam.gserviceaccount.com",
host_filters=[],
),
type=GCPServiceAccountType.GCP_SERVICE_ACCOUNT,
),
)
configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = GCPIntegrationApi(api_client)
response = api_instance.create_gcpsts_account(body=body)
print(response)
First install the library and its dependencies and then save the example to example.py
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>" python3 "example.py"
DELETE https://api.ap1.datadoghq.com/api/v1/integration/gcphttps://api.datadoghq.eu/api/v1/integration/gcphttps://api.ddog-gov.com/api/v1/integration/gcphttps://api.datadoghq.com/api/v1/integration/gcphttps://api.us3.datadoghq.com/api/v1/integration/gcphttps://api.us5.datadoghq.com/api/v1/integration/gcp
This endpoint is deprecated – use the V2 endpoints instead. Delete a given Datadog-GCP integration.
This endpoint requires the gcp_configurations_manage
permission.
Delete a given Datadog-GCP integration.
{
"client_email": "252bf553ef04b351@example.com",
"client_id": "163662907116366290710",
"project_id": "datadog-apitest"
}
OK
{}
Bad Request
Error response object.
{
"errors": [
"Bad Request"
]
}
Authentication error
Error response object.
{
"errors": [
"Bad Request"
]
}
Too many requests
Error response object.
{
"errors": [
"Bad Request"
]
}
"""
Delete a GCP integration returns "OK" response
"""
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.gcp_integration_api import GCPIntegrationApi
from datadog_api_client.v1.model.gcp_account import GCPAccount
body = GCPAccount(
client_email="252bf553ef04b351@example.com",
client_id="163662907116366290710",
project_id="datadog-apitest",
)
configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = GCPIntegrationApi(api_client)
response = api_instance.delete_gcp_integration(body=body)
print(response)
First install the library and its dependencies and then save the example to example.py
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>" python3 "example.py"
DELETE https://api.ap1.datadoghq.com/api/v2/integration/gcp/accounts/{account_id}https://api.datadoghq.eu/api/v2/integration/gcp/accounts/{account_id}https://api.ddog-gov.com/api/v2/integration/gcp/accounts/{account_id}https://api.datadoghq.com/api/v2/integration/gcp/accounts/{account_id}https://api.us3.datadoghq.com/api/v2/integration/gcp/accounts/{account_id}https://api.us5.datadoghq.com/api/v2/integration/gcp/accounts/{account_id}
Delete an STS enabled GCP account from within Datadog.
This endpoint requires the gcp_configurations_manage
permission.
이름
유형
설명
account_id [required]
string
Your GCP STS enabled service account’s unique ID.
No Content
Bad Request
API error response.
{
"errors": [
"Bad Request"
]
}
Not Authorized
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
"""
Delete an STS enabled GCP Account returns "No Content" response
"""
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.gcp_integration_api import GCPIntegrationApi
configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = GCPIntegrationApi(api_client)
api_instance.delete_gcpsts_account(
account_id="account_id",
)
First install the library and its dependencies and then save the example to example.py
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>" python3 "example.py"
PUT https://api.ap1.datadoghq.com/api/v1/integration/gcphttps://api.datadoghq.eu/api/v1/integration/gcphttps://api.ddog-gov.com/api/v1/integration/gcphttps://api.datadoghq.com/api/v1/integration/gcphttps://api.us3.datadoghq.com/api/v1/integration/gcphttps://api.us5.datadoghq.com/api/v1/integration/gcp
This endpoint is deprecated – use the V2 endpoints instead. Update a Datadog-GCP integrations host_filters and/or auto-mute.
Requires a project_id
and client_email
, however these fields cannot be updated.
If you need to update these fields, delete and use the create (POST
) endpoint.
The unspecified fields will keep their original values.
This endpoint requires the gcp_configuration_edit
permission.
Update a Datadog-GCP integration.
{
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"client_email": "252bf553ef04b351@example.com",
"client_id": "163662907116366290710",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL",
"host_filters": "key:value,filter:example",
"cloud_run_revision_filters": [
"merp:derp"
],
"is_cspm_enabled": true,
"is_security_command_center_enabled": true,
"is_resource_change_collection_enabled": true,
"private_key": "private_key",
"private_key_id": "123456789abcdefghi123456789abcdefghijklm",
"project_id": "datadog-apitest",
"resource_collection_enabled": true,
"token_uri": "https://accounts.google.com/o/oauth2/token",
"type": "service_account"
}
{
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"client_email": "252bf553ef04b351@example.com",
"client_id": "163662907116366290710",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL",
"host_filters": "key:value,filter:example",
"is_cspm_enabled": true,
"is_security_command_center_enabled": true,
"is_resource_change_collection_enabled": true,
"private_key": "private_key",
"private_key_id": "123456789abcdefghi123456789abcdefghijklm",
"project_id": "datadog-apitest",
"resource_collection_enabled": true,
"token_uri": "https://accounts.google.com/o/oauth2/token",
"type": "service_account"
}
OK
{}
Bad Request
Error response object.
{
"errors": [
"Bad Request"
]
}
Authentication error
Error response object.
{
"errors": [
"Bad Request"
]
}
Too many requests
Error response object.
{
"errors": [
"Bad Request"
]
}
"""
Update a GCP integration cloud run revision filters returns "OK" response
"""
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.gcp_integration_api import GCPIntegrationApi
from datadog_api_client.v1.model.gcp_account import GCPAccount
body = GCPAccount(
auth_provider_x509_cert_url="https://www.googleapis.com/oauth2/v1/certs",
auth_uri="https://accounts.google.com/o/oauth2/auth",
client_email="252bf553ef04b351@example.com",
client_id="163662907116366290710",
client_x509_cert_url="https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL",
host_filters="key:value,filter:example",
cloud_run_revision_filters=[
"merp:derp",
],
is_cspm_enabled=True,
is_security_command_center_enabled=True,
is_resource_change_collection_enabled=True,
private_key="private_key",
private_key_id="123456789abcdefghi123456789abcdefghijklm",
project_id="datadog-apitest",
resource_collection_enabled=True,
token_uri="https://accounts.google.com/o/oauth2/token",
type="service_account",
)
configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = GCPIntegrationApi(api_client)
response = api_instance.update_gcp_integration(body=body)
print(response)
"""
Update a GCP integration returns "OK" response
"""
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.gcp_integration_api import GCPIntegrationApi
from datadog_api_client.v1.model.gcp_account import GCPAccount
body = GCPAccount(
auth_provider_x509_cert_url="https://www.googleapis.com/oauth2/v1/certs",
auth_uri="https://accounts.google.com/o/oauth2/auth",
client_email="252bf553ef04b351@example.com",
client_id="163662907116366290710",
client_x509_cert_url="https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL",
host_filters="key:value,filter:example",
is_cspm_enabled=True,
is_security_command_center_enabled=True,
is_resource_change_collection_enabled=True,
private_key="private_key",
private_key_id="123456789abcdefghi123456789abcdefghijklm",
project_id="datadog-apitest",
resource_collection_enabled=True,
token_uri="https://accounts.google.com/o/oauth2/token",
type="service_account",
)
configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = GCPIntegrationApi(api_client)
response = api_instance.update_gcp_integration(body=body)
print(response)
First install the library and its dependencies and then save the example to example.py
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>" python3 "example.py"
PATCH https://api.ap1.datadoghq.com/api/v2/integration/gcp/accounts/{account_id}https://api.datadoghq.eu/api/v2/integration/gcp/accounts/{account_id}https://api.ddog-gov.com/api/v2/integration/gcp/accounts/{account_id}https://api.datadoghq.com/api/v2/integration/gcp/accounts/{account_id}https://api.us3.datadoghq.com/api/v2/integration/gcp/accounts/{account_id}https://api.us5.datadoghq.com/api/v2/integration/gcp/accounts/{account_id}
Update an STS enabled service account.
This endpoint requires the gcp_configuration_edit
permission.
이름
유형
설명
account_id [required]
string
Your GCP STS enabled service account’s unique ID.
항목
유형
설명
data
object
Data on your service account.
attributes
object
Attributes associated with your service account.
account_tags
[string]
Tags to be associated with GCP metrics and service checks from your account.
automute
boolean
Silence monitors for expected GCE instance shutdowns.
client_email
string
Your service account email address.
cloud_run_revision_filters
[string]
List of filters to limit the Cloud Run revisions that are pulled into Datadog by using tags. Only Cloud Run revision resources that apply to specified filters are imported into Datadog.
host_filters
[string]
Your Host Filters.
is_cspm_enabled
boolean
When enabled, Datadog will activate the Cloud Security Monitoring product for this service account. Note: This requires resource_collection_enabled to be set to true.
is_per_project_quota_enabled
boolean
When enabled, Datadog applies the X-Goog-User-Project
header, attributing Google Cloud billing and quota usage to the project being monitored rather than the default service account project.
is_resource_change_collection_enabled
boolean
When enabled, Datadog scans for all resource change data in your Google Cloud environment.
is_security_command_center_enabled
boolean
When enabled, Datadog will attempt to collect Security Command Center Findings. Note: This requires additional permissions on the service account.
metric_namespace_configs
[object]
Configurations for GCP metric namespaces.
disabled
boolean
When disabled, Datadog does not collect metrics that are related to this GCP metric namespace.
id
string
The id of the GCP metric namespace.
resource_collection_enabled
boolean
When enabled, Datadog scans for all resources in your GCP environment.
id
string
Your service account's unique ID.
type
enum
The type of account.
Allowed enum values: gcp_service_account
default: gcp_service_account
{
"data": {
"attributes": {
"client_email": "Test-252bf553ef04b351@example.com",
"host_filters": [
"foo:bar"
]
},
"id": "d291291f-12c2-22g4-j290-123456678897",
"type": "gcp_service_account"
}
}
{
"data": {
"attributes": {
"client_email": "Test-252bf553ef04b351@example.com",
"cloud_run_revision_filters": [
"merp:derp"
]
},
"id": "d291291f-12c2-22g4-j290-123456678897",
"type": "gcp_service_account"
}
}
{
"data": {
"attributes": {
"client_email": "Test-252bf553ef04b351@example.com",
"resource_collection_enabled": true
},
"id": "d291291f-12c2-22g4-j290-123456678897",
"type": "gcp_service_account"
}
}
OK
The account creation response.
항목
유형
설명
data
object
Info on your service account.
attributes
object
Attributes associated with your service account.
account_tags
[string]
Tags to be associated with GCP metrics and service checks from your account.
automute
boolean
Silence monitors for expected GCE instance shutdowns.
client_email
string
Your service account email address.
cloud_run_revision_filters
[string]
List of filters to limit the Cloud Run revisions that are pulled into Datadog by using tags. Only Cloud Run revision resources that apply to specified filters are imported into Datadog.
host_filters
[string]
Your Host Filters.
is_cspm_enabled
boolean
When enabled, Datadog will activate the Cloud Security Monitoring product for this service account. Note: This requires resource_collection_enabled to be set to true.
is_per_project_quota_enabled
boolean
When enabled, Datadog applies the X-Goog-User-Project
header, attributing Google Cloud billing and quota usage to the project being monitored rather than the default service account project.
is_resource_change_collection_enabled
boolean
When enabled, Datadog scans for all resource change data in your Google Cloud environment.
is_security_command_center_enabled
boolean
When enabled, Datadog will attempt to collect Security Command Center Findings. Note: This requires additional permissions on the service account.
metric_namespace_configs
[object]
Configurations for GCP metric namespaces.
disabled
boolean
When disabled, Datadog does not collect metrics that are related to this GCP metric namespace.
id
string
The id of the GCP metric namespace.
resource_collection_enabled
boolean
When enabled, Datadog scans for all resources in your GCP environment.
id
string
Your service account's unique ID.
meta
object
Additional information related to your service account.
accessible_projects
[string]
The current list of projects accessible from your service account.
type
enum
The type of account.
Allowed enum values: gcp_service_account
default: gcp_service_account
{
"data": {
"attributes": {
"account_tags": [],
"automute": false,
"client_email": "datadog-service-account@test-project.iam.gserviceaccount.com",
"cloud_run_revision_filters": [
"$KEY:$VALUE"
],
"host_filters": [],
"is_cspm_enabled": false,
"is_per_project_quota_enabled": true,
"is_resource_change_collection_enabled": true,
"is_security_command_center_enabled": true,
"metric_namespace_configs": [
{
"disabled": true,
"id": "aiplatform"
}
],
"resource_collection_enabled": false
},
"id": "d291291f-12c2-22g4-j290-123456678897",
"meta": {
"accessible_projects": []
},
"type": "gcp_service_account"
}
}
Bad Request
API error response.
{
"errors": [
"Bad Request"
]
}
Not Authorized
API error response.
{
"errors": [
"Bad Request"
]
}
Not Found
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
"""
Update STS Service Account returns "OK" response
"""
from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.gcp_integration_api import GCPIntegrationApi
from datadog_api_client.v2.model.gcp_service_account_type import GCPServiceAccountType
from datadog_api_client.v2.model.gcpsts_service_account_attributes import GCPSTSServiceAccountAttributes
from datadog_api_client.v2.model.gcpsts_service_account_update_request import GCPSTSServiceAccountUpdateRequest
from datadog_api_client.v2.model.gcpsts_service_account_update_request_data import GCPSTSServiceAccountUpdateRequestData
# there is a valid "gcp_sts_account" in the system
GCP_STS_ACCOUNT_DATA_ID = environ["GCP_STS_ACCOUNT_DATA_ID"]
body = GCPSTSServiceAccountUpdateRequest(
data=GCPSTSServiceAccountUpdateRequestData(
attributes=GCPSTSServiceAccountAttributes(
client_email="Test-252bf553ef04b351@example.com",
host_filters=[
"foo:bar",
],
),
id=GCP_STS_ACCOUNT_DATA_ID,
type=GCPServiceAccountType.GCP_SERVICE_ACCOUNT,
),
)
configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = GCPIntegrationApi(api_client)
response = api_instance.update_gcpsts_account(account_id=GCP_STS_ACCOUNT_DATA_ID, body=body)
print(response)
"""
Update STS Service Account returns "OK" response with cloud run revision filters
"""
from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.gcp_integration_api import GCPIntegrationApi
from datadog_api_client.v2.model.gcp_service_account_type import GCPServiceAccountType
from datadog_api_client.v2.model.gcpsts_service_account_attributes import GCPSTSServiceAccountAttributes
from datadog_api_client.v2.model.gcpsts_service_account_update_request import GCPSTSServiceAccountUpdateRequest
from datadog_api_client.v2.model.gcpsts_service_account_update_request_data import GCPSTSServiceAccountUpdateRequestData
# there is a valid "gcp_sts_account" in the system
GCP_STS_ACCOUNT_DATA_ID = environ["GCP_STS_ACCOUNT_DATA_ID"]
body = GCPSTSServiceAccountUpdateRequest(
data=GCPSTSServiceAccountUpdateRequestData(
attributes=GCPSTSServiceAccountAttributes(
client_email="Test-252bf553ef04b351@example.com",
cloud_run_revision_filters=[
"merp:derp",
],
),
id=GCP_STS_ACCOUNT_DATA_ID,
type=GCPServiceAccountType.GCP_SERVICE_ACCOUNT,
),
)
configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = GCPIntegrationApi(api_client)
response = api_instance.update_gcpsts_account(account_id=GCP_STS_ACCOUNT_DATA_ID, body=body)
print(response)
"""
Update STS Service Account returns "OK" response with enable resource collection turned on
"""
from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.gcp_integration_api import GCPIntegrationApi
from datadog_api_client.v2.model.gcp_service_account_type import GCPServiceAccountType
from datadog_api_client.v2.model.gcpsts_service_account_attributes import GCPSTSServiceAccountAttributes
from datadog_api_client.v2.model.gcpsts_service_account_update_request import GCPSTSServiceAccountUpdateRequest
from datadog_api_client.v2.model.gcpsts_service_account_update_request_data import GCPSTSServiceAccountUpdateRequestData
# there is a valid "gcp_sts_account" in the system
GCP_STS_ACCOUNT_DATA_ID = environ["GCP_STS_ACCOUNT_DATA_ID"]
body = GCPSTSServiceAccountUpdateRequest(
data=GCPSTSServiceAccountUpdateRequestData(
attributes=GCPSTSServiceAccountAttributes(
client_email="Test-252bf553ef04b351@example.com",
resource_collection_enabled=True,
),
id=GCP_STS_ACCOUNT_DATA_ID,
type=GCPServiceAccountType.GCP_SERVICE_ACCOUNT,
),
)
configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = GCPIntegrationApi(api_client)
response = api_instance.update_gcpsts_account(account_id=GCP_STS_ACCOUNT_DATA_ID, body=body)
print(response)
First install the library and its dependencies and then save the example to example.py
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>" python3 "example.py"
POST https://api.ap1.datadoghq.com/api/v2/integration/gcp/sts_delegatehttps://api.datadoghq.eu/api/v2/integration/gcp/sts_delegatehttps://api.ddog-gov.com/api/v2/integration/gcp/sts_delegatehttps://api.datadoghq.com/api/v2/integration/gcp/sts_delegatehttps://api.us3.datadoghq.com/api/v2/integration/gcp/sts_delegatehttps://api.us5.datadoghq.com/api/v2/integration/gcp/sts_delegate
Create a Datadog GCP principal.
This endpoint requires the gcp_configuration_edit
permission.
Create a delegate service account within Datadog.
{}
OK
Your delegate service account response data.
항목
유형
설명
data
object
Datadog principal service account info.
attributes
object
Your delegate account attributes.
delegate_account_email
string
Your organization's Datadog principal email address.
id
string
The ID of the delegate service account.
type
enum
The type of account.
Allowed enum values: gcp_sts_delegate
default: gcp_sts_delegate
{
"data": {
"attributes": {
"delegate_account_email": "ddgci-1a19n28hb1a812221893@datadog-gci-sts-us5-prod.iam.gserviceaccount.com"
},
"id": "ddgci-1a19n28hb1a812221893@datadog-gci-sts-us5-prod.iam.gserviceaccount.com",
"type": "gcp_sts_delegate"
}
}
Not Authorized
API error response.
{
"errors": [
"Bad Request"
]
}
Conflict
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
"""
Create a Datadog GCP principal with empty body returns "OK" response
"""
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.gcp_integration_api import GCPIntegrationApi
body = dict()
configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = GCPIntegrationApi(api_client)
response = api_instance.make_gcpsts_delegate(body=body)
print(response)
First install the library and its dependencies and then save the example to example.py
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>" python3 "example.py"
GET https://api.ap1.datadoghq.com/api/v2/integration/gcp/sts_delegatehttps://api.datadoghq.eu/api/v2/integration/gcp/sts_delegatehttps://api.ddog-gov.com/api/v2/integration/gcp/sts_delegatehttps://api.datadoghq.com/api/v2/integration/gcp/sts_delegatehttps://api.us3.datadoghq.com/api/v2/integration/gcp/sts_delegatehttps://api.us5.datadoghq.com/api/v2/integration/gcp/sts_delegate
List your Datadog-GCP STS delegate account configured in your Datadog account.
This endpoint requires the gcp_configuration_read
permission.
OK
Your delegate service account response data.
항목
유형
설명
data
object
Datadog principal service account info.
attributes
object
Your delegate account attributes.
delegate_account_email
string
Your organization's Datadog principal email address.
id
string
The ID of the delegate service account.
type
enum
The type of account.
Allowed enum values: gcp_sts_delegate
default: gcp_sts_delegate
{
"data": {
"attributes": {
"delegate_account_email": "ddgci-1a19n28hb1a812221893@datadog-gci-sts-us5-prod.iam.gserviceaccount.com"
},
"id": "ddgci-1a19n28hb1a812221893@datadog-gci-sts-us5-prod.iam.gserviceaccount.com",
"type": "gcp_sts_delegate"
}
}
Not Authorized
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
"""
List delegate account returns "OK" response
"""
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.gcp_integration_api import GCPIntegrationApi
configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = GCPIntegrationApi(api_client)
response = api_instance.get_gcpsts_delegate()
print(response)
First install the library and its dependencies and then save the example to example.py
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>" python3 "example.py"