Skip to content
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
65 changes: 57 additions & 8 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3288,15 +3288,19 @@ components:
example: https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL
type: string
cloud_run_revision_filters:
description: 'Limit the Cloud Run revisions that are pulled into Datadog
by using tags.
deprecated: true
description: '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.'
imported into Datadog.

**Note:** This field is deprecated. Instead, use `monitored_resource_configs`
with `type=cloud_run_revision`'
example:
- $KEY:$VALUE
items:
description: Cloud Run Filters
description: Cloud Run revision filters
type: string
type: array
errors:
Expand All @@ -3309,11 +3313,16 @@ components:
type: string
type: array
host_filters:
description: 'Limit the GCE instances that are pulled into Datadog by using
tags.
deprecated: true
description: 'A comma-separated list of filters to limit the VM instances
that are pulled into Datadog by using tags.

Only hosts that match one of the defined tags are imported into Datadog.'
example: key:value,filter:example
Only VM instance resources that apply to specified filters are imported
into Datadog.

**Note:** This field is deprecated. Instead, use `monitored_resource_configs`
with `type=gce_instance`'
example: $KEY1:$VALUE1,$KEY2:$VALUE2
type: string
is_cspm_enabled:
description: 'When enabled, Datadog will activate the Cloud Security Monitoring
Expand All @@ -3334,6 +3343,15 @@ components:
account.'
example: true
type: boolean
monitored_resource_configs:
description: Configurations for GCP monitored resources.
example:
- filters:
- $KEY:$VALUE
type: gce_instance
items:
$ref: '#/components/schemas/GCPMonitoredResourceConfig'
type: array
private_key:
description: Your private key name found in your JSON service account key.
example: private_key
Expand Down Expand Up @@ -3366,6 +3384,37 @@ components:
items:
$ref: '#/components/schemas/GCPAccount'
type: array
GCPMonitoredResourceConfig:
description: Configuration for a GCP monitored resource.
properties:
filters:
description: 'List of filters to limit the monitored resources that are
pulled into Datadog by using tags.

Only monitored resources that apply to specified filters are imported
into Datadog.'
example:
- $KEY:$VALUE
items:
description: A monitored resource filter
type: string
type: array
type:
$ref: '#/components/schemas/GCPMonitoredResourceConfigType'
type: object
GCPMonitoredResourceConfigType:
description: The GCP monitored resource type. Only a subset of resource types
are supported.
enum:
- cloud_function
- cloud_run_revision
- gce_instance
example: gce_instance
type: string
x-enum-varnames:
- CLOUD_FUNCTION
- CLOUD_RUN_REVISION
- GCE_INSTANCE
GeomapWidgetDefinition:
description: This visualization displays a series of values by country on a
world map.
Expand Down
62 changes: 58 additions & 4 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17694,6 +17694,37 @@ components:
example: aiplatform
type: string
type: object
GCPMonitoredResourceConfig:
description: Configuration for a GCP monitored resource.
properties:
filters:
description: 'List of filters to limit the monitored resources that are
pulled into Datadog by using tags.

Only monitored resources that apply to specified filters are imported
into Datadog.'
example:
- $KEY:$VALUE
items:
description: A monitored resource filter
type: string
type: array
type:
$ref: '#/components/schemas/GCPMonitoredResourceConfigType'
type: object
GCPMonitoredResourceConfigType:
description: The GCP monitored resource type. Only a subset of resource types
are supported.
enum:
- cloud_function
- cloud_run_revision
- gce_instance
example: gce_instance
type: string
x-enum-varnames:
- CLOUD_FUNCTION
- CLOUD_RUN_REVISION
- GCE_INSTANCE
GCPSTSDelegateAccount:
description: Datadog principal service account info.
properties:
Expand Down Expand Up @@ -17761,21 +17792,35 @@ components:
example: datadog-service-account@test-project.iam.gserviceaccount.com
type: string
cloud_run_revision_filters:
deprecated: true
description: '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.'
imported into Datadog.

**Note:** This field is deprecated. Instead, use `monitored_resource_configs`
with `type=cloud_run_revision`'
example:
- $KEY:$VALUE
items:
description: Cloud Run Filters
description: Cloud Run revision filters
type: string
type: array
host_filters:
description: Your Host Filters.
deprecated: true
description: 'List of filters to limit the VM instances that are pulled
into Datadog by using tags.

Only VM instance resources that apply to specified filters are imported
into Datadog.

