Skip to content

Commit

Permalink
feat(bigtableadmin): update the API
Browse files Browse the repository at this point in the history
#### bigtableadmin:v1

The following keys were added:
- schemas.Backup.properties.encryptionInfo.$ref
- schemas.Backup.properties.encryptionInfo.description
- schemas.Backup.properties.encryptionInfo.readOnly
- schemas.Cluster.properties.encryptionConfig.$ref
- schemas.Cluster.properties.encryptionConfig.description
- schemas.EncryptionConfig.description
- schemas.EncryptionConfig.id
- schemas.EncryptionConfig.properties.kmsKeyName.description
- schemas.EncryptionConfig.properties.kmsKeyName.type
- schemas.EncryptionConfig.type
- schemas.EncryptionInfo.description
- schemas.EncryptionInfo.id
- schemas.EncryptionInfo.properties.encryptionStatus.$ref
- schemas.EncryptionInfo.properties.encryptionStatus.description
- schemas.EncryptionInfo.properties.encryptionStatus.readOnly
- schemas.EncryptionInfo.properties.encryptionType.description
- schemas.EncryptionInfo.properties.encryptionType.enum
- schemas.EncryptionInfo.properties.encryptionType.enumDescriptions
- schemas.EncryptionInfo.properties.encryptionType.readOnly
- schemas.EncryptionInfo.properties.encryptionType.type
- schemas.EncryptionInfo.properties.kmsKeyVersion.description
- schemas.EncryptionInfo.properties.kmsKeyVersion.readOnly
- schemas.EncryptionInfo.properties.kmsKeyVersion.type
- schemas.EncryptionInfo.type
- schemas.Status.description
- schemas.Status.id
- schemas.Status.properties.code.description
- schemas.Status.properties.code.format
- schemas.Status.properties.code.type
- schemas.Status.properties.details.description
- schemas.Status.properties.details.items.additionalProperties.description
- schemas.Status.properties.details.items.additionalProperties.type
- schemas.Status.properties.details.items.type
- schemas.Status.properties.details.type
- schemas.Status.properties.message.description
- schemas.Status.properties.message.type
- schemas.Status.type

#### bigtableadmin:v2

The following keys were added:
- schemas.Backup.properties.encryptionInfo.$ref
- schemas.Backup.properties.encryptionInfo.description
- schemas.Backup.properties.encryptionInfo.readOnly
- schemas.Cluster.properties.encryptionConfig.$ref
- schemas.Cluster.properties.encryptionConfig.description
- schemas.ClusterState.properties.encryptionInfo.description
- schemas.ClusterState.properties.encryptionInfo.items.$ref
- schemas.ClusterState.properties.encryptionInfo.readOnly
- schemas.ClusterState.properties.encryptionInfo.type
- schemas.EncryptionConfig.description
- schemas.EncryptionConfig.id
- schemas.EncryptionConfig.properties.kmsKeyName.description
- schemas.EncryptionConfig.properties.kmsKeyName.type
- schemas.EncryptionConfig.type
- schemas.EncryptionInfo.description
- schemas.EncryptionInfo.id
- schemas.EncryptionInfo.properties.encryptionStatus.$ref
- schemas.EncryptionInfo.properties.encryptionStatus.description
- schemas.EncryptionInfo.properties.encryptionStatus.readOnly
- schemas.EncryptionInfo.properties.encryptionType.description
- schemas.EncryptionInfo.properties.encryptionType.enum
- schemas.EncryptionInfo.properties.encryptionType.enumDescriptions
- schemas.EncryptionInfo.properties.encryptionType.readOnly
- schemas.EncryptionInfo.properties.encryptionType.type
- schemas.EncryptionInfo.properties.kmsKeyVersion.description
- schemas.EncryptionInfo.properties.kmsKeyVersion.readOnly
- schemas.EncryptionInfo.properties.kmsKeyVersion.type
- schemas.EncryptionInfo.type

The following keys were changed:
- resources.projects.resources.instances.resources.tables.methods.get.parameters.view.enum
- resources.projects.resources.instances.resources.tables.methods.get.parameters.view.enumDescriptions
- resources.projects.resources.instances.resources.tables.methods.list.parameters.view.enum
- resources.projects.resources.instances.resources.tables.methods.list.parameters.view.enumDescriptions
- schemas.Table.properties.clusterStates.description
  • Loading branch information
