Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b2c290f

Browse files
Google APIscopybara-github
authored andcommitted
feat: Max concurrent backfill tasks
You can now set the number of maximum concurrent backfill tasks for a stream using the Datastream API. PiperOrigin-RevId: 530067890
1 parent ff708e3 commit b2c290f

File tree

2 files changed

+148
-89
lines changed

2 files changed

+148
-89
lines changed

google/cloud/datastream/v1/datastream.proto

Lines changed: 76 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2022 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -22,6 +22,7 @@ import "google/api/field_behavior.proto";
2222
import "google/api/resource.proto";
2323
import "google/cloud/datastream/v1/datastream_resources.proto";
2424
import "google/longrunning/operations.proto";
25+
import "google/protobuf/empty.proto";
2526
import "google/protobuf/field_mask.proto";
2627
import "google/protobuf/timestamp.proto";
2728

@@ -36,40 +37,46 @@ option ruby_package = "Google::Cloud::Datastream::V1";
3637
// Datastream service
3738
service Datastream {
3839
option (google.api.default_host) = "datastream.googleapis.com";
39-
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
40+
option (google.api.oauth_scopes) =
41+
"https://www.googleapis.com/auth/cloud-platform";
4042

4143
// Use this method to list connection profiles created in a project and
4244
// location.
43-
rpc ListConnectionProfiles(ListConnectionProfilesRequest) returns (ListConnectionProfilesResponse) {
45+
rpc ListConnectionProfiles(ListConnectionProfilesRequest)
46+
returns (ListConnectionProfilesResponse) {
4447
option (google.api.http) = {
4548
get: "/v1/{parent=projects/*/locations/*}/connectionProfiles"
4649
};
4750
option (google.api.method_signature) = "parent";
4851
}
4952

5053
// Use this method to get details about a connection profile.
51-
rpc GetConnectionProfile(GetConnectionProfileRequest) returns (ConnectionProfile) {
54+
rpc GetConnectionProfile(GetConnectionProfileRequest)
55+
returns (ConnectionProfile) {
5256
option (google.api.http) = {
5357
get: "/v1/{name=projects/*/locations/*/connectionProfiles/*}"
5458
};
5559
option (google.api.method_signature) = "name";
5660
}
5761

5862
// Use this method to create a connection profile in a project and location.
59-
rpc CreateConnectionProfile(CreateConnectionProfileRequest) returns (google.longrunning.Operation) {
63+
rpc CreateConnectionProfile(CreateConnectionProfileRequest)
64+
returns (google.longrunning.Operation) {
6065
option (google.api.http) = {
6166
post: "/v1/{parent=projects/*/locations/*}/connectionProfiles"
6267
body: "connection_profile"
6368
};
64-
option (google.api.method_signature) = "parent,connection_profile,connection_profile_id";
69+
option (google.api.method_signature) =
70+
"parent,connection_profile,connection_profile_id";
6571
option (google.longrunning.operation_info) = {
6672
response_type: "ConnectionProfile"
6773
metadata_type: "OperationMetadata"
6874
};
6975
}
7076

7177
// Use this method to update the parameters of a connection profile.
72-
rpc UpdateConnectionProfile(UpdateConnectionProfileRequest) returns (google.longrunning.Operation) {
78+
rpc UpdateConnectionProfile(UpdateConnectionProfileRequest)
79+
returns (google.longrunning.Operation) {
7380
option (google.api.http) = {
7481
patch: "/v1/{connection_profile.name=projects/*/locations/*/connectionProfiles/*}"
7582
body: "connection_profile"
@@ -82,7 +89,8 @@ service Datastream {
8289
}
8390

8491
// Use this method to delete a connection profile.
85-
rpc DeleteConnectionProfile(DeleteConnectionProfileRequest) returns (google.longrunning.Operation) {
92+
rpc DeleteConnectionProfile(DeleteConnectionProfileRequest)
93+
returns (google.longrunning.Operation) {
8694
option (google.api.http) = {
8795
delete: "/v1/{name=projects/*/locations/*/connectionProfiles/*}"
8896
};
@@ -97,7 +105,8 @@ service Datastream {
97105
// The discover API call exposes the data objects and metadata belonging to
98106
// the profile. Typically, a request returns children data objects of a
99107
// parent data object that's optionally supplied in the request.
100-
rpc DiscoverConnectionProfile(DiscoverConnectionProfileRequest) returns (DiscoverConnectionProfileResponse) {
108+
rpc DiscoverConnectionProfile(DiscoverConnectionProfileRequest)
109+
returns (DiscoverConnectionProfileResponse) {
101110
option (google.api.http) = {
102111
post: "/v1/{parent=projects/*/locations/*}/connectionProfiles:discover"
103112
body: "*"
@@ -175,15 +184,17 @@ service Datastream {
175184
}
176185

177186
// Use this method to list the objects of a specific stream.
178-
rpc ListStreamObjects(ListStreamObjectsRequest) returns (ListStreamObjectsResponse) {
187+
rpc ListStreamObjects(ListStreamObjectsRequest)
188+
returns (ListStreamObjectsResponse) {
179189
option (google.api.http) = {
180190
get: "/v1/{parent=projects/*/locations/*/streams/*}/objects"
181191
};
182192
option (google.api.method_signature) = "parent";
183193
}
184194

185195
// Use this method to start a backfill job for the specified stream object.
186-
rpc StartBackfillJob(StartBackfillJobRequest) returns (StartBackfillJobResponse) {
196+
rpc StartBackfillJob(StartBackfillJobRequest)
197+
returns (StartBackfillJobResponse) {
187198
option (google.api.http) = {
188199
post: "/v1/{object=projects/*/locations/*/streams/*/objects/*}:startBackfillJob"
189200
body: "*"
@@ -192,7 +203,8 @@ service Datastream {
192203
}
193204

194205
// Use this method to stop a backfill job for the specified stream object.
195-
rpc StopBackfillJob(StopBackfillJobRequest) returns (StopBackfillJobResponse) {
206+
rpc StopBackfillJob(StopBackfillJobRequest)
207+
returns (StopBackfillJobResponse) {
196208
option (google.api.http) = {
197209
post: "/v1/{object=projects/*/locations/*/streams/*/objects/*}:stopBackfillJob"
198210
body: "*"
@@ -210,20 +222,23 @@ service Datastream {
210222
}
211223

212224
// Use this method to create a private connectivity configuration.
213-
rpc CreatePrivateConnection(CreatePrivateConnectionRequest) returns (google.longrunning.Operation) {
225+
rpc CreatePrivateConnection(CreatePrivateConnectionRequest)
226+
returns (google.longrunning.Operation) {
214227
option (google.api.http) = {
215228
post: "/v1/{parent=projects/*/locations/*}/privateConnections"
216229
body: "private_connection"
217230
};
218-
option (google.api.method_signature) = "parent,private_connection,private_connection_id";
231+
option (google.api.method_signature) =
232+
"parent,private_connection,private_connection_id";
219233
option (google.longrunning.operation_info) = {
220234
response_type: "PrivateConnection"
221235
metadata_type: "OperationMetadata"
222236
};
223237
}
224238

225239
// Use this method to get details about a private connectivity configuration.
226-
rpc GetPrivateConnection(GetPrivateConnectionRequest) returns (PrivateConnection) {
240+
rpc GetPrivateConnection(GetPrivateConnectionRequest)
241+
returns (PrivateConnection) {
227242
option (google.api.http) = {
228243
get: "/v1/{name=projects/*/locations/*/privateConnections/*}"
229244
};
@@ -232,15 +247,17 @@ service Datastream {
232247

233248
// Use this method to list private connectivity configurations in a project
234249
// and location.
235-
rpc ListPrivateConnections(ListPrivateConnectionsRequest) returns (ListPrivateConnectionsResponse) {
250+
rpc ListPrivateConnections(ListPrivateConnectionsRequest)
251+
returns (ListPrivateConnectionsResponse) {
236252
option (google.api.http) = {
237253
get: "/v1/{parent=projects/*/locations/*}/privateConnections"
238254
};
239255
option (google.api.method_signature) = "parent";
240256
}
241257

242258
// Use this method to delete a private connectivity configuration.
243-
rpc DeletePrivateConnection(DeletePrivateConnectionRequest) returns (google.longrunning.Operation) {
259+
rpc DeletePrivateConnection(DeletePrivateConnectionRequest)
260+
returns (google.longrunning.Operation) {
244261
option (google.api.http) = {
245262
delete: "/v1/{name=projects/*/locations/*/privateConnections/*}"
246263
};
@@ -297,8 +314,8 @@ service Datastream {
297314

298315
// Request message for 'discover' ConnectionProfile request.
299316
message DiscoverConnectionProfileRequest {
300-
// Required. The parent resource of the connection profile type. Must be in the
301-
// format `projects/*/locations/*`.
317+
// Required. The parent resource of the connection profile type. Must be in
318+
// the format `projects/*/locations/*`.
302319
string parent = 1 [
303320
(google.api.field_behavior) = REQUIRED,
304321
(google.api.resource_reference) = {
@@ -355,8 +372,8 @@ message DiscoverConnectionProfileResponse {
355372

356373
// Request message for 'FetchStaticIps' request.
357374
message FetchStaticIpsRequest {
358-
// Required. The resource name for the location for which static IPs should be returned.
359-
// Must be in the format `projects/*/locations/*`.
375+
// Required. The resource name for the location for which static IPs should be
376+
// returned. Must be in the format `projects/*/locations/*`.
360377
string name = 1 [
361378
(google.api.field_behavior) = REQUIRED,
362379
(google.api.resource_reference) = {
@@ -449,7 +466,8 @@ message CreateConnectionProfileRequest {
449466
string connection_profile_id = 2 [(google.api.field_behavior) = REQUIRED];
450467

451468
// Required. The connection profile resource to create.
452-
ConnectionProfile connection_profile = 3 [(google.api.field_behavior) = REQUIRED];
469+
ConnectionProfile connection_profile = 3
470+
[(google.api.field_behavior) = REQUIRED];
453471

454472
// Optional. A request ID to identify requests. Specify a unique request ID
455473
// so that if you must retry your request, the server will know to ignore
@@ -466,8 +484,8 @@ message CreateConnectionProfileRequest {
466484
// not supported (00000000-0000-0000-0000-000000000000).
467485
string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
468486

469-
// Optional. Only validate the connection profile, but don't create any resources.
470-
// The default is false.
487+
// Optional. Only validate the connection profile, but don't create any
488+
// resources. The default is false.
471489
bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
472490

473491
// Optional. Create the connection profile without validating it.
@@ -481,10 +499,12 @@ message UpdateConnectionProfileRequest {
481499
// The fields specified in the update_mask are relative to the resource, not
482500
// the full request. A field will be overwritten if it is in the mask. If the
483501
// user does not provide a mask then all fields will be overwritten.
484-
google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = OPTIONAL];
502+
google.protobuf.FieldMask update_mask = 1
503+
[(google.api.field_behavior) = OPTIONAL];
485504

486505
// Required. The connection profile to update.
487-
ConnectionProfile connection_profile = 2 [(google.api.field_behavior) = REQUIRED];
506+
ConnectionProfile connection_profile = 2
507+
[(google.api.field_behavior) = REQUIRED];
488508

489509
// Optional. A request ID to identify requests. Specify a unique request ID
490510
// so that if you must retry your request, the server will know to ignore
@@ -501,8 +521,8 @@ message UpdateConnectionProfileRequest {
501521
// not supported (00000000-0000-0000-0000-000000000000).
502522
string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
503523

504-
// Optional. Only validate the connection profile, but don't update any resources.
505-
// The default is false.
524+
// Optional. Only validate the connection profile, but don't update any
525+
// resources. The default is false.
506526
bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL];
507527

508528
// Optional. Update the connection profile without validating it.
@@ -634,7 +654,8 @@ message UpdateStreamRequest {
634654
// The fields specified in the update_mask are relative to the resource, not
635655
// the full request. A field will be overwritten if it is in the mask. If the
636656
// user does not provide a mask then all fields will be overwritten.
637-
google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = OPTIONAL];
657+
google.protobuf.FieldMask update_mask = 1
658+
[(google.api.field_behavior) = OPTIONAL];
638659

639660
// Required. The stream resource to update.
640661
Stream stream = 2 [(google.api.field_behavior) = REQUIRED];
@@ -654,8 +675,8 @@ message UpdateStreamRequest {
654675
// not supported (00000000-0000-0000-0000-000000000000).
655676
string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
656677

657-
// Optional. Only validate the stream with the changes, without actually updating it.
658-
// The default is false.
678+
// Optional. Only validate the stream with the changes, without actually
679+
// updating it. The default is false.
659680
bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL];
660681

661682
// Optional. Update the stream without validating it.
@@ -711,12 +732,14 @@ message LookupStreamObjectRequest {
711732
];
712733

713734
// Required. The source object identifier which maps to the stream object.
714-
SourceObjectIdentifier source_object_identifier = 2 [(google.api.field_behavior) = REQUIRED];
735+
SourceObjectIdentifier source_object_identifier = 2
736+
[(google.api.field_behavior) = REQUIRED];
715737
}
716738

717739
// Request for manually initiating a backfill job for a specific stream object.
718740
message StartBackfillJobRequest {
719-
// Required. The name of the stream object resource to start a backfill job for.
741+
// Required. The name of the stream object resource to start a backfill job
742+
// for.
720743
string object = 1 [
721744
(google.api.field_behavior) = REQUIRED,
722745
(google.api.resource_reference) = {
@@ -734,7 +757,8 @@ message StartBackfillJobResponse {
734757
// Request for manually stopping a running backfill job for a specific stream
735758
// object.
736759
message StopBackfillJobRequest {
737-
// Required. The name of the stream object resource to stop the backfill job for.
760+
// Required. The name of the stream object resource to stop the backfill job
761+
// for.
738762
string object = 1 [
739763
(google.api.field_behavior) = REQUIRED,
740764
(google.api.resource_reference) = {
@@ -784,10 +808,12 @@ message ListStreamObjectsResponse {
784808
// Represents the metadata of the long-running operation.
785809
message OperationMetadata {
786810
// Output only. The time the operation was created.
787-
google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
811+
google.protobuf.Timestamp create_time = 1
812+
[(google.api.field_behavior) = OUTPUT_ONLY];
788813

789814
// Output only. The time the operation finished running.
790-
google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
815+
google.protobuf.Timestamp end_time = 2
816+
[(google.api.field_behavior) = OUTPUT_ONLY];
791817

792818
// Output only. Server-defined resource path for the target of the operation.
793819
string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
@@ -800,15 +826,17 @@ message OperationMetadata {
800826

801827
// Output only. Identifies whether the user has requested cancellation
802828
// of the operation. Operations that have successfully been cancelled
803-
// have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
804-
// corresponding to `Code.CANCELLED`.
829+
// have [Operation.error][] value with a
830+
// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
831+
// `Code.CANCELLED`.
805832
bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
806833

807834
// Output only. API version used to start the operation.
808835
string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
809836

810837
// Output only. Results of executed validations if there are any.
811-
ValidationResult validation_result = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
838+
ValidationResult validation_result = 8
839+
[(google.api.field_behavior) = OUTPUT_ONLY];
812840
}
813841

814842
// Request for creating a private connection.
@@ -825,7 +853,8 @@ message CreatePrivateConnectionRequest {
825853
string private_connection_id = 2 [(google.api.field_behavior) = REQUIRED];
826854

827855
// Required. The Private Connectivity resource to create.
828-
PrivateConnection private_connection = 3 [(google.api.field_behavior) = REQUIRED];
856+
PrivateConnection private_connection = 3
857+
[(google.api.field_behavior) = REQUIRED];
829858

830859
// Optional. A request ID to identify requests. Specify a unique request ID
831860
// so that if you must retry your request, the server will know to ignore
@@ -841,11 +870,15 @@ message CreatePrivateConnectionRequest {
841870
// The request ID must be a valid UUID with the exception that zero UUID is
842871
// not supported (00000000-0000-0000-0000-000000000000).
843872
string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
873+
874+
// Optional. If set to true, will skip validations.
875+
bool force = 6 [(google.api.field_behavior) = OPTIONAL];
844876
}
845877

846878
// Request for listing private connections.
847879
message ListPrivateConnectionsRequest {
848-
// Required. The parent that owns the collection of private connectivity configurations.
880+
// Required. The parent that owns the collection of private connectivity
881+
// configurations.
849882
string parent = 1 [
850883
(google.api.field_behavior) = REQUIRED,
851884
(google.api.resource_reference) = {
@@ -912,8 +945,8 @@ message DeletePrivateConnectionRequest {
912945
// not supported (00000000-0000-0000-0000-000000000000).
913946
string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
914947

915-
// Optional. If set to true, any child routes that belong to this PrivateConnection will
916-
// also be deleted.
948+
// Optional. If set to true, any child routes that belong to this
949+
// PrivateConnection will also be deleted.
917950
bool force = 3 [(google.api.field_behavior) = OPTIONAL];
918951
}
919952

0 commit comments

Comments
 (0)