github.com/cloudwan/edgelq-sdk@v1.15.4/monitoring/proto/v3/monitored_resource_descriptor_service.proto (about)

     1  syntax = "proto3";
     2  
     3  package ntt.monitoring.v3;
     4  
     5  import "edgelq-sdk/monitoring/proto/v3/monitored_resource_descriptor.proto";
     6  import "edgelq-sdk/monitoring/proto/v3/monitored_resource_descriptor_change.proto";
     7  import "edgelq-sdk/monitoring/proto/v3/monitored_resource_descriptor_custom.proto";
     8  import "google/api/annotations.proto";
     9  import "google/api/client.proto";
    10  import "google/protobuf/empty.proto";
    11  import "google/protobuf/field_mask.proto";
    12  import "google/protobuf/timestamp.proto";
    13  import "goten-sdk/types/view.proto";
    14  import "goten-sdk/types/watch_type.proto";
    15  
    16  option go_package = "github.com/cloudwan/edgelq-sdk/monitoring/client/v3/monitored_resource_descriptor;monitored_resource_descriptor_client";
    17  option java_multiple_files = false;
    18  option java_outer_classname = "MonitoredResourceDescriptorServiceProto";
    19  option java_package = "com.ntt.monitoring.pb.v3";
    20  
    21  // A request message of the BatchGetMonitoredResourceDescriptors method.
    22  message BatchGetMonitoredResourceDescriptorsRequest {
    23    // Names of MonitoredResourceDescriptors
    24    repeated string names = 2;
    25  
    26    // A list of extra fields to be obtained for each response item on top of
    27    // fields defined by request field view
    28    google.protobuf.FieldMask field_mask = 3;
    29  
    30    // View defines list of standard response fields present in response items.
    31    // Additional fields can be amended by request field field_mask
    32    goten.types.View view = 4;
    33  
    34    reserved 1;
    35  }
    36  
    37  // A response message of the BatchGetMonitoredResourceDescriptors method.
    38  message BatchGetMonitoredResourceDescriptorsResponse {
    39    // found MonitoredResourceDescriptors
    40    repeated MonitoredResourceDescriptor monitored_resource_descriptors = 1;
    41  
    42    // list of not found MonitoredResourceDescriptors
    43    repeated string missing = 2;
    44  }
    45  
    46  // A request message of the WatchMonitoredResourceDescriptor method.
    47  message WatchMonitoredResourceDescriptorRequest {
    48    // Name of ntt.monitoring.v3.MonitoredResourceDescriptor
    49    string name = 1;
    50  
    51    // A list of extra fields to be obtained for each response item on top of
    52    // fields defined by request field view
    53    google.protobuf.FieldMask field_mask = 2;
    54  
    55    // View defines list of standard response fields present in response items.
    56    // Additional fields can be amended by request field field_mask
    57    goten.types.View view = 4;
    58  }
    59  
    60  // A response message of the WatchMonitoredResourceDescriptor method.
    61  message WatchMonitoredResourceDescriptorResponse {
    62    MonitoredResourceDescriptorChange change = 1;
    63  }
    64  
    65  // A request message of the WatchMonitoredResourceDescriptors method.
    66  message WatchMonitoredResourceDescriptorsRequest {
    67    // Type of a watch. Identifies how server stream data to a client, which
    68    // fields in a request are allowed and which fields in response are relevant.
    69    goten.types.WatchType type = 9;
    70  
    71    // Requested page size. Server may return fewer MonitoredResourceDescriptors
    72    // than requested. If unspecified, server will pick an appropriate default.
    73    // Can be populated only for stateful watch type.
    74    int32 page_size = 2;
    75  
    76    // A token identifying a page of results the server should return.
    77    // Can be populated only for stateful watch type.
    78    string page_token = 3;
    79  
    80    // Order By -
    81    // https://cloud.google.com/apis/design/design_patterns#list_pagination Can be
    82    // populated only for stateful watch type.
    83    string order_by = 4;
    84  
    85    // A token identifying watch resume point from previous session.
    86    // Can be populated only for stateless watch type.
    87    string resume_token = 10;
    88  
    89    // Point in the time from which we want to start getting updates. This field
    90    // can be populated only for stateless watch type and if resume token is not
    91    // known yet. If specified, initial snapshot will NOT be provided. It is
    92    // assumed client can obtain it using separate means. Watch responses will
    93    // contain resume tokens which should be used to resume broken connection.
    94    google.protobuf.Timestamp starting_time = 12;
    95  
    96    // Filter - filter results by field criteria. Simplified SQL-like syntax with
    97    // following operators:
    98    // <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS
    99    // [NOT] NULL | NaN . Combine conditions with OR | AND example: 'meta.labels
   100    // CONTAINS "severity:important" OR (state.last_error_time >
   101    // "2018-11-15T10:00:00Z" AND state.status = "ERROR")'
   102    string filter = 5;
   103  
   104    // A list of extra fields to be obtained for each response item on top of
   105    // fields defined by request field view Changes to MonitoredResourceDescriptor
   106    // that don't affect any of masked fields won't be sent back.
   107    google.protobuf.FieldMask field_mask = 6;
   108  
   109    // View defines list of standard response fields present in response items.
   110    // Additional fields can be amended by request field field_mask Changes to
   111    // MonitoredResourceDescriptor that don't affect any of masked fields won't be
   112    // sent back.
   113    goten.types.View view = 8;
   114  
   115    // Maximum amount of changes in each response message. Query result response
   116    // is divided on the server side into chunks with size of a specified amount
   117    // to limit memory footprint of each message. Responses will hold information
   118    // whether more elements will continue for the actual change. If unspecified,
   119    // server will pick an appropriate default.
   120    int32 max_chunk_size = 11;
   121  }
   122  
   123  // A response message of the WatchMonitoredResourceDescriptors method.
   124  message WatchMonitoredResourceDescriptorsResponse {
   125    // Changes of MonitoredResourceDescriptors
   126    repeated MonitoredResourceDescriptorChange
   127        monitored_resource_descriptor_changes = 2;
   128  
   129    // If request specified max_chunk_size (or this limit was enforced if
   130    // stateless watch has been chosen), then responses with "full changeset" will
   131    // be divided into chunks. Client should keep receiving messages and, once
   132    // is_current has value true, combine this recent message with all previous
   133    // ones where is_current is false. If this is the first is_current in a whole
   134    // watch stream, then it means that client should have, at this moment,
   135    // contain snapshot of the current situation (or more accurately, snapshot of
   136    // situation at the moment of request). All MonitoredResourceDescriptors will
   137    // be of type Added/Current (depending on watch_type specified in the
   138    // request). Further responses will be incremental - however messages may
   139    // still be chunked and is_current logic still applies. is_current is always
   140    // true for stateful watch if max_chunk_size was left to 0.
   141    bool is_current = 4;
   142  
   143    // When present, PageTokens used for page navigation should be updated.
   144    // Present only if is_current is true (last chunk).
   145    PageTokenChange page_token_change = 3;
   146  
   147    // Token that can be used if current connection drops and client needs to
   148    // reconnect. Populated only for stateless watch type. Present only if
   149    // is_current is true (last chunk).
   150    string resume_token = 5;
   151  
   152    // Server may occasionally send information how many resources should client
   153    // have in its state so far (response message without any changes, but with
   154    // snapshot_size field specified). If client has different value than the one
   155    // sent by the server, then it should be treated by a client as an error and
   156    // should reconnect. If value is smaller then 0, then client should ignore
   157    // this field as unpopulated. This field should be checked only for stateless
   158    // watch. In stateful those kind of errors are handled by the server side.
   159    // Will be never sent together with is_current, is_soft_reset and
   160    // is_hard_reset flags.
   161    int64 snapshot_size = 6;
   162  
   163    // In case of internal issue server may send response message with this flag.
   164    // It indicates that client should drop all changes from recent responses
   165    // where is_current is false only! If last message had is_current set to true,
   166    // client should do nothing and process normally. Resume token received before
   167    // is still valid. This field should be checked only for stateless watch. In
   168    // stateful those kind of errors are handled by the server side. Will never be
   169    // sent along with is_current, is_hard_reset or snapshot_size.
   170    bool is_soft_reset = 7;
   171  
   172    // In case of internal issue server may send response message with this flag.
   173    // After receiving, client should clear whole state (drop all changes received
   174    // so far) as server will send new snapshot (MonitoredResourceDescriptors will
   175    // contains changes of type Current only). Any resume tokens should be
   176    // discarded as well. This field should be checked only for stateless watch.
   177    // In stateful those kind of errors are handled by the server side. Will never
   178    // be sent along with is_current, is_soft_reset or snapshot_size.
   179    bool is_hard_reset = 8;
   180  
   181    message PageTokenChange {
   182      // New token to retrieve previous page of results.
   183      string prev_page_token = 1;
   184  
   185      // New token to retrieve next page of results.
   186      string next_page_token = 2;
   187    }
   188  }
   189  
   190  // A request message of the CreateMonitoredResourceDescriptor method.
   191  message CreateMonitoredResourceDescriptorRequest {
   192    // MonitoredResourceDescriptor resource body
   193    MonitoredResourceDescriptor monitored_resource_descriptor = 2;
   194  
   195    // Optional masking applied to response object to reduce message response
   196    // size.
   197    ResponseMask response_mask = 3;
   198  
   199    // ResponseMask allows client to reduce response message size.
   200    message ResponseMask {
   201      oneof masking {
   202        // If this flag has value true, then response will contain just empty
   203        // resource without any fields populated.
   204        bool skip_entire_response_body = 1;
   205  
   206        // If this field is populated, then resource in response will contain only
   207        // specific fields.
   208        google.protobuf.FieldMask body_mask = 2;
   209      }
   210    }
   211  }
   212  
   213  // A request message of the UpdateMonitoredResourceDescriptor method.
   214  message UpdateMonitoredResourceDescriptorRequest {
   215    // MonitoredResourceDescriptor resource body
   216    MonitoredResourceDescriptor monitored_resource_descriptor = 2;
   217  
   218    // FieldMask applied to request - change will be applied only for fields in
   219    // the mask
   220    google.protobuf.FieldMask update_mask = 3;
   221  
   222    // Conditional update applied to request if update should be executed only for
   223    // specific resource state. If this field is populated, then server will fetch
   224    // existing resource, compare with the one stored in the cas field (after
   225    // applying field mask) and proceed with update only and only if they match.
   226    // Otherwise RPC error Aborted will be returned.
   227    CAS cas = 4;
   228  
   229    // If set to true, and the resource is not found,
   230    // a new resource will be created.  In this situation,
   231    // 'field_mask' is ignored.
   232    //
   233    // https://google.aip.dev/134#create-or-update
   234    bool allow_missing = 5; // Optional masking applied to response object to
   235  
   236    // reduce message response size.
   237    ResponseMask response_mask = 6;
   238  
   239    // CAS - Compare and Swap. This object is used if user wants to make update
   240    // conditional based upon previous resource version.
   241    message CAS {
   242      // Conditional desired state of a resource before update.
   243      MonitoredResourceDescriptor conditional_state = 1;
   244  
   245      // Field paths from conditional state of resource server should check and
   246      // compare.
   247      google.protobuf.FieldMask field_mask = 2;
   248    }
   249  
   250    // ResponseMask allows client to reduce response message size.
   251    message ResponseMask {
   252      oneof masking {
   253        // If this flag has value true, then response will contain just empty
   254        // resource without any fields populated. Field body_mask is ignored if
   255        // set.
   256        bool skip_entire_response_body = 1;
   257  
   258        // Include all fields that were actually updated during processing. Note
   259        // this may be larger than update mask if some fields were computed
   260        // additionally. Name is added as well.
   261        bool updated_fields_only = 2;
   262  
   263        // If this field is populated, then resource in response will contain only
   264        // specific fields. If skip_entire_response_body is true, this field is
   265        // ignored.
   266        google.protobuf.FieldMask body_mask = 3;
   267      }
   268    }
   269  }
   270  
   271  // A request message of the DeleteMonitoredResourceDescriptor method.
   272  message DeleteMonitoredResourceDescriptorRequest {
   273    // Name of ntt.monitoring.v3.MonitoredResourceDescriptor
   274    string name = 1;
   275  
   276    // If set to true, and the resource is not found, method will be successful
   277    // and will not return NotFound error.
   278    bool allow_missing = 2;
   279  }
   280  
   281  // MonitoredResourceDescriptor service API for Monitoring
   282  service MonitoredResourceDescriptorService {
   283    option (google.api.default_host) = "monitoring.edgelq.com";
   284    option (google.api.oauth_scopes) = "https://apis.edgelq.com";
   285  
   286    // BatchGetMonitoredResourceDescriptors
   287    rpc BatchGetMonitoredResourceDescriptors(
   288        BatchGetMonitoredResourceDescriptorsRequest)
   289        returns (BatchGetMonitoredResourceDescriptorsResponse) {
   290      option (google.api.http) = {
   291        get : "/v3/monitoredResourceDescriptors:batchGet"
   292      };
   293    }
   294  
   295    // WatchMonitoredResourceDescriptor
   296    rpc WatchMonitoredResourceDescriptor(WatchMonitoredResourceDescriptorRequest)
   297        returns (stream WatchMonitoredResourceDescriptorResponse) {
   298      option (google.api.http) = {
   299        post : "/v3/{name=monitoredResourceDescriptors/*}:watch"
   300      };
   301    }
   302  
   303    // WatchMonitoredResourceDescriptors
   304    rpc WatchMonitoredResourceDescriptors(
   305        WatchMonitoredResourceDescriptorsRequest)
   306        returns (stream WatchMonitoredResourceDescriptorsResponse) {
   307      option (google.api.http) = {
   308        post : "/v3/monitoredResourceDescriptors:watch"
   309      };
   310    }
   311  
   312    // CreateMonitoredResourceDescriptor
   313    rpc CreateMonitoredResourceDescriptor(
   314        CreateMonitoredResourceDescriptorRequest)
   315        returns (MonitoredResourceDescriptor) {
   316      option (google.api.http) = {
   317        post : "/v3/monitoredResourceDescriptors"
   318        body : "monitored_resource_descriptor"
   319      };
   320    }
   321  
   322    // UpdateMonitoredResourceDescriptor
   323    rpc UpdateMonitoredResourceDescriptor(
   324        UpdateMonitoredResourceDescriptorRequest)
   325        returns (MonitoredResourceDescriptor) {
   326      option (google.api.http) = {
   327        put : "/v3/"
   328              "{monitored_resource_descriptor.name=monitoredResourceDescriptors/"
   329              "*}"
   330        body : "monitored_resource_descriptor"
   331      };
   332    }
   333  
   334    // DeleteMonitoredResourceDescriptor
   335    rpc DeleteMonitoredResourceDescriptor(
   336        DeleteMonitoredResourceDescriptorRequest)
   337        returns (google.protobuf.Empty) {
   338      option (google.api.http) = {
   339        delete : "/v3/{name=monitoredResourceDescriptors/*}"
   340      };
   341    }
   342  
   343    // GetMonitoredResourceDescriptor
   344    rpc GetMonitoredResourceDescriptor(GetMonitoredResourceDescriptorRequest)
   345        returns (MonitoredResourceDescriptor) {
   346      option (google.api.http) = {
   347        get : "/v3/{name=monitoredResourceDescriptors/*}"
   348      };
   349    }
   350  
   351    // ListMonitoredResourceDescriptors
   352    rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest)
   353        returns (ListMonitoredResourceDescriptorsResponse) {
   354      option (google.api.http) = {
   355        get : "/v3/monitoredResourceDescriptors"
   356      };
   357    }
   358  }