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

     1  syntax = "proto3";
     2  
     3  package ntt.limits.v1;
     4  
     5  import "edgelq-sdk/iam/proto/v1/organization.proto";
     6  import "edgelq-sdk/iam/proto/v1/project.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_pool;limit_pool";
    12  option java_multiple_files = true;
    13  option java_outer_classname = "LimitPoolProto";
    14  option java_package = "com.ntt.limits.pb.v1";
    15  
    16  // LimitPool represents a pool from which next LimitPool
    17  // or final Limit instances are allocated from. LimitPool
    18  // can either belong to a service (first pool, without parent) or
    19  // organization (which got pool from service or parent organization).
    20  // Size of child limit or limit pools must not exceed parent
    21  // limit pool.
    22  // LimitPool is in a way similar to Limit - it has scope and
    23  // associated resource but LimitPool is non-final object. It cannot be used to
    24  // allocate resources directly. It need child Limit first. Therefore,
    25  // field with values in LimitPool are configured size, active
    26  // size and reserved. Fields in Limit are configured limit,
    27  // active limit and usage - they need different interpretation.
    28  // Because LimitPool instances within one scope (service, organization)
    29  // are managed by primary region of that scope, changes in them
    30  // are done with only single transaction.
    31  // LimitPool instances cannot be directly created or deleted. They cannot be
    32  // also be modified (there are only some state fields controlled
    33  // by service). LimitPools are created/modified along with
    34  // PlanAssignment instances.
    35  message LimitPool {
    36    option (google.api.resource) = {
    37      type : "limits.edgelq.com/LimitPool"
    38      pattern : "services/{service}/limitPools/{limit_pool}"
    39      pattern : "organizations/{organization}/limitPools/{limit_pool}"
    40    };
    41  
    42    // Name of LimitPool
    43    // When creating a new instance, this field is optional and if not provided,
    44    // it will be generated automatically. Last ID segment must conform to the
    45    // following regex:
    46    // [a-zA-Z0-9-]{1,128}\\/[a-zA-Z0-9-.]{1,128}\\/[a-zA-Z]{1,128}
    47    string name = 1;
    48  
    49    // Metadata is an object with information like create, update and delete time
    50    // (for async deleted resources), has user labels/annotations, sharding
    51    // information, multi-region syncing information and may have non-schema
    52    // owners (useful for taking ownership of resources belonging to lower level
    53    // services by higher ones).
    54    goten.types.Meta metadata = 8;
    55  
    56    // Referenced service
    57    string service = 2;
    58  
    59    // Referenced resource type
    60    string resource = 3;
    61  
    62    // Region ID to which this pool applies. This may be different
    63    // compared to default region for service/organization, because
    64    // they may use multiple regions.
    65    string region = 9;
    66  
    67    // Configured size of pool according to PlanAssignment instances
    68    // belonging to same scope (system or organization).
    69    int64 configured_size = 4;
    70  
    71    // Active pool size. It will be normally equal to configured size.
    72    // However, if configured size goes down below reserved value,
    73    // then active size will be equal to that "reserved".
    74    // It will also prevent parent LimitPool (if any) from getting
    75    // limit value back.
    76    int64 active_size = 5;
    77  
    78    // Configured OR Active Size of all child Limit and LimitPool instances -
    79    // whichever is bigger.
    80    int64 reserved = 6;
    81  
    82    // LimitPool source that supplied reservation to this LimitPool. Any change
    83    // in configured/active value in current LimitPool increases/decreases
    84    // reserved field in source LimitPool.
    85    string source = 7;
    86  }