Sha256: d7f1eab23cc33dcf8d53a18e95b29771ee502c93ed1f8363cdadec540a1dcc08

Contents?: true

Size: 1.45 KB

Versions: 19

Compression:

Stored size: 1.45 KB

Contents

# Create Scanning Group returns "OK" response

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

# a valid "configuration" in the system
CONFIGURATION_DATA_ID = ENV["CONFIGURATION_DATA_ID"]

body = DatadogAPIClient::V2::SensitiveDataScannerGroupCreateRequest.new({
  meta: DatadogAPIClient::V2::SensitiveDataScannerMetaVersionOnly.new({}),
  data: DatadogAPIClient::V2::SensitiveDataScannerGroupCreate.new({
    type: DatadogAPIClient::V2::SensitiveDataScannerGroupType::SENSITIVE_DATA_SCANNER_GROUP,
    attributes: DatadogAPIClient::V2::SensitiveDataScannerGroupAttributes.new({
      name: "Example-Sensitive-Data-Scanner",
      is_enabled: false,
      product_list: [
        DatadogAPIClient::V2::SensitiveDataScannerProduct::LOGS,
      ],
      filter: DatadogAPIClient::V2::SensitiveDataScannerFilter.new({
        query: "*",
      }),
    }),
    relationships: DatadogAPIClient::V2::SensitiveDataScannerGroupRelationships.new({
      configuration: DatadogAPIClient::V2::SensitiveDataScannerConfigurationData.new({
        data: DatadogAPIClient::V2::SensitiveDataScannerConfiguration.new({
          type: DatadogAPIClient::V2::SensitiveDataScannerConfigurationType::SENSITIVE_DATA_SCANNER_CONFIGURATIONS,
          id: CONFIGURATION_DATA_ID,
        }),
      }),
      rules: DatadogAPIClient::V2::SensitiveDataScannerRuleData.new({
        data: [],
      }),
    }),
  }),
})
p api_instance.create_scanning_group(body)

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
datadog_api_client-2.28.1 examples/v2/sensitive-data-scanner/CreateScanningGroup.rb
datadog_api_client-2.27.1 examples/v2/sensitive-data-scanner/CreateScanningGroup.rb
datadog_api_client-2.26.1 examples/v2/sensitive-data-scanner/CreateScanningGroup.rb
datadog_api_client-2.26.0 examples/v2/sensitive-data-scanner/CreateScanningGroup.rb
datadog_api_client-2.25.0 examples/v2/sensitive-data-scanner/CreateScanningGroup.rb
datadog_api_client-2.24.0 examples/v2/sensitive-data-scanner/CreateScanningGroup.rb
datadog_api_client-2.22.0 examples/v2/sensitive-data-scanner/CreateScanningGroup.rb
datadog_api_client-2.21.0 examples/v2/sensitive-data-scanner/CreateScanningGroup.rb
datadog_api_client-2.20.0 examples/v2/sensitive-data-scanner/CreateScanningGroup.rb
datadog_api_client-2.19.0 examples/v2/sensitive-data-scanner/CreateScanningGroup.rb
datadog_api_client-2.18.0 examples/v2/sensitive-data-scanner/CreateScanningGroup.rb
datadog_api_client-2.17.0 examples/v2/sensitive-data-scanner/CreateScanningGroup.rb
datadog_api_client-2.16.0 examples/v2/sensitive-data-scanner/CreateScanningGroup.rb
datadog_api_client-2.15.0 examples/v2/sensitive-data-scanner/CreateScanningGroup.rb
datadog_api_client-2.14.0 examples/v2/sensitive-data-scanner/CreateScanningGroup.rb
datadog_api_client-2.13.0 examples/v2/sensitive-data-scanner/CreateScanningGroup.rb
datadog_api_client-2.12.0 examples/v2/sensitive-data-scanner/CreateScanningGroup.rb
datadog_api_client-2.11.0 examples/v2/sensitive-data-scanner/CreateScanningGroup.rb
datadog_api_client-2.10.0 examples/v2/sensitive-data-scanner/CreateScanningGroup.rb