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

     1  syntax = "proto3";
     2  
     3  package ntt.limits.v1;
     4  
     5  import "edgelq-sdk/iam/proto/v1/common.proto";
     6  import "edgelq-sdk/limits/proto/v1/common.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/plan;plan";
    12  option java_multiple_files = true;
    13  option java_outer_classname = "PlanProto";
    14  option java_package = "com.ntt.limits.pb.v1";
    15  
    16  // Plan is a bundle with set of limits for various resources in given service.
    17  // Note that Plan limits are regional. For example, if plan predicts
    18  // for example 1000 pods and is assigned for resource enabled for 2
    19  // regions, then project will be allowed to create 1000 pods in each
    20  // region.
    21  message Plan {
    22    option (google.api.resource) = {
    23      type : "limits.edgelq.com/Plan"
    24      pattern : "services/{service}/plans/{plan}"
    25      pattern : "organizations/{organization}/plans/{plan}"
    26    };
    27  
    28    // Name of Plan
    29    // When creating a new instance, this field is optional and if not provided,
    30    // it will be generated automatically. Last ID segment must conform to the
    31    // following regex: [a-zA-Z0-9_.-]{1,128}
    32    string name = 1;
    33  
    34    // Metadata is an object with information like create, update and delete time
    35    // (for async deleted resources), has user labels/annotations, sharding
    36    // information, multi-region syncing information and may have non-schema
    37    // owners (useful for taking ownership of resources belonging to lower level
    38    // services by higher ones).
    39    goten.types.Meta metadata = 5;
    40  
    41    // Plan display name
    42    string display_name = 2;
    43  
    44    // Service where plan applies. If this Plan is a child of Service itself,
    45    // they must be equal.
    46    string service = 3;
    47  
    48    // List of limits per each resource.
    49    repeated LimitValue resource_limits = 4;
    50  
    51    // Plan level
    52    PlanLevel plan_level = 6;
    53  
    54    // Business tier - this only is used to determine default plan when
    55    // project/organization is created. It is possible to set this value to
    56    // UNDEFINED rendering this plan as non-default.
    57    ntt.iam.v1.BusinessTier business_tier = 7;
    58  
    59    // Spec generation, incremented for every change in resource_limits field.
    60    int64 generation = 8;
    61  
    62    // LimitValue informs how many instances of resource for given type are
    63    // permitted.
    64    message LimitValue {
    65      // Reference to resource
    66      string resource = 1;
    67  
    68      // Limit for given resource.
    69      int64 value = 2;
    70    }
    71  
    72    // PlanLevel defines entity level for whom plan can be assigned
    73    enum PlanLevel {
    74      UNDEFINED = 0;
    75  
    76      SERVICE = 1;
    77  
    78      ORGANIZATION = 2;
    79  
    80      PROJECT = 3;
    81    }
    82  }