Skip to content

Update GCP API Spec to support is_resource_change_collection_enabled #2201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-10-07 14:32:05.490650",
"spec_repo_commit": "ef7c2778"
"regenerated": "2024-10-07 20:44:54.911447",
"spec_repo_commit": "5b4f9ebe"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-10-07 14:32:05.504415",
"spec_repo_commit": "ef7c2778"
"regenerated": "2024-10-07 20:44:54.925632",
"spec_repo_commit": "5b4f9ebe"
}
}
}
6 changes: 6 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3314,6 +3314,12 @@ components:
to be set to true.'
example: true
type: boolean
is_resource_change_collection_enabled:
default: false
description: When enabled, Datadog scans for all resource change data in
your Google Cloud environment.
example: true
type: boolean
is_security_command_center_enabled:
default: false
description: 'When enabled, Datadog will attempt to collect Security Command
Expand Down
6 changes: 6 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9566,6 +9566,12 @@ components:
product for this service account. Note: This requires resource_collection_enabled
to be set to true.'
type: boolean
is_resource_change_collection_enabled:
default: false
description: When enabled, Datadog scans for all resource change data in
your Google Cloud environment.
example: true
type: boolean
is_security_command_center_enabled:
default: false
description: 'When enabled, Datadog will attempt to collect Security Command
Expand Down
1 change: 1 addition & 0 deletions examples/v1/gcp-integration/CreateGCPIntegration.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
],
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",
Expand Down
1 change: 1 addition & 0 deletions examples/v1/gcp-integration/UpdateGCPIntegration.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
],
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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
data=GCPSTSServiceAccountData(
attributes=GCPSTSServiceAccountAttributes(
is_security_command_center_enabled=True,
is_resource_change_collection_enabled=True,
client_email="[email protected]",
host_filters=[],
),
Expand Down
8 changes: 8 additions & 0 deletions src/datadog_api_client/v1/model/gcp_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def openapi_types(_):
"errors": ([str],),
"host_filters": (str,),
"is_cspm_enabled": (bool,),
"is_resource_change_collection_enabled": (bool,),
"is_security_command_center_enabled": (bool,),
"private_key": (str,),
"private_key_id": (str,),
Expand All @@ -47,6 +48,7 @@ def openapi_types(_):
"errors": "errors",
"host_filters": "host_filters",
"is_cspm_enabled": "is_cspm_enabled",
"is_resource_change_collection_enabled": "is_resource_change_collection_enabled",
"is_security_command_center_enabled": "is_security_command_center_enabled",
"private_key": "private_key",
"private_key_id": "private_key_id",
Expand All @@ -68,6 +70,7 @@ def __init__(
errors: Union[List[str], UnsetType] = unset,
host_filters: Union[str, UnsetType] = unset,
is_cspm_enabled: Union[bool, UnsetType] = unset,
is_resource_change_collection_enabled: Union[bool, UnsetType] = unset,
is_security_command_center_enabled: Union[bool, UnsetType] = unset,
private_key: Union[str, UnsetType] = unset,
private_key_id: Union[str, UnsetType] = unset,
Expand Down Expand Up @@ -113,6 +116,9 @@ def __init__(
:param is_cspm_enabled: 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.
:type is_cspm_enabled: bool, optional

:param is_resource_change_collection_enabled: When enabled, Datadog scans for all resource change data in your Google Cloud environment.
:type is_resource_change_collection_enabled: bool, optional

:param is_security_command_center_enabled: When enabled, Datadog will attempt to collect Security Command Center Findings. Note: This requires additional permissions on the service account.
:type is_security_command_center_enabled: bool, optional

Expand Down Expand Up @@ -154,6 +160,8 @@ def __init__(
kwargs["host_filters"] = host_filters
if is_cspm_enabled is not unset:
kwargs["is_cspm_enabled"] = is_cspm_enabled
if is_resource_change_collection_enabled is not unset:
kwargs["is_resource_change_collection_enabled"] = is_resource_change_collection_enabled
if is_security_command_center_enabled is not unset:
kwargs["is_security_command_center_enabled"] = is_security_command_center_enabled
if private_key is not unset:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def openapi_types(_):
"cloud_run_revision_filters": ([str],),
"host_filters": ([str],),
"is_cspm_enabled": (bool,),
"is_resource_change_collection_enabled": (bool,),
"is_security_command_center_enabled": (bool,),
"resource_collection_enabled": (bool,),
}
Expand All @@ -34,6 +35,7 @@ def openapi_types(_):
"cloud_run_revision_filters": "cloud_run_revision_filters",
"host_filters": "host_filters",
"is_cspm_enabled": "is_cspm_enabled",
"is_resource_change_collection_enabled": "is_resource_change_collection_enabled",
"is_security_command_center_enabled": "is_security_command_center_enabled",
"resource_collection_enabled": "resource_collection_enabled",
}
Expand All @@ -46,6 +48,7 @@ def __init__(
cloud_run_revision_filters: Union[List[str], UnsetType] = unset,
host_filters: Union[List[str], UnsetType] = unset,
is_cspm_enabled: Union[bool, UnsetType] = unset,
is_resource_change_collection_enabled: Union[bool, UnsetType] = unset,
is_security_command_center_enabled: Union[bool, UnsetType] = unset,
resource_collection_enabled: Union[bool, UnsetType] = unset,
**kwargs,
Expand All @@ -72,6 +75,9 @@ def __init__(
:param is_cspm_enabled: 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.
:type is_cspm_enabled: bool, optional

:param is_resource_change_collection_enabled: When enabled, Datadog scans for all resource change data in your Google Cloud environment.
:type is_resource_change_collection_enabled: bool, optional

:param is_security_command_center_enabled: When enabled, Datadog will attempt to collect Security Command Center Findings. Note: This requires additional permissions on the service account.
:type is_security_command_center_enabled: bool, optional

Expand All @@ -90,6 +96,8 @@ def __init__(
kwargs["host_filters"] = host_filters
if is_cspm_enabled is not unset:
kwargs["is_cspm_enabled"] = is_cspm_enabled
if is_resource_change_collection_enabled is not unset:
kwargs["is_resource_change_collection_enabled"] = is_resource_change_collection_enabled
if is_security_command_center_enabled is not unset:
kwargs["is_security_command_center_enabled"] = is_security_command_center_enabled
if resource_collection_enabled is not unset:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-01-31T21:16:03.254Z
2024-10-07T20:24:57.651Z
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interactions:
- request:
body: '{"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"3af93b0f1c973838@example.com","client_id":"170673576317067357630","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL","cloud_run_revision_filters":["dr:dre"],"host_filters":"key:value,filter:example","is_cspm_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"}'
body: '{"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"f28619c1be385271@example.com","client_id":"172833269717283326970","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL","cloud_run_revision_filters":["dr:dre"],"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"}'
headers:
accept:
- application/json
Expand All @@ -20,7 +20,7 @@ interactions:
code: 200
message: OK
- request:
body: '{"client_email":"3af93b0f1c973838@example.com","client_id":"170673576317067357630","project_id":"datadog-apitest"}'
body: '{"client_email":"f28619c1be385271@example.com","client_id":"172833269717283326970","project_id":"datadog-apitest"}'
headers:
accept:
- application/json
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-12-20T13:20:18.421Z
2024-10-07T20:30:09.400Z
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interactions:
- request:
body: '{"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"40c7bfeef7b52e04@example.com","client_id":"170307841817030784180","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,"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"}'
body: '{"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"8c747ddd32fcd610@example.com","client_id":"172833300917283330090","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_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"}'
headers:
accept:
- application/json
Expand All @@ -20,7 +20,7 @@ interactions:
code: 200
message: OK
- request:
body: '{"client_email":"40c7bfeef7b52e04@example.com","client_id":"170307841817030784180","project_id":"datadog-apitest"}'
body: '{"client_email":"8c747ddd32fcd610@example.com","client_id":"172833300917283330090","project_id":"datadog-apitest"}'
headers:
accept:
- application/json
Expand All @@ -40,7 +40,7 @@ interactions:
code: 200
message: OK
- request:
body: '{"client_email":"40c7bfeef7b52e04@example.com","client_id":"170307841817030784180","project_id":"datadog-apitest"}'
body: '{"client_email":"8c747ddd32fcd610@example.com","client_id":"172833300917283330090","project_id":"datadog-apitest"}'
headers:
accept:
- application/json
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-01-31T21:16:03.829Z
2024-10-07T20:30:10.415Z
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interactions:
- request:
body: '{"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"edcdf6542ac6e6b6@example.com","client_id":"170673576317067357630","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,"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"}'
body: '{"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"0a9b348679053531@example.com","client_id":"172833301017283330100","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_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"}'
headers:
accept:
- application/json
Expand All @@ -20,7 +20,7 @@ interactions:
code: 200
message: OK
- request:
body: '{"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"edcdf6542ac6e6b6@example.com","client_id":"170673576317067357630","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL","cloud_run_revision_filters":["merp:derp"],"host_filters":"key:value,filter:example","is_cspm_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"}'
body: '{"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"0a9b348679053531@example.com","client_id":"172833301017283330100","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL","cloud_run_revision_filters":["merp:derp"],"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"}'
headers:
accept:
- application/json
Expand All @@ -40,7 +40,7 @@ interactions:
code: 200
message: OK
- request:
body: '{"client_email":"edcdf6542ac6e6b6@example.com","client_id":"170673576317067357630","project_id":"datadog-apitest"}'
body: '{"client_email":"0a9b348679053531@example.com","client_id":"172833301017283330100","project_id":"datadog-apitest"}'
headers:
accept:
- application/json
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-12-20T13:43:40.420Z
2024-10-07T20:30:11.373Z
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interactions:
- request:
body: '{"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"5cf439fad579761d@example.com","client_id":"170307982017030798200","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,"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"}'
body: '{"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"b4b2a84c6669b5d4@example.com","client_id":"172833301117283330110","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_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"}'
headers:
accept:
- application/json
Expand All @@ -20,7 +20,7 @@ interactions:
code: 200
message: OK
- request:
body: '{"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"5cf439fad579761d@example.com","client_id":"170307982017030798200","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,"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"}'
body: '{"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"b4b2a84c6669b5d4@example.com","client_id":"172833301117283330110","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_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"}'
headers:
accept:
- application/json
Expand All @@ -40,7 +40,7 @@ interactions:
code: 200
message: OK
- request:
body: '{"client_email":"5cf439fad579761d@example.com","client_id":"170307982017030798200","project_id":"datadog-apitest"}'
body: '{"client_email":"b4b2a84c6669b5d4@example.com","client_id":"172833301117283330110","project_id":"datadog-apitest"}'
headers:
accept:
- application/json
Expand Down
Loading
Loading