Skip to content

Commit

Permalink
feat(parallelstore/v1beta): add ImportData and ExportData RPCs
Browse files Browse the repository at this point in the history
docs: fix typo in Instance.reserved_ip_range field doc

PiperOrigin-RevId: 629176948
  • Loading branch information
Google APIs authored and Copybara-Service committed Apr 29, 2024
1 parent a3a2dc6 commit 35125cf
Show file tree
Hide file tree
Showing 2 changed files with 206 additions and 3 deletions.
206 changes: 205 additions & 1 deletion google/cloud/parallelstore/v1beta/parallelstore.proto
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,42 @@ service Parallelstore {
metadata_type: "OperationMetadata"
};
}

// ImportData copies data from Cloud Storage to Parallelstore.
rpc ImportData(ImportDataRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta/{name=projects/*/locations/*/instances/*}:importData"
body: "*"
};
option (google.longrunning.operation_info) = {
response_type: "ImportDataResponse"
metadata_type: "ImportDataMetadata"
};
}

// ExportData copies data from Parallelstore to Cloud Storage
rpc ExportData(ExportDataRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta/{name=projects/*/locations/*/instances/*}:exportData"
body: "*"
};
option (google.longrunning.operation_info) = {
response_type: "ExportDataResponse"
metadata_type: "ExportDataMetadata"
};
}
}

// Type of transfer that occurred.
enum TransferType {
// Zero is an illegal value.
TRANSFER_TYPE_UNSPECIFIED = 0;

// Imports to Parallelstore.
IMPORT = 1;

// Exports from Parallelstore.
EXPORT = 2;
}

// A Parallelstore instance.
Expand Down Expand Up @@ -212,7 +248,7 @@ message Instance {
(google.api.resource_reference) = { type: "compute.googleapis.com/Network" }
];

// Optional. Immutable. Contains the id of allocated IP address range
// Optional. Immutable. Contains the id of the allocated IP address range
// associated with the private service access connection for example,
// "test-default" associated with IP range 10.0.0.0/29. If no range id is
// provided all ranges will be considered.
Expand All @@ -221,6 +257,17 @@ message Instance {
(google.api.field_behavior) = OPTIONAL,
(google.api.resource_reference) = { type: "compute.googleapis.com/Address" }
];

// Output only. Immutable. Contains the id of the allocated IP address range
// associated with the private service access connection for example,
// "test-default" associated with IP range 10.0.0.0/29. This field is
// populated by the service and and contains the value currently used by the
// service.
string effective_reserved_ip_range = 14 [
(google.api.field_behavior) = IMMUTABLE,
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.resource_reference) = { type: "compute.googleapis.com/Address" }
];
}

// Message for requesting list of Instances
Expand Down Expand Up @@ -401,3 +448,160 @@ message OperationMetadata {
// Output only. API version used to start the operation.
string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Message representing the request importing data from parallelstore to Cloud
// Storage.
message ImportDataRequest {
// The source of the data being imported into the parallelstore instance.
oneof source {
// URI to a Cloud Storage object in format:
// 'gs://<bucket_name>/<path_inside_bucket>'.
string source_gcs_uri = 2;
}

// The destination of the data being imported into the parallelstore instance.
oneof destination {
// Optional. Root directory path to the Paralellstore filesystem, starting
// with '/'. Sets to '/' if no value is set.
string destination_path = 3 [(google.api.field_behavior) = OPTIONAL];
}

// Required. Name of the resource.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "parallelstore.googleapis.com/Instance"
}
];

// Optional. An optional request ID to identify requests. Specify a unique
// request ID so that if you must retry your request, the server will know to
// ignore the request if it has already been completed. The server will
// guarantee that for at least 60 minutes since the first request.
//
// For example, consider a situation where you make an initial request and t
// he request times out. If you make the request again with the same request
// ID, the server can check if original operation with the same request ID
// was received, and if so, will ignore the second request. This prevents
// clients from accidentally creating duplicate commitments.
//
// The request ID must be a valid UUID with the exception that zero UUID is
// not supported (00000000-0000-0000-0000-000000000000).
string request_id = 4 [
(google.api.field_info).format = UUID4,
(google.api.field_behavior) = OPTIONAL
];
}

// Message representing the request exporting data from Cloud Storage to
// parallelstore.
message ExportDataRequest {
// The source of the data exported from the parallelstore instance.
oneof source {
// Optional. Root directory path to the Paralellstore filesystem, starting
// with '/'. Sets to '/' if no value is set.
string source_path = 2 [(google.api.field_behavior) = OPTIONAL];
}

// The destination of the data exported from the parallelstore instance.
oneof destination {
// URI to a Cloud Storage object in format:
// 'gs://<bucket_name>/<path_inside_bucket>'.
string destination_gcs_uri = 3;
}

// Required. Name of the resource.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "parallelstore.googleapis.com/Instance"
}
];

// Optional. An optional request ID to identify requests. Specify a unique
// request ID so that if you must retry your request, the server will know to
// ignore the request if it has already been completed. The server will
// guarantee that for at least 60 minutes since the first request.
//
// For example, consider a situation where you make an initial request and t
// he request times out. If you make the request again with the same request
// ID, the server can check if original operation with the same request ID
// was received, and if so, will ignore the second request. This prevents
// clients from accidentally creating duplicate commitments.
//
// The request ID must be a valid UUID with the exception that zero UUID is
// not supported (00000000-0000-0000-0000-000000000000).
string request_id = 4 [
(google.api.field_info).format = UUID4,
(google.api.field_behavior) = OPTIONAL
];
}

// ImportDataResponse is the response returned from ImportData rpc.
message ImportDataResponse {}

// ImportDataMetadata contains import data operation metadata
message ImportDataMetadata {
// Contains the data transfer operation metadata.
TransferOperationMetadata operation_metadata = 1;
}

// ExportDataResponse is the response returned from ExportData rpc
message ExportDataResponse {}

// ExportDataMetadata contains export data operation metadata
message ExportDataMetadata {
// Contains the data transfer operation metadata.
TransferOperationMetadata operation_metadata = 1;
}

// Represents the metadata of the long-running operation.
message TransferOperationMetadata {
// Output only. CCFE supplied fields BEGIN
// The time the operation was created.
google.protobuf.Timestamp create_time = 1
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The time the operation finished running.
google.protobuf.Timestamp end_time = 2
[(google.api.field_behavior) = OUTPUT_ONLY];

// Information about the progress of the transfer operation.
TransferCounters counters = 3;

// Required. The origin of the data transfer.
string source = 4 [(google.api.field_behavior) = REQUIRED];

// Required. The destination of the data transfer.
string destination = 5 [(google.api.field_behavior) = REQUIRED];

// The type of transfer occurring.
TransferType transfer_type = 6;
}

// A collection of counters that report the progress of a transfer operation.
message TransferCounters {
// Objects found in the data source that are scheduled to be transferred,
// excluding any that are filtered based on object conditions or skipped due
// to sync.
int64 objects_found = 1;

// Bytes found in the data source that are scheduled to be transferred,
// excluding any that are filtered based on object conditions or skipped due
// to sync.
int64 bytes_found = 2;

// Objects in the data source that are not transferred because they already
// exist in the data destination.
int64 objects_skipped = 3;

// Bytes in the data source that are not transferred because they already
// exist in the data destination.
int64 bytes_skipped = 4;

// Objects that are copied to the data destination.
int64 objects_copied = 5;

// Bytes that are copied to the data destination.
int64 bytes_copied = 6;
}
3 changes: 1 addition & 2 deletions google/cloud/parallelstore/v1beta/parallelstore_v1beta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ authentication:
publishing:
new_issue_uri: https://issuetracker.google.com/issues/new?component=1181190
documentation_uri: http://cloud/parallelstore?hl=en
documentation_uri: https://cloud.google.com/parallelstore?hl=en
api_short_name: parallelstore
github_label: 'api: parallelstore'
doc_tag_prefix: parallelstore
Expand Down Expand Up @@ -96,4 +96,3 @@ publishing:
common:
destinations:
- PACKAGE_MANAGER
proto_reference_documentation_uri: http://cloud/parallelstore/docs/apis

0 comments on commit 35125cf

Please sign in to comment.