github.com/cloudwan/edgelq-sdk@v1.15.4/limits/proto/v1/limit.proto (about)

     1  syntax = "proto3";
     2  
     3  package ntt.limits.v1;
     4  
     5  import "edgelq-sdk/iam/proto/v1/project.proto";
     6  import "edgelq-sdk/limits/proto/v1/limit_pool.proto";
     7  import "google/api/resource.proto";
     8  import "goten-sdk/meta-service/proto/v1/service.proto";
     9  import "goten-sdk/types/meta.proto";
    10  
    11  option go_package = "github.com/cloudwan/edgelq-sdk/limits/resources/v1/limit;limit";
    12  option java_multiple_files = true;
    13  option java_outer_classname = "LimitProto";
    14  option java_package = "com.ntt.limits.pb.v1";
    15  
    16  // Limit resource represents usage/limit of specific resource
    17  // in specific project and region - however instances of those
    18  // resources are managed by primary region of project. This
    19  // ensures consistency and allows modification of project limits
    20  // in one database transaction.
    21  // Limit instances cannot be created or deleted. They cannot be
    22  // also be modified (there are only some state fields controlled
    23  // by system). Limits are created/modified along with
    24  // PlanAssignment instances.
    25  message Limit {
    26    option (google.api.resource) = {
    27      type : "limits.edgelq.com/Limit"
    28      pattern : "projects/{project}/limits/{limit}"
    29    };
    30  
    31    // Name of Limit
    32    // When creating a new instance, this field is optional and if not provided,
    33    // it will be generated automatically. Last ID segment must conform to the
    34    // following regex:
    35    // [a-zA-Z0-9-]{1,128}\\/[a-zA-Z0-9-.]{1,128}\\/[a-zA-Z]{1,128}
    36    string name = 1;
    37  
    38    // Metadata is an object with information like create, update and delete time
    39    // (for async deleted resources), has user labels/annotations, sharding
    40    // information, multi-region syncing information and may have non-schema
    41    // owners (useful for taking ownership of resources belonging to lower level
    42    // services by higher ones).
    43    goten.types.Meta metadata = 9;
    44  
    45    // Referenced service
    46    string service = 2;
    47  
    48    // Referenced resource type
    49    string resource = 3;
    50  
    51    // Region ID to which this limit applies. This may be different
    52    // compared to default project region, because projects themselves
    53    // can be multi-regional.
    54    string region = 4;
    55  
    56    // Configured limit - it is always in sync with limits
    57    // predicted by PlanAssignment instances.
    58    int64 configured_limit = 5;
    59  
    60    // Active limit - it is always equal to configured limit with exceptions:
    61    // * If configured limit has just changed, then active limit will for
    62    // a moment contain old value before synchronization.
    63    // * If it turns out that usage increased in the very same moment
    64    // when configured limit decreased, then active limit will hold
    65    // old value indicating problem.
    66    // It is important to note that, because projects may be multi-regional,
    67    // limits are tracked by their FINAL region (See region field).
    68    // State fields (active limit and usage) are synced asynchronously.
    69    // From user perspective this field can be hidden if in line with
    70    // configured limit.
    71    int64 active_limit = 6;
    72  
    73    // Number of resources currently in existence.
    74    int64 usage = 7;
    75  
    76    // LimitPool sources that supplied reservation to this limit. Any change
    77    // in configured/active value in current Limit increases/decreases
    78    // reserved field in source LimitPool.
    79    // Number of sources depends whether resource is regional or not - if
    80    // resource is regional, it will be only one source pointing to the
    81    // specific region. Non-regional resources will point to all regions
    82    // where project is present.
    83    repeated string sources = 8;
    84  }