Skip to content

Commit

Permalink
feat: publish updated definitions for cloud/datafusion/v1 and cloud/d…
Browse files Browse the repository at this point in the history
…atafusion/v1beta1

fix!: multiple fields now have field_behavior REQUIRED in cloud/datafusion/v1 service definition
fix!: multiple fields now have field_behavior REQUIRED in cloud/datafusion/v1beta1 service definition

Committer: @viacheslav-rostovtsev
PiperOrigin-RevId: 421416031
  • Loading branch information
Google APIs authored and Copybara-Service committed Jan 13, 2022
1 parent 8675f5e commit 5438a17
Show file tree
Hide file tree
Showing 2 changed files with 251 additions and 107 deletions.
153 changes: 109 additions & 44 deletions google/cloud/datafusion/v1/datafusion.proto
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,21 @@ option java_multiple_files = true;
option java_package = "com.google.cloud.datafusion.v1";
option php_namespace = "Google\\Cloud\\DataFusion\\V1";
option ruby_package = "Google::Cloud::DataFusion::V1";
option (google.api.resource_definition) = {
type: "cloudkms.googleapis.com/CryptoKey"
pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}"
};

// Service for creating and managing Data Fusion instances.
// Data Fusion enables ETL developers to build code-free, data integration
// pipelines via a point-and-click UI.
service DataFusion {
option (google.api.default_host) = "datafusion.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform";
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";

// Lists possible versions for Data Fusion instances in the specified project
// and location.
rpc ListAvailableVersions(ListAvailableVersionsRequest)
returns (ListAvailableVersionsResponse) {
rpc ListAvailableVersions(ListAvailableVersionsRequest) returns (ListAvailableVersionsResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*}/versions"
};
Expand All @@ -64,8 +66,7 @@ service DataFusion {
}

// Creates a new Data Fusion instance in the specified project and location.
rpc CreateInstance(CreateInstanceRequest)
returns (google.longrunning.Operation) {
rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*}/instances"
body: "instance"
Expand All @@ -78,8 +79,7 @@ service DataFusion {
}

// Deletes a single Date Fusion instance.
rpc DeleteInstance(DeleteInstanceRequest)
returns (google.longrunning.Operation) {
rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/locations/*/instances/*}"
};
Expand All @@ -91,8 +91,7 @@ service DataFusion {
}

// Updates a single Data Fusion instance.
rpc UpdateInstance(UpdateInstanceRequest)
returns (google.longrunning.Operation) {
rpc UpdateInstance(UpdateInstanceRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
patch: "/v1/{instance.name=projects/*/locations/*/instances/*}"
body: "instance"
Expand All @@ -106,8 +105,7 @@ service DataFusion {

// Restart a single Data Fusion instance.
// At the end of an operation instance is fully restarted.
rpc RestartInstance(RestartInstanceRequest)
returns (google.longrunning.Operation) {
rpc RestartInstance(RestartInstanceRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{name=projects/*/locations/*/instances/*}:restart"
body: "*"
Expand Down Expand Up @@ -141,6 +139,18 @@ message NetworkConfig {
// The Data Fusion version. This proto message stores information about certain
// Data Fusion version, which is used for Data Fusion version upgrade.
message Version {
// Each type represents the release availability of a CDF version
enum Type {
// Version does not have availability yet
TYPE_UNSPECIFIED = 0;

// Version is under development and not considered stable
TYPE_PREVIEW = 1;

// Version is available for public use
TYPE_GENERAL_AVAILABILITY = 2;
}

// The version number of the Data Fusion instance, such as '6.0.1.0'.
string version_number = 1;

Expand All @@ -149,6 +159,9 @@ message Version {

// Represents a list of available feature names for a given version.
repeated string available_features = 3;

// Type represents the release availability of the version
Type type = 4;
}

// Identifies Data Fusion accelerators for an instance.
Expand Down Expand Up @@ -201,7 +214,9 @@ message CryptoKeyConfig {
// The name of the key which is used to encrypt/decrypt customer data. For key
// in Cloud KMS, the key should be in the format of
// `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
string key_reference = 1;
string key_reference = 1 [(google.api.resource_reference) = {
type: "cloudkms.googleapis.com/CryptoKey"
}];
}

// Represents a Data Fusion instance.
Expand Down Expand Up @@ -267,11 +282,28 @@ message Instance {

// Instance is being auto-upgraded
AUTO_UPGRADING = 9;

// Instance is disabled
DISABLED = 10;
}

// The reason for disabling the instance if the state is DISABLED.
enum DisabledReason {
// This is an unknown reason for disabling.
DISABLED_REASON_UNSPECIFIED = 0;

// The KMS key used by the instance is either revoked or denied access to
KMS_KEY_ISSUE = 1;
}

// Output only. The name of this instance is in the form of
// projects/{project}/locations/{location}/instances/{instance}.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.resource_reference) = {
type: "datafusion.googleapis.com/Instance"
}
];

// A description of this instance.
string description = 2;
Expand Down Expand Up @@ -304,12 +336,10 @@ message Instance {
map<string, string> options = 9;

// Output only. The time the instance was created.
google.protobuf.Timestamp create_time = 10
[(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp create_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The time the instance was last updated.
google.protobuf.Timestamp update_time = 11
[(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp update_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The current state of this Data Fusion instance.
State state = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
Expand All @@ -328,10 +358,11 @@ message Instance {
// Current version of the Data Fusion. Only specifiable in Update.
string version = 16;

// Output only. Deprecated. Use tenant_project_id instead to extract the
// tenant project ID.
string service_account = 17
[deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Deprecated. Use tenant_project_id instead to extract the tenant project ID.
string service_account = 17 [
deprecated = true,
(google.api.field_behavior) = OUTPUT_ONLY
];

// Display name for an instance.
string display_name = 18;
Expand All @@ -343,8 +374,7 @@ message Instance {
// Output only. Endpoint on which the REST APIs is accessible.
string api_endpoint = 20 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Cloud Storage bucket generated by Data Fusion in the customer
// project.
// Output only. Cloud Storage bucket generated by Data Fusion in the customer project.
string gcs_bucket = 21 [(google.api.field_behavior) = OUTPUT_ONLY];

// List of accelerators enabled for this CDF instance.
Expand All @@ -369,15 +399,23 @@ message Instance {
// The crypto key configuration. This field is used by the Customer-Managed
// Encryption Keys (CMEK) feature.
CryptoKeyConfig crypto_key_config = 28;

// Output only. If the instance state is DISABLED, the reason for disabling the instance.
repeated DisabledReason disabled_reason = 29 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Request message for listing Data Fusion instances.
message ListInstancesRequest {
// The project and location for which to retrieve instance information
// Required. The project and location for which to retrieve instance information
// in the format projects/{project}/locations/{location}. If the location is
// specified as '-' (wildcard), then all regions available to the project
// are queried, and the results are aggregated.
string parent = 1;
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];

// The maximum number of items to return.
int32 page_size = 2;
Expand Down Expand Up @@ -408,9 +446,14 @@ message ListInstancesResponse {

// Request message for the list available versions request.
message ListAvailableVersionsRequest {
// Required. The project and location for which to retrieve instance
// information in the format projects/{project}/locations/{location}.
string parent = 1 [(google.api.field_behavior) = REQUIRED];
// Required. The project and location for which to retrieve instance information
// in the format projects/{project}/locations/{location}.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];

// The maximum number of items to return.
int32 page_size = 2;
Expand All @@ -437,36 +480,54 @@ message ListAvailableVersionsResponse {

// Request message for getting details about a Data Fusion instance.
message GetInstanceRequest {
// The instance resource name in the format
// Required. The instance resource name in the format
// projects/{project}/locations/{location}/instances/{instance}.
string name = 1;
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datafusion.googleapis.com/Instance"
}
];
}

// Request message for creating a Data Fusion instance.
message CreateInstanceRequest {
// The instance's project and location in the format
// Required. The instance's project and location in the format
// projects/{project}/locations/{location}.
string parent = 1;
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];

// The name of the instance to create.
string instance_id = 2;
// Required. The name of the instance to create.
string instance_id = 2 [(google.api.field_behavior) = REQUIRED];

// An instance resource.
Instance instance = 3;
}

// Request message for deleting a Data Fusion instance.
message DeleteInstanceRequest {
// The instance resource name in the format
// Required. The instance resource name in the format
// projects/{project}/locations/{location}/instances/{instance}
string name = 1;
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datafusion.googleapis.com/Instance"
}
];
}

// Request message for updating a Data Fusion instance.
// Data Fusion allows updating the labels, options, and stack driver settings.
// This is also used for CDF version upgrade.
message UpdateInstanceRequest {
// The instance resource that replaces the resource on the server. Currently,
// Required. The instance resource that replaces the resource on the server. Currently,
// Data Fusion only allows replacing labels, options, and stack driver
// settings. All other fields will be ignored.
Instance instance = 1;
Instance instance = 1 [(google.api.field_behavior) = REQUIRED];

// Field mask is used to specify the fields that the update will overwrite
// in an instance resource. The fields specified in the update_mask are
Expand All @@ -479,9 +540,14 @@ message UpdateInstanceRequest {

// Request message for restarting a Data Fusion instance.
message RestartInstanceRequest {
// Name of the Data Fusion instance which need to be restarted in the form of
// Required. Name of the Data Fusion instance which need to be restarted in the form of
// projects/{project}/locations/{location}/instances/{instance}
string name = 1;
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datafusion.googleapis.com/Instance"
}
];
}

// Represents the metadata of a long-running operation.
Expand All @@ -503,9 +569,8 @@ message OperationMetadata {

// 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 [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
// corresponding to `Code.CANCELLED`.
bool requested_cancellation = 6;

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

0 comments on commit 5438a17

Please sign in to comment.