Sha256: 18ccb777e96662c54f7efd6241b760d85c46e866b4f6f422c706d3ea6dbe7d94

Contents?: true

Size: 1.47 KB

Versions: 5

Compression:

Stored size: 1.47 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-Create_Scanning_Group_returns_OK_response",
      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

5 entries across 5 versions & 1 rubygems

Version Path
datadog_api_client-2.9.0 examples/v2/sensitive-data-scanner/CreateScanningGroup.rb
datadog_api_client-2.8.0 examples/v2/sensitive-data-scanner/CreateScanningGroup.rb
datadog_api_client-2.7.0 examples/v2/sensitive-data-scanner/CreateScanningGroup.rb
datadog_api_client-2.6.0 examples/v2/sensitive-data-scanner/CreateScanningGroup.rb
datadog_api_client-2.5.0 examples/v2/sensitive-data-scanner/CreateScanningGroup.rb