Skip to content

Commit

Permalink
Merge master into datadog-api-spec/test/sherz/add-case-management-group
Browse files Browse the repository at this point in the history
  • Loading branch information
2 parents fca9f1b + f517988 commit 6f9f631
Show file tree
Hide file tree
Showing 32 changed files with 550 additions and 49 deletions.
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-02-14 10:50:03.602357",
"spec_repo_commit": "9348385b"
"regenerated": "2024-02-20 12:21:52.216044",
"spec_repo_commit": "7e467650"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-02-14 10:50:03.618501",
"spec_repo_commit": "9348385b"
"regenerated": "2024-02-20 12:21:52.235691",
"spec_repo_commit": "7e467650"
}
}
}
14 changes: 14 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3207,6 +3207,18 @@ components:
key.'
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.

Only Cloud Run revision resources that apply to specified filters are
imported into Datadog.'
example:
- $KEY:$VALUE
items:
description: Cloud Run Filters
type: string
type: array
errors:
description: An array of errors.
example:
Expand Down Expand Up @@ -13213,10 +13225,12 @@ components:
only supporting `http`.
enum:
- http
- grpc
example: http
type: string
x-enum-varnames:
- HTTP
- GRPC
SyntheticsAPITest:
description: Object containing details about a Synthetic API test.
properties:
Expand Down
19 changes: 16 additions & 3 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2039,7 +2039,8 @@ components:
type: number
type: object
CIAppAggregateSort:
description: A sort rule.
description: A sort rule. The `aggregation` field is required when `type` is
`measure`.
example:
aggregation: count
order: asc
Expand Down Expand Up @@ -7388,6 +7389,18 @@ components:
description: Your service account email address.
example: datadog-service-account@test-project.iam.gserviceaccount.com
type: string
cloud_run_revision_filters:
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.'
example:
- $KEY:$VALUE
items:
description: Cloud Run Filters
type: string
type: array
host_filters:
description: Your Host Filters.
items:
Expand Down Expand Up @@ -24052,7 +24065,7 @@ paths:
/api/v2/cost_by_tag/active_billing_dimensions:
get:
description: Get active billing dimensions for cost attribution. Cost data for
a given month becomes available no later than the 17th of the following month.
a given month becomes available no later than the 19th of the following month.
operationId: GetActiveBillingDimensions
responses:
'200':
Expand Down Expand Up @@ -24094,7 +24107,7 @@ paths:
get:
description: "Get monthly cost attribution by tag across multi-org and single
root-org accounts.\nCost Attribution data for a given month becomes available
no later than the 17th of the following month.\nThis API endpoint is paginated.
no later than the 19th of the following month.\nThis API endpoint is paginated.
To make sure you receive all records, check if the value of `next_record_id`
is\nset in the response. If it is, make another request and pass `next_record_id`
as a parameter.\nPseudo code example:\n```\nresponse := GetMonthlyCostAttribution(start_month,
Expand Down
38 changes: 37 additions & 1 deletion api/datadogV1/model_gcp_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ type GCPAccount struct {
// Should be `https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL`
// where `$CLIENT_EMAIL` is the email found in your JSON service account key.
ClientX509CertUrl *string `json:"client_x509_cert_url,omitempty"`
// 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.
CloudRunRevisionFilters []string `json:"cloud_run_revision_filters,omitempty"`
// An array of errors.
Errors []string `json:"errors,omitempty"`
// Limit the GCE instances that are pulled into Datadog by using tags.
Expand Down Expand Up @@ -238,6 +241,34 @@ func (o *GCPAccount) SetClientX509CertUrl(v string) {
o.ClientX509CertUrl = &v
}

// GetCloudRunRevisionFilters returns the CloudRunRevisionFilters field value if set, zero value otherwise.
func (o *GCPAccount) GetCloudRunRevisionFilters() []string {
if o == nil || o.CloudRunRevisionFilters == nil {
var ret []string
return ret
}
return o.CloudRunRevisionFilters
}

// GetCloudRunRevisionFiltersOk returns a tuple with the CloudRunRevisionFilters field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GCPAccount) GetCloudRunRevisionFiltersOk() (*[]string, bool) {
if o == nil || o.CloudRunRevisionFilters == nil {
return nil, false
}
return &o.CloudRunRevisionFilters, true
}

// HasCloudRunRevisionFilters returns a boolean if a field has been set.
func (o *GCPAccount) HasCloudRunRevisionFilters() bool {
return o != nil && o.CloudRunRevisionFilters != nil
}

// SetCloudRunRevisionFilters gets a reference to the given []string and assigns it to the CloudRunRevisionFilters field.
func (o *GCPAccount) SetCloudRunRevisionFilters(v []string) {
o.CloudRunRevisionFilters = v
}

// GetErrors returns the Errors field value if set, zero value otherwise.
func (o *GCPAccount) GetErrors() []string {
if o == nil || o.Errors == nil {
Expand Down Expand Up @@ -542,6 +573,9 @@ func (o GCPAccount) MarshalJSON() ([]byte, error) {
if o.ClientX509CertUrl != nil {
toSerialize["client_x509_cert_url"] = o.ClientX509CertUrl
}
if o.CloudRunRevisionFilters != nil {
toSerialize["cloud_run_revision_filters"] = o.CloudRunRevisionFilters
}
if o.Errors != nil {
toSerialize["errors"] = o.Errors
}
Expand Down Expand Up @@ -588,6 +622,7 @@ func (o *GCPAccount) UnmarshalJSON(bytes []byte) (err error) {
ClientEmail *string `json:"client_email,omitempty"`
ClientId *string `json:"client_id,omitempty"`
ClientX509CertUrl *string `json:"client_x509_cert_url,omitempty"`
CloudRunRevisionFilters []string `json:"cloud_run_revision_filters,omitempty"`
Errors []string `json:"errors,omitempty"`
HostFilters *string `json:"host_filters,omitempty"`
IsCspmEnabled *bool `json:"is_cspm_enabled,omitempty"`
Expand All @@ -604,7 +639,7 @@ func (o *GCPAccount) UnmarshalJSON(bytes []byte) (err error) {
}
additionalProperties := make(map[string]interface{})
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"auth_provider_x509_cert_url", "auth_uri", "automute", "client_email", "client_id", "client_x509_cert_url", "errors", "host_filters", "is_cspm_enabled", "is_security_command_center_enabled", "private_key", "private_key_id", "project_id", "resource_collection_enabled", "token_uri", "type"})
datadog.DeleteKeys(additionalProperties, &[]string{"auth_provider_x509_cert_url", "auth_uri", "automute", "client_email", "client_id", "client_x509_cert_url", "cloud_run_revision_filters", "errors", "host_filters", "is_cspm_enabled", "is_security_command_center_enabled", "private_key", "private_key_id", "project_id", "resource_collection_enabled", "token_uri", "type"})
} else {
return err
}
Expand All @@ -614,6 +649,7 @@ func (o *GCPAccount) UnmarshalJSON(bytes []byte) (err error) {
o.ClientEmail = all.ClientEmail
o.ClientId = all.ClientId
o.ClientX509CertUrl = all.ClientX509CertUrl
o.CloudRunRevisionFilters = all.CloudRunRevisionFilters
o.Errors = all.Errors
o.HostFilters = all.HostFilters
o.IsCspmEnabled = all.IsCspmEnabled
Expand Down
2 changes: 2 additions & 0 deletions api/datadogV1/model_synthetics_api_step_subtype.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ type SyntheticsAPIStepSubtype string
// List of SyntheticsAPIStepSubtype.
const (
SYNTHETICSAPISTEPSUBTYPE_HTTP SyntheticsAPIStepSubtype = "http"
SYNTHETICSAPISTEPSUBTYPE_GRPC SyntheticsAPIStepSubtype = "grpc"
)

var allowedSyntheticsAPIStepSubtypeEnumValues = []SyntheticsAPIStepSubtype{
SYNTHETICSAPISTEPSUBTYPE_HTTP,
SYNTHETICSAPISTEPSUBTYPE_GRPC,
}

// GetAllowedValues reeturns the list of possible values.
Expand Down
4 changes: 2 additions & 2 deletions api/datadogV2/api_usage_metering.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
type UsageMeteringApi datadog.Service

// GetActiveBillingDimensions Get active billing dimensions for cost attribution.
// Get active billing dimensions for cost attribution. Cost data for a given month becomes available no later than the 17th of the following month.
// Get active billing dimensions for cost attribution. Cost data for a given month becomes available no later than the 19th of the following month.
func (a *UsageMeteringApi) GetActiveBillingDimensions(ctx _context.Context) (ActiveBillingDimensionsResponse, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
Expand Down Expand Up @@ -648,7 +648,7 @@ func (r *GetMonthlyCostAttributionOptionalParameters) WithIncludeDescendants(inc

// GetMonthlyCostAttribution Get Monthly Cost Attribution.
// Get monthly cost attribution by tag across multi-org and single root-org accounts.
// Cost Attribution data for a given month becomes available no later than the 17th of the following month.
// Cost Attribution data for a given month becomes available no later than the 19th of the following month.
// This API endpoint is paginated. To make sure you receive all records, check if the value of `next_record_id` is
// set in the response. If it is, make another request and pass `next_record_id` as a parameter.
// Pseudo code example:
Expand Down
2 changes: 1 addition & 1 deletion api/datadogV2/model_ci_app_aggregate_sort.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
)

// CIAppAggregateSort A sort rule.
// CIAppAggregateSort A sort rule. The `aggregation` field is required when `type` is `measure`.
type CIAppAggregateSort struct {
// An aggregation function.
Aggregation *CIAppAggregationFunction `json:"aggregation,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion api/datadogV2/model_ci_app_pipelines_group_by.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type CIAppPipelinesGroupBy struct {
Limit *int64 `json:"limit,omitempty"`
// The value to use for logs that don't have the facet used to group-by.
Missing *CIAppGroupByMissing `json:"missing,omitempty"`
// A sort rule.
// A sort rule. The `aggregation` field is required when `type` is `measure`.
Sort *CIAppAggregateSort `json:"sort,omitempty"`
// A resulting object to put the given computes in over all the matching records.
Total *CIAppGroupByTotal `json:"total,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion api/datadogV2/model_ci_app_tests_group_by.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type CIAppTestsGroupBy struct {
Limit *int64 `json:"limit,omitempty"`
// The value to use for logs that don't have the facet used to group-by.
Missing *CIAppGroupByMissing `json:"missing,omitempty"`
// A sort rule.
// A sort rule. The `aggregation` field is required when `type` is `measure`.
Sort *CIAppAggregateSort `json:"sort,omitempty"`
// A resulting object to put the given computes in over all the matching records.
Total *CIAppGroupByTotal `json:"total,omitempty"`
Expand Down
38 changes: 37 additions & 1 deletion api/datadogV2/model_gcpsts_service_account_attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ type GCPSTSServiceAccountAttributes struct {
Automute *bool `json:"automute,omitempty"`
// Your service account email address.
ClientEmail *string `json:"client_email,omitempty"`
// 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.
CloudRunRevisionFilters []string `json:"cloud_run_revision_filters,omitempty"`
// Your Host Filters.
HostFilters []string `json:"host_filters,omitempty"`
// 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.
Expand Down Expand Up @@ -134,6 +137,34 @@ func (o *GCPSTSServiceAccountAttributes) SetClientEmail(v string) {
o.ClientEmail = &v
}

// GetCloudRunRevisionFilters returns the CloudRunRevisionFilters field value if set, zero value otherwise.
func (o *GCPSTSServiceAccountAttributes) GetCloudRunRevisionFilters() []string {
if o == nil || o.CloudRunRevisionFilters == nil {
var ret []string
return ret
}
return o.CloudRunRevisionFilters
}

// GetCloudRunRevisionFiltersOk returns a tuple with the CloudRunRevisionFilters field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GCPSTSServiceAccountAttributes) GetCloudRunRevisionFiltersOk() (*[]string, bool) {
if o == nil || o.CloudRunRevisionFilters == nil {
return nil, false
}
return &o.CloudRunRevisionFilters, true
}

// HasCloudRunRevisionFilters returns a boolean if a field has been set.
func (o *GCPSTSServiceAccountAttributes) HasCloudRunRevisionFilters() bool {
return o != nil && o.CloudRunRevisionFilters != nil
}

// SetCloudRunRevisionFilters gets a reference to the given []string and assigns it to the CloudRunRevisionFilters field.
func (o *GCPSTSServiceAccountAttributes) SetCloudRunRevisionFilters(v []string) {
o.CloudRunRevisionFilters = v
}

// GetHostFilters returns the HostFilters field value if set, zero value otherwise.
func (o *GCPSTSServiceAccountAttributes) GetHostFilters() []string {
if o == nil || o.HostFilters == nil {
Expand Down Expand Up @@ -261,6 +292,9 @@ func (o GCPSTSServiceAccountAttributes) MarshalJSON() ([]byte, error) {
if o.ClientEmail != nil {
toSerialize["client_email"] = o.ClientEmail
}
if o.CloudRunRevisionFilters != nil {
toSerialize["cloud_run_revision_filters"] = o.CloudRunRevisionFilters
}
if o.HostFilters != nil {
toSerialize["host_filters"] = o.HostFilters
}
Expand All @@ -286,6 +320,7 @@ func (o *GCPSTSServiceAccountAttributes) UnmarshalJSON(bytes []byte) (err error)
AccountTags []string `json:"account_tags,omitempty"`
Automute *bool `json:"automute,omitempty"`
ClientEmail *string `json:"client_email,omitempty"`
CloudRunRevisionFilters []string `json:"cloud_run_revision_filters,omitempty"`
HostFilters []string `json:"host_filters,omitempty"`
IsCspmEnabled *bool `json:"is_cspm_enabled,omitempty"`
IsSecurityCommandCenterEnabled *bool `json:"is_security_command_center_enabled,omitempty"`
Expand All @@ -296,13 +331,14 @@ func (o *GCPSTSServiceAccountAttributes) UnmarshalJSON(bytes []byte) (err error)
}
additionalProperties := make(map[string]interface{})
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"account_tags", "automute", "client_email", "host_filters", "is_cspm_enabled", "is_security_command_center_enabled", "resource_collection_enabled"})
datadog.DeleteKeys(additionalProperties, &[]string{"account_tags", "automute", "client_email", "cloud_run_revision_filters", "host_filters", "is_cspm_enabled", "is_security_command_center_enabled", "resource_collection_enabled"})
} else {
return err
}
o.AccountTags = all.AccountTags
o.Automute = all.Automute
o.ClientEmail = all.ClientEmail
o.CloudRunRevisionFilters = all.CloudRunRevisionFilters
o.HostFilters = all.HostFilters
o.IsCspmEnabled = all.IsCspmEnabled
o.IsSecurityCommandCenterEnabled = all.IsSecurityCommandCenterEnabled
Expand Down
15 changes: 9 additions & 6 deletions examples/v1/gcp-integration/CreateGCPIntegration.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@ import (

func main() {
body := datadogV1.GCPAccount{
AuthProviderX509CertUrl: datadog.PtrString("https://www.googleapis.com/oauth2/v1/certs"),
AuthUri: datadog.PtrString("https://accounts.google.com/o/oauth2/auth"),
ClientEmail: datadog.PtrString("252bf553ef04b351@example.com"),
ClientId: datadog.PtrString("163662907116366290710"),
ClientX509CertUrl: datadog.PtrString("https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL"),
HostFilters: datadog.PtrString("key:value,filter:example"),
AuthProviderX509CertUrl: datadog.PtrString("https://www.googleapis.com/oauth2/v1/certs"),
AuthUri: datadog.PtrString("https://accounts.google.com/o/oauth2/auth"),
ClientEmail: datadog.PtrString("252bf553ef04b351@example.com"),
ClientId: datadog.PtrString("163662907116366290710"),
ClientX509CertUrl: datadog.PtrString("https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL"),
HostFilters: datadog.PtrString("key:value,filter:example"),
CloudRunRevisionFilters: []string{
"dr:dre",
},
IsCspmEnabled: datadog.PtrBool(true),
IsSecurityCommandCenterEnabled: datadog.PtrBool(true),
PrivateKey: datadog.PtrString("private_key"),
Expand Down
48 changes: 48 additions & 0 deletions examples/v1/gcp-integration/UpdateGCPIntegration_3544259255.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// Update a GCP integration cloud run revision filters returns "OK" response

package main

import (
"context"
"encoding/json"
"fmt"
"os"

"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
body := datadogV1.GCPAccount{
AuthProviderX509CertUrl: datadog.PtrString("https://www.googleapis.com/oauth2/v1/certs"),
AuthUri: datadog.PtrString("https://accounts.google.com/o/oauth2/auth"),
ClientEmail: datadog.PtrString("252bf553ef04b351@example.com"),
ClientId: datadog.PtrString("163662907116366290710"),
ClientX509CertUrl: datadog.PtrString("https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL"),
HostFilters: datadog.PtrString("key:value,filter:example"),
CloudRunRevisionFilters: []string{
"merp:derp",
},
IsCspmEnabled: datadog.PtrBool(true),
IsSecurityCommandCenterEnabled: datadog.PtrBool(true),
PrivateKey: datadog.PtrString("private_key"),
PrivateKeyId: datadog.PtrString("123456789abcdefghi123456789abcdefghijklm"),
ProjectId: datadog.PtrString("datadog-apitest"),
ResourceCollectionEnabled: datadog.PtrBool(true),
TokenUri: datadog.PtrString("https://accounts.google.com/o/oauth2/token"),
Type: datadog.PtrString("service_account"),
}
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
api := datadogV1.NewGCPIntegrationApi(apiClient)
resp, r, err := api.UpdateGCPIntegration(ctx, body)

if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GCPIntegrationApi.UpdateGCPIntegration`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}

responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from `GCPIntegrationApi.UpdateGCPIntegration`:\n%s\n", responseContent)
}
Loading

0 comments on commit 6f9f631

Please sign in to comment.