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

     1  syntax = "proto3";
     2  
     3  package ntt.limits.v1alpha2;
     4  
     5  import "edgelq-sdk/iam/proto/v1alpha2/organization.proto";
     6  import "edgelq-sdk/iam/proto/v1alpha2/project.proto";
     7  import "edgelq-sdk/limits/proto/v1alpha2/common.proto";
     8  import "edgelq-sdk/limits/proto/v1alpha2/plan.proto";
     9  import "edgelq-sdk/limits/proto/v1alpha2/plan_assignment.proto";
    10  import "edgelq-sdk/meta/proto/v1alpha2/service.proto";
    11  import "google/api/resource.proto";
    12  import "goten-sdk/types/meta.proto";
    13  
    14  option go_package = "github.com/cloudwan/edgelq-sdk/limits/resources/v1alpha2/plan_assignment_request;plan_assignment_request";
    15  option java_multiple_files = true;
    16  option java_outer_classname = "PlanAssignmentRequestProto";
    17  option java_package = "com.ntt.meta.pb.v1alpha2";
    18  
    19  // PlanAssignmentRequest gives administrator a way to modify their
    20  // PlanAssignment instances in a safe way, with respect to parent
    21  // organization/system limits.
    22  // PlanAssignmentRequest can be used to:
    23  // * Assign/Reassign new plan for specific service
    24  // * Extend specific resource limits for existing PlanAssignment
    25  // * Redistribute limits across regions (available for project PlanAssignments)
    26  // * Unassign existing PlanAssignment
    27  // Certain requests may be automatically approved by system (for example, if
    28  // they would result in lowering limits), other require higher administrator
    29  // consent. User creating request should check status field after operation
    30  // to check if request was automatically approved.
    31  message PlanAssignmentRequest {
    32    option (google.api.resource) = {
    33      type : "limits.edgelq.com/PlanAssignmentRequest"
    34      pattern : "projects/{project}/planAssignmentRequests/"
    35                "{plan_assignment_request}"
    36      pattern : "organizations/{organization}/planAssignmentRequests/"
    37                "{plan_assignment_request}"
    38    };
    39  
    40    // Name of PlanAssignmentRequest
    41    // When creating a new instance, this field is optional and if not provided,
    42    // it will be generated automatically. Last ID segment must conform to the
    43    // following regex: [a-z][a-z0-9\-]{0,28}[a-z0-9]
    44    string name = 1;
    45  
    46    // Purpose of this request
    47    RequestType request = 2;
    48  
    49    // Service associated with this request.
    50    string service = 3;
    51  
    52    // Approver
    53    string approver = 4;
    54  
    55    Status status = 5;
    56  
    57    // Metadata
    58    goten.types.Meta metadata = 6;
    59  
    60    // Status
    61    message Status {
    62      // Conclusion
    63      Conclusion conclusion = 1;
    64  
    65      // Optional message with reason
    66      string reason = 2;
    67  
    68      enum Conclusion {
    69        UNDEFINED = 0;
    70  
    71        PENDING = 1;
    72  
    73        APPROVED = 2;
    74  
    75        REJECTED = 3;
    76      }
    77    }
    78  
    79    // RequestType describes what should change in existing PlanAssignment,
    80    // optionally if new one should be created.
    81    message RequestType {
    82      oneof request {
    83        // Assign request
    84        Assign assign = 1;
    85  
    86        // Extend request
    87        Extend extend = 2;
    88  
    89        // Redistribute request
    90        Redistribute redistribute = 3;
    91  
    92        // Unassign request
    93        Unassign unassign = 4;
    94      }
    95  
    96      // Assign request requests for new PlanAssignment instance. If there
    97      // already is a plan for same service, then previous record is overwritten.
    98      // In other words, this request can also be used to upgrade/downgrade
    99      // existing plan.
   100      message Assign {
   101        // Plan to apply
   102        string plan = 1;
   103  
   104        // List of all extensions over basic plan
   105        repeated Allowance extensions = 2;
   106  
   107        // Optional list of distributions across regions. This field
   108        // can only be used for project plans only.
   109        // It may be provided fully or partially by user - system will
   110        // automatically distribute remaining limits equally across
   111        // all regions.
   112        repeated RegionalDistribution regional_distributions = 3;
   113      }
   114  
   115      // Extend request should be used in order to increase (optionally
   116      // decrease) limits from existing plan assignment.
   117      message Extend {
   118        // Reference to existing plan assignment
   119        string assignment = 1;
   120  
   121        // List of limits to merge within existing assignment
   122        repeated Allowance additions = 2;
   123  
   124        // Distributions of NEW (only!) limits across regions.
   125        // It does not allow for redistribution of existing limits before.
   126        // It is optional, but can be provided only for project plans.
   127        // May be provided fully or partially, system will distribute
   128        // remaining limits on its own.
   129        repeated RegionalDistribution regional_distributions = 3;
   130      }
   131  
   132      // Redistribute request is used to move existing limits across
   133      // regions. It cannot change total values.
   134      message Redistribute {
   135        // Reference to existing assignment
   136        string assignment = 1;
   137  
   138        // List of regional distributions. It should contain
   139        // only those regions where limits are moved from/to.
   140        repeated RegionalDistribution regional_distributions = 2;
   141      }
   142  
   143      // Unassign is used to remove existing PlanAssignment. This will
   144      // always be automatically approved unless limits are in use by
   145      // existing resources.
   146      message Unassign { string assignment = 1; }
   147    }
   148  }