Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add create_time to Instance #953

Merged
merged 2 commits into from
Oct 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions protos/google/bigtable/admin/v2/instance.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ package google.bigtable.admin.v2;
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/bigtable/admin/v2/common.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";

option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2";
option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin";
Expand Down Expand Up @@ -105,6 +107,11 @@ message Instance {
// * No more than 64 labels can be associated with a given resource.
// * Keys and values must both be under 128 bytes.
map<string, string> labels = 5;

// Output only. A server-assigned timestamp representing when this Instance was created.
// For instances created before this field was added (August 2021), this value
// is `seconds: 0, nanos: 1`.
google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// A resizable group of nodes in a particular cloud location, capable
Expand Down
6 changes: 6 additions & 0 deletions protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions protos/protos.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions protos/protos.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

'use strict';

function main(name, displayName) {
function main(name, displayName, createTime) {
// [START bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateInstance_async]
/**
* TODO(developer): Uncomment these variables before running the sample.
Expand Down Expand Up @@ -52,6 +52,12 @@ function main(name, displayName) {
* * Keys and values must both be under 128 bytes.
*/
// const labels = 1234
/**
* Output only. A server-assigned timestamp representing when this Instance was created.
* For instances created before this field was added (August 2021), this value
* is `seconds: 0, nanos: 1`.
*/
// const createTime = ''

// Imports the Admin library
const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2;
Expand All @@ -64,6 +70,7 @@ function main(name, displayName) {
const request = {
name,
displayName,
createTime,
};

// Run request
Expand Down
4 changes: 4 additions & 0 deletions src/v2/bigtable_instance_admin_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,10 @@ export class BigtableInstanceAdminClient {
* the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`.
* * No more than 64 labels can be associated with a given resource.
* * Keys and values must both be under 128 bytes.
* @param {google.protobuf.Timestamp} request.createTime
* Output only. A server-assigned timestamp representing when this Instance was created.
* For instances created before this field was added (August 2021), this value
* is `seconds: 0, nanos: 1`.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
Expand Down