diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 79c3e338ff..10a5a5875c 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -12266,6 +12266,349 @@ components: type: string x-enum-varnames: - CREATE_RULESET + CreateTableRequest: + description: The definition of `CreateTableRequest` object. + example: + data: + attributes: + description: this is a cloud table generated via a cloud bucket sync + file_metadata: + access_details: + aws_detail: + aws_account_id: test-account-id + aws_bucket_name: test-bucket + file_path: test_rt.csv + sync_enabled: true + schema: + fields: + - name: name + type: STRING + - name: account_id + type: STRING + primary_keys: + - account_id + source: S3 + table_name: test_reference_table + tags: + - test_tag + type: reference_table + properties: + data: + $ref: '#/components/schemas/CreateTableRequestData' + type: object + CreateTableRequestData: + description: The definition of `CreateTableRequestData` object. + properties: + attributes: + $ref: '#/components/schemas/CreateTableRequestDataAttributes' + id: + description: The ID of the reference table. + type: string + type: + $ref: '#/components/schemas/CreateTableRequestDataType' + required: + - type + type: object + CreateTableRequestDataAttributes: + description: The definition of `CreateTableRequestDataAttributes` object. + properties: + description: + description: The description of the reference table. + type: string + file_metadata: + $ref: '#/components/schemas/CreateTableRequestDataAttributesFileMetadata' + schema: + $ref: '#/components/schemas/CreateTableRequestDataAttributesSchema' + source: + $ref: '#/components/schemas/ReferenceTableCreateSourceType' + table_name: + description: The name of the reference table. + example: '' + type: string + tags: + description: The tags of the reference table. + items: + type: string + type: array + required: + - table_name + - schema + - source + type: object + CreateTableRequestDataAttributesFileMetadata: + description: The definition of `CreateTableRequestDataAttributesFileMetadata` + object. + oneOf: + - $ref: '#/components/schemas/CreateTableRequestDataAttributesFileMetadataCloudStorage' + - $ref: '#/components/schemas/CreateTableRequestDataAttributesFileMetadataLocalFile' + CreateTableRequestDataAttributesFileMetadataCloudStorage: + additionalProperties: false + description: Cloud storage file metadata for create requests. Both access_details + and sync_enabled are required. + properties: + access_details: + $ref: '#/components/schemas/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails' + sync_enabled: + description: Whether this table is synced automatically. + example: false + type: boolean + required: + - access_details + - sync_enabled + title: CloudFileMetadataV2 + type: object + CreateTableRequestDataAttributesFileMetadataLocalFile: + additionalProperties: false + description: Local file metadata for create requests using the upload ID. + properties: + upload_id: + description: The upload ID. + example: '' + type: string + required: + - upload_id + title: LocalFileMetadataV2 + type: object + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails: + description: The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails` + object. + properties: + aws_detail: + $ref: '#/components/schemas/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail' + azure_detail: + $ref: '#/components/schemas/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail' + gcp_detail: + $ref: '#/components/schemas/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail' + type: object + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail: + description: The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail` + object. + properties: + aws_account_id: + description: The ID of the AWS account. + example: '123456789000' + type: string + aws_bucket_name: + description: The name of the Amazon S3 bucket. + example: example-data-bucket + type: string + file_path: + description: The relative file path from the S3 bucket root to the CSV file. + example: reference-tables/users.csv + type: string + required: + - aws_account_id + - aws_bucket_name + - file_path + type: object + x-oneOf-parent: + - AwsDetail + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail: + description: The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail` + object. + properties: + azure_client_id: + description: The Azure client ID. + example: aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb + type: string + azure_container_name: + description: The name of the Azure container. + example: reference-data + type: string + azure_storage_account_name: + description: The name of the Azure storage account. + example: examplestorageaccount + type: string + azure_tenant_id: + description: The ID of the Azure tenant. + example: cccccccc-4444-5555-6666-dddddddddddd + type: string + file_path: + description: The relative file path from the Azure container root to the + CSV file. + example: tables/users.csv + type: string + required: + - azure_client_id + - azure_container_name + - azure_storage_account_name + - azure_tenant_id + - file_path + type: object + x-oneOf-parent: + - AzureDetail + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail: + description: The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail` + object. + properties: + file_path: + description: The relative file path from the GCS bucket root to the CSV + file. + example: data/reference_tables/users.csv + type: string + gcp_bucket_name: + description: The name of the GCP bucket. + example: example-data-bucket + type: string + gcp_project_id: + description: The ID of the GCP project. + example: example-gcp-project-12345 + type: string + gcp_service_account_email: + description: The email of the GCP service account. + example: example-service@example-gcp-project-12345.iam.gserviceaccount.com + type: string + required: + - file_path + - gcp_bucket_name + - gcp_project_id + - gcp_service_account_email + type: object + x-oneOf-parent: + - GcpDetail + CreateTableRequestDataAttributesSchema: + description: The definition of `CreateTableRequestDataAttributesSchema` object. + properties: + fields: + description: The `schema` `fields`. + items: + $ref: '#/components/schemas/CreateTableRequestDataAttributesSchemaFieldsItems' + type: array + primary_keys: + description: List of field names that serve as primary keys for the table. + Only one primary key is supported, and it is used as an ID to retrieve + rows. + example: + - '' + items: + type: string + type: array + required: + - fields + - primary_keys + type: object + CreateTableRequestDataAttributesSchemaFieldsItems: + description: The definition of `CreateTableRequestDataAttributesSchemaFieldsItems` + object. + properties: + name: + description: The field name. + example: '' + type: string + type: + $ref: '#/components/schemas/ReferenceTableSchemaFieldType' + required: + - name + - type + type: object + CreateTableRequestDataType: + default: reference_table + description: Reference table resource type. + enum: + - reference_table + example: reference_table + type: string + x-enum-varnames: + - REFERENCE_TABLE + CreateUploadRequest: + description: The definition of `CreateUploadRequest` object. + properties: + data: + $ref: '#/components/schemas/CreateUploadRequestData' + type: object + CreateUploadRequestData: + description: The definition of `CreateUploadRequestData` object. + properties: + attributes: + $ref: '#/components/schemas/CreateUploadRequestDataAttributes' + id: + description: The ID of the upload. + type: string + type: + $ref: '#/components/schemas/CreateUploadRequestDataType' + required: + - type + type: object + CreateUploadRequestDataAttributes: + description: The definition of `CreateUploadRequestDataAttributes` object. + properties: + headers: + description: The headers of the file to upload. + example: + - '' + items: + type: string + type: array + part_count: + description: The number of parts in the upload. + example: 3 + format: int32 + maximum: 20 + type: integer + part_size: + description: The size of each part in the upload in bytes. For multipart + uploads (part_count > 1), all parts except the last one must be at least + 5,000,000 bytes. For single-part uploads (part_count = 1), any size is + allowed. + example: 10000000 + format: int64 + type: integer + table_name: + description: The name of the reference table. + example: '' + type: string + required: + - headers + - table_name + - part_count + - part_size + type: object + CreateUploadRequestDataType: + default: upload + description: Upload resource type. + enum: + - upload + example: upload + type: string + x-enum-varnames: + - UPLOAD + CreateUploadResponse: + description: The definition of `CreateUploadResponse` object. + properties: + data: + $ref: '#/components/schemas/CreateUploadResponseData' + type: object + CreateUploadResponseData: + description: The definition of `CreateUploadResponseData` object. + properties: + attributes: + $ref: '#/components/schemas/CreateUploadResponseDataAttributes' + id: + description: The ID of the upload. + type: string + type: + $ref: '#/components/schemas/CreateUploadResponseDataType' + required: + - type + type: object + CreateUploadResponseDataAttributes: + description: The definition of `CreateUploadResponseDataAttributes` object. + properties: + part_urls: + description: The URLs of the parts in the upload. + items: + type: string + type: array + type: object + CreateUploadResponseDataType: + default: upload + description: Upload resource type. + enum: + - upload + example: upload + type: string + x-enum-varnames: + - UPLOAD CreateWorkflowRequest: description: A request object for creating a new workflow. example: @@ -35482,6 +35825,225 @@ components: version: $ref: '#/components/schemas/Version' type: object + PatchTableRequest: + description: The definition of `PatchTableRequest` object. + example: + data: + attributes: + description: this is a cloud table generated via a cloud bucket sync + file_metadata: + access_details: + aws_detail: + aws_account_id: test-account-id + aws_bucket_name: test-bucket + file_path: test_rt.csv + sync_enabled: true + schema: + fields: + - name: id + type: INT32 + - name: name + type: STRING + primary_keys: + - id + sync_enabled: false + tags: + - test_tag + id: 00000000-0000-0000-0000-000000000000 + type: reference_table + properties: + data: + $ref: '#/components/schemas/PatchTableRequestData' + type: object + PatchTableRequestData: + description: The definition of `PatchTableRequestData` object. + properties: + attributes: + $ref: '#/components/schemas/PatchTableRequestDataAttributes' + id: + description: The ID of the reference table. + type: string + type: + $ref: '#/components/schemas/PatchTableRequestDataType' + required: + - type + type: object + PatchTableRequestDataAttributes: + description: The definition of `PatchTableRequestDataAttributes` object. + properties: + description: + description: The description of the reference table. + type: string + file_metadata: + $ref: '#/components/schemas/PatchTableRequestDataAttributesFileMetadata' + schema: + $ref: '#/components/schemas/PatchTableRequestDataAttributesSchema' + sync_enabled: + description: Whether this table is synced automatically. + type: boolean + tags: + description: The tags of the reference table. + items: + type: string + type: array + type: object + PatchTableRequestDataAttributesFileMetadata: + description: The definition of `PatchTableRequestDataAttributesFileMetadata` + object. + oneOf: + - $ref: '#/components/schemas/PatchTableRequestDataAttributesFileMetadataCloudStorage' + - $ref: '#/components/schemas/PatchTableRequestDataAttributesFileMetadataLocalFile' + PatchTableRequestDataAttributesFileMetadataCloudStorage: + additionalProperties: false + description: Cloud storage file metadata for patch requests. Allows partial + updates of access_details and sync_enabled. + properties: + access_details: + $ref: '#/components/schemas/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails' + sync_enabled: + description: Whether this table is synced automatically. + example: false + type: boolean + title: CloudFileMetadataV2 + type: object + PatchTableRequestDataAttributesFileMetadataLocalFile: + additionalProperties: false + description: Local file metadata for patch requests using upload ID. + properties: + upload_id: + description: The upload ID. + example: '' + type: string + required: + - upload_id + title: LocalFileMetadataV2 + type: object + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails: + description: The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails` + object. + properties: + aws_detail: + $ref: '#/components/schemas/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail' + azure_detail: + $ref: '#/components/schemas/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail' + gcp_detail: + $ref: '#/components/schemas/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail' + type: object + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail: + description: The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail` + object. + properties: + aws_account_id: + description: The ID of the AWS account. + example: '123456789000' + type: string + aws_bucket_name: + description: The name of the AWS bucket. + example: example-data-bucket + type: string + file_path: + description: The relative file path from the S3 bucket root to the CSV file. + example: reference-tables/users.csv + type: string + type: object + x-oneOf-parent: + - AwsDetail + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail: + description: The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail` + object. + properties: + azure_client_id: + description: The Azure client ID. + example: aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb + type: string + azure_container_name: + description: The name of the Azure container. + example: reference-data + type: string + azure_storage_account_name: + description: The name of the Azure storage account. + example: examplestorageaccount + type: string + azure_tenant_id: + description: The ID of the Azure tenant. + example: cccccccc-4444-5555-6666-dddddddddddd + type: string + file_path: + description: The relative file path from the Azure container root to the + CSV file. + example: tables/users.csv + type: string + type: object + x-oneOf-parent: + - AzureDetail + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail: + description: The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail` + object. + properties: + file_path: + description: The relative file path from the GCS bucket root to the CSV + file. + example: data/reference_tables/users.csv + type: string + gcp_bucket_name: + description: The name of the GCP bucket. + example: example-data-bucket + type: string + gcp_project_id: + description: The ID of the GCP project. + example: example-gcp-project-12345 + type: string + gcp_service_account_email: + description: The email of the GCP service account. + example: example-service@example-gcp-project-12345.iam.gserviceaccount.com + type: string + type: object + x-oneOf-parent: + - GcpDetail + PatchTableRequestDataAttributesSchema: + description: The definition of `PatchTableRequestDataAttributesSchema` object. + properties: + fields: + description: The `schema` `fields`. + items: + $ref: '#/components/schemas/PatchTableRequestDataAttributesSchemaFieldsItems' + type: array + primary_keys: + description: List of field names that serve as primary keys for the table. + Only one primary key is supported, and it is used as an ID to retrieve + rows. + example: + - '' + items: + type: string + type: array + required: + - fields + - primary_keys + type: object + PatchTableRequestDataAttributesSchemaFieldsItems: + description: The definition of `PatchTableRequestDataAttributesSchemaFieldsItems` + object. + properties: + name: + description: The field name. + example: '' + type: string + type: + $ref: '#/components/schemas/ReferenceTableSchemaFieldType' + required: + - name + - type + type: object + PatchTableRequestDataType: + default: reference_table + description: Reference table resource type. + enum: + - reference_table + example: reference_table + type: string + x-enum-varnames: + - REFERENCE_TABLE Permission: description: Permission object. properties: @@ -37099,6 +37661,73 @@ components: type: string x-enum-varnames: - RECOMMENDATION + ReferenceTableCreateSourceType: + description: The source type for creating reference table data. Only these source + types can be created through this API. + enum: + - LOCAL_FILE + - S3 + - GCS + - AZURE + example: LOCAL_FILE + type: string + x-enum-varnames: + - LOCAL_FILE + - S3 + - GCS + - AZURE + ReferenceTableSchemaFieldType: + description: The field type for reference table schema fields. + enum: + - STRING + - INT32 + example: STRING + type: string + x-enum-varnames: + - STRING + - INT32 + ReferenceTableSortType: + default: -updated_at + description: Sort field and direction for reference tables. Use field name for + ascending, prefix with "-" for descending. + enum: + - updated_at + - table_name + - status + - -updated_at + - -table_name + - -status + type: string + x-enum-varnames: + - UPDATED_AT + - TABLE_NAME + - STATUS + - MINUS_UPDATED_AT + - MINUS_TABLE_NAME + - MINUS_STATUS + ReferenceTableSourceType: + description: The source type for reference table data. Includes all possible + source types that can appear in responses. + enum: + - LOCAL_FILE + - S3 + - GCS + - AZURE + - SERVICENOW + - SALESFORCE + - DATABRICKS + - SNOWFLAKE + example: LOCAL_FILE + type: string + x-enum-varnames: + - LOCAL_FILE + - S3 + - GCS + - AZURE + - SERVICENOW + - SALESFORCE + - DATABRICKS + - SNOWFLAKE RegisterAppKeyResponse: description: The response object after creating an app key registration. properties: @@ -47003,6 +47632,394 @@ components: format: double type: number type: object + TableResultV2: + description: The definition of `TableResultV2` object. + example: + data: + attributes: + created_by: 00000000-0000-0000-0000-000000000000 + description: example description + file_metadata: + access_details: {} + upload_id: 00000000-0000-0000-0000-000000000000 + last_updated_by: '' + row_count: 5 + schema: + fields: + - name: id + type: INT32 + - name: name + type: STRING + primary_keys: + - id + source: LOCAL_FILE + status: DONE + table_name: test_reference_table + tags: + - tag1 + - tag2 + updated_at: '2000-01-01T01:00:00+00:00' + id: 00000000-0000-0000-0000-000000000000 + type: reference_table + properties: + data: + $ref: '#/components/schemas/TableResultV2Data' + type: object + TableResultV2Array: + description: The definition of `TableResultV2Array` object. + example: + data: + - attributes: + created_by: 00000000-0000-0000-0000-000000000000 + description: example description + file_metadata: + access_details: {} + error_message: '' + error_row_count: 0 + upload_id: 00000000-0000-0000-0000-000000000000 + last_updated_by: '' + row_count: 5 + schema: + fields: + - name: id + type: INT32 + - name: name + type: STRING + primary_keys: + - id + source: LOCAL_FILE + status: DONE + table_name: test_reference_table + tags: + - tag1 + - tag2 + updated_at: '2000-01-01T01:00:00+00:00' + id: 00000000-0000-0000-0000-000000000000 + type: reference_table + - attributes: + created_by: 00000000-0000-0000-0000-000000000000 + description: example description + file_metadata: + access_details: + aws_detail: + aws_account_id: test-account-id + aws_bucket_name: test-bucket + file_path: test_rt.csv + error_message: '' + error_row_count: 0 + sync_enabled: true + last_updated_by: 00000000-0000-0000-0000-000000000000 + row_count: 5 + schema: + fields: + - name: location + type: STRING + - name: file_name + type: STRING + primary_keys: + - location + source: S3 + status: DONE + table_name: test_reference_table_2 + tags: + - test_tag1 + - tag2 + - '3' + updated_at: '2000-01-01T01:00:00+00:00' + id: 00000000-0000-0000-0000-000000000000 + type: reference_table + properties: + data: + description: The reference tables. + items: + $ref: '#/components/schemas/TableResultV2Data' + type: array + required: + - data + type: object + TableResultV2Data: + description: The definition of `TableResultV2Data` object. + properties: + attributes: + $ref: '#/components/schemas/TableResultV2DataAttributes' + id: + description: The ID of the reference table. + type: string + type: + $ref: '#/components/schemas/TableResultV2DataType' + required: + - type + type: object + TableResultV2DataAttributes: + description: The definition of `TableResultV2DataAttributes` object. + properties: + created_by: + description: UUID of the user who created the reference table. + type: string + description: + description: The description of the reference table. + type: string + file_metadata: + $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadata' + last_updated_by: + description: UUID of the user who last updated the reference table. + type: string + row_count: + description: The number of successfully processed rows in the reference + table. + format: int64 + type: integer + schema: + $ref: '#/components/schemas/TableResultV2DataAttributesSchema' + source: + $ref: '#/components/schemas/ReferenceTableSourceType' + status: + description: The status of the reference table. + type: string + table_name: + description: The name of the reference table. + type: string + tags: + description: The tags of the reference table. + items: + type: string + type: array + updated_at: + description: The timestamp of the last update to the reference table in + ISO 8601 format. + type: string + type: object + TableResultV2DataAttributesFileMetadata: + description: The definition of `TableResultV2DataAttributesFileMetadata` object. + oneOf: + - $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataCloudStorage' + - $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataLocalFile' + TableResultV2DataAttributesFileMetadataCloudStorage: + description: File metadata for reference tables created by cloud storage. + properties: + access_details: + $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataOneOfAccessDetails' + error_message: + description: The error message returned from the sync. + type: string + error_row_count: + description: The number of rows that failed to sync. + format: int64 + type: integer + error_type: + $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataCloudStorageErrorType' + sync_enabled: + description: Whether this table is synced automatically. + type: boolean + title: CloudFileMetadataV2 + type: object + TableResultV2DataAttributesFileMetadataCloudStorageErrorType: + description: The type of error that occurred during file processing. This field + provides high-level error categories for easier troubleshooting and is only + present when there are errors. + enum: + - TABLE_SCHEMA_ERROR + - FILE_FORMAT_ERROR + - CONFIGURATION_ERROR + - QUOTA_EXCEEDED + - CONFLICT_ERROR + - VALIDATION_ERROR + - STATE_ERROR + - OPERATION_ERROR + - SYSTEM_ERROR + type: string + x-enum-varnames: + - TABLE_SCHEMA_ERROR + - FILE_FORMAT_ERROR + - CONFIGURATION_ERROR + - QUOTA_EXCEEDED + - CONFLICT_ERROR + - VALIDATION_ERROR + - STATE_ERROR + - OPERATION_ERROR + - SYSTEM_ERROR + TableResultV2DataAttributesFileMetadataLocalFile: + description: File metadata for reference tables created by upload. + properties: + error_message: + description: The error message returned from the creation/update. + type: string + error_row_count: + description: The number of rows that failed to create/update. + format: int64 + type: integer + upload_id: + description: The upload ID that was used to create/update the table. + type: string + title: LocalFileMetadataV2 + type: object + TableResultV2DataAttributesFileMetadataOneOfAccessDetails: + description: The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetails` + object. + properties: + aws_detail: + $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail' + azure_detail: + $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail' + gcp_detail: + $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail' + type: object + TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail: + description: The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail` + object. + properties: + aws_account_id: + description: The ID of the AWS account. + example: '123456789000' + type: string + aws_bucket_name: + description: The name of the AWS bucket. + example: example-data-bucket + type: string + file_path: + description: The relative file path from the S3 bucket root to the CSV file. + example: reference-tables/users.csv + type: string + type: object + x-oneOf-parent: + - AwsDetail + TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail: + description: The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail` + object. + properties: + azure_client_id: + description: The Azure client ID. + example: aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb + type: string + azure_container_name: + description: The name of the Azure container. + example: reference-data + type: string + azure_storage_account_name: + description: The name of the Azure storage account. + example: examplestorageaccount + type: string + azure_tenant_id: + description: The ID of the Azure tenant. + example: cccccccc-4444-5555-6666-dddddddddddd + type: string + file_path: + description: The relative file path from the Azure container root to the + CSV file. + example: tables/users.csv + type: string + type: object + x-oneOf-parent: + - AzureDetail + TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail: + description: The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail` + object. + properties: + file_path: + description: The relative file path from the GCS bucket root to the CSV + file. + example: data/reference_tables/users.csv + type: string + gcp_bucket_name: + description: The name of the GCP bucket. + example: example-data-bucket + type: string + gcp_project_id: + description: The ID of the GCP project. + example: example-gcp-project-12345 + type: string + gcp_service_account_email: + description: The email of the GCP service account. + example: example-service@example-gcp-project-12345.iam.gserviceaccount.com + type: string + type: object + x-oneOf-parent: + - GcpDetail + TableResultV2DataAttributesSchema: + description: The definition of `TableResultV2DataAttributesSchema` object. + properties: + fields: + description: The `schema` `fields`. + items: + $ref: '#/components/schemas/TableResultV2DataAttributesSchemaFieldsItems' + type: array + primary_keys: + description: List of field names that serve as primary keys for the table. + Only one primary key is supported, and it is used as an ID to retrieve + rows. + example: + - '' + items: + type: string + type: array + required: + - fields + - primary_keys + type: object + TableResultV2DataAttributesSchemaFieldsItems: + description: The definition of `TableResultV2DataAttributesSchemaFieldsItems` + object. + properties: + name: + description: The field name. + example: '' + type: string + type: + $ref: '#/components/schemas/ReferenceTableSchemaFieldType' + required: + - name + - type + type: object + TableResultV2DataType: + default: reference_table + description: Reference table resource type. + enum: + - reference_table + example: reference_table + type: string + x-enum-varnames: + - REFERENCE_TABLE + TableRowResourceArray: + description: The definition of `TableRowResourceArray` object. + properties: + data: + description: The rows. + items: + $ref: '#/components/schemas/TableRowResourceData' + type: array + required: + - data + type: object + TableRowResourceData: + description: The definition of `TableRowResourceData` object. + properties: + attributes: + $ref: '#/components/schemas/TableRowResourceDataAttributes' + id: + description: The ID of the row. + type: string + type: + $ref: '#/components/schemas/TableRowResourceDataType' + required: + - type + type: object + TableRowResourceDataAttributes: + description: The definition of `TableRowResourceDataAttributes` object. + properties: + values: + additionalProperties: {} + description: The values of the row. + type: object + type: object + TableRowResourceDataType: + default: row + description: Row resource type. + enum: + - row + example: row + type: string + x-enum-varnames: + - ROW TagFilter: description: Tag filter for the budget's entries. properties: @@ -66728,6 +67745,284 @@ paths: operator: OR permissions: - timeseries_query + /api/v2/reference-tables/tables: + get: + description: List all reference tables in this organization. + operationId: ListTables + parameters: + - description: Number of tables to return. + example: 15 + in: query + name: limit + required: false + schema: + default: 15 + format: int64 + maximum: 100 + minimum: 1 + type: integer + - description: Number of tables to skip for pagination. + example: 0 + in: query + name: offset + required: false + schema: + default: 0 + format: int64 + minimum: 0 + type: integer + - description: Sort field and direction. Use field name for ascending, prefix + with "-" for descending. + example: -updated_at + in: query + name: sort + required: false + schema: + $ref: '#/components/schemas/ReferenceTableSortType' + - description: Filter by table status. + example: DONE + in: query + name: filter[status] + required: false + schema: + type: string + - description: Filter by exact table name match. + example: my_reference_table + in: query + name: filter[table_name][exact] + required: false + schema: + type: string + - description: Filter by table name containing substring. + example: user + in: query + name: filter[table_name][contains] + required: false + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TableResultV2Array' + description: OK + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: List tables + tags: + - Reference Tables + post: + description: 'Create a new reference table. You can provide data in two ways: + 1) Call POST api/v2/reference-tables/upload first to get an upload ID, then + PUT chunks of CSV data to each provided URL, and finally call this POST endpoint + with the upload_id in file_metadata, OR 2) Provide access_details in file_metadata + pointing to a CSV file in cloud storage (Amazon S3, Azure Blob Storage, or + GCP Cloud Storage).' + operationId: CreateReferenceTable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateTableRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/TableResultV2' + description: Created + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Create reference table + tags: + - Reference Tables + /api/v2/reference-tables/tables/{id}: + delete: + description: Delete a reference table by ID + operationId: DeleteTable + parameters: + - description: The ID of the reference table to delete + in: path + name: id + required: true + schema: + type: string + responses: + '200': + description: OK + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Delete table + tags: + - Reference Tables + get: + description: Get a reference table by ID + operationId: GetTable + parameters: + - description: The ID of the reference table to retrieve + in: path + name: id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TableResultV2' + description: OK + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get table + tags: + - Reference Tables + patch: + description: 'Update a reference table by ID. You can update the table''s data, + description, and tags. Note: The source type cannot be changed after table + creation. For data updates: For existing tables of type `source:LOCAL_FILE`, + call POST api/v2/reference-tables/uploads first to get an upload ID, then + PUT chunks of CSV data to each provided URL, and finally call this PATCH endpoint + with the upload_id in file_metadata. For existing tables with `source:` types + of `S3`, `GCS`, or `AZURE`, provide updated access_details in file_metadata + pointing to a CSV file in the same type of cloud storage.' + operationId: UpdateReferenceTable + parameters: + - description: The ID of the reference table to update + in: path + name: id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchTableRequest' + required: true + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Update reference table + tags: + - Reference Tables + /api/v2/reference-tables/tables/{id}/rows: + get: + description: Get reference table rows by their primary key values. + operationId: GetRowsByID + parameters: + - description: The ID of the reference table + example: table-123 + in: path + name: id + required: true + schema: + type: string + - description: List of row IDs (primary key values) to retrieve from the reference + table. + example: + - row1 + - row2 + explode: true + in: query + name: row_id + required: true + schema: + items: + type: string + type: array + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TableRowResourceArray' + description: Some or all requested rows were found. + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get rows by id + tags: + - Reference Tables + /api/v2/reference-tables/uploads: + post: + description: Create a reference table upload for bulk data ingestion + operationId: CreateReferenceTableUpload + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateUploadRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/CreateUploadResponse' + description: Created + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Create reference table upload + tags: + - Reference Tables /api/v2/remote_config/products/asm/waf/custom_rules: get: description: Retrieve a list of WAF custom rule. @@ -76923,6 +78218,8 @@ tags: aggregate your RUM events over HTTP. See the [RUM & Session Replay page](https://docs.datadoghq.com/real_user_monitoring/) for more information name: RUM +- description: Auto-generated tag Reference Tables + name: Reference Tables - description: 'A restriction policy defines the access control rules for a resource, mapping a set of relations diff --git a/docs/datadog_api_client.v2.api.rst b/docs/datadog_api_client.v2.api.rst index 236fdb4c2a..c489f87abb 100644 --- a/docs/datadog_api_client.v2.api.rst +++ b/docs/datadog_api_client.v2.api.rst @@ -389,6 +389,13 @@ datadog\_api\_client.v2.api.processes\_api module :members: :show-inheritance: +datadog\_api\_client.v2.api.reference\_tables\_api module +--------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.api.reference_tables_api + :members: + :show-inheritance: + datadog\_api\_client.v2.api.restriction\_policies\_api module ------------------------------------------------------------- diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index e7d1e36680..9660705440 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -4897,6 +4897,153 @@ datadog\_api\_client.v2.model.create\_ruleset\_request\_data\_type module :members: :show-inheritance: +datadog\_api\_client.v2.model.create\_table\_request module +----------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.create_table_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_table\_request\_data module +----------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.create_table_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_table\_request\_data\_attributes module +----------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.create_table_request_data_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_table\_request\_data\_attributes\_file\_metadata module +--------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_table\_request\_data\_attributes\_file\_metadata\_cloud\_storage module +------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_cloud_storage + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_table\_request\_data\_attributes\_file\_metadata\_local\_file module +---------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_local_file + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_table\_request\_data\_attributes\_file\_metadata\_one\_of\_access\_details module +----------------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_one_of_access_details + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_table\_request\_data\_attributes\_file\_metadata\_one\_of\_access\_details\_aws\_detail module +------------------------------------------------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_one_of_access_details_aws_detail + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_table\_request\_data\_attributes\_file\_metadata\_one\_of\_access\_details\_azure\_detail module +-------------------------------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_one_of_access_details_azure_detail + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_table\_request\_data\_attributes\_file\_metadata\_one\_of\_access\_details\_gcp\_detail module +------------------------------------------------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_one_of_access_details_gcp_detail + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_table\_request\_data\_attributes\_schema module +------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.create_table_request_data_attributes_schema + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_table\_request\_data\_attributes\_schema\_fields\_items module +---------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.create_table_request_data_attributes_schema_fields_items + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_table\_request\_data\_type module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.create_table_request_data_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_upload\_request module +------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.create_upload_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_upload\_request\_data module +------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.create_upload_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_upload\_request\_data\_attributes module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.create_upload_request_data_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_upload\_request\_data\_type module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.create_upload_request_data_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_upload\_response module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.create_upload_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_upload\_response\_data module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.create_upload_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_upload\_response\_data\_attributes module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.create_upload_response_data_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.create\_upload\_response\_data\_type module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.create_upload_response_data_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.create\_workflow\_request module -------------------------------------------------------------- @@ -15537,6 +15684,97 @@ datadog\_api\_client.v2.model.patch\_notification\_rule\_parameters\_data\_attri :members: :show-inheritance: +datadog\_api\_client.v2.model.patch\_table\_request module +---------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.patch_table_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.patch\_table\_request\_data module +---------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.patch_table_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.patch\_table\_request\_data\_attributes module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.patch_table_request_data_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.patch\_table\_request\_data\_attributes\_file\_metadata module +-------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.patch\_table\_request\_data\_attributes\_file\_metadata\_cloud\_storage module +------------------------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_cloud_storage + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.patch\_table\_request\_data\_attributes\_file\_metadata\_local\_file module +--------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_local_file + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.patch\_table\_request\_data\_attributes\_file\_metadata\_one\_of\_access\_details module +---------------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_one_of_access_details + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.patch\_table\_request\_data\_attributes\_file\_metadata\_one\_of\_access\_details\_aws\_detail module +----------------------------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_one_of_access_details_aws_detail + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.patch\_table\_request\_data\_attributes\_file\_metadata\_one\_of\_access\_details\_azure\_detail module +------------------------------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_one_of_access_details_azure_detail + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.patch\_table\_request\_data\_attributes\_file\_metadata\_one\_of\_access\_details\_gcp\_detail module +----------------------------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_one_of_access_details_gcp_detail + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.patch\_table\_request\_data\_attributes\_schema module +------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.patch_table_request_data_attributes_schema + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.patch\_table\_request\_data\_attributes\_schema\_fields\_items module +--------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.patch_table_request_data_attributes_schema_fields_items + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.patch\_table\_request\_data\_type module +---------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.patch_table_request_data_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.permission module ----------------------------------------------- @@ -15901,6 +16139,34 @@ datadog\_api\_client.v2.model.recommendation\_type module :members: :show-inheritance: +datadog\_api\_client.v2.model.reference\_table\_create\_source\_type module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.reference_table_create_source_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.reference\_table\_schema\_field\_type module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.reference_table_schema_field_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.reference\_table\_sort\_type module +----------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.reference_table_sort_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.reference\_table\_source\_type module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.reference_table_source_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.register\_app\_key\_response module ----------------------------------------------------------------- @@ -20717,6 +20983,139 @@ datadog\_api\_client.v2.model.step\_display\_bounds module :members: :show-inheritance: +datadog\_api\_client.v2.model.table\_result\_v2 module +------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.table_result_v2 + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.table\_result\_v2\_array module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.table_result_v2_array + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.table\_result\_v2\_data module +------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.table_result_v2_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.table\_result\_v2\_data\_attributes module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.table_result_v2_data_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.table\_result\_v2\_data\_attributes\_file\_metadata module +---------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.table\_result\_v2\_data\_attributes\_file\_metadata\_cloud\_storage module +-------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_cloud_storage + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.table\_result\_v2\_data\_attributes\_file\_metadata\_cloud\_storage\_error\_type module +--------------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_cloud_storage_error_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.table\_result\_v2\_data\_attributes\_file\_metadata\_local\_file module +----------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_local_file + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.table\_result\_v2\_data\_attributes\_file\_metadata\_one\_of\_access\_details module +------------------------------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_one_of_access_details + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.table\_result\_v2\_data\_attributes\_file\_metadata\_one\_of\_access\_details\_aws\_detail module +------------------------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_one_of_access_details_aws_detail + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.table\_result\_v2\_data\_attributes\_file\_metadata\_one\_of\_access\_details\_azure\_detail module +--------------------------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_one_of_access_details_azure_detail + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.table\_result\_v2\_data\_attributes\_file\_metadata\_one\_of\_access\_details\_gcp\_detail module +------------------------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_one_of_access_details_gcp_detail + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.table\_result\_v2\_data\_attributes\_schema module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.table_result_v2_data_attributes_schema + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.table\_result\_v2\_data\_attributes\_schema\_fields\_items module +----------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.table_result_v2_data_attributes_schema_fields_items + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.table\_result\_v2\_data\_type module +------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.table_result_v2_data_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.table\_row\_resource\_array module +---------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.table_row_resource_array + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.table\_row\_resource\_data module +--------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.table_row_resource_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.table\_row\_resource\_data\_attributes module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.table_row_resource_data_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.table\_row\_resource\_data\_type module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.table_row_resource_data_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.tag\_filter module ------------------------------------------------ diff --git a/examples/v2/reference-tables/CreateReferenceTable.py b/examples/v2/reference-tables/CreateReferenceTable.py new file mode 100644 index 0000000000..9429566c24 --- /dev/null +++ b/examples/v2/reference-tables/CreateReferenceTable.py @@ -0,0 +1,73 @@ +""" +Create reference table returns "Created" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.reference_tables_api import ReferenceTablesApi +from datadog_api_client.v2.model.create_table_request import CreateTableRequest +from datadog_api_client.v2.model.create_table_request_data import CreateTableRequestData +from datadog_api_client.v2.model.create_table_request_data_attributes import CreateTableRequestDataAttributes +from datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_cloud_storage import ( + CreateTableRequestDataAttributesFileMetadataCloudStorage, +) +from datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_one_of_access_details import ( + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails, +) +from datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_one_of_access_details_aws_detail import ( + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail, +) +from datadog_api_client.v2.model.create_table_request_data_attributes_schema import ( + CreateTableRequestDataAttributesSchema, +) +from datadog_api_client.v2.model.create_table_request_data_attributes_schema_fields_items import ( + CreateTableRequestDataAttributesSchemaFieldsItems, +) +from datadog_api_client.v2.model.create_table_request_data_type import CreateTableRequestDataType +from datadog_api_client.v2.model.reference_table_create_source_type import ReferenceTableCreateSourceType +from datadog_api_client.v2.model.reference_table_schema_field_type import ReferenceTableSchemaFieldType + +body = CreateTableRequest( + data=CreateTableRequestData( + attributes=CreateTableRequestDataAttributes( + description="this is a cloud table generated via a cloud bucket sync", + file_metadata=CreateTableRequestDataAttributesFileMetadataCloudStorage( + access_details=CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails( + aws_detail=CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail( + aws_account_id="test-account-id", + aws_bucket_name="test-bucket", + file_path="test_rt.csv", + ), + ), + sync_enabled=True, + ), + schema=CreateTableRequestDataAttributesSchema( + fields=[ + CreateTableRequestDataAttributesSchemaFieldsItems( + name="name", + type=ReferenceTableSchemaFieldType.STRING, + ), + CreateTableRequestDataAttributesSchemaFieldsItems( + name="account_id", + type=ReferenceTableSchemaFieldType.STRING, + ), + ], + primary_keys=[ + "account_id", + ], + ), + source=ReferenceTableCreateSourceType.S3, + table_name="test_reference_table", + tags=[ + "test_tag", + ], + ), + type=CreateTableRequestDataType.REFERENCE_TABLE, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = ReferenceTablesApi(api_client) + response = api_instance.create_reference_table(body=body) + + print(response) diff --git a/examples/v2/reference-tables/CreateReferenceTableUpload.py b/examples/v2/reference-tables/CreateReferenceTableUpload.py new file mode 100644 index 0000000000..1245dc9f97 --- /dev/null +++ b/examples/v2/reference-tables/CreateReferenceTableUpload.py @@ -0,0 +1,33 @@ +""" +Create reference table upload returns "Created" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.reference_tables_api import ReferenceTablesApi +from datadog_api_client.v2.model.create_upload_request import CreateUploadRequest +from datadog_api_client.v2.model.create_upload_request_data import CreateUploadRequestData +from datadog_api_client.v2.model.create_upload_request_data_attributes import CreateUploadRequestDataAttributes +from datadog_api_client.v2.model.create_upload_request_data_type import CreateUploadRequestDataType + +body = CreateUploadRequest( + data=CreateUploadRequestData( + attributes=CreateUploadRequestDataAttributes( + headers=[ + "id", + "name", + "value", + ], + table_name="test_upload_table_Example-Reference-Table", + part_count=1, + part_size=1024, + ), + type=CreateUploadRequestDataType.UPLOAD, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = ReferenceTablesApi(api_client) + response = api_instance.create_reference_table_upload(body=body) + + print(response) diff --git a/examples/v2/reference-tables/CreateReferenceTable_3196130987.py b/examples/v2/reference-tables/CreateReferenceTable_3196130987.py new file mode 100644 index 0000000000..de20ed036d --- /dev/null +++ b/examples/v2/reference-tables/CreateReferenceTable_3196130987.py @@ -0,0 +1,64 @@ +""" +Create reference table with upload returns "Created" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.reference_tables_api import ReferenceTablesApi +from datadog_api_client.v2.model.create_table_request import CreateTableRequest +from datadog_api_client.v2.model.create_table_request_data import CreateTableRequestData +from datadog_api_client.v2.model.create_table_request_data_attributes import CreateTableRequestDataAttributes +from datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_local_file import ( + CreateTableRequestDataAttributesFileMetadataLocalFile, +) +from datadog_api_client.v2.model.create_table_request_data_attributes_schema import ( + CreateTableRequestDataAttributesSchema, +) +from datadog_api_client.v2.model.create_table_request_data_attributes_schema_fields_items import ( + CreateTableRequestDataAttributesSchemaFieldsItems, +) +from datadog_api_client.v2.model.create_table_request_data_type import CreateTableRequestDataType +from datadog_api_client.v2.model.reference_table_create_source_type import ReferenceTableCreateSourceType +from datadog_api_client.v2.model.reference_table_schema_field_type import ReferenceTableSchemaFieldType + +body = CreateTableRequest( + data=CreateTableRequestData( + attributes=CreateTableRequestDataAttributes( + description="Test reference table created via BDD test Example-Reference-Table", + source=ReferenceTableCreateSourceType.LOCAL_FILE, + file_metadata=CreateTableRequestDataAttributesFileMetadataLocalFile( + upload_id="test-upload-id-Example-Reference-Table", + ), + schema=CreateTableRequestDataAttributesSchema( + fields=[ + CreateTableRequestDataAttributesSchemaFieldsItems( + name="id", + type=ReferenceTableSchemaFieldType.STRING, + ), + CreateTableRequestDataAttributesSchemaFieldsItems( + name="name", + type=ReferenceTableSchemaFieldType.STRING, + ), + CreateTableRequestDataAttributesSchemaFieldsItems( + name="value", + type=ReferenceTableSchemaFieldType.INT32, + ), + ], + primary_keys=[ + "id", + ], + ), + table_name="test_reference_table_Example-Reference-Table", + tags=[ + "test_tag", + ], + ), + type=CreateTableRequestDataType.REFERENCE_TABLE, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = ReferenceTablesApi(api_client) + response = api_instance.create_reference_table(body=body) + + print(response) diff --git a/examples/v2/reference-tables/DeleteTable.py b/examples/v2/reference-tables/DeleteTable.py new file mode 100644 index 0000000000..14945368fc --- /dev/null +++ b/examples/v2/reference-tables/DeleteTable.py @@ -0,0 +1,13 @@ +""" +Delete table returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.reference_tables_api import ReferenceTablesApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = ReferenceTablesApi(api_client) + api_instance.delete_table( + id="id", + ) diff --git a/examples/v2/reference-tables/GetRowsByID.py b/examples/v2/reference-tables/GetRowsByID.py new file mode 100644 index 0000000000..0071737b16 --- /dev/null +++ b/examples/v2/reference-tables/GetRowsByID.py @@ -0,0 +1,16 @@ +""" +Get rows by id returns "Some or all requested rows were found." response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.reference_tables_api import ReferenceTablesApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = ReferenceTablesApi(api_client) + response = api_instance.get_rows_by_id( + id="id", + row_id=[], + ) + + print(response) diff --git a/examples/v2/reference-tables/GetTable.py b/examples/v2/reference-tables/GetTable.py new file mode 100644 index 0000000000..a3be04164e --- /dev/null +++ b/examples/v2/reference-tables/GetTable.py @@ -0,0 +1,15 @@ +""" +Get table returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.reference_tables_api import ReferenceTablesApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = ReferenceTablesApi(api_client) + response = api_instance.get_table( + id="id", + ) + + print(response) diff --git a/examples/v2/reference-tables/ListTables.py b/examples/v2/reference-tables/ListTables.py new file mode 100644 index 0000000000..754ebb1c2f --- /dev/null +++ b/examples/v2/reference-tables/ListTables.py @@ -0,0 +1,13 @@ +""" +List tables returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.reference_tables_api import ReferenceTablesApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = ReferenceTablesApi(api_client) + response = api_instance.list_tables() + + print(response) diff --git a/examples/v2/reference-tables/UpdateReferenceTable.py b/examples/v2/reference-tables/UpdateReferenceTable.py new file mode 100644 index 0000000000..dc2261edea --- /dev/null +++ b/examples/v2/reference-tables/UpdateReferenceTable.py @@ -0,0 +1,68 @@ +""" +Update reference table returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.reference_tables_api import ReferenceTablesApi +from datadog_api_client.v2.model.patch_table_request import PatchTableRequest +from datadog_api_client.v2.model.patch_table_request_data import PatchTableRequestData +from datadog_api_client.v2.model.patch_table_request_data_attributes import PatchTableRequestDataAttributes +from datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_cloud_storage import ( + PatchTableRequestDataAttributesFileMetadataCloudStorage, +) +from datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_one_of_access_details import ( + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails, +) +from datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_one_of_access_details_aws_detail import ( + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail, +) +from datadog_api_client.v2.model.patch_table_request_data_attributes_schema import PatchTableRequestDataAttributesSchema +from datadog_api_client.v2.model.patch_table_request_data_attributes_schema_fields_items import ( + PatchTableRequestDataAttributesSchemaFieldsItems, +) +from datadog_api_client.v2.model.patch_table_request_data_type import PatchTableRequestDataType +from datadog_api_client.v2.model.reference_table_schema_field_type import ReferenceTableSchemaFieldType + +body = PatchTableRequest( + data=PatchTableRequestData( + attributes=PatchTableRequestDataAttributes( + description="this is a cloud table generated via a cloud bucket sync", + file_metadata=PatchTableRequestDataAttributesFileMetadataCloudStorage( + access_details=PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails( + aws_detail=PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail( + aws_account_id="test-account-id", + aws_bucket_name="test-bucket", + file_path="test_rt.csv", + ), + ), + sync_enabled=True, + ), + schema=PatchTableRequestDataAttributesSchema( + fields=[ + PatchTableRequestDataAttributesSchemaFieldsItems( + name="id", + type=ReferenceTableSchemaFieldType.INT32, + ), + PatchTableRequestDataAttributesSchemaFieldsItems( + name="name", + type=ReferenceTableSchemaFieldType.STRING, + ), + ], + primary_keys=[ + "id", + ], + ), + sync_enabled=False, + tags=[ + "test_tag", + ], + ), + id="00000000-0000-0000-0000-000000000000", + type=PatchTableRequestDataType.REFERENCE_TABLE, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = ReferenceTablesApi(api_client) + api_instance.update_reference_table(id="id", body=body) diff --git a/src/datadog_api_client/v2/api/reference_tables_api.py b/src/datadog_api_client/v2/api/reference_tables_api.py new file mode 100644 index 0000000000..574f2bedf6 --- /dev/null +++ b/src/datadog_api_client/v2/api/reference_tables_api.py @@ -0,0 +1,386 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Any, Dict, List, Union + +from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint +from datadog_api_client.configuration import Configuration +from datadog_api_client.model_utils import ( + UnsetType, + unset, +) +from datadog_api_client.v2.model.table_result_v2_array import TableResultV2Array +from datadog_api_client.v2.model.reference_table_sort_type import ReferenceTableSortType +from datadog_api_client.v2.model.table_result_v2 import TableResultV2 +from datadog_api_client.v2.model.create_table_request import CreateTableRequest +from datadog_api_client.v2.model.patch_table_request import PatchTableRequest +from datadog_api_client.v2.model.table_row_resource_array import TableRowResourceArray +from datadog_api_client.v2.model.create_upload_response import CreateUploadResponse +from datadog_api_client.v2.model.create_upload_request import CreateUploadRequest + + +class ReferenceTablesApi: + """ + Auto-generated tag Reference Tables + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient(Configuration()) + self.api_client = api_client + + self._create_reference_table_endpoint = _Endpoint( + settings={ + "response_type": (TableResultV2,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/reference-tables/tables", + "operation_id": "create_reference_table", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (CreateTableRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._create_reference_table_upload_endpoint = _Endpoint( + settings={ + "response_type": (CreateUploadResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/reference-tables/uploads", + "operation_id": "create_reference_table_upload", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (CreateUploadRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._delete_table_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/reference-tables/tables/{id}", + "operation_id": "delete_table", + "http_method": "DELETE", + "version": "v2", + }, + params_map={ + "id": { + "required": True, + "openapi_types": (str,), + "attribute": "id", + "location": "path", + }, + }, + headers_map={ + "accept": ["*/*"], + }, + api_client=api_client, + ) + + self._get_rows_by_id_endpoint = _Endpoint( + settings={ + "response_type": (TableRowResourceArray,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/reference-tables/tables/{id}/rows", + "operation_id": "get_rows_by_id", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "id": { + "required": True, + "openapi_types": (str,), + "attribute": "id", + "location": "path", + }, + "row_id": { + "required": True, + "openapi_types": ([str],), + "attribute": "row_id", + "location": "query", + "collection_format": "multi", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._get_table_endpoint = _Endpoint( + settings={ + "response_type": (TableResultV2,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/reference-tables/tables/{id}", + "operation_id": "get_table", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "id": { + "required": True, + "openapi_types": (str,), + "attribute": "id", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._list_tables_endpoint = _Endpoint( + settings={ + "response_type": (TableResultV2Array,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/reference-tables/tables", + "operation_id": "list_tables", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "limit": { + "validation": { + "inclusive_maximum": 100, + "inclusive_minimum": 1, + }, + "openapi_types": (int,), + "attribute": "limit", + "location": "query", + }, + "offset": { + "validation": { + "inclusive_minimum": 0, + }, + "openapi_types": (int,), + "attribute": "offset", + "location": "query", + }, + "sort": { + "openapi_types": (ReferenceTableSortType,), + "attribute": "sort", + "location": "query", + }, + "filter_status": { + "openapi_types": (str,), + "attribute": "filter[status]", + "location": "query", + }, + "filter_table_name_exact": { + "openapi_types": (str,), + "attribute": "filter[table_name][exact]", + "location": "query", + }, + "filter_table_name_contains": { + "openapi_types": (str,), + "attribute": "filter[table_name][contains]", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._update_reference_table_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/reference-tables/tables/{id}", + "operation_id": "update_reference_table", + "http_method": "PATCH", + "version": "v2", + }, + params_map={ + "id": { + "required": True, + "openapi_types": (str,), + "attribute": "id", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (PatchTableRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["*/*"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + def create_reference_table( + self, + body: CreateTableRequest, + ) -> TableResultV2: + """Create reference table. + + Create a new reference table. You can provide data in two ways: 1) Call POST api/v2/reference-tables/upload first to get an upload ID, then PUT chunks of CSV data to each provided URL, and finally call this POST endpoint with the upload_id in file_metadata, OR 2) Provide access_details in file_metadata pointing to a CSV file in cloud storage (Amazon S3, Azure Blob Storage, or GCP Cloud Storage). + + :type body: CreateTableRequest + :rtype: TableResultV2 + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._create_reference_table_endpoint.call_with_http_info(**kwargs) + + def create_reference_table_upload( + self, + body: CreateUploadRequest, + ) -> CreateUploadResponse: + """Create reference table upload. + + Create a reference table upload for bulk data ingestion + + :type body: CreateUploadRequest + :rtype: CreateUploadResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._create_reference_table_upload_endpoint.call_with_http_info(**kwargs) + + def delete_table( + self, + id: str, + ) -> None: + """Delete table. + + Delete a reference table by ID + + :param id: The ID of the reference table to delete + :type id: str + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["id"] = id + + return self._delete_table_endpoint.call_with_http_info(**kwargs) + + def get_rows_by_id( + self, + id: str, + row_id: List[str], + ) -> TableRowResourceArray: + """Get rows by id. + + Get reference table rows by their primary key values. + + :param id: The ID of the reference table + :type id: str + :param row_id: List of row IDs (primary key values) to retrieve from the reference table. + :type row_id: [str] + :rtype: TableRowResourceArray + """ + kwargs: Dict[str, Any] = {} + kwargs["id"] = id + + kwargs["row_id"] = row_id + + return self._get_rows_by_id_endpoint.call_with_http_info(**kwargs) + + def get_table( + self, + id: str, + ) -> TableResultV2: + """Get table. + + Get a reference table by ID + + :param id: The ID of the reference table to retrieve + :type id: str + :rtype: TableResultV2 + """ + kwargs: Dict[str, Any] = {} + kwargs["id"] = id + + return self._get_table_endpoint.call_with_http_info(**kwargs) + + def list_tables( + self, + *, + limit: Union[int, UnsetType] = unset, + offset: Union[int, UnsetType] = unset, + sort: Union[ReferenceTableSortType, UnsetType] = unset, + filter_status: Union[str, UnsetType] = unset, + filter_table_name_exact: Union[str, UnsetType] = unset, + filter_table_name_contains: Union[str, UnsetType] = unset, + ) -> TableResultV2Array: + """List tables. + + List all reference tables in this organization. + + :param limit: Number of tables to return. + :type limit: int, optional + :param offset: Number of tables to skip for pagination. + :type offset: int, optional + :param sort: Sort field and direction. Use field name for ascending, prefix with "-" for descending. + :type sort: ReferenceTableSortType, optional + :param filter_status: Filter by table status. + :type filter_status: str, optional + :param filter_table_name_exact: Filter by exact table name match. + :type filter_table_name_exact: str, optional + :param filter_table_name_contains: Filter by table name containing substring. + :type filter_table_name_contains: str, optional + :rtype: TableResultV2Array + """ + kwargs: Dict[str, Any] = {} + if limit is not unset: + kwargs["limit"] = limit + + if offset is not unset: + kwargs["offset"] = offset + + if sort is not unset: + kwargs["sort"] = sort + + if filter_status is not unset: + kwargs["filter_status"] = filter_status + + if filter_table_name_exact is not unset: + kwargs["filter_table_name_exact"] = filter_table_name_exact + + if filter_table_name_contains is not unset: + kwargs["filter_table_name_contains"] = filter_table_name_contains + + return self._list_tables_endpoint.call_with_http_info(**kwargs) + + def update_reference_table( + self, + id: str, + body: PatchTableRequest, + ) -> None: + """Update reference table. + + Update a reference table by ID. You can update the table's data, description, and tags. Note: The source type cannot be changed after table creation. For data updates: For existing tables of type `source:LOCAL_FILE`, call POST api/v2/reference-tables/uploads first to get an upload ID, then PUT chunks of CSV data to each provided URL, and finally call this PATCH endpoint with the upload_id in file_metadata. For existing tables with `source:` types of `S3 ``,`` GCS ``, or`` AZURE`, provide updated access_details in file_metadata pointing to a CSV file in the same type of cloud storage. + + :param id: The ID of the reference table to update + :type id: str + :type body: PatchTableRequest + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["id"] = id + + kwargs["body"] = body + + return self._update_reference_table_endpoint.call_with_http_info(**kwargs) diff --git a/src/datadog_api_client/v2/apis/__init__.py b/src/datadog_api_client/v2/apis/__init__.py index e25289c260..83e48bf4e4 100644 --- a/src/datadog_api_client/v2/apis/__init__.py +++ b/src/datadog_api_client/v2/apis/__init__.py @@ -54,6 +54,7 @@ from datadog_api_client.v2.api.powerpack_api import PowerpackApi from datadog_api_client.v2.api.processes_api import ProcessesApi from datadog_api_client.v2.api.rum_api import RUMApi +from datadog_api_client.v2.api.reference_tables_api import ReferenceTablesApi from datadog_api_client.v2.api.restriction_policies_api import RestrictionPoliciesApi from datadog_api_client.v2.api.roles_api import RolesApi from datadog_api_client.v2.api.rum_metrics_api import RumMetricsApi @@ -133,6 +134,7 @@ "PowerpackApi", "ProcessesApi", "RUMApi", + "ReferenceTablesApi", "RestrictionPoliciesApi", "RolesApi", "RumMetricsApi", diff --git a/src/datadog_api_client/v2/model/create_table_request.py b/src/datadog_api_client/v2/model/create_table_request.py new file mode 100644 index 0000000000..a9b7082461 --- /dev/null +++ b/src/datadog_api_client/v2/model/create_table_request.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.create_table_request_data import CreateTableRequestData + + +class CreateTableRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.create_table_request_data import CreateTableRequestData + + return { + "data": (CreateTableRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[CreateTableRequestData, UnsetType] = unset, **kwargs): + """ + The definition of ``CreateTableRequest`` object. + + :param data: The definition of ``CreateTableRequestData`` object. + :type data: CreateTableRequestData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/create_table_request_data.py b/src/datadog_api_client/v2/model/create_table_request_data.py new file mode 100644 index 0000000000..bfac1d4a2b --- /dev/null +++ b/src/datadog_api_client/v2/model/create_table_request_data.py @@ -0,0 +1,64 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.create_table_request_data_attributes import CreateTableRequestDataAttributes + from datadog_api_client.v2.model.create_table_request_data_type import CreateTableRequestDataType + + +class CreateTableRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.create_table_request_data_attributes import CreateTableRequestDataAttributes + from datadog_api_client.v2.model.create_table_request_data_type import CreateTableRequestDataType + + return { + "attributes": (CreateTableRequestDataAttributes,), + "id": (str,), + "type": (CreateTableRequestDataType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + type: CreateTableRequestDataType, + attributes: Union[CreateTableRequestDataAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + The definition of ``CreateTableRequestData`` object. + + :param attributes: The definition of ``CreateTableRequestDataAttributes`` object. + :type attributes: CreateTableRequestDataAttributes, optional + + :param id: The ID of the reference table. + :type id: str, optional + + :param type: Reference table resource type. + :type type: CreateTableRequestDataType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + super().__init__(kwargs) + + self_.type = type diff --git a/src/datadog_api_client/v2/model/create_table_request_data_attributes.py b/src/datadog_api_client/v2/model/create_table_request_data_attributes.py new file mode 100644 index 0000000000..a95ff00203 --- /dev/null +++ b/src/datadog_api_client/v2/model/create_table_request_data_attributes.py @@ -0,0 +1,107 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata import ( + CreateTableRequestDataAttributesFileMetadata, + ) + from datadog_api_client.v2.model.create_table_request_data_attributes_schema import ( + CreateTableRequestDataAttributesSchema, + ) + from datadog_api_client.v2.model.reference_table_create_source_type import ReferenceTableCreateSourceType + from datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_cloud_storage import ( + CreateTableRequestDataAttributesFileMetadataCloudStorage, + ) + from datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_local_file import ( + CreateTableRequestDataAttributesFileMetadataLocalFile, + ) + + +class CreateTableRequestDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata import ( + CreateTableRequestDataAttributesFileMetadata, + ) + from datadog_api_client.v2.model.create_table_request_data_attributes_schema import ( + CreateTableRequestDataAttributesSchema, + ) + from datadog_api_client.v2.model.reference_table_create_source_type import ReferenceTableCreateSourceType + + return { + "description": (str,), + "file_metadata": (CreateTableRequestDataAttributesFileMetadata,), + "schema": (CreateTableRequestDataAttributesSchema,), + "source": (ReferenceTableCreateSourceType,), + "table_name": (str,), + "tags": ([str],), + } + + attribute_map = { + "description": "description", + "file_metadata": "file_metadata", + "schema": "schema", + "source": "source", + "table_name": "table_name", + "tags": "tags", + } + + def __init__( + self_, + schema: CreateTableRequestDataAttributesSchema, + source: ReferenceTableCreateSourceType, + table_name: str, + description: Union[str, UnsetType] = unset, + file_metadata: Union[ + CreateTableRequestDataAttributesFileMetadata, + CreateTableRequestDataAttributesFileMetadataCloudStorage, + CreateTableRequestDataAttributesFileMetadataLocalFile, + UnsetType, + ] = unset, + tags: Union[List[str], UnsetType] = unset, + **kwargs, + ): + """ + The definition of ``CreateTableRequestDataAttributes`` object. + + :param description: The description of the reference table. + :type description: str, optional + + :param file_metadata: The definition of ``CreateTableRequestDataAttributesFileMetadata`` object. + :type file_metadata: CreateTableRequestDataAttributesFileMetadata, optional + + :param schema: The definition of ``CreateTableRequestDataAttributesSchema`` object. + :type schema: CreateTableRequestDataAttributesSchema + + :param source: The source type for creating reference table data. Only these source types can be created through this API. + :type source: ReferenceTableCreateSourceType + + :param table_name: The name of the reference table. + :type table_name: str + + :param tags: The tags of the reference table. + :type tags: [str], optional + """ + if description is not unset: + kwargs["description"] = description + if file_metadata is not unset: + kwargs["file_metadata"] = file_metadata + if tags is not unset: + kwargs["tags"] = tags + super().__init__(kwargs) + + self_.schema = schema + self_.source = source + self_.table_name = table_name diff --git a/src/datadog_api_client/v2/model/create_table_request_data_attributes_file_metadata.py b/src/datadog_api_client/v2/model/create_table_request_data_attributes_file_metadata.py new file mode 100644 index 0000000000..90e506cfb1 --- /dev/null +++ b/src/datadog_api_client/v2/model/create_table_request_data_attributes_file_metadata.py @@ -0,0 +1,50 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelComposed, + cached_property, +) + + +class CreateTableRequestDataAttributesFileMetadata(ModelComposed): + def __init__(self, **kwargs): + """ + The definition of ``CreateTableRequestDataAttributesFileMetadata`` object. + + :param access_details: The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails` object. + :type access_details: CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails + + :param sync_enabled: Whether this table is synced automatically. + :type sync_enabled: bool + + :param upload_id: The upload ID. + :type upload_id: str + """ + super().__init__(kwargs) + + @cached_property + def _composed_schemas(_): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + from datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_cloud_storage import ( + CreateTableRequestDataAttributesFileMetadataCloudStorage, + ) + from datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_local_file import ( + CreateTableRequestDataAttributesFileMetadataLocalFile, + ) + + return { + "oneOf": [ + CreateTableRequestDataAttributesFileMetadataCloudStorage, + CreateTableRequestDataAttributesFileMetadataLocalFile, + ], + } diff --git a/src/datadog_api_client/v2/model/create_table_request_data_attributes_file_metadata_cloud_storage.py b/src/datadog_api_client/v2/model/create_table_request_data_attributes_file_metadata_cloud_storage.py new file mode 100644 index 0000000000..b3ec9430cb --- /dev/null +++ b/src/datadog_api_client/v2/model/create_table_request_data_attributes_file_metadata_cloud_storage.py @@ -0,0 +1,59 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_one_of_access_details import ( + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails, + ) + + +class CreateTableRequestDataAttributesFileMetadataCloudStorage(ModelNormal): + @cached_property + def additional_properties_type(_): + return None + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_one_of_access_details import ( + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails, + ) + + return { + "access_details": (CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails,), + "sync_enabled": (bool,), + } + + attribute_map = { + "access_details": "access_details", + "sync_enabled": "sync_enabled", + } + + def __init__( + self_, + access_details: CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails, + sync_enabled: bool, + **kwargs, + ): + """ + Cloud storage file metadata for create requests. Both access_details and sync_enabled are required. + + :param access_details: The definition of ``CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails`` object. + :type access_details: CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails + + :param sync_enabled: Whether this table is synced automatically. + :type sync_enabled: bool + """ + super().__init__(kwargs) + + self_.access_details = access_details + self_.sync_enabled = sync_enabled diff --git a/src/datadog_api_client/v2/model/create_table_request_data_attributes_file_metadata_local_file.py b/src/datadog_api_client/v2/model/create_table_request_data_attributes_file_metadata_local_file.py new file mode 100644 index 0000000000..0e2b155a4c --- /dev/null +++ b/src/datadog_api_client/v2/model/create_table_request_data_attributes_file_metadata_local_file.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class CreateTableRequestDataAttributesFileMetadataLocalFile(ModelNormal): + @cached_property + def additional_properties_type(_): + return None + + @cached_property + def openapi_types(_): + return { + "upload_id": (str,), + } + + attribute_map = { + "upload_id": "upload_id", + } + + def __init__(self_, upload_id: str, **kwargs): + """ + Local file metadata for create requests using the upload ID. + + :param upload_id: The upload ID. + :type upload_id: str + """ + super().__init__(kwargs) + + self_.upload_id = upload_id diff --git a/src/datadog_api_client/v2/model/create_table_request_data_attributes_file_metadata_one_of_access_details.py b/src/datadog_api_client/v2/model/create_table_request_data_attributes_file_metadata_one_of_access_details.py new file mode 100644 index 0000000000..b5d7331b7f --- /dev/null +++ b/src/datadog_api_client/v2/model/create_table_request_data_attributes_file_metadata_one_of_access_details.py @@ -0,0 +1,80 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_one_of_access_details_aws_detail import ( + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail, + ) + from datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_one_of_access_details_azure_detail import ( + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail, + ) + from datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_one_of_access_details_gcp_detail import ( + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail, + ) + + +class CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_one_of_access_details_aws_detail import ( + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail, + ) + from datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_one_of_access_details_azure_detail import ( + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail, + ) + from datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_one_of_access_details_gcp_detail import ( + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail, + ) + + return { + "aws_detail": (CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail,), + "azure_detail": (CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail,), + "gcp_detail": (CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail,), + } + + attribute_map = { + "aws_detail": "aws_detail", + "azure_detail": "azure_detail", + "gcp_detail": "gcp_detail", + } + + def __init__( + self_, + aws_detail: Union[CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail, UnsetType] = unset, + azure_detail: Union[ + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail, UnsetType + ] = unset, + gcp_detail: Union[CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail, UnsetType] = unset, + **kwargs, + ): + """ + The definition of ``CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails`` object. + + :param aws_detail: The definition of ``CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail`` object. + :type aws_detail: CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail, optional + + :param azure_detail: The definition of ``CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail`` object. + :type azure_detail: CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail, optional + + :param gcp_detail: The definition of ``CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail`` object. + :type gcp_detail: CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail, optional + """ + if aws_detail is not unset: + kwargs["aws_detail"] = aws_detail + if azure_detail is not unset: + kwargs["azure_detail"] = azure_detail + if gcp_detail is not unset: + kwargs["gcp_detail"] = gcp_detail + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/create_table_request_data_attributes_file_metadata_one_of_access_details_aws_detail.py b/src/datadog_api_client/v2/model/create_table_request_data_attributes_file_metadata_one_of_access_details_aws_detail.py new file mode 100644 index 0000000000..5697a96ab8 --- /dev/null +++ b/src/datadog_api_client/v2/model/create_table_request_data_attributes_file_metadata_one_of_access_details_aws_detail.py @@ -0,0 +1,45 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail(ModelNormal): + @cached_property + def openapi_types(_): + return { + "aws_account_id": (str,), + "aws_bucket_name": (str,), + "file_path": (str,), + } + + attribute_map = { + "aws_account_id": "aws_account_id", + "aws_bucket_name": "aws_bucket_name", + "file_path": "file_path", + } + + def __init__(self_, aws_account_id: str, aws_bucket_name: str, file_path: str, **kwargs): + """ + The definition of ``CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail`` object. + + :param aws_account_id: The ID of the AWS account. + :type aws_account_id: str + + :param aws_bucket_name: The name of the Amazon S3 bucket. + :type aws_bucket_name: str + + :param file_path: The relative file path from the S3 bucket root to the CSV file. + :type file_path: str + """ + super().__init__(kwargs) + + self_.aws_account_id = aws_account_id + self_.aws_bucket_name = aws_bucket_name + self_.file_path = file_path diff --git a/src/datadog_api_client/v2/model/create_table_request_data_attributes_file_metadata_one_of_access_details_azure_detail.py b/src/datadog_api_client/v2/model/create_table_request_data_attributes_file_metadata_one_of_access_details_azure_detail.py new file mode 100644 index 0000000000..911ce25be9 --- /dev/null +++ b/src/datadog_api_client/v2/model/create_table_request_data_attributes_file_metadata_one_of_access_details_azure_detail.py @@ -0,0 +1,65 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail(ModelNormal): + @cached_property + def openapi_types(_): + return { + "azure_client_id": (str,), + "azure_container_name": (str,), + "azure_storage_account_name": (str,), + "azure_tenant_id": (str,), + "file_path": (str,), + } + + attribute_map = { + "azure_client_id": "azure_client_id", + "azure_container_name": "azure_container_name", + "azure_storage_account_name": "azure_storage_account_name", + "azure_tenant_id": "azure_tenant_id", + "file_path": "file_path", + } + + def __init__( + self_, + azure_client_id: str, + azure_container_name: str, + azure_storage_account_name: str, + azure_tenant_id: str, + file_path: str, + **kwargs, + ): + """ + The definition of ``CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail`` object. + + :param azure_client_id: The Azure client ID. + :type azure_client_id: str + + :param azure_container_name: The name of the Azure container. + :type azure_container_name: str + + :param azure_storage_account_name: The name of the Azure storage account. + :type azure_storage_account_name: str + + :param azure_tenant_id: The ID of the Azure tenant. + :type azure_tenant_id: str + + :param file_path: The relative file path from the Azure container root to the CSV file. + :type file_path: str + """ + super().__init__(kwargs) + + self_.azure_client_id = azure_client_id + self_.azure_container_name = azure_container_name + self_.azure_storage_account_name = azure_storage_account_name + self_.azure_tenant_id = azure_tenant_id + self_.file_path = file_path diff --git a/src/datadog_api_client/v2/model/create_table_request_data_attributes_file_metadata_one_of_access_details_gcp_detail.py b/src/datadog_api_client/v2/model/create_table_request_data_attributes_file_metadata_one_of_access_details_gcp_detail.py new file mode 100644 index 0000000000..56dc77b561 --- /dev/null +++ b/src/datadog_api_client/v2/model/create_table_request_data_attributes_file_metadata_one_of_access_details_gcp_detail.py @@ -0,0 +1,53 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail(ModelNormal): + @cached_property + def openapi_types(_): + return { + "file_path": (str,), + "gcp_bucket_name": (str,), + "gcp_project_id": (str,), + "gcp_service_account_email": (str,), + } + + attribute_map = { + "file_path": "file_path", + "gcp_bucket_name": "gcp_bucket_name", + "gcp_project_id": "gcp_project_id", + "gcp_service_account_email": "gcp_service_account_email", + } + + def __init__( + self_, file_path: str, gcp_bucket_name: str, gcp_project_id: str, gcp_service_account_email: str, **kwargs + ): + """ + The definition of ``CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail`` object. + + :param file_path: The relative file path from the GCS bucket root to the CSV file. + :type file_path: str + + :param gcp_bucket_name: The name of the GCP bucket. + :type gcp_bucket_name: str + + :param gcp_project_id: The ID of the GCP project. + :type gcp_project_id: str + + :param gcp_service_account_email: The email of the GCP service account. + :type gcp_service_account_email: str + """ + super().__init__(kwargs) + + self_.file_path = file_path + self_.gcp_bucket_name = gcp_bucket_name + self_.gcp_project_id = gcp_project_id + self_.gcp_service_account_email = gcp_service_account_email diff --git a/src/datadog_api_client/v2/model/create_table_request_data_attributes_schema.py b/src/datadog_api_client/v2/model/create_table_request_data_attributes_schema.py new file mode 100644 index 0000000000..76f467e051 --- /dev/null +++ b/src/datadog_api_client/v2/model/create_table_request_data_attributes_schema.py @@ -0,0 +1,52 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.create_table_request_data_attributes_schema_fields_items import ( + CreateTableRequestDataAttributesSchemaFieldsItems, + ) + + +class CreateTableRequestDataAttributesSchema(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.create_table_request_data_attributes_schema_fields_items import ( + CreateTableRequestDataAttributesSchemaFieldsItems, + ) + + return { + "fields": ([CreateTableRequestDataAttributesSchemaFieldsItems],), + "primary_keys": ([str],), + } + + attribute_map = { + "fields": "fields", + "primary_keys": "primary_keys", + } + + def __init__( + self_, fields: List[CreateTableRequestDataAttributesSchemaFieldsItems], primary_keys: List[str], **kwargs + ): + """ + The definition of ``CreateTableRequestDataAttributesSchema`` object. + + :param fields: The ``schema`` ``fields``. + :type fields: [CreateTableRequestDataAttributesSchemaFieldsItems] + + :param primary_keys: List of field names that serve as primary keys for the table. Only one primary key is supported, and it is used as an ID to retrieve rows. + :type primary_keys: [str] + """ + super().__init__(kwargs) + + self_.fields = fields + self_.primary_keys = primary_keys diff --git a/src/datadog_api_client/v2/model/create_table_request_data_attributes_schema_fields_items.py b/src/datadog_api_client/v2/model/create_table_request_data_attributes_schema_fields_items.py new file mode 100644 index 0000000000..9ba392700a --- /dev/null +++ b/src/datadog_api_client/v2/model/create_table_request_data_attributes_schema_fields_items.py @@ -0,0 +1,46 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.reference_table_schema_field_type import ReferenceTableSchemaFieldType + + +class CreateTableRequestDataAttributesSchemaFieldsItems(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.reference_table_schema_field_type import ReferenceTableSchemaFieldType + + return { + "name": (str,), + "type": (ReferenceTableSchemaFieldType,), + } + + attribute_map = { + "name": "name", + "type": "type", + } + + def __init__(self_, name: str, type: ReferenceTableSchemaFieldType, **kwargs): + """ + The definition of ``CreateTableRequestDataAttributesSchemaFieldsItems`` object. + + :param name: The field name. + :type name: str + + :param type: The field type for reference table schema fields. + :type type: ReferenceTableSchemaFieldType + """ + super().__init__(kwargs) + + self_.name = name + self_.type = type diff --git a/src/datadog_api_client/v2/model/create_table_request_data_type.py b/src/datadog_api_client/v2/model/create_table_request_data_type.py new file mode 100644 index 0000000000..1fc12ed8f7 --- /dev/null +++ b/src/datadog_api_client/v2/model/create_table_request_data_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class CreateTableRequestDataType(ModelSimple): + """ + Reference table resource type. + + :param value: If omitted defaults to "reference_table". Must be one of ["reference_table"]. + :type value: str + """ + + allowed_values = { + "reference_table", + } + REFERENCE_TABLE: ClassVar["CreateTableRequestDataType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +CreateTableRequestDataType.REFERENCE_TABLE = CreateTableRequestDataType("reference_table") diff --git a/src/datadog_api_client/v2/model/create_upload_request.py b/src/datadog_api_client/v2/model/create_upload_request.py new file mode 100644 index 0000000000..5fc508bcfc --- /dev/null +++ b/src/datadog_api_client/v2/model/create_upload_request.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.create_upload_request_data import CreateUploadRequestData + + +class CreateUploadRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.create_upload_request_data import CreateUploadRequestData + + return { + "data": (CreateUploadRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[CreateUploadRequestData, UnsetType] = unset, **kwargs): + """ + The definition of ``CreateUploadRequest`` object. + + :param data: The definition of ``CreateUploadRequestData`` object. + :type data: CreateUploadRequestData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/create_upload_request_data.py b/src/datadog_api_client/v2/model/create_upload_request_data.py new file mode 100644 index 0000000000..521065c746 --- /dev/null +++ b/src/datadog_api_client/v2/model/create_upload_request_data.py @@ -0,0 +1,64 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.create_upload_request_data_attributes import CreateUploadRequestDataAttributes + from datadog_api_client.v2.model.create_upload_request_data_type import CreateUploadRequestDataType + + +class CreateUploadRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.create_upload_request_data_attributes import CreateUploadRequestDataAttributes + from datadog_api_client.v2.model.create_upload_request_data_type import CreateUploadRequestDataType + + return { + "attributes": (CreateUploadRequestDataAttributes,), + "id": (str,), + "type": (CreateUploadRequestDataType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + type: CreateUploadRequestDataType, + attributes: Union[CreateUploadRequestDataAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + The definition of ``CreateUploadRequestData`` object. + + :param attributes: The definition of ``CreateUploadRequestDataAttributes`` object. + :type attributes: CreateUploadRequestDataAttributes, optional + + :param id: The ID of the upload. + :type id: str, optional + + :param type: Upload resource type. + :type type: CreateUploadRequestDataType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + super().__init__(kwargs) + + self_.type = type diff --git a/src/datadog_api_client/v2/model/create_upload_request_data_attributes.py b/src/datadog_api_client/v2/model/create_upload_request_data_attributes.py new file mode 100644 index 0000000000..d73e73803b --- /dev/null +++ b/src/datadog_api_client/v2/model/create_upload_request_data_attributes.py @@ -0,0 +1,58 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class CreateUploadRequestDataAttributes(ModelNormal): + validations = { + "part_count": { + "inclusive_maximum": 20, + }, + } + + @cached_property + def openapi_types(_): + return { + "headers": ([str],), + "part_count": (int,), + "part_size": (int,), + "table_name": (str,), + } + + attribute_map = { + "headers": "headers", + "part_count": "part_count", + "part_size": "part_size", + "table_name": "table_name", + } + + def __init__(self_, headers: List[str], part_count: int, part_size: int, table_name: str, **kwargs): + """ + The definition of ``CreateUploadRequestDataAttributes`` object. + + :param headers: The headers of the file to upload. + :type headers: [str] + + :param part_count: The number of parts in the upload. + :type part_count: int + + :param part_size: The size of each part in the upload in bytes. For multipart uploads (part_count > 1), all parts except the last one must be at least 5,000,000 bytes. For single-part uploads (part_count = 1), any size is allowed. + :type part_size: int + + :param table_name: The name of the reference table. + :type table_name: str + """ + super().__init__(kwargs) + + self_.headers = headers + self_.part_count = part_count + self_.part_size = part_size + self_.table_name = table_name diff --git a/src/datadog_api_client/v2/model/create_upload_request_data_type.py b/src/datadog_api_client/v2/model/create_upload_request_data_type.py new file mode 100644 index 0000000000..0c49cb4335 --- /dev/null +++ b/src/datadog_api_client/v2/model/create_upload_request_data_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class CreateUploadRequestDataType(ModelSimple): + """ + Upload resource type. + + :param value: If omitted defaults to "upload". Must be one of ["upload"]. + :type value: str + """ + + allowed_values = { + "upload", + } + UPLOAD: ClassVar["CreateUploadRequestDataType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +CreateUploadRequestDataType.UPLOAD = CreateUploadRequestDataType("upload") diff --git a/src/datadog_api_client/v2/model/create_upload_response.py b/src/datadog_api_client/v2/model/create_upload_response.py new file mode 100644 index 0000000000..f7e0db4cf6 --- /dev/null +++ b/src/datadog_api_client/v2/model/create_upload_response.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.create_upload_response_data import CreateUploadResponseData + + +class CreateUploadResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.create_upload_response_data import CreateUploadResponseData + + return { + "data": (CreateUploadResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[CreateUploadResponseData, UnsetType] = unset, **kwargs): + """ + The definition of ``CreateUploadResponse`` object. + + :param data: The definition of ``CreateUploadResponseData`` object. + :type data: CreateUploadResponseData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/create_upload_response_data.py b/src/datadog_api_client/v2/model/create_upload_response_data.py new file mode 100644 index 0000000000..dc036eadc0 --- /dev/null +++ b/src/datadog_api_client/v2/model/create_upload_response_data.py @@ -0,0 +1,66 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.create_upload_response_data_attributes import CreateUploadResponseDataAttributes + from datadog_api_client.v2.model.create_upload_response_data_type import CreateUploadResponseDataType + + +class CreateUploadResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.create_upload_response_data_attributes import ( + CreateUploadResponseDataAttributes, + ) + from datadog_api_client.v2.model.create_upload_response_data_type import CreateUploadResponseDataType + + return { + "attributes": (CreateUploadResponseDataAttributes,), + "id": (str,), + "type": (CreateUploadResponseDataType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + type: CreateUploadResponseDataType, + attributes: Union[CreateUploadResponseDataAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + The definition of ``CreateUploadResponseData`` object. + + :param attributes: The definition of ``CreateUploadResponseDataAttributes`` object. + :type attributes: CreateUploadResponseDataAttributes, optional + + :param id: The ID of the upload. + :type id: str, optional + + :param type: Upload resource type. + :type type: CreateUploadResponseDataType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + super().__init__(kwargs) + + self_.type = type diff --git a/src/datadog_api_client/v2/model/create_upload_response_data_attributes.py b/src/datadog_api_client/v2/model/create_upload_response_data_attributes.py new file mode 100644 index 0000000000..326d3b73f1 --- /dev/null +++ b/src/datadog_api_client/v2/model/create_upload_response_data_attributes.py @@ -0,0 +1,36 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class CreateUploadResponseDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "part_urls": ([str],), + } + + attribute_map = { + "part_urls": "part_urls", + } + + def __init__(self_, part_urls: Union[List[str], UnsetType] = unset, **kwargs): + """ + The definition of ``CreateUploadResponseDataAttributes`` object. + + :param part_urls: The URLs of the parts in the upload. + :type part_urls: [str], optional + """ + if part_urls is not unset: + kwargs["part_urls"] = part_urls + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/create_upload_response_data_type.py b/src/datadog_api_client/v2/model/create_upload_response_data_type.py new file mode 100644 index 0000000000..bd69643c36 --- /dev/null +++ b/src/datadog_api_client/v2/model/create_upload_response_data_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class CreateUploadResponseDataType(ModelSimple): + """ + Upload resource type. + + :param value: If omitted defaults to "upload". Must be one of ["upload"]. + :type value: str + """ + + allowed_values = { + "upload", + } + UPLOAD: ClassVar["CreateUploadResponseDataType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +CreateUploadResponseDataType.UPLOAD = CreateUploadResponseDataType("upload") diff --git a/src/datadog_api_client/v2/model/patch_table_request.py b/src/datadog_api_client/v2/model/patch_table_request.py new file mode 100644 index 0000000000..8f2e93e9f0 --- /dev/null +++ b/src/datadog_api_client/v2/model/patch_table_request.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.patch_table_request_data import PatchTableRequestData + + +class PatchTableRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.patch_table_request_data import PatchTableRequestData + + return { + "data": (PatchTableRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[PatchTableRequestData, UnsetType] = unset, **kwargs): + """ + The definition of ``PatchTableRequest`` object. + + :param data: The definition of ``PatchTableRequestData`` object. + :type data: PatchTableRequestData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/patch_table_request_data.py b/src/datadog_api_client/v2/model/patch_table_request_data.py new file mode 100644 index 0000000000..2b4dc1f667 --- /dev/null +++ b/src/datadog_api_client/v2/model/patch_table_request_data.py @@ -0,0 +1,64 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.patch_table_request_data_attributes import PatchTableRequestDataAttributes + from datadog_api_client.v2.model.patch_table_request_data_type import PatchTableRequestDataType + + +class PatchTableRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.patch_table_request_data_attributes import PatchTableRequestDataAttributes + from datadog_api_client.v2.model.patch_table_request_data_type import PatchTableRequestDataType + + return { + "attributes": (PatchTableRequestDataAttributes,), + "id": (str,), + "type": (PatchTableRequestDataType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + type: PatchTableRequestDataType, + attributes: Union[PatchTableRequestDataAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + The definition of ``PatchTableRequestData`` object. + + :param attributes: The definition of ``PatchTableRequestDataAttributes`` object. + :type attributes: PatchTableRequestDataAttributes, optional + + :param id: The ID of the reference table. + :type id: str, optional + + :param type: Reference table resource type. + :type type: PatchTableRequestDataType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + super().__init__(kwargs) + + self_.type = type diff --git a/src/datadog_api_client/v2/model/patch_table_request_data_attributes.py b/src/datadog_api_client/v2/model/patch_table_request_data_attributes.py new file mode 100644 index 0000000000..a12c9d83e7 --- /dev/null +++ b/src/datadog_api_client/v2/model/patch_table_request_data_attributes.py @@ -0,0 +1,99 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata import ( + PatchTableRequestDataAttributesFileMetadata, + ) + from datadog_api_client.v2.model.patch_table_request_data_attributes_schema import ( + PatchTableRequestDataAttributesSchema, + ) + from datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_cloud_storage import ( + PatchTableRequestDataAttributesFileMetadataCloudStorage, + ) + from datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_local_file import ( + PatchTableRequestDataAttributesFileMetadataLocalFile, + ) + + +class PatchTableRequestDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata import ( + PatchTableRequestDataAttributesFileMetadata, + ) + from datadog_api_client.v2.model.patch_table_request_data_attributes_schema import ( + PatchTableRequestDataAttributesSchema, + ) + + return { + "description": (str,), + "file_metadata": (PatchTableRequestDataAttributesFileMetadata,), + "schema": (PatchTableRequestDataAttributesSchema,), + "sync_enabled": (bool,), + "tags": ([str],), + } + + attribute_map = { + "description": "description", + "file_metadata": "file_metadata", + "schema": "schema", + "sync_enabled": "sync_enabled", + "tags": "tags", + } + + def __init__( + self_, + description: Union[str, UnsetType] = unset, + file_metadata: Union[ + PatchTableRequestDataAttributesFileMetadata, + PatchTableRequestDataAttributesFileMetadataCloudStorage, + PatchTableRequestDataAttributesFileMetadataLocalFile, + UnsetType, + ] = unset, + schema: Union[PatchTableRequestDataAttributesSchema, UnsetType] = unset, + sync_enabled: Union[bool, UnsetType] = unset, + tags: Union[List[str], UnsetType] = unset, + **kwargs, + ): + """ + The definition of ``PatchTableRequestDataAttributes`` object. + + :param description: The description of the reference table. + :type description: str, optional + + :param file_metadata: The definition of ``PatchTableRequestDataAttributesFileMetadata`` object. + :type file_metadata: PatchTableRequestDataAttributesFileMetadata, optional + + :param schema: The definition of ``PatchTableRequestDataAttributesSchema`` object. + :type schema: PatchTableRequestDataAttributesSchema, optional + + :param sync_enabled: Whether this table is synced automatically. + :type sync_enabled: bool, optional + + :param tags: The tags of the reference table. + :type tags: [str], optional + """ + if description is not unset: + kwargs["description"] = description + if file_metadata is not unset: + kwargs["file_metadata"] = file_metadata + if schema is not unset: + kwargs["schema"] = schema + if sync_enabled is not unset: + kwargs["sync_enabled"] = sync_enabled + if tags is not unset: + kwargs["tags"] = tags + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/patch_table_request_data_attributes_file_metadata.py b/src/datadog_api_client/v2/model/patch_table_request_data_attributes_file_metadata.py new file mode 100644 index 0000000000..01b95c19e0 --- /dev/null +++ b/src/datadog_api_client/v2/model/patch_table_request_data_attributes_file_metadata.py @@ -0,0 +1,50 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelComposed, + cached_property, +) + + +class PatchTableRequestDataAttributesFileMetadata(ModelComposed): + def __init__(self, **kwargs): + """ + The definition of ``PatchTableRequestDataAttributesFileMetadata`` object. + + :param access_details: The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails` object. + :type access_details: PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails, optional + + :param sync_enabled: Whether this table is synced automatically. + :type sync_enabled: bool, optional + + :param upload_id: The upload ID. + :type upload_id: str + """ + super().__init__(kwargs) + + @cached_property + def _composed_schemas(_): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + from datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_cloud_storage import ( + PatchTableRequestDataAttributesFileMetadataCloudStorage, + ) + from datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_local_file import ( + PatchTableRequestDataAttributesFileMetadataLocalFile, + ) + + return { + "oneOf": [ + PatchTableRequestDataAttributesFileMetadataCloudStorage, + PatchTableRequestDataAttributesFileMetadataLocalFile, + ], + } diff --git a/src/datadog_api_client/v2/model/patch_table_request_data_attributes_file_metadata_cloud_storage.py b/src/datadog_api_client/v2/model/patch_table_request_data_attributes_file_metadata_cloud_storage.py new file mode 100644 index 0000000000..614cfa3327 --- /dev/null +++ b/src/datadog_api_client/v2/model/patch_table_request_data_attributes_file_metadata_cloud_storage.py @@ -0,0 +1,62 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_one_of_access_details import ( + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails, + ) + + +class PatchTableRequestDataAttributesFileMetadataCloudStorage(ModelNormal): + @cached_property + def additional_properties_type(_): + return None + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_one_of_access_details import ( + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails, + ) + + return { + "access_details": (PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails,), + "sync_enabled": (bool,), + } + + attribute_map = { + "access_details": "access_details", + "sync_enabled": "sync_enabled", + } + + def __init__( + self_, + access_details: Union[PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails, UnsetType] = unset, + sync_enabled: Union[bool, UnsetType] = unset, + **kwargs, + ): + """ + Cloud storage file metadata for patch requests. Allows partial updates of access_details and sync_enabled. + + :param access_details: The definition of ``PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails`` object. + :type access_details: PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails, optional + + :param sync_enabled: Whether this table is synced automatically. + :type sync_enabled: bool, optional + """ + if access_details is not unset: + kwargs["access_details"] = access_details + if sync_enabled is not unset: + kwargs["sync_enabled"] = sync_enabled + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/patch_table_request_data_attributes_file_metadata_local_file.py b/src/datadog_api_client/v2/model/patch_table_request_data_attributes_file_metadata_local_file.py new file mode 100644 index 0000000000..bb72da006e --- /dev/null +++ b/src/datadog_api_client/v2/model/patch_table_request_data_attributes_file_metadata_local_file.py @@ -0,0 +1,37 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class PatchTableRequestDataAttributesFileMetadataLocalFile(ModelNormal): + @cached_property + def additional_properties_type(_): + return None + + @cached_property + def openapi_types(_): + return { + "upload_id": (str,), + } + + attribute_map = { + "upload_id": "upload_id", + } + + def __init__(self_, upload_id: str, **kwargs): + """ + Local file metadata for patch requests using upload ID. + + :param upload_id: The upload ID. + :type upload_id: str + """ + super().__init__(kwargs) + + self_.upload_id = upload_id diff --git a/src/datadog_api_client/v2/model/patch_table_request_data_attributes_file_metadata_one_of_access_details.py b/src/datadog_api_client/v2/model/patch_table_request_data_attributes_file_metadata_one_of_access_details.py new file mode 100644 index 0000000000..0bcf7d9a8e --- /dev/null +++ b/src/datadog_api_client/v2/model/patch_table_request_data_attributes_file_metadata_one_of_access_details.py @@ -0,0 +1,80 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_one_of_access_details_aws_detail import ( + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail, + ) + from datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_one_of_access_details_azure_detail import ( + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail, + ) + from datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_one_of_access_details_gcp_detail import ( + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail, + ) + + +class PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_one_of_access_details_aws_detail import ( + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail, + ) + from datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_one_of_access_details_azure_detail import ( + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail, + ) + from datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_one_of_access_details_gcp_detail import ( + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail, + ) + + return { + "aws_detail": (PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail,), + "azure_detail": (PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail,), + "gcp_detail": (PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail,), + } + + attribute_map = { + "aws_detail": "aws_detail", + "azure_detail": "azure_detail", + "gcp_detail": "gcp_detail", + } + + def __init__( + self_, + aws_detail: Union[PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail, UnsetType] = unset, + azure_detail: Union[ + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail, UnsetType + ] = unset, + gcp_detail: Union[PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail, UnsetType] = unset, + **kwargs, + ): + """ + The definition of ``PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails`` object. + + :param aws_detail: The definition of ``PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail`` object. + :type aws_detail: PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail, optional + + :param azure_detail: The definition of ``PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail`` object. + :type azure_detail: PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail, optional + + :param gcp_detail: The definition of ``PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail`` object. + :type gcp_detail: PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail, optional + """ + if aws_detail is not unset: + kwargs["aws_detail"] = aws_detail + if azure_detail is not unset: + kwargs["azure_detail"] = azure_detail + if gcp_detail is not unset: + kwargs["gcp_detail"] = gcp_detail + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/patch_table_request_data_attributes_file_metadata_one_of_access_details_aws_detail.py b/src/datadog_api_client/v2/model/patch_table_request_data_attributes_file_metadata_one_of_access_details_aws_detail.py new file mode 100644 index 0000000000..a2709f4b44 --- /dev/null +++ b/src/datadog_api_client/v2/model/patch_table_request_data_attributes_file_metadata_one_of_access_details_aws_detail.py @@ -0,0 +1,56 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail(ModelNormal): + @cached_property + def openapi_types(_): + return { + "aws_account_id": (str,), + "aws_bucket_name": (str,), + "file_path": (str,), + } + + attribute_map = { + "aws_account_id": "aws_account_id", + "aws_bucket_name": "aws_bucket_name", + "file_path": "file_path", + } + + def __init__( + self_, + aws_account_id: Union[str, UnsetType] = unset, + aws_bucket_name: Union[str, UnsetType] = unset, + file_path: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + The definition of ``PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail`` object. + + :param aws_account_id: The ID of the AWS account. + :type aws_account_id: str, optional + + :param aws_bucket_name: The name of the AWS bucket. + :type aws_bucket_name: str, optional + + :param file_path: The relative file path from the S3 bucket root to the CSV file. + :type file_path: str, optional + """ + if aws_account_id is not unset: + kwargs["aws_account_id"] = aws_account_id + if aws_bucket_name is not unset: + kwargs["aws_bucket_name"] = aws_bucket_name + if file_path is not unset: + kwargs["file_path"] = file_path + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/patch_table_request_data_attributes_file_metadata_one_of_access_details_azure_detail.py b/src/datadog_api_client/v2/model/patch_table_request_data_attributes_file_metadata_one_of_access_details_azure_detail.py new file mode 100644 index 0000000000..e03277a932 --- /dev/null +++ b/src/datadog_api_client/v2/model/patch_table_request_data_attributes_file_metadata_one_of_access_details_azure_detail.py @@ -0,0 +1,72 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail(ModelNormal): + @cached_property + def openapi_types(_): + return { + "azure_client_id": (str,), + "azure_container_name": (str,), + "azure_storage_account_name": (str,), + "azure_tenant_id": (str,), + "file_path": (str,), + } + + attribute_map = { + "azure_client_id": "azure_client_id", + "azure_container_name": "azure_container_name", + "azure_storage_account_name": "azure_storage_account_name", + "azure_tenant_id": "azure_tenant_id", + "file_path": "file_path", + } + + def __init__( + self_, + azure_client_id: Union[str, UnsetType] = unset, + azure_container_name: Union[str, UnsetType] = unset, + azure_storage_account_name: Union[str, UnsetType] = unset, + azure_tenant_id: Union[str, UnsetType] = unset, + file_path: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + The definition of ``PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail`` object. + + :param azure_client_id: The Azure client ID. + :type azure_client_id: str, optional + + :param azure_container_name: The name of the Azure container. + :type azure_container_name: str, optional + + :param azure_storage_account_name: The name of the Azure storage account. + :type azure_storage_account_name: str, optional + + :param azure_tenant_id: The ID of the Azure tenant. + :type azure_tenant_id: str, optional + + :param file_path: The relative file path from the Azure container root to the CSV file. + :type file_path: str, optional + """ + if azure_client_id is not unset: + kwargs["azure_client_id"] = azure_client_id + if azure_container_name is not unset: + kwargs["azure_container_name"] = azure_container_name + if azure_storage_account_name is not unset: + kwargs["azure_storage_account_name"] = azure_storage_account_name + if azure_tenant_id is not unset: + kwargs["azure_tenant_id"] = azure_tenant_id + if file_path is not unset: + kwargs["file_path"] = file_path + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/patch_table_request_data_attributes_file_metadata_one_of_access_details_gcp_detail.py b/src/datadog_api_client/v2/model/patch_table_request_data_attributes_file_metadata_one_of_access_details_gcp_detail.py new file mode 100644 index 0000000000..6f8856c478 --- /dev/null +++ b/src/datadog_api_client/v2/model/patch_table_request_data_attributes_file_metadata_one_of_access_details_gcp_detail.py @@ -0,0 +1,64 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail(ModelNormal): + @cached_property + def openapi_types(_): + return { + "file_path": (str,), + "gcp_bucket_name": (str,), + "gcp_project_id": (str,), + "gcp_service_account_email": (str,), + } + + attribute_map = { + "file_path": "file_path", + "gcp_bucket_name": "gcp_bucket_name", + "gcp_project_id": "gcp_project_id", + "gcp_service_account_email": "gcp_service_account_email", + } + + def __init__( + self_, + file_path: Union[str, UnsetType] = unset, + gcp_bucket_name: Union[str, UnsetType] = unset, + gcp_project_id: Union[str, UnsetType] = unset, + gcp_service_account_email: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + The definition of ``PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail`` object. + + :param file_path: The relative file path from the GCS bucket root to the CSV file. + :type file_path: str, optional + + :param gcp_bucket_name: The name of the GCP bucket. + :type gcp_bucket_name: str, optional + + :param gcp_project_id: The ID of the GCP project. + :type gcp_project_id: str, optional + + :param gcp_service_account_email: The email of the GCP service account. + :type gcp_service_account_email: str, optional + """ + if file_path is not unset: + kwargs["file_path"] = file_path + if gcp_bucket_name is not unset: + kwargs["gcp_bucket_name"] = gcp_bucket_name + if gcp_project_id is not unset: + kwargs["gcp_project_id"] = gcp_project_id + if gcp_service_account_email is not unset: + kwargs["gcp_service_account_email"] = gcp_service_account_email + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/patch_table_request_data_attributes_schema.py b/src/datadog_api_client/v2/model/patch_table_request_data_attributes_schema.py new file mode 100644 index 0000000000..01cc508d82 --- /dev/null +++ b/src/datadog_api_client/v2/model/patch_table_request_data_attributes_schema.py @@ -0,0 +1,52 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.patch_table_request_data_attributes_schema_fields_items import ( + PatchTableRequestDataAttributesSchemaFieldsItems, + ) + + +class PatchTableRequestDataAttributesSchema(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.patch_table_request_data_attributes_schema_fields_items import ( + PatchTableRequestDataAttributesSchemaFieldsItems, + ) + + return { + "fields": ([PatchTableRequestDataAttributesSchemaFieldsItems],), + "primary_keys": ([str],), + } + + attribute_map = { + "fields": "fields", + "primary_keys": "primary_keys", + } + + def __init__( + self_, fields: List[PatchTableRequestDataAttributesSchemaFieldsItems], primary_keys: List[str], **kwargs + ): + """ + The definition of ``PatchTableRequestDataAttributesSchema`` object. + + :param fields: The ``schema`` ``fields``. + :type fields: [PatchTableRequestDataAttributesSchemaFieldsItems] + + :param primary_keys: List of field names that serve as primary keys for the table. Only one primary key is supported, and it is used as an ID to retrieve rows. + :type primary_keys: [str] + """ + super().__init__(kwargs) + + self_.fields = fields + self_.primary_keys = primary_keys diff --git a/src/datadog_api_client/v2/model/patch_table_request_data_attributes_schema_fields_items.py b/src/datadog_api_client/v2/model/patch_table_request_data_attributes_schema_fields_items.py new file mode 100644 index 0000000000..9dd157b397 --- /dev/null +++ b/src/datadog_api_client/v2/model/patch_table_request_data_attributes_schema_fields_items.py @@ -0,0 +1,46 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.reference_table_schema_field_type import ReferenceTableSchemaFieldType + + +class PatchTableRequestDataAttributesSchemaFieldsItems(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.reference_table_schema_field_type import ReferenceTableSchemaFieldType + + return { + "name": (str,), + "type": (ReferenceTableSchemaFieldType,), + } + + attribute_map = { + "name": "name", + "type": "type", + } + + def __init__(self_, name: str, type: ReferenceTableSchemaFieldType, **kwargs): + """ + The definition of ``PatchTableRequestDataAttributesSchemaFieldsItems`` object. + + :param name: The field name. + :type name: str + + :param type: The field type for reference table schema fields. + :type type: ReferenceTableSchemaFieldType + """ + super().__init__(kwargs) + + self_.name = name + self_.type = type diff --git a/src/datadog_api_client/v2/model/patch_table_request_data_type.py b/src/datadog_api_client/v2/model/patch_table_request_data_type.py new file mode 100644 index 0000000000..0c60cea010 --- /dev/null +++ b/src/datadog_api_client/v2/model/patch_table_request_data_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class PatchTableRequestDataType(ModelSimple): + """ + Reference table resource type. + + :param value: If omitted defaults to "reference_table". Must be one of ["reference_table"]. + :type value: str + """ + + allowed_values = { + "reference_table", + } + REFERENCE_TABLE: ClassVar["PatchTableRequestDataType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +PatchTableRequestDataType.REFERENCE_TABLE = PatchTableRequestDataType("reference_table") diff --git a/src/datadog_api_client/v2/model/reference_table_create_source_type.py b/src/datadog_api_client/v2/model/reference_table_create_source_type.py new file mode 100644 index 0000000000..1849e1d0fa --- /dev/null +++ b/src/datadog_api_client/v2/model/reference_table_create_source_type.py @@ -0,0 +1,44 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ReferenceTableCreateSourceType(ModelSimple): + """ + The source type for creating reference table data. Only these source types can be created through this API. + + :param value: Must be one of ["LOCAL_FILE", "S3", "GCS", "AZURE"]. + :type value: str + """ + + allowed_values = { + "LOCAL_FILE", + "S3", + "GCS", + "AZURE", + } + LOCAL_FILE: ClassVar["ReferenceTableCreateSourceType"] + S3: ClassVar["ReferenceTableCreateSourceType"] + GCS: ClassVar["ReferenceTableCreateSourceType"] + AZURE: ClassVar["ReferenceTableCreateSourceType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ReferenceTableCreateSourceType.LOCAL_FILE = ReferenceTableCreateSourceType("LOCAL_FILE") +ReferenceTableCreateSourceType.S3 = ReferenceTableCreateSourceType("S3") +ReferenceTableCreateSourceType.GCS = ReferenceTableCreateSourceType("GCS") +ReferenceTableCreateSourceType.AZURE = ReferenceTableCreateSourceType("AZURE") diff --git a/src/datadog_api_client/v2/model/reference_table_schema_field_type.py b/src/datadog_api_client/v2/model/reference_table_schema_field_type.py new file mode 100644 index 0000000000..447f9753c7 --- /dev/null +++ b/src/datadog_api_client/v2/model/reference_table_schema_field_type.py @@ -0,0 +1,38 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ReferenceTableSchemaFieldType(ModelSimple): + """ + The field type for reference table schema fields. + + :param value: Must be one of ["STRING", "INT32"]. + :type value: str + """ + + allowed_values = { + "STRING", + "INT32", + } + STRING: ClassVar["ReferenceTableSchemaFieldType"] + INT32: ClassVar["ReferenceTableSchemaFieldType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ReferenceTableSchemaFieldType.STRING = ReferenceTableSchemaFieldType("STRING") +ReferenceTableSchemaFieldType.INT32 = ReferenceTableSchemaFieldType("INT32") diff --git a/src/datadog_api_client/v2/model/reference_table_sort_type.py b/src/datadog_api_client/v2/model/reference_table_sort_type.py new file mode 100644 index 0000000000..ac2a34ff07 --- /dev/null +++ b/src/datadog_api_client/v2/model/reference_table_sort_type.py @@ -0,0 +1,50 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ReferenceTableSortType(ModelSimple): + """ + Sort field and direction for reference tables. Use field name for ascending, prefix with "-" for descending. + + :param value: If omitted defaults to "-updated_at". Must be one of ["updated_at", "table_name", "status", "-updated_at", "-table_name", "-status"]. + :type value: str + """ + + allowed_values = { + "updated_at", + "table_name", + "status", + "-updated_at", + "-table_name", + "-status", + } + UPDATED_AT: ClassVar["ReferenceTableSortType"] + TABLE_NAME: ClassVar["ReferenceTableSortType"] + STATUS: ClassVar["ReferenceTableSortType"] + MINUS_UPDATED_AT: ClassVar["ReferenceTableSortType"] + MINUS_TABLE_NAME: ClassVar["ReferenceTableSortType"] + MINUS_STATUS: ClassVar["ReferenceTableSortType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ReferenceTableSortType.UPDATED_AT = ReferenceTableSortType("updated_at") +ReferenceTableSortType.TABLE_NAME = ReferenceTableSortType("table_name") +ReferenceTableSortType.STATUS = ReferenceTableSortType("status") +ReferenceTableSortType.MINUS_UPDATED_AT = ReferenceTableSortType("-updated_at") +ReferenceTableSortType.MINUS_TABLE_NAME = ReferenceTableSortType("-table_name") +ReferenceTableSortType.MINUS_STATUS = ReferenceTableSortType("-status") diff --git a/src/datadog_api_client/v2/model/reference_table_source_type.py b/src/datadog_api_client/v2/model/reference_table_source_type.py new file mode 100644 index 0000000000..07ecf2030e --- /dev/null +++ b/src/datadog_api_client/v2/model/reference_table_source_type.py @@ -0,0 +1,56 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ReferenceTableSourceType(ModelSimple): + """ + The source type for reference table data. Includes all possible source types that can appear in responses. + + :param value: Must be one of ["LOCAL_FILE", "S3", "GCS", "AZURE", "SERVICENOW", "SALESFORCE", "DATABRICKS", "SNOWFLAKE"]. + :type value: str + """ + + allowed_values = { + "LOCAL_FILE", + "S3", + "GCS", + "AZURE", + "SERVICENOW", + "SALESFORCE", + "DATABRICKS", + "SNOWFLAKE", + } + LOCAL_FILE: ClassVar["ReferenceTableSourceType"] + S3: ClassVar["ReferenceTableSourceType"] + GCS: ClassVar["ReferenceTableSourceType"] + AZURE: ClassVar["ReferenceTableSourceType"] + SERVICENOW: ClassVar["ReferenceTableSourceType"] + SALESFORCE: ClassVar["ReferenceTableSourceType"] + DATABRICKS: ClassVar["ReferenceTableSourceType"] + SNOWFLAKE: ClassVar["ReferenceTableSourceType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ReferenceTableSourceType.LOCAL_FILE = ReferenceTableSourceType("LOCAL_FILE") +ReferenceTableSourceType.S3 = ReferenceTableSourceType("S3") +ReferenceTableSourceType.GCS = ReferenceTableSourceType("GCS") +ReferenceTableSourceType.AZURE = ReferenceTableSourceType("AZURE") +ReferenceTableSourceType.SERVICENOW = ReferenceTableSourceType("SERVICENOW") +ReferenceTableSourceType.SALESFORCE = ReferenceTableSourceType("SALESFORCE") +ReferenceTableSourceType.DATABRICKS = ReferenceTableSourceType("DATABRICKS") +ReferenceTableSourceType.SNOWFLAKE = ReferenceTableSourceType("SNOWFLAKE") diff --git a/src/datadog_api_client/v2/model/table_result_v2.py b/src/datadog_api_client/v2/model/table_result_v2.py new file mode 100644 index 0000000000..76a3710d9c --- /dev/null +++ b/src/datadog_api_client/v2/model/table_result_v2.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.table_result_v2_data import TableResultV2Data + + +class TableResultV2(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.table_result_v2_data import TableResultV2Data + + return { + "data": (TableResultV2Data,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[TableResultV2Data, UnsetType] = unset, **kwargs): + """ + The definition of ``TableResultV2`` object. + + :param data: The definition of ``TableResultV2Data`` object. + :type data: TableResultV2Data, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/table_result_v2_array.py b/src/datadog_api_client/v2/model/table_result_v2_array.py new file mode 100644 index 0000000000..cd01c38f70 --- /dev/null +++ b/src/datadog_api_client/v2/model/table_result_v2_array.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.table_result_v2_data import TableResultV2Data + + +class TableResultV2Array(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.table_result_v2_data import TableResultV2Data + + return { + "data": ([TableResultV2Data],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: List[TableResultV2Data], **kwargs): + """ + The definition of ``TableResultV2Array`` object. + + :param data: The reference tables. + :type data: [TableResultV2Data] + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/table_result_v2_data.py b/src/datadog_api_client/v2/model/table_result_v2_data.py new file mode 100644 index 0000000000..0694584824 --- /dev/null +++ b/src/datadog_api_client/v2/model/table_result_v2_data.py @@ -0,0 +1,64 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.table_result_v2_data_attributes import TableResultV2DataAttributes + from datadog_api_client.v2.model.table_result_v2_data_type import TableResultV2DataType + + +class TableResultV2Data(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.table_result_v2_data_attributes import TableResultV2DataAttributes + from datadog_api_client.v2.model.table_result_v2_data_type import TableResultV2DataType + + return { + "attributes": (TableResultV2DataAttributes,), + "id": (str,), + "type": (TableResultV2DataType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + type: TableResultV2DataType, + attributes: Union[TableResultV2DataAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + The definition of ``TableResultV2Data`` object. + + :param attributes: The definition of ``TableResultV2DataAttributes`` object. + :type attributes: TableResultV2DataAttributes, optional + + :param id: The ID of the reference table. + :type id: str, optional + + :param type: Reference table resource type. + :type type: TableResultV2DataType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + super().__init__(kwargs) + + self_.type = type diff --git a/src/datadog_api_client/v2/model/table_result_v2_data_attributes.py b/src/datadog_api_client/v2/model/table_result_v2_data_attributes.py new file mode 100644 index 0000000000..471f4bae4b --- /dev/null +++ b/src/datadog_api_client/v2/model/table_result_v2_data_attributes.py @@ -0,0 +1,145 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata import ( + TableResultV2DataAttributesFileMetadata, + ) + from datadog_api_client.v2.model.table_result_v2_data_attributes_schema import TableResultV2DataAttributesSchema + from datadog_api_client.v2.model.reference_table_source_type import ReferenceTableSourceType + from datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_cloud_storage import ( + TableResultV2DataAttributesFileMetadataCloudStorage, + ) + from datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_local_file import ( + TableResultV2DataAttributesFileMetadataLocalFile, + ) + + +class TableResultV2DataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata import ( + TableResultV2DataAttributesFileMetadata, + ) + from datadog_api_client.v2.model.table_result_v2_data_attributes_schema import TableResultV2DataAttributesSchema + from datadog_api_client.v2.model.reference_table_source_type import ReferenceTableSourceType + + return { + "created_by": (str,), + "description": (str,), + "file_metadata": (TableResultV2DataAttributesFileMetadata,), + "last_updated_by": (str,), + "row_count": (int,), + "schema": (TableResultV2DataAttributesSchema,), + "source": (ReferenceTableSourceType,), + "status": (str,), + "table_name": (str,), + "tags": ([str],), + "updated_at": (str,), + } + + attribute_map = { + "created_by": "created_by", + "description": "description", + "file_metadata": "file_metadata", + "last_updated_by": "last_updated_by", + "row_count": "row_count", + "schema": "schema", + "source": "source", + "status": "status", + "table_name": "table_name", + "tags": "tags", + "updated_at": "updated_at", + } + + def __init__( + self_, + created_by: Union[str, UnsetType] = unset, + description: Union[str, UnsetType] = unset, + file_metadata: Union[ + TableResultV2DataAttributesFileMetadata, + TableResultV2DataAttributesFileMetadataCloudStorage, + TableResultV2DataAttributesFileMetadataLocalFile, + UnsetType, + ] = unset, + last_updated_by: Union[str, UnsetType] = unset, + row_count: Union[int, UnsetType] = unset, + schema: Union[TableResultV2DataAttributesSchema, UnsetType] = unset, + source: Union[ReferenceTableSourceType, UnsetType] = unset, + status: Union[str, UnsetType] = unset, + table_name: Union[str, UnsetType] = unset, + tags: Union[List[str], UnsetType] = unset, + updated_at: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + The definition of ``TableResultV2DataAttributes`` object. + + :param created_by: UUID of the user who created the reference table. + :type created_by: str, optional + + :param description: The description of the reference table. + :type description: str, optional + + :param file_metadata: The definition of ``TableResultV2DataAttributesFileMetadata`` object. + :type file_metadata: TableResultV2DataAttributesFileMetadata, optional + + :param last_updated_by: UUID of the user who last updated the reference table. + :type last_updated_by: str, optional + + :param row_count: The number of successfully processed rows in the reference table. + :type row_count: int, optional + + :param schema: The definition of ``TableResultV2DataAttributesSchema`` object. + :type schema: TableResultV2DataAttributesSchema, optional + + :param source: The source type for reference table data. Includes all possible source types that can appear in responses. + :type source: ReferenceTableSourceType, optional + + :param status: The status of the reference table. + :type status: str, optional + + :param table_name: The name of the reference table. + :type table_name: str, optional + + :param tags: The tags of the reference table. + :type tags: [str], optional + + :param updated_at: The timestamp of the last update to the reference table in ISO 8601 format. + :type updated_at: str, optional + """ + if created_by is not unset: + kwargs["created_by"] = created_by + if description is not unset: + kwargs["description"] = description + if file_metadata is not unset: + kwargs["file_metadata"] = file_metadata + if last_updated_by is not unset: + kwargs["last_updated_by"] = last_updated_by + if row_count is not unset: + kwargs["row_count"] = row_count + if schema is not unset: + kwargs["schema"] = schema + if source is not unset: + kwargs["source"] = source + if status is not unset: + kwargs["status"] = status + if table_name is not unset: + kwargs["table_name"] = table_name + if tags is not unset: + kwargs["tags"] = tags + if updated_at is not unset: + kwargs["updated_at"] = updated_at + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/table_result_v2_data_attributes_file_metadata.py b/src/datadog_api_client/v2/model/table_result_v2_data_attributes_file_metadata.py new file mode 100644 index 0000000000..2f893da887 --- /dev/null +++ b/src/datadog_api_client/v2/model/table_result_v2_data_attributes_file_metadata.py @@ -0,0 +1,59 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelComposed, + cached_property, +) + + +class TableResultV2DataAttributesFileMetadata(ModelComposed): + def __init__(self, **kwargs): + """ + The definition of ``TableResultV2DataAttributesFileMetadata`` object. + + :param access_details: The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetails` object. + :type access_details: TableResultV2DataAttributesFileMetadataOneOfAccessDetails, optional + + :param error_message: The error message returned from the sync. + :type error_message: str, optional + + :param error_row_count: The number of rows that failed to sync. + :type error_row_count: int, optional + + :param error_type: The type of error that occurred during file processing. This field provides high-level error categories for easier troubleshooting and is only present when there are errors. + :type error_type: TableResultV2DataAttributesFileMetadataCloudStorageErrorType, optional + + :param sync_enabled: Whether this table is synced automatically. + :type sync_enabled: bool, optional + + :param upload_id: The upload ID that was used to create/update the table. + :type upload_id: str, optional + """ + super().__init__(kwargs) + + @cached_property + def _composed_schemas(_): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + from datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_cloud_storage import ( + TableResultV2DataAttributesFileMetadataCloudStorage, + ) + from datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_local_file import ( + TableResultV2DataAttributesFileMetadataLocalFile, + ) + + return { + "oneOf": [ + TableResultV2DataAttributesFileMetadataCloudStorage, + TableResultV2DataAttributesFileMetadataLocalFile, + ], + } diff --git a/src/datadog_api_client/v2/model/table_result_v2_data_attributes_file_metadata_cloud_storage.py b/src/datadog_api_client/v2/model/table_result_v2_data_attributes_file_metadata_cloud_storage.py new file mode 100644 index 0000000000..1348e77d3c --- /dev/null +++ b/src/datadog_api_client/v2/model/table_result_v2_data_attributes_file_metadata_cloud_storage.py @@ -0,0 +1,88 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_one_of_access_details import ( + TableResultV2DataAttributesFileMetadataOneOfAccessDetails, + ) + from datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_cloud_storage_error_type import ( + TableResultV2DataAttributesFileMetadataCloudStorageErrorType, + ) + + +class TableResultV2DataAttributesFileMetadataCloudStorage(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_one_of_access_details import ( + TableResultV2DataAttributesFileMetadataOneOfAccessDetails, + ) + from datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_cloud_storage_error_type import ( + TableResultV2DataAttributesFileMetadataCloudStorageErrorType, + ) + + return { + "access_details": (TableResultV2DataAttributesFileMetadataOneOfAccessDetails,), + "error_message": (str,), + "error_row_count": (int,), + "error_type": (TableResultV2DataAttributesFileMetadataCloudStorageErrorType,), + "sync_enabled": (bool,), + } + + attribute_map = { + "access_details": "access_details", + "error_message": "error_message", + "error_row_count": "error_row_count", + "error_type": "error_type", + "sync_enabled": "sync_enabled", + } + + def __init__( + self_, + access_details: Union[TableResultV2DataAttributesFileMetadataOneOfAccessDetails, UnsetType] = unset, + error_message: Union[str, UnsetType] = unset, + error_row_count: Union[int, UnsetType] = unset, + error_type: Union[TableResultV2DataAttributesFileMetadataCloudStorageErrorType, UnsetType] = unset, + sync_enabled: Union[bool, UnsetType] = unset, + **kwargs, + ): + """ + File metadata for reference tables created by cloud storage. + + :param access_details: The definition of ``TableResultV2DataAttributesFileMetadataOneOfAccessDetails`` object. + :type access_details: TableResultV2DataAttributesFileMetadataOneOfAccessDetails, optional + + :param error_message: The error message returned from the sync. + :type error_message: str, optional + + :param error_row_count: The number of rows that failed to sync. + :type error_row_count: int, optional + + :param error_type: The type of error that occurred during file processing. This field provides high-level error categories for easier troubleshooting and is only present when there are errors. + :type error_type: TableResultV2DataAttributesFileMetadataCloudStorageErrorType, optional + + :param sync_enabled: Whether this table is synced automatically. + :type sync_enabled: bool, optional + """ + if access_details is not unset: + kwargs["access_details"] = access_details + if error_message is not unset: + kwargs["error_message"] = error_message + if error_row_count is not unset: + kwargs["error_row_count"] = error_row_count + if error_type is not unset: + kwargs["error_type"] = error_type + if sync_enabled is not unset: + kwargs["sync_enabled"] = sync_enabled + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/table_result_v2_data_attributes_file_metadata_cloud_storage_error_type.py b/src/datadog_api_client/v2/model/table_result_v2_data_attributes_file_metadata_cloud_storage_error_type.py new file mode 100644 index 0000000000..d148de2eef --- /dev/null +++ b/src/datadog_api_client/v2/model/table_result_v2_data_attributes_file_metadata_cloud_storage_error_type.py @@ -0,0 +1,77 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class TableResultV2DataAttributesFileMetadataCloudStorageErrorType(ModelSimple): + """ + The type of error that occurred during file processing. This field provides high-level error categories for easier troubleshooting and is only present when there are errors. + + :param value: Must be one of ["TABLE_SCHEMA_ERROR", "FILE_FORMAT_ERROR", "CONFIGURATION_ERROR", "QUOTA_EXCEEDED", "CONFLICT_ERROR", "VALIDATION_ERROR", "STATE_ERROR", "OPERATION_ERROR", "SYSTEM_ERROR"]. + :type value: str + """ + + allowed_values = { + "TABLE_SCHEMA_ERROR", + "FILE_FORMAT_ERROR", + "CONFIGURATION_ERROR", + "QUOTA_EXCEEDED", + "CONFLICT_ERROR", + "VALIDATION_ERROR", + "STATE_ERROR", + "OPERATION_ERROR", + "SYSTEM_ERROR", + } + TABLE_SCHEMA_ERROR: ClassVar["TableResultV2DataAttributesFileMetadataCloudStorageErrorType"] + FILE_FORMAT_ERROR: ClassVar["TableResultV2DataAttributesFileMetadataCloudStorageErrorType"] + CONFIGURATION_ERROR: ClassVar["TableResultV2DataAttributesFileMetadataCloudStorageErrorType"] + QUOTA_EXCEEDED: ClassVar["TableResultV2DataAttributesFileMetadataCloudStorageErrorType"] + CONFLICT_ERROR: ClassVar["TableResultV2DataAttributesFileMetadataCloudStorageErrorType"] + VALIDATION_ERROR: ClassVar["TableResultV2DataAttributesFileMetadataCloudStorageErrorType"] + STATE_ERROR: ClassVar["TableResultV2DataAttributesFileMetadataCloudStorageErrorType"] + OPERATION_ERROR: ClassVar["TableResultV2DataAttributesFileMetadataCloudStorageErrorType"] + SYSTEM_ERROR: ClassVar["TableResultV2DataAttributesFileMetadataCloudStorageErrorType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +TableResultV2DataAttributesFileMetadataCloudStorageErrorType.TABLE_SCHEMA_ERROR = ( + TableResultV2DataAttributesFileMetadataCloudStorageErrorType("TABLE_SCHEMA_ERROR") +) +TableResultV2DataAttributesFileMetadataCloudStorageErrorType.FILE_FORMAT_ERROR = ( + TableResultV2DataAttributesFileMetadataCloudStorageErrorType("FILE_FORMAT_ERROR") +) +TableResultV2DataAttributesFileMetadataCloudStorageErrorType.CONFIGURATION_ERROR = ( + TableResultV2DataAttributesFileMetadataCloudStorageErrorType("CONFIGURATION_ERROR") +) +TableResultV2DataAttributesFileMetadataCloudStorageErrorType.QUOTA_EXCEEDED = ( + TableResultV2DataAttributesFileMetadataCloudStorageErrorType("QUOTA_EXCEEDED") +) +TableResultV2DataAttributesFileMetadataCloudStorageErrorType.CONFLICT_ERROR = ( + TableResultV2DataAttributesFileMetadataCloudStorageErrorType("CONFLICT_ERROR") +) +TableResultV2DataAttributesFileMetadataCloudStorageErrorType.VALIDATION_ERROR = ( + TableResultV2DataAttributesFileMetadataCloudStorageErrorType("VALIDATION_ERROR") +) +TableResultV2DataAttributesFileMetadataCloudStorageErrorType.STATE_ERROR = ( + TableResultV2DataAttributesFileMetadataCloudStorageErrorType("STATE_ERROR") +) +TableResultV2DataAttributesFileMetadataCloudStorageErrorType.OPERATION_ERROR = ( + TableResultV2DataAttributesFileMetadataCloudStorageErrorType("OPERATION_ERROR") +) +TableResultV2DataAttributesFileMetadataCloudStorageErrorType.SYSTEM_ERROR = ( + TableResultV2DataAttributesFileMetadataCloudStorageErrorType("SYSTEM_ERROR") +) diff --git a/src/datadog_api_client/v2/model/table_result_v2_data_attributes_file_metadata_local_file.py b/src/datadog_api_client/v2/model/table_result_v2_data_attributes_file_metadata_local_file.py new file mode 100644 index 0000000000..82426c58e5 --- /dev/null +++ b/src/datadog_api_client/v2/model/table_result_v2_data_attributes_file_metadata_local_file.py @@ -0,0 +1,56 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class TableResultV2DataAttributesFileMetadataLocalFile(ModelNormal): + @cached_property + def openapi_types(_): + return { + "error_message": (str,), + "error_row_count": (int,), + "upload_id": (str,), + } + + attribute_map = { + "error_message": "error_message", + "error_row_count": "error_row_count", + "upload_id": "upload_id", + } + + def __init__( + self_, + error_message: Union[str, UnsetType] = unset, + error_row_count: Union[int, UnsetType] = unset, + upload_id: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + File metadata for reference tables created by upload. + + :param error_message: The error message returned from the creation/update. + :type error_message: str, optional + + :param error_row_count: The number of rows that failed to create/update. + :type error_row_count: int, optional + + :param upload_id: The upload ID that was used to create/update the table. + :type upload_id: str, optional + """ + if error_message is not unset: + kwargs["error_message"] = error_message + if error_row_count is not unset: + kwargs["error_row_count"] = error_row_count + if upload_id is not unset: + kwargs["upload_id"] = upload_id + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/table_result_v2_data_attributes_file_metadata_one_of_access_details.py b/src/datadog_api_client/v2/model/table_result_v2_data_attributes_file_metadata_one_of_access_details.py new file mode 100644 index 0000000000..f3962509e2 --- /dev/null +++ b/src/datadog_api_client/v2/model/table_result_v2_data_attributes_file_metadata_one_of_access_details.py @@ -0,0 +1,78 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_one_of_access_details_aws_detail import ( + TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail, + ) + from datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_one_of_access_details_azure_detail import ( + TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail, + ) + from datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_one_of_access_details_gcp_detail import ( + TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail, + ) + + +class TableResultV2DataAttributesFileMetadataOneOfAccessDetails(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_one_of_access_details_aws_detail import ( + TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail, + ) + from datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_one_of_access_details_azure_detail import ( + TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail, + ) + from datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_one_of_access_details_gcp_detail import ( + TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail, + ) + + return { + "aws_detail": (TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail,), + "azure_detail": (TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail,), + "gcp_detail": (TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail,), + } + + attribute_map = { + "aws_detail": "aws_detail", + "azure_detail": "azure_detail", + "gcp_detail": "gcp_detail", + } + + def __init__( + self_, + aws_detail: Union[TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail, UnsetType] = unset, + azure_detail: Union[TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail, UnsetType] = unset, + gcp_detail: Union[TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail, UnsetType] = unset, + **kwargs, + ): + """ + The definition of ``TableResultV2DataAttributesFileMetadataOneOfAccessDetails`` object. + + :param aws_detail: The definition of ``TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail`` object. + :type aws_detail: TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail, optional + + :param azure_detail: The definition of ``TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail`` object. + :type azure_detail: TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail, optional + + :param gcp_detail: The definition of ``TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail`` object. + :type gcp_detail: TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail, optional + """ + if aws_detail is not unset: + kwargs["aws_detail"] = aws_detail + if azure_detail is not unset: + kwargs["azure_detail"] = azure_detail + if gcp_detail is not unset: + kwargs["gcp_detail"] = gcp_detail + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/table_result_v2_data_attributes_file_metadata_one_of_access_details_aws_detail.py b/src/datadog_api_client/v2/model/table_result_v2_data_attributes_file_metadata_one_of_access_details_aws_detail.py new file mode 100644 index 0000000000..f6fb81fedc --- /dev/null +++ b/src/datadog_api_client/v2/model/table_result_v2_data_attributes_file_metadata_one_of_access_details_aws_detail.py @@ -0,0 +1,56 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail(ModelNormal): + @cached_property + def openapi_types(_): + return { + "aws_account_id": (str,), + "aws_bucket_name": (str,), + "file_path": (str,), + } + + attribute_map = { + "aws_account_id": "aws_account_id", + "aws_bucket_name": "aws_bucket_name", + "file_path": "file_path", + } + + def __init__( + self_, + aws_account_id: Union[str, UnsetType] = unset, + aws_bucket_name: Union[str, UnsetType] = unset, + file_path: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + The definition of ``TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail`` object. + + :param aws_account_id: The ID of the AWS account. + :type aws_account_id: str, optional + + :param aws_bucket_name: The name of the AWS bucket. + :type aws_bucket_name: str, optional + + :param file_path: The relative file path from the S3 bucket root to the CSV file. + :type file_path: str, optional + """ + if aws_account_id is not unset: + kwargs["aws_account_id"] = aws_account_id + if aws_bucket_name is not unset: + kwargs["aws_bucket_name"] = aws_bucket_name + if file_path is not unset: + kwargs["file_path"] = file_path + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/table_result_v2_data_attributes_file_metadata_one_of_access_details_azure_detail.py b/src/datadog_api_client/v2/model/table_result_v2_data_attributes_file_metadata_one_of_access_details_azure_detail.py new file mode 100644 index 0000000000..021b3551da --- /dev/null +++ b/src/datadog_api_client/v2/model/table_result_v2_data_attributes_file_metadata_one_of_access_details_azure_detail.py @@ -0,0 +1,72 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail(ModelNormal): + @cached_property + def openapi_types(_): + return { + "azure_client_id": (str,), + "azure_container_name": (str,), + "azure_storage_account_name": (str,), + "azure_tenant_id": (str,), + "file_path": (str,), + } + + attribute_map = { + "azure_client_id": "azure_client_id", + "azure_container_name": "azure_container_name", + "azure_storage_account_name": "azure_storage_account_name", + "azure_tenant_id": "azure_tenant_id", + "file_path": "file_path", + } + + def __init__( + self_, + azure_client_id: Union[str, UnsetType] = unset, + azure_container_name: Union[str, UnsetType] = unset, + azure_storage_account_name: Union[str, UnsetType] = unset, + azure_tenant_id: Union[str, UnsetType] = unset, + file_path: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + The definition of ``TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail`` object. + + :param azure_client_id: The Azure client ID. + :type azure_client_id: str, optional + + :param azure_container_name: The name of the Azure container. + :type azure_container_name: str, optional + + :param azure_storage_account_name: The name of the Azure storage account. + :type azure_storage_account_name: str, optional + + :param azure_tenant_id: The ID of the Azure tenant. + :type azure_tenant_id: str, optional + + :param file_path: The relative file path from the Azure container root to the CSV file. + :type file_path: str, optional + """ + if azure_client_id is not unset: + kwargs["azure_client_id"] = azure_client_id + if azure_container_name is not unset: + kwargs["azure_container_name"] = azure_container_name + if azure_storage_account_name is not unset: + kwargs["azure_storage_account_name"] = azure_storage_account_name + if azure_tenant_id is not unset: + kwargs["azure_tenant_id"] = azure_tenant_id + if file_path is not unset: + kwargs["file_path"] = file_path + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/table_result_v2_data_attributes_file_metadata_one_of_access_details_gcp_detail.py b/src/datadog_api_client/v2/model/table_result_v2_data_attributes_file_metadata_one_of_access_details_gcp_detail.py new file mode 100644 index 0000000000..796679ee0c --- /dev/null +++ b/src/datadog_api_client/v2/model/table_result_v2_data_attributes_file_metadata_one_of_access_details_gcp_detail.py @@ -0,0 +1,64 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail(ModelNormal): + @cached_property + def openapi_types(_): + return { + "file_path": (str,), + "gcp_bucket_name": (str,), + "gcp_project_id": (str,), + "gcp_service_account_email": (str,), + } + + attribute_map = { + "file_path": "file_path", + "gcp_bucket_name": "gcp_bucket_name", + "gcp_project_id": "gcp_project_id", + "gcp_service_account_email": "gcp_service_account_email", + } + + def __init__( + self_, + file_path: Union[str, UnsetType] = unset, + gcp_bucket_name: Union[str, UnsetType] = unset, + gcp_project_id: Union[str, UnsetType] = unset, + gcp_service_account_email: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + The definition of ``TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail`` object. + + :param file_path: The relative file path from the GCS bucket root to the CSV file. + :type file_path: str, optional + + :param gcp_bucket_name: The name of the GCP bucket. + :type gcp_bucket_name: str, optional + + :param gcp_project_id: The ID of the GCP project. + :type gcp_project_id: str, optional + + :param gcp_service_account_email: The email of the GCP service account. + :type gcp_service_account_email: str, optional + """ + if file_path is not unset: + kwargs["file_path"] = file_path + if gcp_bucket_name is not unset: + kwargs["gcp_bucket_name"] = gcp_bucket_name + if gcp_project_id is not unset: + kwargs["gcp_project_id"] = gcp_project_id + if gcp_service_account_email is not unset: + kwargs["gcp_service_account_email"] = gcp_service_account_email + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/table_result_v2_data_attributes_schema.py b/src/datadog_api_client/v2/model/table_result_v2_data_attributes_schema.py new file mode 100644 index 0000000000..4d76f90dc7 --- /dev/null +++ b/src/datadog_api_client/v2/model/table_result_v2_data_attributes_schema.py @@ -0,0 +1,50 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.table_result_v2_data_attributes_schema_fields_items import ( + TableResultV2DataAttributesSchemaFieldsItems, + ) + + +class TableResultV2DataAttributesSchema(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.table_result_v2_data_attributes_schema_fields_items import ( + TableResultV2DataAttributesSchemaFieldsItems, + ) + + return { + "fields": ([TableResultV2DataAttributesSchemaFieldsItems],), + "primary_keys": ([str],), + } + + attribute_map = { + "fields": "fields", + "primary_keys": "primary_keys", + } + + def __init__(self_, fields: List[TableResultV2DataAttributesSchemaFieldsItems], primary_keys: List[str], **kwargs): + """ + The definition of ``TableResultV2DataAttributesSchema`` object. + + :param fields: The ``schema`` ``fields``. + :type fields: [TableResultV2DataAttributesSchemaFieldsItems] + + :param primary_keys: List of field names that serve as primary keys for the table. Only one primary key is supported, and it is used as an ID to retrieve rows. + :type primary_keys: [str] + """ + super().__init__(kwargs) + + self_.fields = fields + self_.primary_keys = primary_keys diff --git a/src/datadog_api_client/v2/model/table_result_v2_data_attributes_schema_fields_items.py b/src/datadog_api_client/v2/model/table_result_v2_data_attributes_schema_fields_items.py new file mode 100644 index 0000000000..bf55f49315 --- /dev/null +++ b/src/datadog_api_client/v2/model/table_result_v2_data_attributes_schema_fields_items.py @@ -0,0 +1,46 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.reference_table_schema_field_type import ReferenceTableSchemaFieldType + + +class TableResultV2DataAttributesSchemaFieldsItems(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.reference_table_schema_field_type import ReferenceTableSchemaFieldType + + return { + "name": (str,), + "type": (ReferenceTableSchemaFieldType,), + } + + attribute_map = { + "name": "name", + "type": "type", + } + + def __init__(self_, name: str, type: ReferenceTableSchemaFieldType, **kwargs): + """ + The definition of ``TableResultV2DataAttributesSchemaFieldsItems`` object. + + :param name: The field name. + :type name: str + + :param type: The field type for reference table schema fields. + :type type: ReferenceTableSchemaFieldType + """ + super().__init__(kwargs) + + self_.name = name + self_.type = type diff --git a/src/datadog_api_client/v2/model/table_result_v2_data_type.py b/src/datadog_api_client/v2/model/table_result_v2_data_type.py new file mode 100644 index 0000000000..0316300e9d --- /dev/null +++ b/src/datadog_api_client/v2/model/table_result_v2_data_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class TableResultV2DataType(ModelSimple): + """ + Reference table resource type. + + :param value: If omitted defaults to "reference_table". Must be one of ["reference_table"]. + :type value: str + """ + + allowed_values = { + "reference_table", + } + REFERENCE_TABLE: ClassVar["TableResultV2DataType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +TableResultV2DataType.REFERENCE_TABLE = TableResultV2DataType("reference_table") diff --git a/src/datadog_api_client/v2/model/table_row_resource_array.py b/src/datadog_api_client/v2/model/table_row_resource_array.py new file mode 100644 index 0000000000..7329423be5 --- /dev/null +++ b/src/datadog_api_client/v2/model/table_row_resource_array.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.table_row_resource_data import TableRowResourceData + + +class TableRowResourceArray(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.table_row_resource_data import TableRowResourceData + + return { + "data": ([TableRowResourceData],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: List[TableRowResourceData], **kwargs): + """ + The definition of ``TableRowResourceArray`` object. + + :param data: The rows. + :type data: [TableRowResourceData] + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/table_row_resource_data.py b/src/datadog_api_client/v2/model/table_row_resource_data.py new file mode 100644 index 0000000000..05b65ba727 --- /dev/null +++ b/src/datadog_api_client/v2/model/table_row_resource_data.py @@ -0,0 +1,64 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.table_row_resource_data_attributes import TableRowResourceDataAttributes + from datadog_api_client.v2.model.table_row_resource_data_type import TableRowResourceDataType + + +class TableRowResourceData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.table_row_resource_data_attributes import TableRowResourceDataAttributes + from datadog_api_client.v2.model.table_row_resource_data_type import TableRowResourceDataType + + return { + "attributes": (TableRowResourceDataAttributes,), + "id": (str,), + "type": (TableRowResourceDataType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + type: TableRowResourceDataType, + attributes: Union[TableRowResourceDataAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + The definition of ``TableRowResourceData`` object. + + :param attributes: The definition of ``TableRowResourceDataAttributes`` object. + :type attributes: TableRowResourceDataAttributes, optional + + :param id: The ID of the row. + :type id: str, optional + + :param type: Row resource type. + :type type: TableRowResourceDataType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + super().__init__(kwargs) + + self_.type = type diff --git a/src/datadog_api_client/v2/model/table_row_resource_data_attributes.py b/src/datadog_api_client/v2/model/table_row_resource_data_attributes.py new file mode 100644 index 0000000000..7f70042495 --- /dev/null +++ b/src/datadog_api_client/v2/model/table_row_resource_data_attributes.py @@ -0,0 +1,55 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Any, Dict, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + date, + datetime, + none_type, + unset, + UnsetType, + UUID, +) + + +class TableRowResourceDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "values": ( + { + str: ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ) + }, + ), + } + + attribute_map = { + "values": "values", + } + + def __init__(self_, values: Union[Dict[str, Any], UnsetType] = unset, **kwargs): + """ + The definition of ``TableRowResourceDataAttributes`` object. + + :param values: The values of the row. + :type values: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional + """ + if values is not unset: + kwargs["values"] = values + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/table_row_resource_data_type.py b/src/datadog_api_client/v2/model/table_row_resource_data_type.py new file mode 100644 index 0000000000..d1d4788de8 --- /dev/null +++ b/src/datadog_api_client/v2/model/table_row_resource_data_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class TableRowResourceDataType(ModelSimple): + """ + Row resource type. + + :param value: If omitted defaults to "row". Must be one of ["row"]. + :type value: str + """ + + allowed_values = { + "row", + } + ROW: ClassVar["TableRowResourceDataType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +TableRowResourceDataType.ROW = TableRowResourceDataType("row") diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 525d7e1a29..a4f2b8db88 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -947,6 +947,45 @@ CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems, ) from datadog_api_client.v2.model.create_ruleset_request_data_type import CreateRulesetRequestDataType +from datadog_api_client.v2.model.create_table_request import CreateTableRequest +from datadog_api_client.v2.model.create_table_request_data import CreateTableRequestData +from datadog_api_client.v2.model.create_table_request_data_attributes import CreateTableRequestDataAttributes +from datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata import ( + CreateTableRequestDataAttributesFileMetadata, +) +from datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_cloud_storage import ( + CreateTableRequestDataAttributesFileMetadataCloudStorage, +) +from datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_local_file import ( + CreateTableRequestDataAttributesFileMetadataLocalFile, +) +from datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_one_of_access_details import ( + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails, +) +from datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_one_of_access_details_aws_detail import ( + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail, +) +from datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_one_of_access_details_azure_detail import ( + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail, +) +from datadog_api_client.v2.model.create_table_request_data_attributes_file_metadata_one_of_access_details_gcp_detail import ( + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail, +) +from datadog_api_client.v2.model.create_table_request_data_attributes_schema import ( + CreateTableRequestDataAttributesSchema, +) +from datadog_api_client.v2.model.create_table_request_data_attributes_schema_fields_items import ( + CreateTableRequestDataAttributesSchemaFieldsItems, +) +from datadog_api_client.v2.model.create_table_request_data_type import CreateTableRequestDataType +from datadog_api_client.v2.model.create_upload_request import CreateUploadRequest +from datadog_api_client.v2.model.create_upload_request_data import CreateUploadRequestData +from datadog_api_client.v2.model.create_upload_request_data_attributes import CreateUploadRequestDataAttributes +from datadog_api_client.v2.model.create_upload_request_data_type import CreateUploadRequestDataType +from datadog_api_client.v2.model.create_upload_response import CreateUploadResponse +from datadog_api_client.v2.model.create_upload_response_data import CreateUploadResponseData +from datadog_api_client.v2.model.create_upload_response_data_attributes import CreateUploadResponseDataAttributes +from datadog_api_client.v2.model.create_upload_response_data_type import CreateUploadResponseDataType from datadog_api_client.v2.model.create_workflow_request import CreateWorkflowRequest from datadog_api_client.v2.model.create_workflow_response import CreateWorkflowResponse from datadog_api_client.v2.model.creator import Creator @@ -3139,6 +3178,35 @@ from datadog_api_client.v2.model.patch_notification_rule_parameters_data_attributes import ( PatchNotificationRuleParametersDataAttributes, ) +from datadog_api_client.v2.model.patch_table_request import PatchTableRequest +from datadog_api_client.v2.model.patch_table_request_data import PatchTableRequestData +from datadog_api_client.v2.model.patch_table_request_data_attributes import PatchTableRequestDataAttributes +from datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata import ( + PatchTableRequestDataAttributesFileMetadata, +) +from datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_cloud_storage import ( + PatchTableRequestDataAttributesFileMetadataCloudStorage, +) +from datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_local_file import ( + PatchTableRequestDataAttributesFileMetadataLocalFile, +) +from datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_one_of_access_details import ( + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails, +) +from datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_one_of_access_details_aws_detail import ( + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail, +) +from datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_one_of_access_details_azure_detail import ( + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail, +) +from datadog_api_client.v2.model.patch_table_request_data_attributes_file_metadata_one_of_access_details_gcp_detail import ( + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail, +) +from datadog_api_client.v2.model.patch_table_request_data_attributes_schema import PatchTableRequestDataAttributesSchema +from datadog_api_client.v2.model.patch_table_request_data_attributes_schema_fields_items import ( + PatchTableRequestDataAttributesSchemaFieldsItems, +) +from datadog_api_client.v2.model.patch_table_request_data_type import PatchTableRequestDataType from datadog_api_client.v2.model.permission import Permission from datadog_api_client.v2.model.permission_attributes import PermissionAttributes from datadog_api_client.v2.model.permissions_response import PermissionsResponse @@ -3245,6 +3313,10 @@ from datadog_api_client.v2.model.recommendation_data import RecommendationData from datadog_api_client.v2.model.recommendation_document import RecommendationDocument from datadog_api_client.v2.model.recommendation_type import RecommendationType +from datadog_api_client.v2.model.reference_table_create_source_type import ReferenceTableCreateSourceType +from datadog_api_client.v2.model.reference_table_schema_field_type import ReferenceTableSchemaFieldType +from datadog_api_client.v2.model.reference_table_sort_type import ReferenceTableSortType +from datadog_api_client.v2.model.reference_table_source_type import ReferenceTableSourceType from datadog_api_client.v2.model.register_app_key_response import RegisterAppKeyResponse from datadog_api_client.v2.model.relation_attributes import RelationAttributes from datadog_api_client.v2.model.relation_entity import RelationEntity @@ -4088,6 +4160,43 @@ from datadog_api_client.v2.model.step import Step from datadog_api_client.v2.model.step_display import StepDisplay from datadog_api_client.v2.model.step_display_bounds import StepDisplayBounds +from datadog_api_client.v2.model.table_result_v2 import TableResultV2 +from datadog_api_client.v2.model.table_result_v2_array import TableResultV2Array +from datadog_api_client.v2.model.table_result_v2_data import TableResultV2Data +from datadog_api_client.v2.model.table_result_v2_data_attributes import TableResultV2DataAttributes +from datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata import ( + TableResultV2DataAttributesFileMetadata, +) +from datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_cloud_storage import ( + TableResultV2DataAttributesFileMetadataCloudStorage, +) +from datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_cloud_storage_error_type import ( + TableResultV2DataAttributesFileMetadataCloudStorageErrorType, +) +from datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_local_file import ( + TableResultV2DataAttributesFileMetadataLocalFile, +) +from datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_one_of_access_details import ( + TableResultV2DataAttributesFileMetadataOneOfAccessDetails, +) +from datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_one_of_access_details_aws_detail import ( + TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail, +) +from datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_one_of_access_details_azure_detail import ( + TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail, +) +from datadog_api_client.v2.model.table_result_v2_data_attributes_file_metadata_one_of_access_details_gcp_detail import ( + TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail, +) +from datadog_api_client.v2.model.table_result_v2_data_attributes_schema import TableResultV2DataAttributesSchema +from datadog_api_client.v2.model.table_result_v2_data_attributes_schema_fields_items import ( + TableResultV2DataAttributesSchemaFieldsItems, +) +from datadog_api_client.v2.model.table_result_v2_data_type import TableResultV2DataType +from datadog_api_client.v2.model.table_row_resource_array import TableRowResourceArray +from datadog_api_client.v2.model.table_row_resource_data import TableRowResourceData +from datadog_api_client.v2.model.table_row_resource_data_attributes import TableRowResourceDataAttributes +from datadog_api_client.v2.model.table_row_resource_data_type import TableRowResourceDataType from datadog_api_client.v2.model.tag_filter import TagFilter from datadog_api_client.v2.model.tags_event_attribute import TagsEventAttribute from datadog_api_client.v2.model.team import Team @@ -5115,6 +5224,27 @@ "CreateRulesetRequestDataAttributesRulesItemsReferenceTable", "CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems", "CreateRulesetRequestDataType", + "CreateTableRequest", + "CreateTableRequestData", + "CreateTableRequestDataAttributes", + "CreateTableRequestDataAttributesFileMetadata", + "CreateTableRequestDataAttributesFileMetadataCloudStorage", + "CreateTableRequestDataAttributesFileMetadataLocalFile", + "CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails", + "CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail", + "CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail", + "CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail", + "CreateTableRequestDataAttributesSchema", + "CreateTableRequestDataAttributesSchemaFieldsItems", + "CreateTableRequestDataType", + "CreateUploadRequest", + "CreateUploadRequestData", + "CreateUploadRequestDataAttributes", + "CreateUploadRequestDataType", + "CreateUploadResponse", + "CreateUploadResponseData", + "CreateUploadResponseDataAttributes", + "CreateUploadResponseDataType", "CreateWorkflowRequest", "CreateWorkflowResponse", "Creator", @@ -6635,6 +6765,19 @@ "PatchNotificationRuleParameters", "PatchNotificationRuleParametersData", "PatchNotificationRuleParametersDataAttributes", + "PatchTableRequest", + "PatchTableRequestData", + "PatchTableRequestDataAttributes", + "PatchTableRequestDataAttributesFileMetadata", + "PatchTableRequestDataAttributesFileMetadataCloudStorage", + "PatchTableRequestDataAttributesFileMetadataLocalFile", + "PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails", + "PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail", + "PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail", + "PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail", + "PatchTableRequestDataAttributesSchema", + "PatchTableRequestDataAttributesSchemaFieldsItems", + "PatchTableRequestDataType", "Permission", "PermissionAttributes", "PermissionsResponse", @@ -6739,6 +6882,10 @@ "RecommendationData", "RecommendationDocument", "RecommendationType", + "ReferenceTableCreateSourceType", + "ReferenceTableSchemaFieldType", + "ReferenceTableSortType", + "ReferenceTableSourceType", "RegisterAppKeyResponse", "RelationAttributes", "RelationEntity", @@ -7380,6 +7527,25 @@ "Step", "StepDisplay", "StepDisplayBounds", + "TableResultV2", + "TableResultV2Array", + "TableResultV2Data", + "TableResultV2DataAttributes", + "TableResultV2DataAttributesFileMetadata", + "TableResultV2DataAttributesFileMetadataCloudStorage", + "TableResultV2DataAttributesFileMetadataCloudStorageErrorType", + "TableResultV2DataAttributesFileMetadataLocalFile", + "TableResultV2DataAttributesFileMetadataOneOfAccessDetails", + "TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail", + "TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail", + "TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail", + "TableResultV2DataAttributesSchema", + "TableResultV2DataAttributesSchemaFieldsItems", + "TableResultV2DataType", + "TableRowResourceArray", + "TableRowResourceData", + "TableRowResourceDataAttributes", + "TableRowResourceDataType", "TagFilter", "TagsEventAttribute", "Team", diff --git a/tests/v2/cassettes/test_scenarios/test_create_reference_table_without_upload_or_access_details_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_reference_table_without_upload_or_access_details_returns_bad_request_response.frozen new file mode 100644 index 0000000000..2e6c5cff61 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_create_reference_table_without_upload_or_access_details_returns_bad_request_response.frozen @@ -0,0 +1 @@ +2025-10-01T20:51:23.877Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_create_reference_table_without_upload_or_access_details_returns_bad_request_response.yaml b/tests/v2/cassettes/test_scenarios/test_create_reference_table_without_upload_or_access_details_returns_bad_request_response.yaml new file mode 100644 index 0000000000..27df34ab4e --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_create_reference_table_without_upload_or_access_details_returns_bad_request_response.yaml @@ -0,0 +1,22 @@ +interactions: +- request: + body: '{"data":{"attributes":{"description":"Test reference table without upload + or access details","schema":{"fields":[{"name":"id","type":"STRING"}],"primary_keys":["id"]},"source":"LOCAL_FILE","table_name":"test_invalid_table_Test-Create_reference_table_without_upload_or_access_details_returns_Bad_Request_response-1759351883","tags":["test_tag"]},"type":"reference_table"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/reference-tables/tables + response: + body: + string: '{"errors":[{"title":"Generic Error","detail":"upload_id is required + for tables with ''LOCAL_FILE'' source"}]}' + headers: + content-type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +version: 1 diff --git a/tests/v2/features/reference_tables.feature b/tests/v2/features/reference_tables.feature new file mode 100644 index 0000000000..17e66019c0 --- /dev/null +++ b/tests/v2/features/reference_tables.feature @@ -0,0 +1,121 @@ +@endpoint(reference-tables) @endpoint(reference-tables-v2) +Feature: Reference Tables + Auto-generated tag Reference Tables + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "ReferenceTables" API + + @generated @skip @team:DataDog/redapl-experiences + Scenario: Create reference table returns "Bad Request" response + Given new "CreateReferenceTable" request + And body with value {"data": {"attributes": {"description": "this is a cloud table generated via a cloud bucket sync", "file_metadata": {"access_details": {"aws_detail": {"aws_account_id": "test-account-id", "aws_bucket_name": "test-bucket", "file_path": "test_rt.csv"}}, "sync_enabled": true}, "schema": {"fields": [{"name": "name", "type": "STRING"}, {"name": "account_id", "type": "STRING"}], "primary_keys": ["account_id"]}, "source": "S3", "table_name": "test_reference_table", "tags": ["test_tag"]}, "type": "reference_table"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/redapl-experiences + Scenario: Create reference table returns "Created" response + Given new "CreateReferenceTable" request + And body with value {"data": {"attributes": {"description": "this is a cloud table generated via a cloud bucket sync", "file_metadata": {"access_details": {"aws_detail": {"aws_account_id": "test-account-id", "aws_bucket_name": "test-bucket", "file_path": "test_rt.csv"}}, "sync_enabled": true}, "schema": {"fields": [{"name": "name", "type": "STRING"}, {"name": "account_id", "type": "STRING"}], "primary_keys": ["account_id"]}, "source": "S3", "table_name": "test_reference_table", "tags": ["test_tag"]}, "type": "reference_table"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/redapl-experiences + Scenario: Create reference table upload returns "Bad Request" response + Given new "CreateReferenceTableUpload" request + And body with value {"data": {"attributes": {"headers": [""], "part_count": 3, "part_size": 10000000, "table_name": ""}, "type": "upload"}} + When the request is sent + Then the response status is 400 Bad Request + + @skip @team:DataDog/redapl-experiences + Scenario: Create reference table upload returns "Created" response + Given new "CreateReferenceTableUpload" request + And body with value {"data": {"attributes": {"headers": ["id", "name", "value"], "table_name": "test_upload_table_{{ unique }}", "part_count": 1, "part_size": 1024}, "type": "upload"}} + When the request is sent + Then the response status is 201 Created + And the response "data.type" is equal to "upload" + And the response "data.attributes.table_name" is equal to "test_upload_table_{{ unique }}" + + @skip @team:DataDog/redapl-experiences + Scenario: Create reference table with upload returns "Created" response + Given new "CreateReferenceTable" request + And body with value {"data": {"attributes": {"description": "Test reference table created via BDD test {{ unique }}", "source": "LOCAL_FILE", "file_metadata": {"upload_id": "test-upload-id-{{ unique }}"}, "schema": {"fields": [{"name": "id", "type": "STRING"}, {"name": "name", "type": "STRING"}, {"name": "value", "type": "INT32"}], "primary_keys": ["id"]}, "table_name": "test_reference_table_{{ unique }}", "tags": ["test_tag"]}, "type": "reference_table"}} + When the request is sent + Then the response status is 201 Created + And the response "data.type" is equal to "reference_table" + And the response "data.attributes.table_name" is equal to "test_reference_table_{{ unique }}" + + @team:DataDog/redapl-experiences + Scenario: Create reference table without upload or access details returns "Bad Request" response + Given new "CreateReferenceTable" request + And body with value {"data": {"attributes": {"description": "Test reference table without upload or access details", "source": "LOCAL_FILE", "schema": {"fields": [{"name": "id", "type": "STRING"}], "primary_keys": ["id"]}, "table_name": "test_invalid_table_{{ unique }}", "tags": ["test_tag"]}, "type": "reference_table"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/redapl-experiences + Scenario: Delete table returns "Not Found" response + Given new "DeleteTable" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/redapl-experiences + Scenario: Delete table returns "OK" response + Given new "DeleteTable" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/redapl-experiences + Scenario: Get rows by id returns "Not Found" response + Given new "GetRowsByID" request + And request contains "id" parameter from "REPLACE.ME" + And request contains "row_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/redapl-experiences + Scenario: Get rows by id returns "Some or all requested rows were found." response + Given new "GetRowsByID" request + And request contains "id" parameter from "REPLACE.ME" + And request contains "row_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 Some or all requested rows were found. + + @generated @skip @team:DataDog/redapl-experiences + Scenario: Get table returns "Not Found" response + Given new "GetTable" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/redapl-experiences + Scenario: Get table returns "OK" response + Given new "GetTable" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @skip @team:DataDog/redapl-experiences + Scenario: List tables returns "OK" response + Given new "ListTables" request + When the request is sent + Then the response status is 200 OK + And the response "data" has length 1 + + @generated @skip @team:DataDog/redapl-experiences + Scenario: Update reference table returns "Bad Request" response + Given new "UpdateReferenceTable" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"description": "this is a cloud table generated via a cloud bucket sync", "file_metadata": {"access_details": {"aws_detail": {"aws_account_id": "test-account-id", "aws_bucket_name": "test-bucket", "file_path": "test_rt.csv"}}, "sync_enabled": true}, "schema": {"fields": [{"name": "id", "type": "INT32"}, {"name": "name", "type": "STRING"}], "primary_keys": ["id"]}, "sync_enabled": false, "tags": ["test_tag"]}, "id": "00000000-0000-0000-0000-000000000000", "type": "reference_table"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/redapl-experiences + Scenario: Update reference table returns "OK" response + Given new "UpdateReferenceTable" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"description": "this is a cloud table generated via a cloud bucket sync", "file_metadata": {"access_details": {"aws_detail": {"aws_account_id": "test-account-id", "aws_bucket_name": "test-bucket", "file_path": "test_rt.csv"}}, "sync_enabled": true}, "schema": {"fields": [{"name": "id", "type": "INT32"}, {"name": "name", "type": "STRING"}], "primary_keys": ["id"]}, "sync_enabled": false, "tags": ["test_tag"]}, "id": "00000000-0000-0000-0000-000000000000", "type": "reference_table"}} + When the request is sent + Then the response status is 200 OK diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index c4c269d3ca..f57ef90651 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -2641,6 +2641,55 @@ "type": "idempotent" } }, + "ListTables": { + "tag": "Reference Tables", + "undo": { + "type": "safe" + } + }, + "CreateReferenceTable": { + "tag": "Reference Tables", + "undo": { + "operationId": "DeleteTable", + "parameters": [ + { + "name": "id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteTable": { + "tag": "Reference Tables", + "undo": { + "type": "idempotent" + } + }, + "GetTable": { + "tag": "Reference Tables", + "undo": { + "type": "safe" + } + }, + "UpdateReferenceTable": { + "tag": "Reference Tables", + "undo": { + "type": "idempotent" + } + }, + "GetRowsByID": { + "tag": "Reference Tables", + "undo": { + "type": "safe" + } + }, + "CreateReferenceTableUpload": { + "tag": "Reference Tables", + "undo": { + "type": "idempotent" + } + }, "ListApplicationSecurityWAFCustomRules": { "tag": "Application Security", "undo": {