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: [datastream] A new method RunStream is added to service Datastream #5834

Merged
merged 2 commits into from
Nov 21, 2024
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
5 changes: 3 additions & 2 deletions packages/google-cloud-datastream/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
1. [Select or create a Cloud Platform project][projects].
1. [Enable billing for your project][billing].
1. [Enable the Datastream API][enable_api].
1. [Set up authentication with a service account][auth] so you can access the
1. [Set up authentication][auth] so you can access the
API from your local workstation.

### Installing the client library
Expand Down Expand Up @@ -139,6 +139,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
| Datastream.list_stream_objects | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.list_stream_objects.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.list_stream_objects.js,packages/google-cloud-datastream/samples/README.md) |
| Datastream.list_streams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.list_streams.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.list_streams.js,packages/google-cloud-datastream/samples/README.md) |
| Datastream.lookup_stream_object | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.lookup_stream_object.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.lookup_stream_object.js,packages/google-cloud-datastream/samples/README.md) |
| Datastream.run_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.run_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.run_stream.js,packages/google-cloud-datastream/samples/README.md) |
| Datastream.start_backfill_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.start_backfill_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.start_backfill_job.js,packages/google-cloud-datastream/samples/README.md) |
| Datastream.stop_backfill_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.stop_backfill_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.stop_backfill_job.js,packages/google-cloud-datastream/samples/README.md) |
| Datastream.update_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.update_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.update_connection_profile.js,packages/google-cloud-datastream/samples/README.md) |
Expand Down Expand Up @@ -234,4 +235,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
[projects]: https://console.cloud.google.com/project
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=datastream.googleapis.com
[auth]: https://cloud.google.com/docs/authentication/getting-started
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,19 @@ service Datastream {
};
}

// Use this method to start, resume or recover a stream with a non default CDC
// strategy.
rpc RunStream(RunStreamRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{name=projects/*/locations/*/streams/*}:run"
body: "*"
};
option (google.longrunning.operation_info) = {
response_type: "Stream"
metadata_type: "OperationMetadata"
};
}

// Use this method to get details about a stream object.
rpc GetStreamObject(GetStreamObjectRequest) returns (StreamObject) {
option (google.api.http) = {
Expand Down Expand Up @@ -352,6 +365,9 @@ message DiscoverConnectionProfileRequest {

// PostgreSQL RDBMS to enrich with child data objects and metadata.
PostgresqlRdbms postgresql_rdbms = 102;

// SQLServer RDBMS to enrich with child data objects and metadata.
SqlServerRdbms sql_server_rdbms = 103;
}
}

Expand All @@ -367,6 +383,9 @@ message DiscoverConnectionProfileResponse {

// Enriched PostgreSQL RDBMS object.
PostgresqlRdbms postgresql_rdbms = 102;

// Enriched SQLServer RDBMS object.
SqlServerRdbms sql_server_rdbms = 103;
}
}

Expand Down Expand Up @@ -709,6 +728,25 @@ message DeleteStreamRequest {
string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Request message for running a stream.
message RunStreamRequest {
// Required. Name of the stream resource to start, in the format:
// projects/{project_id}/locations/{location}/streams/{stream_name}
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datastream.googleapis.com/Stream"
}
];

// Optional. The CDC strategy of the stream. If not set, the system's default
// value will be used.
CdcStrategy cdc_strategy = 2 [(google.api.field_behavior) = OPTIONAL];

// Optional. Update the stream without validating it.
bool force = 3 [(google.api.field_behavior) = OPTIONAL];
}

// Request for fetching a specific stream object.
message GetStreamObjectRequest {
// Required. The name of the stream object resource to get.
Expand Down Expand Up @@ -826,9 +864,10 @@ message OperationMetadata {

// Output only. Identifies whether the user has requested cancellation
// of the operation. Operations that have successfully been cancelled
// have [Operation.error][] value with a
// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
// `Code.CANCELLED`.
// have
// [google.longrunning.Operation.error][google.longrunning.Operation.error]
// value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
// corresponding to `Code.CANCELLED`.
bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. API version used to start the operation.
Expand Down
Loading
Loading