**Note:** This field is deprecated. Instead, use `monitored_resource_configs`
with `type=gce_instance`'
example:
- $KEY:$VALUE
items:
description: Host Filters
description: VM instance filters
type: string
type: array
is_cspm_enabled:
Expand Down Expand Up @@ -17811,6 +17856,15 @@ components:
items:
$ref: '#/components/schemas/GCPMetricNamespaceConfig'
type: array
monitored_resource_configs:
description: Configurations for GCP monitored resources.
example:
- filters:
- $KEY:$VALUE
type: gce_instance
items:
$ref: '#/components/schemas/GCPMonitoredResourceConfig'
type: array
resource_collection_enabled:
description: When enabled, Datadog scans for all resources in your GCP environment.
type: boolean
Expand Down
64 changes: 60 additions & 4 deletions src/main/java/com/datadog/api/client/v1/model/GCPAccount.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
GCPAccount.JSON_PROPERTY_IS_CSPM_ENABLED,
GCPAccount.JSON_PROPERTY_IS_RESOURCE_CHANGE_COLLECTION_ENABLED,
GCPAccount.JSON_PROPERTY_IS_SECURITY_COMMAND_CENTER_ENABLED,
GCPAccount.JSON_PROPERTY_MONITORED_RESOURCE_CONFIGS,
GCPAccount.JSON_PROPERTY_PRIVATE_KEY,
GCPAccount.JSON_PROPERTY_PRIVATE_KEY_ID,
GCPAccount.JSON_PROPERTY_PROJECT_ID,
Expand Down Expand Up @@ -83,6 +84,10 @@ public class GCPAccount {
"is_security_command_center_enabled";
private Boolean isSecurityCommandCenterEnabled = false;

public static final String JSON_PROPERTY_MONITORED_RESOURCE_CONFIGS =
"monitored_resource_configs";
private List<GCPMonitoredResourceConfig> monitoredResourceConfigs = null;

public static final String JSON_PROPERTY_PRIVATE_KEY = "private_key";
private String privateKey;

Expand Down Expand Up @@ -243,18 +248,23 @@ public GCPAccount addCloudRunRevisionFiltersItem(String cloudRunRevisionFiltersI
}

/**
* 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.
* 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.
* <strong>Note:</strong> This field is deprecated. Instead, use <code>monitored_resource_configs
* </code> with <code>type=cloud_run_revision</code>
*
* @return cloudRunRevisionFilters
* @deprecated
*/
@Deprecated
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CLOUD_RUN_REVISION_FILTERS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<String> getCloudRunRevisionFilters() {
return cloudRunRevisionFilters;
}

@Deprecated
public void setCloudRunRevisionFilters(List<String> cloudRunRevisionFilters) {
this.cloudRunRevisionFilters = cloudRunRevisionFilters;
}
Expand Down Expand Up @@ -294,18 +304,23 @@ public GCPAccount hostFilters(String hostFilters) {
}

/**
* Limit the GCE instances that are pulled into Datadog by using tags. Only hosts that match one
* of the defined tags are imported into Datadog.
* A comma-separated list of filters to limit the VM instances that are pulled into Datadog by
* using tags. Only VM instance resources that apply to specified filters are imported into
* Datadog. <strong>Note:</strong> This field is deprecated. Instead, use <code>
* monitored_resource_configs</code> with <code>type=gce_instance</code>
*
* @return hostFilters
* @deprecated
*/
@Deprecated
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_HOST_FILTERS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getHostFilters() {
return hostFilters;
}

@Deprecated
public void setHostFilters(String hostFilters) {
this.hostFilters = hostFilters;
}
Expand Down Expand Up @@ -375,6 +390,42 @@ public void setIsSecurityCommandCenterEnabled(Boolean isSecurityCommandCenterEna
this.isSecurityCommandCenterEnabled = isSecurityCommandCenterEnabled;
}

public GCPAccount monitoredResourceConfigs(
List<GCPMonitoredResourceConfig> monitoredResourceConfigs) {
this.monitoredResourceConfigs = monitoredResourceConfigs;
for (GCPMonitoredResourceConfig item : monitoredResourceConfigs) {
this.unparsed |= item.unparsed;
}
return this;
}

public GCPAccount addMonitoredResourceConfigsItem(
GCPMonitoredResourceConfig monitoredResourceConfigsItem) {
if (this.monitoredResourceConfigs == null) {
this.monitoredResourceConfigs = new ArrayList<>();
}
this.monitoredResourceConfigs.add(monitoredResourceConfigsItem);
this.unparsed |= monitoredResourceConfigsItem.unparsed;
return this;
}

/**
* Configurations for GCP monitored resources.
*
* @return monitoredResourceConfigs
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_MONITORED_RESOURCE_CONFIGS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<GCPMonitoredResourceConfig> getMonitoredResourceConfigs() {
return monitoredResourceConfigs;
}

public void setMonitoredResourceConfigs(
List<GCPMonitoredResourceConfig> monitoredResourceConfigs) {
this.monitoredResourceConfigs = monitoredResourceConfigs;
}

public GCPAccount privateKey(String privateKey) {
this.privateKey = privateKey;
return this;
Expand Down Expand Up @@ -571,6 +622,7 @@ public boolean equals(Object o) {
this.isResourceChangeCollectionEnabled, gcpAccount.isResourceChangeCollectionEnabled)
&& Objects.equals(
this.isSecurityCommandCenterEnabled, gcpAccount.isSecurityCommandCenterEnabled)
&& Objects.equals(this.monitoredResourceConfigs, gcpAccount.monitoredResourceConfigs)
&& Objects.equals(this.privateKey, gcpAccount.privateKey)
&& Objects.equals(this.privateKeyId, gcpAccount.privateKeyId)
&& Objects.equals(this.projectId, gcpAccount.projectId)
Expand All @@ -595,6 +647,7 @@ public int hashCode() {
isCspmEnabled,
isResourceChangeCollectionEnabled,
isSecurityCommandCenterEnabled,
monitoredResourceConfigs,
privateKey,
privateKeyId,
projectId,
Expand Down Expand Up @@ -628,6 +681,9 @@ public String toString() {
sb.append(" isSecurityCommandCenterEnabled: ")
.append(toIndentedString(isSecurityCommandCenterEnabled))
.append("\n");
sb.append(" monitoredResourceConfigs: ")
.append(toIndentedString(monitoredResourceConfigs))
.append("\n");
sb.append(" privateKey: ").append(toIndentedString(privateKey)).append("\n");
sb.append(" privateKeyId: ").append(toIndentedString(privateKeyId)).append("\n");
sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n");
Expand Down
Loading