github.com/cloudwan/edgelq-sdk@v1.15.4/limits/proto/v1/plan_assignment_request.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 "edgelq-sdk/limits/proto/v1/common.proto"; 8 import "edgelq-sdk/limits/proto/v1/plan.proto"; 9 import "edgelq-sdk/limits/proto/v1/plan_assignment.proto"; 10 import "google/api/resource.proto"; 11 import "goten-sdk/meta-service/proto/v1/service.proto"; 12 import "goten-sdk/types/meta.proto"; 13 14 option go_package = "github.com/cloudwan/edgelq-sdk/limits/resources/v1/plan_assignment_request;plan_assignment_request"; 15 option java_multiple_files = true; 16 option java_outer_classname = "PlanAssignmentRequestProto"; 17 option java_package = "com.ntt.limits.pb.v1"; 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 // Metadata is an object with information like create, update and delete time 47 // (for async deleted resources), has user labels/annotations, sharding 48 // information, multi-region syncing information and may have non-schema 49 // owners (useful for taking ownership of resources belonging to lower level 50 // services by higher ones). 51 goten.types.Meta metadata = 6; 52 53 // Purpose of this request 54 RequestType request = 2; 55 56 // Service associated with this request. 57 string service = 3; 58 59 // Approver - it can be org or service in practice, note its always equal 60 // to the parent name of AcceptedPlan 61 string approver = 4; 62 63 Status status = 5; 64 65 // Status 66 message Status { 67 // Conclusion 68 Conclusion conclusion = 1; 69 70 // Optional message with reason 71 string reason = 2; 72 73 enum Conclusion { 74 UNDEFINED = 0; 75 76 PENDING = 1; 77 78 APPROVED = 2; 79 80 REJECTED = 3; 81 } 82 } 83 84 // RequestType describes what should change in existing PlanAssignment, 85 // optionally if new one should be created. 86 message RequestType { 87 oneof request { 88 // Assign request 89 Assign assign = 1; 90 91 // Extend request 92 Extend extend = 2; 93 94 // Unassign request 95 Unassign unassign = 4; 96 } 97 98 // Assign request requests for new PlanAssignment instance. If there 99 // already is a plan for associated service, then previous record is 100 // overwritten in the scope of the "region". In other words, this request 101 // can also be used to upgrade/downgrade existing plan. If "region" is 102 // specified, all extensions from existing plan for given region will be 103 // discarded and overwritten from this one. If "region" is not specified, 104 // then 105 message Assign { 106 // Plan to apply 107 string plan = 1; 108 109 // List of all extensions over basic plan. Extensions without specified 110 // region will apply to all regions if value of field "region" in this 111 // request is also empty. However, if "region" is specified, then 112 // extensions defined here will be applicable for this region only. 113 repeated Allowance extensions = 2; 114 115 // Optional region ID for the plan - if not specified, 116 // assigned plan will apply to all regions (default plan for region), 117 // BUT it will not override plans for specific region in existing 118 // PlanAssignment. 119 string region = 4; 120 121 reserved 3; 122 } 123 124 // Extend request should be used in order to increase (optionally 125 // decrease) limits from existing plan assignment. Note each addition 126 // can be applied to one or all regions. 127 message Extend { 128 // Reference to existing plan assignment 129 string assignment = 1; 130 131 // List of limits to merge within existing assignment 132 repeated Allowance additions = 2; 133 134 reserved 3; 135 } 136 137 // Unassign is used to remove existing PlanAssignment if "region" is empty. 138 // This will always be automatically approved unless limits are in use by 139 // existing resources. 140 // If "region" is specified, then this request will remove region specific 141 // overrides only. Note that this will not be self approved if this would 142 // result in increased value of limits. 143 message Unassign { 144 string assignment = 1; 145 146 string region = 2; 147 } 148 149 reserved 3; 150 } 151 }