REST Resource: projects.locations.datasetConfigs

资源:DatasetConfig

描述数据集配置属性的消息。如需了解详情,请参阅数据集配置属性

JSON 表示法
{
  "name": string,
  "createTime": string,
  "updateTime": string,
  "labels": {
    string: string,
    ...
  },
  "uid": string,
  "organizationNumber": string,
  "includeNewlyCreatedBuckets": boolean,
  "retentionPeriodDays": integer,
  "link": {
    object (Link)
  },
  "identity": {
    object (Identity)
  },
  "status": {
    object (Status)
  },
  "datasetConfigState": enum (ConfigState),
  "description": string,

  // Union field source_options can be only one of the following:
  "sourceProjects": {
    object (SourceProjects)
  },
  "sourceFolders": {
    object (SourceFolders)
  },
  "organizationScope": boolean,
  "cloudStorageObjectPath": string
  // End of list of possible types for union field source_options.

  // Union field cloud_storage_locations can be only one of the following:
  "includeCloudStorageLocations": {
    object (CloudStorageLocations)
  },
  "excludeCloudStorageLocations": {
    object (CloudStorageLocations)
  }
  // End of list of possible types for union field cloud_storage_locations.

  // Union field cloud_storage_buckets can be only one of the following:
  "includeCloudStorageBuckets": {
    object (CloudStorageBuckets)
  },
  "excludeCloudStorageBuckets": {
    object (CloudStorageBuckets)
  }
  // End of list of possible types for union field cloud_storage_buckets.
}
字段
name

string

标识符。资源的名称

createTime

string (Timestamp format)

仅限输出。数据集配置的创建时间(世界协调时间 [UTC])。系统会自动填充此字段。

采用 RFC 3339 标准,生成的输出将始终在末尾带 Z,并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

updateTime

string (Timestamp format)

仅限输出。数据集配置的上次更新时间(世界协调时间 [UTC])。系统会自动填充此字段。

采用 RFC 3339 标准,生成的输出将始终在末尾带 Z,并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

labels

map (key: string, value: string)

标签作为键值对

包含一系列 "key": value 对的对象。示例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }

uid

string

仅限输出。系统为资源生成的唯一标识符。

organizationNumber

string (int64 format)

可选。源项目应属于的组织资源 ID。创建数据集时,系统不会考虑不属于所提供组织的项目。

includeNewlyCreatedBuckets

boolean

如果设置为 true,则请求会包含数据集中所有符合收录和排除规则的新创建的存储桶。

retentionPeriodDays

integer

必须保留的历史记录天数。

identity

object (Identity)

datasetConfig 使用的身份。

status

object (Status)

仅限输出。datasetConfig 的状态。

datasetConfigState

enum (ConfigState)

仅限输出。datasetConfig 的状态。

description

string

可选。用户提供的数据集配置说明。

长度上限:256 个字符。

联合字段 source_options。定义用于为数据集提供来源标识符的选项。source_options 只能是下列其中一项:
sourceProjects

object (SourceProjects)

定义用于为数据集提供源项目的选项。

sourceFolders

object (SourceFolders)

定义用于为数据集提供源文件夹的选项。

organizationScope

boolean

定义用于为数据集提供源组织的选项。

cloudStorageObjectPath

string

仅限输入。包含要收录到数据集中的项目或文件夹编号列表的 Cloud Storage 对象路径;不能同时包含项目和文件夹。

该对象必须是一个文本文件,其中每行包含以下条目之一:

  • 项目编号,格式为 projects/{projectNumber},例如 projects/1234567890
  • 文件夹标识符,格式为 folders/{folder_number},例如 folders/9876543210。路径必须采用 gs://{bucketName}/{objectName} 格式。
联合字段 cloud_storage_locations。要包含或排除的 Cloud Storage 位置。cloud_storage_locations 只能是下列其中一项:
includeCloudStorageLocations

object (CloudStorageLocations)

excludeCloudStorageLocations

object (CloudStorageLocations)

联合字段 cloud_storage_buckets。要包含或排除的 Cloud Storage 存储桶。cloud_storage_buckets 只能是下列其中一项:
includeCloudStorageBuckets

object (CloudStorageBuckets)

excludeCloudStorageBuckets

object (CloudStorageBuckets)

SourceProjects

项目编号的集合

JSON 表示法
{
  "projectNumbers": [
    string
  ]
}
字段
projectNumbers[]

string (int64 format)

SourceFolders

指定要包含在数据集中的一组文件夹

JSON 表示法
{
  "folderNumbers": [
    string
  ]
}
字段
folderNumbers[]

string (int64 format)

可选。要包含在数据集中的文件夹编号的列表。

CloudStorageLocations

Cloud Storage 位置的集合。

JSON 表示法
{
  "locations": [
    string
  ]
}
字段
locations[]

string

CloudStorageBuckets

Cloud Storage 存储桶的集合。

JSON 表示法
{
  "cloudStorageBuckets": [
    {
      object (CloudStorageBucket)
    }
  ]
}
字段
cloudStorageBuckets[]

object (CloudStorageBucket)

CloudStorageBucket

按名称定义存储桶或定义正则表达式模式以匹配存储桶。

JSON 表示法
{

  // Union field cloud_storage_bucket can be only one of the following:
  "bucketName": string,
  "bucketPrefixRegex": string
  // End of list of possible types for union field cloud_storage_bucket.
}
字段

联合字段 cloud_storage_bucket

cloud_storage_bucket 只能是下列其中一项:

bucketName

string

Cloud Storage 存储桶名称。

bucketPrefixRegex

string

与正则表达式匹配的存储桶名称的正则表达式模式。正则表达式应遵循 GitHub 上 google/re2 中指定的语法。

身份

Identity 可让用户提供要使用的身份类型,并输出可用于 IAM 政策更改的身份字符串。

JSON 表示法
{
  "name": string,
  "type": enum (IdentityType)
}
字段
name

string

仅限输出。身份的名称。

type

enum (IdentityType)

要用于 datasetConfig 的身份类型。

IdentityType

要用于数据集配置的服务账号类型。

枚举
IDENTITY_TYPE_UNSPECIFIED 默认值为未指定,不应使用。
IDENTITY_TYPE_PER_CONFIG 每个资源对应一个 Google 管理的服务账号。
IDENTITY_TYPE_PER_PROJECT 每个项目对应一个 Google 管理的服务账号。

ConfigState

配置的状态。

枚举
CONFIG_STATE_UNSPECIFIED 未指定状态。
CONFIG_STATE_ACTIVE 有效配置表示相应配置正在积极注入数据。
CONFIG_STATE_VERIFICATION_IN_PROGRESS 在此状态下,系统正在验证配置的各种权限。
CONFIG_STATE_CREATED 配置已创建,需要进一步处理。
CONFIG_STATE_PROCESSING 配置正在进行处理

方法

create

在给定项目的给定位置中创建数据集配置。

delete

在给定项目的给定位置中删除数据集配置。

get

获取给定项目在给定位置中的数据集配置。

linkDataset

在给定项目和位置中,将数据集与 BigQuery 关联。

list

列出给定位置的给定项目中的数据集配置。

patch

在给定项目的给定位置中更新数据集配置。

unlinkDataset

在指定项目和位置中,取消数据集与 BigQuery 的关联。