Sha256: 4451ea25ee88429cd6fe4aca976d23d34a0088db38ac0a76fdf5896a53c06a25

Contents?: true

Size: 802 Bytes

Versions: 9

Compression:

Stored size: 802 Bytes

Contents

# Update STS Service Account returns "OK" response with enable resource collection turned on

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::GCPIntegrationAPI.new

# there is a valid "gcp_sts_account" in the system
GCP_STS_ACCOUNT_DATA_ID = ENV["GCP_STS_ACCOUNT_DATA_ID"]

body = DatadogAPIClient::V2::GCPSTSServiceAccountUpdateRequest.new({
  data: DatadogAPIClient::V2::GCPSTSServiceAccountUpdateRequestData.new({
    attributes: DatadogAPIClient::V2::GCPSTSServiceAccountAttributes.new({
      client_email: "Test-252bf553ef04b351@example.com",
      resource_collection_enabled: true,
    }),
    id: GCP_STS_ACCOUNT_DATA_ID,
    type: DatadogAPIClient::V2::GCPServiceAccountType::GCP_SERVICE_ACCOUNT,
  }),
})
p api_instance.update_gcpsts_account(GCP_STS_ACCOUNT_DATA_ID, body)

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
datadog_api_client-2.30.0 examples/v2/gcp-integration/UpdateGCPSTSAccount_3205636354.rb
datadog_api_client-2.29.1 examples/v2/gcp-integration/UpdateGCPSTSAccount_3205636354.rb
datadog_api_client-2.28.1 examples/v2/gcp-integration/UpdateGCPSTSAccount_3205636354.rb
datadog_api_client-2.27.1 examples/v2/gcp-integration/UpdateGCPSTSAccount_3205636354.rb
datadog_api_client-2.26.1 examples/v2/gcp-integration/UpdateGCPSTSAccount_3205636354.rb
datadog_api_client-2.26.0 examples/v2/gcp-integration/UpdateGCPSTSAccount_3205636354.rb
datadog_api_client-2.25.0 examples/v2/gcp-integration/UpdateGCPSTSAccount_3205636354.rb
datadog_api_client-2.24.0 examples/v2/gcp-integration/UpdateGCPSTSAccount_3205636354.rb
datadog_api_client-2.22.0 examples/v2/gcp-integration/UpdateGCPSTSAccount_3205636354.rb