Skip to content

Commit 56fd793

Browse files
Adding Capacity Structs for Cloud Namespace
1 parent 24f5a5b commit 56fd793

File tree

1 file changed

+102
-16
lines changed

1 file changed

+102
-16
lines changed

temporal/api/cloud/namespace/v1/message.proto

Lines changed: 102 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,13 @@ message MtlsAuthSpec {
3434
// This must only be one value, but the CA can have a chain.
3535
//
3636
// (-- api-linter: core::0140::base64=disabled --)
37-
// Deprecated: Not supported after v0.2.0 api version. Use accepted_client_ca instead.
37+
// Deprecated: Use accepted_client_ca instead. Will be ignored when accepted_client_ca is set.
3838
// temporal:versioning:max_version=v0.2.0
3939
string accepted_client_ca_deprecated = 1 [deprecated = true];
4040
// The ca cert(s) in PEM format that the clients can use for authentication and authorization.
4141
// This must only be one value, but the CA can have a chain.
4242
// temporal:versioning:min_version=v0.2.0
43+
// temporal:codegen:ignore
4344
bytes accepted_client_ca = 4;
4445
// Certificate filters which, if specified, only allow connections from client certificates whose distinguished name properties match at least one of the filters.
4546
// This allows limiting access to specific end-entity certificates.
@@ -57,6 +58,11 @@ message ApiKeyAuthSpec {
5758
bool enabled = 1;
5859
}
5960

61+
message LifecycleSpec {
62+
// Flag to enable delete protection for the namespace.
63+
bool enable_delete_protection = 1;
64+
}
65+
6066
message CodecServerSpec {
6167
// The codec server endpoint.
6268
string endpoint = 1;
@@ -81,16 +87,78 @@ message CodecServerSpec {
8187
}
8288
}
8389

84-
message LifecycleSpec {
85-
// Flag to enable delete protection for the namespace.
86-
bool enable_delete_protection = 1;
87-
}
88-
8990
message HighAvailabilitySpec {
9091
// Flag to disable managed failover for the namespace.
9192
bool disable_managed_failover = 1;
9293
}
9394

95+
96+
// temporal:dev
97+
message CapacitySpec {
98+
oneof spec {
99+
// on-demand capacity (dynamic-envelope)
100+
OnDemand on_demand = 1;
101+
// provisioned capacity
102+
Provisioned provisioned = 2;
103+
}
104+
105+
message OnDemand {
106+
}
107+
108+
message Provisioned {
109+
// the unit of the provisioned capacity (Temporal Resource Units)
110+
double value = 1;
111+
}
112+
}
113+
114+
// temporal:dev
115+
message Capacity {
116+
117+
// temporal:dev
118+
oneof current_mode {
119+
// the current capacity is on-demand
120+
OnDemand on_demand = 1;
121+
// the current capacity is provisioned
122+
Provisioned provisioned = 2;
123+
}
124+
125+
// temporal:dev
126+
message OnDemand {
127+
}
128+
129+
// temporal:dev
130+
message Provisioned {
131+
// the current unit of the provisioned capacity (Temporal Resource Units)
132+
double current_value = 1;
133+
}
134+
135+
// temporal:dev
136+
message Request {
137+
// the current state of the capacity request (e.g. in-progress, completed, failed)
138+
State state = 1;
139+
// The date and time when the capacity request was created.
140+
google.protobuf.Timestamp start_time = 2;
141+
// The date and time when the capacity request was completed or failed.
142+
google.protobuf.Timestamp end_time = 3;
143+
// The id of the async operation that is creating/updating/deleting the capacity, if any.
144+
string async_operation_id = 4;
145+
// The requested capacity specification.
146+
CapacitySpec spec = 5;
147+
148+
// temporal:dev
149+
enum State {
150+
STATE_CAPACITY_REQUEST_UNSPECIFIED = 0;
151+
STATE_CAPACITY_REQUEST_COMPLETED = 1;
152+
STATE_CAPACITY_REQUEST_IN_PROGRESS = 2;
153+
STATE_CAPACITY_REQUEST_FAILED = 3;
154+
}
155+
}
156+
157+
// temporal:dev
158+
// The latest capacity request, if any.
159+
Request latest_request = 3;
160+
}
161+
94162
message NamespaceSpec {
95163
// The name to use for the namespace.
96164
// This will create a namespace that's available at '<name>.<account>.tmprl.cloud:7233'.
@@ -121,7 +189,7 @@ message NamespaceSpec {
121189
// Supported attribute types: text, keyword, int, double, bool, datetime, keyword_list.
122190
// NOTE: currently deleting a search attribute is not supported.
123191
// Optional, default is empty.
124-
// Deprecated: Not supported after v0.3.0 api version. Use search_attributes instead.
192+
// Deprecated: Use search_attributes instead.
125193
// temporal:versioning:max_version=v0.3.0
126194
map<string, string> custom_search_attributes = 5 [deprecated = true];
127195
// The custom search attributes to use for the namespace.
@@ -134,17 +202,23 @@ message NamespaceSpec {
134202
// Codec server spec used by UI to decode payloads for all users interacting with this namespace.
135203
// Optional, default is unset.
136204
CodecServerSpec codec_server = 6;
205+
137206
// The lifecycle configuration for the namespace.
138207
// temporal:versioning:min_version=v0.4.0
139208
LifecycleSpec lifecycle = 9;
209+
140210
// The high availability configuration for the namespace.
141211
// temporal:versioning:min_version=v0.4.0
142212
HighAvailabilitySpec high_availability = 10;
143-
// The private connectivity configuration for the namespace.
144-
// This will apply the connectivity rules specified to the namespace.
213+
214+
// The existing connectivity rule ids for the namespace.
145215
// temporal:versioning:min_version=v0.6.0
146216
repeated string connectivity_rule_ids = 11;
147217

218+
// The capacity configuration for the namespace.
219+
// temporal:versioning:min_version=development
220+
// temporal:dev
221+
CapacitySpec capacity_spec = 12;
148222

149223
enum SearchAttributeType {
150224
SEARCH_ATTRIBUTE_TYPE_UNSPECIFIED = 0;
@@ -171,6 +245,12 @@ message Limits {
171245
// The number of actions per second (APS) that is currently allowed for the namespace.
172246
// The namespace may be throttled if its APS exceeds the limit.
173247
int32 actions_per_second_limit = 1;
248+
// The number of requests per second (RPS) that is currently allowed for the namespace.
249+
// temporal:dev
250+
int32 requests_per_second_limit = 2;
251+
// The number of concurrent task pollers allowed for the namespace.
252+
// temporal:dev
253+
int32 concurrent_task_poller_limit = 3;
174254
}
175255

176256
message AWSPrivateLinkInfo {
@@ -198,7 +278,7 @@ message Namespace {
198278
// The namespace specification.
199279
NamespaceSpec spec = 3;
200280
// The current state of the namespace.
201-
// Deprecated: Not supported after v0.3.0 api version. Use state instead.
281+
// Deprecated: Use state instead.
202282
// temporal:versioning:max_version=v0.3.0
203283
string state_deprecated = 4 [deprecated = true];
204284
// The current state of the namespace.
@@ -224,17 +304,22 @@ message Namespace {
224304
// The status of each region where the namespace is available.
225305
// The id of the region is the key and the status is the value of the map.
226306
map<string, NamespaceRegionStatus> region_status = 12;
227-
// The connectivity rules that are set on this namespace.
307+
// connectivity_rules that set on this namespace
228308
repeated temporal.api.cloud.connectivityrule.v1.ConnectivityRule connectivity_rules = 14;
309+
229310
// The tags for the namespace.
230311
map<string, string> tags = 15;
312+
313+
// The capacity of the namespace.
314+
// temporal:dev
315+
Capacity capacity = 16;
231316
}
232317

233318
message NamespaceRegionStatus {
234319
// The current state of the namespace region.
235320
// Possible values: adding, active, passive, removing, failed.
236321
// For any failed state, reach out to Temporal Cloud support for remediation.
237-
// Deprecated: Not supported after v0.3.0 api version. Use state instead.
322+
// Deprecated: Use state instead.
238323
// temporal:versioning:max_version=v0.3.0
239324
string state_deprecated = 1 [deprecated = true];
240325
// The current state of the namespace region.
@@ -255,21 +340,22 @@ message NamespaceRegionStatus {
255340
}
256341

257342
message ExportSinkSpec {
258-
// The unique name of the export sink, it can't be changed once set.
343+
// The unique name of the export sink.
259344
string name = 1;
260345

261346
// A flag indicating whether the export sink is enabled or not.
262347
bool enabled = 2;
263-
348+
264349
// The S3 configuration details when destination_type is S3.
265350
temporal.api.cloud.sink.v1.S3Spec s3 = 3;
266351

267-
// The GCS configuration details when destination_type is GCS.
352+
// This is a feature under development. We will allow GCS sink support for GCP Namespaces.
353+
// The GCS configuration details when destination_type is GCS.
268354
temporal.api.cloud.sink.v1.GCSSpec gcs = 4;
269355
}
270356

271357
message ExportSink {
272-
// The unique name of the export sink.
358+
// The unique name of the export sink, once set it can't be changed
273359
string name = 1;
274360

275361
// The version of the export sink resource.

0 commit comments

Comments
 (0)