yoshi-automation authored and bcoe committed Mar 26, 2021
1 parent 646398c commit 7a1fc20
Show file tree
Hide file tree
Showing 4 changed files with 243 additions and 4 deletions.
81 changes: 80 additions & 1 deletion discovery/bigtableadmin-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,18 @@
},
"protocol": "rest",
"resources": {},
"revision": "20200916",
"revision": "20210323",
"rootUrl": "https://bigtableadmin.googleapis.com/",
"schemas": {
"Backup": {
"description": "A backup of a Cloud Bigtable table.",
"id": "Backup",
"properties": {
"encryptionInfo": {
"$ref": "EncryptionInfo",
"description": "Output only. The encryption information for the backup.",
"readOnly": true
},
"endTime": {
"description": "Output only. `end_time` is the time that the backup was finished. The row data in the backup will be no newer than this timestamp.",
"format": "google-datetime",
Expand Down Expand Up @@ -199,6 +204,10 @@
],
"type": "string"
},
"encryptionConfig": {
"$ref": "EncryptionConfig",
"description": "Immutable. The encryption configuration for CMEK-protected clusters."
},
"location": {
"description": "Immutable. The location where this cluster's nodes and storage reside. For best performance, clients should be located as close as possible to this cluster. Currently only zones are supported, so values should be of the form `projects/{project}/locations/{zone}`.",
"type": "string"
Expand Down Expand Up @@ -353,6 +362,49 @@
},
"type": "object"
},
"EncryptionConfig": {
"description": "Cloud Key Management Service (Cloud KMS) settings for a CMEK-protected cluster.",
"id": "EncryptionConfig",
"properties": {
"kmsKeyName": {
"description": "Describes the Cloud KMS encryption key that will be used to protect the destination Bigtable cluster. The requirements for this key are: 1) The Cloud Bigtable service account associated with the project that contains this cluster must be granted the `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key. 2) Only regional keys can be used and the region of the CMEK key must match the region of the cluster. 3) All clusters within an instance must use the same CMEK key. Values are of the form `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}`",
"type": "string"
}
},
"type": "object"
},
"EncryptionInfo": {
"description": "Encryption information for a given resource. If this resource is protected with customer managed encryption, the in-use Cloud Key Management Service (Cloud KMS) key version is specified along with its status.",
"id": "EncryptionInfo",
"properties": {
"encryptionStatus": {
"$ref": "Status",
"description": "Output only. The status of encrypt/decrypt calls on underlying data for this resource. Regardless of status, the existing data is always encrypted at rest.",
"readOnly": true
},
"encryptionType": {
"description": "Output only. The type of encryption used to protect this resource.",
"enum": [
"ENCRYPTION_TYPE_UNSPECIFIED",
"GOOGLE_DEFAULT_ENCRYPTION",
"CUSTOMER_MANAGED_ENCRYPTION"
],
"enumDescriptions": [
"Encryption type was not specified, though data at rest remains encrypted.",
"The data backing this resource is encrypted at rest with a key that is fully managed by Google. No key version or status will be populated. This is the default state.",
"The data backing this resource is encrypted at rest with a key that is managed by the customer. The in-use version of the key and its status are populated for CMEK-protected tables. CMEK-protected backups are pinned to the key version that was in use at the time the backup was taken. This key version is populated but its status is not tracked and is reported as `UNKNOWN`."
],
"readOnly": true,
"type": "string"
},
"kmsKeyVersion": {
"description": "Output only. The version of the Cloud KMS key specified in the parent cluster that is in use for the data underlying this table.",
"readOnly": true,
"type": "string"
}
},
"type": "object"
},
"FailureTrace": {
"description": "Added to the error payload.",
"id": "FailureTrace",
Expand Down Expand Up @@ -519,6 +571,33 @@
},
"type": "object"
},
"Status": {
"description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).",
"id": "Status",
"properties": {
"code": {
"description": "The status code, which should be an enum value of google.rpc.Code.",
"format": "int32",
"type": "integer"
},
"details": {
"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.",
"items": {
"additionalProperties": {
"description": "Properties of the object. Contains field @type with type URL.",
"type": "any"
},
"type": "object"
},
"type": "array"
},
"message": {
"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.",
"type": "string"
}
},
"type": "object"
},
"TableProgress": {
"description": "Progress info for copying a table's data to the new cluster.",
"id": "TableProgress",
Expand Down
68 changes: 66 additions & 2 deletions discovery/bigtableadmin-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -1425,13 +1425,15 @@
"NAME_ONLY",
"SCHEMA_VIEW",
"REPLICATION_VIEW",
"ENCRYPTION_VIEW",
"FULL"
],
"enumDescriptions": [
"Uses the default view for each method as documented in its request.",
"Only populates `name`.",
"Only populates `name` and fields related to the table's schema.",
"Only populates `name` and fields related to the table's replication state.",
"Only populates 'name' and fields related to the table's encryption state.",
"Populates all fields."
],
"location": "query",
Expand Down Expand Up @@ -1517,13 +1519,15 @@
"NAME_ONLY",
"SCHEMA_VIEW",
"REPLICATION_VIEW",
"ENCRYPTION_VIEW",
"FULL"
],
"enumDescriptions": [
"Uses the default view for each method as documented in its request.",
"Only populates `name`.",
"Only populates `name` and fields related to the table's schema.",
"Only populates `name` and fields related to the table's replication state.",
"Only populates 'name' and fields related to the table's encryption state.",
"Populates all fields."
],
"location": "query",
Expand Down Expand Up @@ -1760,7 +1764,7 @@
}
}
},
"revision": "20200916",
"revision": "20210323",
"rootUrl": "https://bigtableadmin.googleapis.com/",
"schemas": {
"AppProfile": {
Expand Down Expand Up @@ -1842,6 +1846,11 @@
"description": "A backup of a Cloud Bigtable table.",
"id": "Backup",
"properties": {
"encryptionInfo": {
"$ref": "EncryptionInfo",
"description": "Output only. The encryption information for the backup.",
"readOnly": true
},
"endTime": {
"description": "Output only. `end_time` is the time that the backup was finished. The row data in the backup will be no newer than this timestamp.",
"format": "google-datetime",
Expand Down Expand Up @@ -1982,6 +1991,10 @@
],
"type": "string"
},
"encryptionConfig": {
"$ref": "EncryptionConfig",
"description": "Immutable. The encryption configuration for CMEK-protected clusters."
},
"location": {
"description": "Immutable. The location where this cluster's nodes and storage reside. For best performance, clients should be located as close as possible to this cluster. Currently only zones are supported, so values should be of the form `projects/{project}/locations/{zone}`.",
"type": "string"
Expand Down Expand Up @@ -2021,6 +2034,14 @@
"description": "The state of a table's data in a particular cluster.",
"id": "ClusterState",
"properties": {
"encryptionInfo": {
"description": "Output only. The encryption information for the table in this cluster. If the encryption key protecting this resource is customer managed, then its version can be rotated in Cloud Key Management Service (Cloud KMS). The primary version of the key and its status will be reflected here when changes propagate from Cloud KMS.",
"items": {
"$ref": "EncryptionInfo"
},
"readOnly": true,
"type": "array"
},
"replicationState": {
"description": "Output only. The state of replication for the table in this cluster.",
"enum": [
Expand Down Expand Up @@ -2219,6 +2240,49 @@
"properties": {},
"type": "object"
},
"EncryptionConfig": {
"description": "Cloud Key Management Service (Cloud KMS) settings for a CMEK-protected cluster.",
"id": "EncryptionConfig",
"properties": {
"kmsKeyName": {
"description": "Describes the Cloud KMS encryption key that will be used to protect the destination Bigtable cluster. The requirements for this key are: 1) The Cloud Bigtable service account associated with the project that contains this cluster must be granted the `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key. 2) Only regional keys can be used and the region of the CMEK key must match the region of the cluster. 3) All clusters within an instance must use the same CMEK key. Values are of the form `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}`",
"type": "string"
}
},
"type": "object"
},
"EncryptionInfo": {
"description": "Encryption information for a given resource. If this resource is protected with customer managed encryption, the in-use Cloud Key Management Service (Cloud KMS) key version is specified along with its status.",
"id": "EncryptionInfo",
"properties": {
"encryptionStatus": {
"$ref": "Status",
"description": "Output only. The status of encrypt/decrypt calls on underlying data for this resource. Regardless of status, the existing data is always encrypted at rest.",
"readOnly": true
},
"encryptionType": {
"description": "Output only. The type of encryption used to protect this resource.",
"enum": [
"ENCRYPTION_TYPE_UNSPECIFIED",
"GOOGLE_DEFAULT_ENCRYPTION",
"CUSTOMER_MANAGED_ENCRYPTION"
],
"enumDescriptions": [
"Encryption type was not specified, though data at rest remains encrypted.",
"The data backing this resource is encrypted at rest with a key that is fully managed by Google. No key version or status will be populated. This is the default state.",
"The data backing this resource is encrypted at rest with a key that is managed by the customer. The in-use version of the key and its status are populated for CMEK-protected tables. CMEK-protected backups are pinned to the key version that was in use at the time the backup was taken. This key version is populated but its status is not tracked and is reported as `UNKNOWN`."
],
"readOnly": true,
"type": "string"
},
"kmsKeyVersion": {
"description": "Output only. The version of the Cloud KMS key specified in the parent cluster that is in use for the data underlying this table.",
"readOnly": true,
"type": "string"
}
},
"type": "object"
},
"Expr": {
"description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() < 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' && document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.",
"id": "Expr",
Expand Down Expand Up @@ -2893,7 +2957,7 @@
"additionalProperties": {
"$ref": "ClusterState"
},
"description": "Output only. Map from cluster ID to per-cluster table state. If it could not be determined whether or not the table has data in a particular cluster (for example, if its zone is unavailable), then there will be an entry for the cluster with UNKNOWN `replication_status`. Views: `REPLICATION_VIEW`, `FULL`",
"description": "Output only. Map from cluster ID to per-cluster table state. If it could not be determined whether or not the table has data in a particular cluster (for example, if its zone is unavailable), then there will be an entry for the cluster with UNKNOWN `replication_status`. Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL`",
"readOnly": true,
"type": "object"
},
Expand Down
51 changes: 51 additions & 0 deletions src/apis/bigtableadmin/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ export namespace bigtableadmin_v1 {
* A backup of a Cloud Bigtable table.
*/
export interface Schema$Backup {
/**
* Output only. The encryption information for the backup.
*/
encryptionInfo?: Schema$EncryptionInfo;
/**
* Output only. `end_time` is the time that the backup was finished. The row data in the backup will be no newer than this timestamp.
*/
Expand Down Expand Up @@ -184,6 +188,10 @@ export namespace bigtableadmin_v1 {
* Immutable. The type of storage used by this cluster to serve its parent instance's tables, unless explicitly overridden.
*/
defaultStorageType?: string | null;
/**
* Immutable. The encryption configuration for CMEK-protected clusters.
*/
encryptionConfig?: Schema$EncryptionConfig;
/**
* Immutable. The location where this cluster's nodes and storage reside. For best performance, clients should be located as close as possible to this cluster. Currently only zones are supported, so values should be of the form `projects/{project\}/locations/{zone\}`.
*/
Expand Down Expand Up @@ -298,6 +306,32 @@ export namespace bigtableadmin_v1 {
*/
parent?: string | null;
}
/**
* Cloud Key Management Service (Cloud KMS) settings for a CMEK-protected cluster.
*/
export interface Schema$EncryptionConfig {
/**
* Describes the Cloud KMS encryption key that will be used to protect the destination Bigtable cluster. The requirements for this key are: 1) The Cloud Bigtable service account associated with the project that contains this cluster must be granted the `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key. 2) Only regional keys can be used and the region of the CMEK key must match the region of the cluster. 3) All clusters within an instance must use the same CMEK key. Values are of the form `projects/{project\}/locations/{location\}/keyRings/{keyring\}/cryptoKeys/{key\}`
*/
kmsKeyName?: string | null;
}
/**
* Encryption information for a given resource. If this resource is protected with customer managed encryption, the in-use Cloud Key Management Service (Cloud KMS) key version is specified along with its status.
*/
export interface Schema$EncryptionInfo {
/**
* Output only. The status of encrypt/decrypt calls on underlying data for this resource. Regardless of status, the existing data is always encrypted at rest.
*/
encryptionStatus?: Schema$Status;
/**
* Output only. The type of encryption used to protect this resource.
*/
encryptionType?: string | null;
/**
* Output only. The version of the Cloud KMS key specified in the parent cluster that is in use for the data underlying this table.
*/
kmsKeyVersion?: string | null;
}
/**
* Added to the error payload.
*/
Expand Down Expand Up @@ -399,6 +433,23 @@ export namespace bigtableadmin_v1 {
*/
sourceType?: string | null;
}
/**
* The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
*/
export interface Schema$Status {
/**
* The status code, which should be an enum value of google.rpc.Code.
*/
code?: number | null;
/**
* A list of messages that carry the error details. There is a common set of message types for APIs to use.
*/
details?: Array<{[key: string]: any}> | null;
/**
* A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
*/
message?: string | null;
}
/**
* Progress info for copying a table's data to the new cluster.
*/
Expand Down

0 comments on commit 7a1fc20

Please sign in to comment.