Skip to content

Commit 51c120c

Browse files
authored
Bump cloud-api to v0.8.0 (#1052)
* proto changes * lib.rs changes * fmt
1 parent eadc5cd commit 51c120c

File tree

8 files changed

+119
-22
lines changed

8 files changed

+119
-22
lines changed

crates/client/src/raw.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,6 +1575,8 @@ proxier! {
15751575
(get_connectivity_rule, cloudreq::GetConnectivityRuleRequest, cloudreq::GetConnectivityRuleResponse);
15761576
(get_connectivity_rules, cloudreq::GetConnectivityRulesRequest, cloudreq::GetConnectivityRulesResponse);
15771577
(delete_connectivity_rule, cloudreq::DeleteConnectivityRuleRequest, cloudreq::DeleteConnectivityRuleResponse);
1578+
(set_service_account_namespace_access, cloudreq::SetServiceAccountNamespaceAccessRequest, cloudreq::SetServiceAccountNamespaceAccessResponse);
1579+
(validate_account_audit_log_sink, cloudreq::ValidateAccountAuditLogSinkRequest, cloudreq::ValidateAccountAuditLogSinkResponse);
15781580
}
15791581

15801582
proxier! {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.7.1
1+
v0.8.0

crates/common/protos/api_cloud_upstream/temporal/api/cloud/account/v1/message.proto

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ option ruby_package = "Temporalio::Api::Cloud::Account::V1";
1010
option csharp_namespace = "Temporalio.Api.Cloud.Account.V1";
1111

1212
import "temporal/api/cloud/resource/v1/message.proto";
13+
import "temporal/api/cloud/sink/v1/message.proto";
1314

1415
message MetricsSpec {
1516
// The ca cert(s) in PEM format that clients connecting to the metrics endpoint can use for authentication.
@@ -44,3 +45,20 @@ message Account {
4445
// Information related to metrics.
4546
Metrics metrics = 6;
4647
}
48+
49+
// AuditLogSinkSpec is only used by Audit Log
50+
message AuditLogSinkSpec {
51+
// Name of the sink e.g. "audit_log_01"
52+
string name = 1;
53+
54+
oneof sink_type {
55+
// The KinesisSpec when destination_type is Kinesis
56+
api.cloud.sink.v1.KinesisSpec kinesis_sink = 2;
57+
58+
// The PubSubSpec when destination_type is PubSub
59+
api.cloud.sink.v1.PubSubSpec pub_sub_sink = 3;
60+
}
61+
62+
// Enabled indicates whether the sink is enabled or not.
63+
bool enabled = 4;
64+
}

crates/common/protos/api_cloud_upstream/temporal/api/cloud/cloudservice/v1/request_response.proto

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import "temporal/api/cloud/connectivityrule/v1/message.proto";
2222

2323
message GetUsersRequest {
2424
// The requested size of the page to retrieve - optional.
25-
// Cannot exceed 1000. Defaults to 100.
25+
// Cannot exceed 1000. Defaults to 100.
2626
int32 page_size = 1;
2727
// The page token if this is continuing from another response - optional.
2828
string page_token = 2;
@@ -144,8 +144,8 @@ message CreateNamespaceResponse {
144144

145145
message GetNamespacesRequest {
146146
// The requested size of the page to retrieve.
147-
// Cannot exceed 1000.
148-
// Optional, defaults to 100.
147+
// Cannot exceed 1000.
148+
// Optional, defaults to 100.
149149
int32 page_size = 1;
150150
// The page token if this is continuing from another response.
151151
// Optional, defaults to empty.
@@ -387,7 +387,7 @@ message DeleteApiKeyResponse {
387387

388388
message GetNexusEndpointsRequest {
389389
// The requested size of the page to retrieve - optional.
390-
// Cannot exceed 1000. Defaults to 100.
390+
// Cannot exceed 1000. Defaults to 100.
391391
int32 page_size = 1;
392392

393393
// The page token if this is continuing from another response - optional.
@@ -694,6 +694,25 @@ message UpdateServiceAccountResponse {
694694
temporal.api.cloud.operation.v1.AsyncOperation async_operation = 1;
695695
}
696696

697+
message SetServiceAccountNamespaceAccessRequest {
698+
// The ID of the service account to update.
699+
string service_account_id = 1;
700+
// The namespace to set permissions for.
701+
string namespace = 2;
702+
// The namespace access to assign the service account.
703+
temporal.api.cloud.identity.v1.NamespaceAccess access = 3;
704+
// The version of the service account for which this update is intended for.
705+
// The latest version can be found in the GetServiceAccount response.
706+
string resource_version = 4;
707+
// The ID to use for this async operation - optional.
708+
string async_operation_id = 5;
709+
}
710+
711+
message SetServiceAccountNamespaceAccessResponse {
712+
// The async operation.
713+
temporal.api.cloud.operation.v1.AsyncOperation async_operation = 1;
714+
}
715+
697716
message DeleteServiceAccountRequest {
698717
// The ID of the service account to delete;
699718
string service_account_id = 1;
@@ -715,18 +734,18 @@ message GetUsageRequest {
715734
// Must be: within the last 90 days from the current date.
716735
// Must be: midnight UTC time.
717736
google.protobuf.Timestamp start_time_inclusive = 1;
718-
737+
719738
// Filter for UTC time < - optional.
720739
// Defaults to: start of the next UTC day.
721740
// Must be: within the last 90 days from the current date.
722741
// Must be: midnight UTC time.
723742
google.protobuf.Timestamp end_time_exclusive = 2;
724-
743+
725744
// The requested size of the page to retrieve - optional.
726745
// Each count corresponds to a single object - per day per namespace
727746
// Cannot exceed 1000. Defaults to 100.
728747
int32 page_size = 3;
729-
748+
730749
// The page token if this is continuing from another response - optional.
731750
string page_token = 4;
732751
}
@@ -853,11 +872,11 @@ message ValidateNamespaceExportSinkResponse {
853872
message UpdateNamespaceTagsRequest {
854873
// The namespace to set tags for.
855874
string namespace = 1;
856-
// A list of tags to add or update.
857-
// If a key of an existing tag is added, the tag's value is updated.
875+
// A list of tags to add or update.
876+
// If a key of an existing tag is added, the tag's value is updated.
858877
// At least one of tags_to_upsert or tags_to_remove must be specified.
859878
map<string, string> tags_to_upsert = 2;
860-
// A list of tag keys to remove.
879+
// A list of tag keys to remove.
861880
// If a tag key doesn't exist, it is silently ignored.
862881
// At least one of tags_to_upsert or tags_to_remove must be specified.
863882
repeated string tags_to_remove = 3;
@@ -868,7 +887,7 @@ message UpdateNamespaceTagsRequest {
868887
message UpdateNamespaceTagsResponse {
869888
// The async operation.
870889
temporal.api.cloud.operation.v1.AsyncOperation async_operation = 1;
871-
}
890+
}
872891

873892
message CreateConnectivityRuleRequest {
874893
// The connectivity rule specification.
@@ -928,3 +947,11 @@ message DeleteConnectivityRuleResponse {
928947
// The async operation
929948
temporal.api.cloud.operation.v1.AsyncOperation async_operation = 1;
930949
}
950+
951+
message ValidateAccountAuditLogSinkRequest {
952+
// The audit log sink spec that will be validated
953+
temporal.api.cloud.account.v1.AuditLogSinkSpec spec = 1;
954+
}
955+
956+
message ValidateAccountAuditLogSinkResponse {
957+
}

crates/common/protos/api_cloud_upstream/temporal/api/cloud/cloudservice/v1/service.proto

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ service CloudService {
2121
get: "/cloud/users",
2222
};
2323
}
24-
24+
2525
// Get a user
2626
rpc GetUser(GetUserRequest) returns (GetUserResponse) {
2727
option (google.api.http) = {
@@ -192,7 +192,7 @@ service CloudService {
192192
get: "/cloud/nexus/endpoints",
193193
};
194194
}
195-
195+
196196
// Get a nexus endpoint
197197
rpc GetNexusEndpoint(GetNexusEndpointRequest) returns (GetNexusEndpointResponse) {
198198
option (google.api.http) = {
@@ -320,6 +320,14 @@ service CloudService {
320320
};
321321
}
322322

323+
// Set a service account's access to a namespace.
324+
rpc SetServiceAccountNamespaceAccess(SetServiceAccountNamespaceAccessRequest) returns (SetServiceAccountNamespaceAccessResponse) {
325+
option (google.api.http) = {
326+
post: "/cloud/namespaces/{namespace}/service-accounts/{service_account_id}/access",
327+
body: "*"
328+
};
329+
}
330+
323331
// Delete a service account.
324332
rpc DeleteServiceAccount(DeleteServiceAccountRequest) returns (DeleteServiceAccountResponse) {
325333
option (google.api.http) = {
@@ -358,7 +366,7 @@ service CloudService {
358366
};
359367
}
360368

361-
// Get an export sink
369+
// Get an export sink
362370
rpc GetNamespaceExportSink(GetNamespaceExportSinkRequest) returns (GetNamespaceExportSinkResponse) {
363371
option (google.api.http) = {
364372
get: "/cloud/namespaces/{namespace}/export-sinks/{name}"
@@ -432,4 +440,13 @@ service CloudService {
432440
delete: "/cloud/connectivity-rules/{connectivity_rule_id}"
433441
};
434442
}
435-
}
443+
444+
// Validate customer audit log sink is accessible from Temporal's workflow by delivering an empty file to the specified sink.
445+
// The operation verifies that the sink is correctly configured, accessible and ready to receive audit logs.
446+
rpc ValidateAccountAuditLogSink(ValidateAccountAuditLogSinkRequest) returns (ValidateAccountAuditLogSinkResponse) {
447+
option (google.api.http) = {
448+
post: "/cloud/account/audit-logs/sink/validate",
449+
body: "*"
450+
};
451+
}
452+
}

crates/common/protos/api_cloud_upstream/temporal/api/cloud/operation/v1/message.proto

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ message AsyncOperation {
4141
google.protobuf.Timestamp finished_time = 8;
4242

4343
enum State {
44-
STATE_UNSPECIFIED = 0;
45-
STATE_PENDING = 1; // The operation is pending.
46-
STATE_IN_PROGRESS = 2; // The operation is in progress.
47-
STATE_FAILED = 3; // The operation failed, check failure_reason for more details.
48-
STATE_CANCELLED = 4; // The operation was cancelled.
49-
STATE_FULFILLED = 5; // The operation was fulfilled.
44+
STATE_UNSPECIFIED = 0;
45+
STATE_PENDING = 1; // The operation is pending.
46+
STATE_IN_PROGRESS = 2; // The operation is in progress.
47+
STATE_FAILED = 3; // The operation failed, check failure_reason for more details.
48+
STATE_CANCELLED = 4; // The operation was cancelled.
49+
STATE_FULFILLED = 5; // The operation was fulfilled.
5050
STATE_REJECTED = 6; // The operation was rejected.
5151
}
5252
}

crates/common/protos/api_cloud_upstream/temporal/api/cloud/sink/v1/message.proto

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,26 @@ message GCSSpec {
3838

3939
// The region of the gcs bucket
4040
string region = 4;
41+
}
42+
43+
message KinesisSpec {
44+
// The role Temporal Cloud assumes when writing records to Kinesis
45+
string role_name = 1;
46+
47+
// Destination Kinesis endpoint arn for temporal to send data to.
48+
string destination_uri = 2;
49+
50+
// The sink's region.
51+
string region = 3;
52+
}
53+
54+
message PubSubSpec{
55+
// The customer service account id that Temporal Cloud impersonates for writing records to customer's pubsub topic
56+
string service_account_id = 1;
57+
58+
// Destination pubsub topic name for us
59+
string topic_name = 2;
60+
61+
// The gcp project id of pubsub topic and service account
62+
string gcp_project_id = 3;
4163
}

crates/sdk-core-c-bridge/src/client.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,6 +1058,17 @@ async fn call_cloud_service(client: &CoreClient, call: &RpcCallOptions) -> anyho
10581058
"DeleteConnectivityRule" => {
10591059
rpc_call_on_trait!(client, call, CloudService, delete_connectivity_rule)
10601060
}
1061+
"SetServiceAccountNamespaceAccess" => {
1062+
rpc_call_on_trait!(
1063+
client,
1064+
call,
1065+
CloudService,
1066+
set_service_account_namespace_access
1067+
)
1068+
}
1069+
"ValidateAccountAuditLogSink" => {
1070+
rpc_call_on_trait!(client, call, CloudService, validate_account_audit_log_sink)
1071+
}
10611072
rpc => Err(anyhow::anyhow!("Unknown RPC call {rpc}")),
10621073
}
10631074
}

0 commit comments

Comments
 (0)