Skip to content

Commit

Permalink
feat!: Remove EnableService and DisableService RPC methods and relate…
Browse files Browse the repository at this point in the history
…d protos from service management API (#116)

* fix!: Remove EnableService and DisableService RPC methods and related protos from service management API

BREAKING CHANGE: Remove EnableService and DisableService RPC methods. 
These backend methods were disabled long ago

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Feb 15, 2022
1 parent 9ac20c2 commit 8325a83
Show file tree
Hide file tree
Showing 18 changed files with 60 additions and 2,551 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019 Google LLC.
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

syntax = "proto3";

Expand All @@ -33,7 +32,7 @@ option ruby_package = "Google::Cloud::ServiceManagement::V1";
// The full representation of a Service that is managed by
// Google Service Management.
message ManagedService {
// The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
// The name of the service. See the [overview](/service-management/overview)
// for naming requirements.
string service_name = 2;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019 Google LLC.
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -23,8 +23,6 @@ import "google/api/service.proto";
import "google/api/servicemanagement/v1/resources.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/any.proto";
import "google/protobuf/field_mask.proto";
import "google/rpc/status.proto";

option csharp_namespace = "Google.Cloud.ServiceManagement.V1";
option go_package = "google.golang.org/genproto/googleapis/api/servicemanagement/v1;servicemanagement";
Expand All @@ -35,7 +33,7 @@ option objc_class_prefix = "GASM";
option php_namespace = "Google\\Cloud\\ServiceManagement\\V1";
option ruby_package = "Google::Cloud::ServiceManagement::V1";

// [Google Service Management API](https://cloud.google.com/service-management/overview)
// [Google Service Management API](/service-management/overview)
service ServiceManager {
option (google.api.default_host) = "servicemanagement.googleapis.com";
option (google.api.oauth_scopes) =
Expand All @@ -49,10 +47,6 @@ service ServiceManager {
// Returns all public services. For authenticated users, also returns all
// services the calling user has "servicemanagement.services.get" permission
// for.
//
// **BETA:** If the caller specifies the `consumer_id`, it returns only the
// services enabled on the consumer. The `consumer_id` must have the format
// of "project:{PROJECT-ID}".
rpc ListServices(ListServicesRequest) returns (ListServicesResponse) {
option (google.api.http) = {
get: "/v1/services"
Expand All @@ -70,7 +64,14 @@ service ServiceManager {
}

// Creates a new managed service.
// Please note one producer project can own no more than 20 services.
//
// A managed service is immutable, and is subject to mandatory 30-day
// data retention. You cannot move a service or recreate it within 30 days
// after deletion.
//
// One producer project can own no more than 500 services. For security and
// reliability purposes, a production service should be hosted in a
// dedicated producer project.
//
// Operation<response: ManagedService>
rpc CreateService(CreateServiceRequest) returns (google.longrunning.Operation) {
Expand Down Expand Up @@ -241,43 +242,6 @@ service ServiceManager {
};
option (google.api.method_signature) = "new_config,old_config";
}

// Enables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can be used
// for the project. See
// [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for
// more information.
//
// Operation<response: EnableServiceResponse>
rpc EnableService(EnableServiceRequest) returns (google.longrunning.Operation) {
option deprecated = true;
option (google.api.http) = {
post: "/v1/services/{service_name}:enable"
body: "*"
};
option (google.api.method_signature) = "service_name,consumer_id";
option (google.longrunning.operation_info) = {
response_type: "google.api.servicemanagement.v1.EnableServiceResponse"
metadata_type: "google.api.servicemanagement.v1.OperationMetadata"
};
}

// Disables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can no longer be
// be used for the project. It prevents accidental usage that may cause
// unexpected billing charges or security leaks.
//
// Operation<response: DisableServiceResponse>
rpc DisableService(DisableServiceRequest) returns (google.longrunning.Operation) {
option deprecated = true;
option (google.api.http) = {
post: "/v1/services/{service_name}:disable"
body: "*"
};
option (google.api.method_signature) = "service_name,consumer_id";
option (google.longrunning.operation_info) = {
response_type: "google.api.servicemanagement.v1.DisableServiceResponse"
metadata_type: "google.api.servicemanagement.v1.OperationMetadata"
};
}
}

// Request message for `ListServices` method.
Expand Down Expand Up @@ -325,14 +289,14 @@ message CreateServiceRequest {

// Request message for DeleteService method.
message DeleteServiceRequest {
// Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
// Required. The name of the service. See the [overview](/service-management/overview)
// for naming requirements. For example: `example.googleapis.com`.
string service_name = 1 [(google.api.field_behavior) = REQUIRED];
}

// Request message for UndeleteService method.
message UndeleteServiceRequest {
// Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
// Required. The name of the service. See the [overview](/service-management/overview)
// for naming requirements. For example: `example.googleapis.com`.
string service_name = 1 [(google.api.field_behavior) = REQUIRED];
}
Expand All @@ -356,7 +320,7 @@ message GetServiceConfigRequest {
FULL = 1;
}

// Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
// Required. The name of the service. See the [overview](/service-management/overview)
// for naming requirements. For example: `example.googleapis.com`.
string service_name = 1 [(google.api.field_behavior) = REQUIRED];

Expand All @@ -373,7 +337,7 @@ message GetServiceConfigRequest {

// Request message for ListServiceConfigs method.
message ListServiceConfigsRequest {
// Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
// Required. The name of the service. See the [overview](/service-management/overview)
// for naming requirements. For example: `example.googleapis.com`.
string service_name = 1 [(google.api.field_behavior) = REQUIRED];

Expand All @@ -396,7 +360,7 @@ message ListServiceConfigsResponse {

// Request message for CreateServiceConfig method.
message CreateServiceConfigRequest {
// Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
// Required. The name of the service. See the [overview](/service-management/overview)
// for naming requirements. For example: `example.googleapis.com`.
string service_name = 1 [(google.api.field_behavior) = REQUIRED];

Expand All @@ -406,7 +370,7 @@ message CreateServiceConfigRequest {

// Request message for SubmitConfigSource method.
message SubmitConfigSourceRequest {
// Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
// Required. The name of the service. See the [overview](/service-management/overview)
// for naming requirements. For example: `example.googleapis.com`.
string service_name = 1 [(google.api.field_behavior) = REQUIRED];

Expand All @@ -427,7 +391,7 @@ message SubmitConfigSourceResponse {

// Request message for 'CreateServiceRollout'
message CreateServiceRolloutRequest {
// Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
// Required. The name of the service. See the [overview](/service-management/overview)
// for naming requirements. For example: `example.googleapis.com`.
string service_name = 1 [(google.api.field_behavior) = REQUIRED];

Expand All @@ -437,7 +401,7 @@ message CreateServiceRolloutRequest {

// Request message for 'ListServiceRollouts'
message ListServiceRolloutsRequest {
// Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
// Required. The name of the service. See the [overview](/service-management/overview)
// for naming requirements. For example: `example.googleapis.com`.
string service_name = 1 [(google.api.field_behavior) = REQUIRED];

Expand All @@ -451,10 +415,10 @@ message ListServiceRolloutsRequest {
// Required. Use `filter` to return subset of rollouts.
// The following filters are supported:
// -- To limit the results to only those in
// status (google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS',
// [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS',
// use filter='status=SUCCESS'
// -- To limit the results to those in
// status (google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED'
// [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED'
// or 'FAILED', use filter='status=CANCELLED OR status=FAILED'
string filter = 4 [(google.api.field_behavior) = REQUIRED];
}
Expand All @@ -470,60 +434,14 @@ message ListServiceRolloutsResponse {

// Request message for GetServiceRollout method.
message GetServiceRolloutRequest {
// Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview)
// Required. The name of the service. See the [overview](/service-management/overview)
// for naming requirements. For example: `example.googleapis.com`.
string service_name = 1 [(google.api.field_behavior) = REQUIRED];

// Required. The id of the rollout resource.
string rollout_id = 2 [(google.api.field_behavior) = REQUIRED];
}

// Request message for EnableService method.
message EnableServiceRequest {
// Required. Name of the service to enable. Specifying an unknown service name will
// cause the request to fail.
string service_name = 1 [(google.api.field_behavior) = REQUIRED];

// Required. The identity of consumer resource which service enablement will be
// applied to.
//
// The Google Service Management implementation accepts the following
// forms:
// - "project:<project_id>"
//
// Note: this is made compatible with
// google.api.servicecontrol.v1.Operation.consumer_id.
string consumer_id = 2 [(google.api.field_behavior) = REQUIRED];
}

// Operation payload for EnableService method.
message EnableServiceResponse {

}

// Request message for DisableService method.
message DisableServiceRequest {
// Required. Name of the service to disable. Specifying an unknown service name
// will cause the request to fail.
string service_name = 1 [(google.api.field_behavior) = REQUIRED];

// Required. The identity of consumer resource which service disablement will be
// applied to.
//
// The Google Service Management implementation accepts the following
// forms:
// - "project:<project_id>"
//
// Note: this is made compatible with
// google.api.servicecontrol.v1.Operation.consumer_id.
string consumer_id = 2 [(google.api.field_behavior) = REQUIRED];
}

// Operation payload for DisableService method.
message DisableServiceResponse {

}

// Request message for GenerateConfigReport method.
message GenerateConfigReportRequest {
// Required. Service configuration for which we want to generate the report.
Expand Down
Loading

0 comments on commit 8325a83

Please sign in to comment.