Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions crates/client/src/grpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1680,6 +1680,16 @@ proxier! {
(delete_connectivity_rule, cloudreq::DeleteConnectivityRuleRequest, cloudreq::DeleteConnectivityRuleResponse);
(set_service_account_namespace_access, cloudreq::SetServiceAccountNamespaceAccessRequest, cloudreq::SetServiceAccountNamespaceAccessResponse);
(validate_account_audit_log_sink, cloudreq::ValidateAccountAuditLogSinkRequest, cloudreq::ValidateAccountAuditLogSinkResponse);
(get_current_identity, cloudreq::GetCurrentIdentityRequest, cloudreq::GetCurrentIdentityResponse);
(get_audit_logs, cloudreq::GetAuditLogsRequest, cloudreq::GetAuditLogsResponse);
(create_account_audit_log_sink, cloudreq::CreateAccountAuditLogSinkRequest, cloudreq::CreateAccountAuditLogSinkResponse);
(get_account_audit_log_sink, cloudreq::GetAccountAuditLogSinkRequest, cloudreq::GetAccountAuditLogSinkResponse);
(get_account_audit_log_sinks, cloudreq::GetAccountAuditLogSinksRequest, cloudreq::GetAccountAuditLogSinksResponse);
(update_account_audit_log_sink, cloudreq::UpdateAccountAuditLogSinkRequest, cloudreq::UpdateAccountAuditLogSinkResponse);
(delete_account_audit_log_sink, cloudreq::DeleteAccountAuditLogSinkRequest, cloudreq::DeleteAccountAuditLogSinkResponse);
(get_namespace_capacity_info, cloudreq::GetNamespaceCapacityInfoRequest, cloudreq::GetNamespaceCapacityInfoResponse);
(create_billing_report, cloudreq::CreateBillingReportRequest, cloudreq::CreateBillingReportResponse);
(get_billing_report, cloudreq::GetBillingReportRequest, cloudreq::GetBillingReportResponse);
}

proxier! {
Expand Down
2 changes: 1 addition & 1 deletion crates/common/protos/api_cloud_upstream/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ grpc-install:

openapiv2-install:
printf $(COLOR) "Install/update openapiv2 protoc gen..."
go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@v2.16.2
go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@v2.26.3

##### Linters #####
buf-lint:
Expand Down
2 changes: 1 addition & 1 deletion crates/common/protos/api_cloud_upstream/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.8.0
v0.12.0
1 change: 1 addition & 0 deletions crates/common/protos/api_cloud_upstream/buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ plugins:
opt:
- output_format=yaml
- allow_delete_body
- disable_service_tags=true
9 changes: 7 additions & 2 deletions crates/common/protos/api_cloud_upstream/buf.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ deps:
- remote: buf.build
owner: googleapis
repository: googleapis
commit: e93e34f48be043dab55be31b4b47f458
digest: shake256:93dbe51c27606999eef918360df509485a4d272e79aaed6d0016940379a9b06d316fc5228b7b50cca94bb310f34c5fc5955ce7474f655f0d0a224c4121dda3c1
commit: 72c8614f3bd0466ea67931ef2c43d608
digest: shake256:b3ac4d383db09f92ab0ca85d12bff8c49eddf7031bd3a854c260b6ac4ed6a2bb85b52b3393c316d28f8038bf3b8e70cb3d16470e8cc4423007678fb6d89d36d4
- remote: buf.build
owner: grpc-ecosystem
repository: grpc-gateway
commit: 4c5ba75caaf84e928b7137ae5c18c26a
digest: shake256:e174ad9408f3e608f6157907153ffec8d310783ee354f821f57178ffbeeb8faa6bb70b41b61099c1783c82fe16210ebd1279bc9c9ee6da5cffba9f0e675b8b99
- remote: buf.build
owner: temporalio
repository: api
Expand Down
1 change: 1 addition & 0 deletions crates/common/protos/api_cloud_upstream/buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: buf.build/temporalio/cloud-api
deps:
- buf.build/googleapis/googleapis
- buf.build/temporalio/api:v1.43.0
- buf.build/grpc-ecosystem/grpc-gateway:v2.26.3

breaking:
use:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ option csharp_namespace = "Temporalio.Api.Cloud.Account.V1";

import "temporal/api/cloud/resource/v1/message.proto";
import "temporal/api/cloud/sink/v1/message.proto";
import "google/protobuf/timestamp.proto";

message MetricsSpec {
// The ca cert(s) in PEM format that clients connecting to the metrics endpoint can use for authentication.
Expand Down Expand Up @@ -62,3 +63,38 @@ message AuditLogSinkSpec {
// Enabled indicates whether the sink is enabled or not.
bool enabled = 4;
}

// AuditLogSink is only used by Audit Log
message AuditLogSink {
// Name of the sink e.g. "audit_log_01"
string name = 1;

// The version of the audit log sink resource.
string resource_version = 2;

// The current state of the audit log sink.
temporal.api.cloud.resource.v1.ResourceState state = 3;

// The specification details of the audit log sink.
AuditLogSinkSpec spec = 4;

// The health status of the audit log sink.
Health health = 5;

// An error message describing any issues with the audit log sink, if applicable.
string error_message = 6;

// The last succeeded timestamp for the internal workflow responsible for adding data to the sink.
google.protobuf.Timestamp last_succeeded_time = 7;

// The health status of the audit log sink.
enum Health {
HEALTH_UNSPECIFIED = 0;
// The audit log sink is healthy and functioning correctly.
HEALTH_OK = 1;
// The audit log sink has an internal error.
HEALTH_ERROR_INTERNAL = 2;
// The audit log sink has a configuration error.
HEALTH_ERROR_USER_CONFIGURATION = 3;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
syntax = "proto3";

package temporal.api.cloud.auditlog.v1;

option go_package = "go.temporal.io/api/cloud/auditlog/v1;auditlog";
option java_package = "io.temporal.api.cloud.auditlog.v1";
option java_multiple_files = true;
option java_outer_classname = "MessageProto";
option ruby_package = "Temporalio::Api::Cloud::AuditLog::V1";
option csharp_namespace = "Temporalio.Api.Cloud.AuditLog.V1";

import "google/protobuf/timestamp.proto";
import "google/protobuf/struct.proto";

// LogRecord represents an audit log entry from Temporal, structured for easy parsing and analysis.
message LogRecord {
// Time when the log was emitted.
google.protobuf.Timestamp emit_time = 1;

// The operation performed.
string operation = 5;

// The status of the operation.
string status = 7;

// The internal version of the log message. Can be used in deduplication if needed.
int32 version = 9;

// Unique ID for the log record.
string log_id = 10;

// The principal that performed the operation.
Principal principal = 12;

// The raw details of the operation.
google.protobuf.Struct raw_details = 13;

// The originating IP address of the request.
string x_forwarded_for = 14;

// The ID of the async operation.
string async_operation_id = 15;
}

message Principal {
// The type of the principal.
// Possible type values: user, serviceaccount.
string type = 1;

// The id of the principal.
string id = 2;

// The name of the principal.
string name = 3;

// The api key id of the principal if provided.
string api_key_id = 4;
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
syntax = "proto3";

package temporal.api.cloud.billing.v1;

option go_package = "go.temporal.io/api/cloud/billing/v1;billing";
option java_package = "io.temporal.api.cloud.billing.v1";
option java_multiple_files = true;
option java_outer_classname = "MessageProto";
option ruby_package = "Temporalio::Api::Cloud::Billing::V1";
option csharp_namespace = "Temporalio.Api.Cloud.Billing.V1";

import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";

message BillingReportSpec {
// The start time of the billing report (in UTC).
google.protobuf.Timestamp start_time_inclusive = 1;
// The end time of the billing report (in UTC).
google.protobuf.Timestamp end_time_exclusive = 2;
// The duration after which the download url will expire.
// Optional, default is 5 minutes and maximum is 1 hour.
google.protobuf.Duration download_url_expiration_duration = 3;
// The description for the billing report.
// Optional, default is empty.
string description = 4;
}

message BillingReport {
// The id of the billing report.
string id = 1;
// The current state of the billing report.
BillingReportState state = 2;
// The spec used to generate this billing report.
BillingReportSpec spec = 3;
// The download information for the billing report.
// For future-proofness this is repeated as we may return multiple files (e.g. csv+meta/json, split by size/date, etc.)
repeated Download download_info = 4;
// The date and time when the billing report was requested.
google.protobuf.Timestamp requested_time = 5;
// The date and time when the billing report generation completed.
google.protobuf.Timestamp generated_time = 6;
// The async operation id associated with the billing report generation.
string async_operation_id = 7;

message Download {
// The download url.
string url = 1;
// The time when the download url will expire.
google.protobuf.Timestamp url_expiration_time = 2;
// The file format of the billing report
FileFormat file_format = 3;
// The size of the file in bytes. Useful for pre-allocating space, progress indicators, etc.
int64 file_size_bytes = 4;

enum FileFormat {
FILE_FORMAT_UNSPECIFIED = 0;
FILE_FORMAT_CSV = 1;
}
}

enum BillingReportState {
BILLING_REPORT_STATE_UNSPECIFIED = 0;
BILLING_REPORT_STATE_IN_PROGRESS = 1;
BILLING_REPORT_STATE_GENERATED = 2;
BILLING_REPORT_STATE_FAILED = 3;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,23 @@ import "temporal/api/cloud/region/v1/message.proto";
import "temporal/api/cloud/account/v1/message.proto";
import "temporal/api/cloud/usage/v1/message.proto";
import "temporal/api/cloud/connectivityrule/v1/message.proto";
import "temporal/api/cloud/auditlog/v1/message.proto";
import "temporal/api/cloud/billing/v1/message.proto";

message GetCurrentIdentityRequest {
}

message GetCurrentIdentityResponse {
// The authenticated principal making the request
oneof principal {
// The user is a regular user
temporal.api.cloud.identity.v1.User user = 1;
// The user is a service account
temporal.api.cloud.identity.v1.ServiceAccount service_account = 2;
}
// The API key info used to authenticate the request, if any
temporal.api.cloud.identity.v1.ApiKey principal_api_key = 3;
}

message GetUsersRequest {
// The requested size of the page to retrieve - optional.
Expand Down Expand Up @@ -307,6 +324,7 @@ message GetApiKeysRequest {
string owner_id = 3;
// Filter api keys by owner type - optional.
// Possible values: user, service-account
// temporal:versioning:max_version=v0.3.0
string owner_type_deprecated = 4 [deprecated = true];
// Filter api keys by owner type - optional.
// temporal:enums:replaces=owner_type_deprecated
Expand Down Expand Up @@ -948,10 +966,131 @@ message DeleteConnectivityRuleResponse {
temporal.api.cloud.operation.v1.AsyncOperation async_operation = 1;
}

message GetAuditLogsRequest {
// The requested size of the page to retrieve - optional.
// Cannot exceed 1000. Defaults to 100.
int32 page_size = 1;
// The page token if this is continuing from another response - optional.
string page_token = 2;
// Filter for UTC time >= (defaults to 30 days ago) - optional.
google.protobuf.Timestamp start_time_inclusive = 3;
// Filter for UTC time < (defaults to current time) - optional.
google.protobuf.Timestamp end_time_exclusive = 4;
}

message GetAuditLogsResponse {
// The list of audit logs ordered by emit time, log_id
repeated temporal.api.cloud.auditlog.v1.LogRecord logs = 1;
// The next page's token.
string next_page_token = 2;
}

message ValidateAccountAuditLogSinkRequest {
// The audit log sink spec that will be validated
temporal.api.cloud.account.v1.AuditLogSinkSpec spec = 1;
}

message ValidateAccountAuditLogSinkResponse {
}

message CreateAccountAuditLogSinkRequest {
// The specification for the audit log sink.
temporal.api.cloud.account.v1.AuditLogSinkSpec spec = 1;
// Optional. The ID to use for this async operation.
string async_operation_id = 2;
}

message CreateAccountAuditLogSinkResponse {
// The async operation.
temporal.api.cloud.operation.v1.AsyncOperation async_operation = 1;
}

message GetAccountAuditLogSinkRequest {
// The name of the sink to retrieve.
string name = 1;
}

message GetAccountAuditLogSinkResponse {
// The audit log sink retrieved.
temporal.api.cloud.account.v1.AuditLogSink sink = 1;
}

message GetAccountAuditLogSinksRequest {
// The requested size of the page to retrieve. Cannot exceed 1000.
// Defaults to 100 if not specified.
int32 page_size = 1;
// The page token if this is continuing from another response - optional.
string page_token = 2;
}

message GetAccountAuditLogSinksResponse {
// The list of audit log sinks retrieved.
repeated temporal.api.cloud.account.v1.AuditLogSink sinks = 1;
// The next page token, set if there is another page.
string next_page_token = 2;
}

message UpdateAccountAuditLogSinkRequest {
// The updated audit log sink specification.
temporal.api.cloud.account.v1.AuditLogSinkSpec spec = 1;
// The version of the audit log sink to update. The latest version can be
// retrieved using the GetAuditLogSink call.
string resource_version = 2;
// The ID to use for this async operation - optional.
string async_operation_id = 3;
}

message UpdateAccountAuditLogSinkResponse {
// The async operation.
temporal.api.cloud.operation.v1.AsyncOperation async_operation = 1;
}

message DeleteAccountAuditLogSinkRequest {
// The name of the sink to delete.
string name = 1;
// The version of the sink to delete. The latest version can be
// retrieved using the GetAccountAuditLogSink call.
string resource_version = 2;
// The ID to use for this async operation - optional.
string async_operation_id = 3;
}

message DeleteAccountAuditLogSinkResponse {
// The async operation.
temporal.api.cloud.operation.v1.AsyncOperation async_operation = 1;
}

message GetNamespaceCapacityInfoRequest {
// The namespace identifier.
// Required.
string namespace = 1;
}

message GetNamespaceCapacityInfoResponse {
// Capacity information for the namespace.
temporal.api.cloud.namespace.v1.NamespaceCapacityInfo capacity_info = 1;
}

message CreateBillingReportRequest {
// The specification for the billing report.
temporal.api.cloud.billing.v1.BillingReportSpec spec = 1;
// Optional, if not provided a random id will be generated.
string async_operation_id = 2;
}

message CreateBillingReportResponse {
// The id of the billing report created.
string billing_report_id = 1;
// The async operation.
temporal.api.cloud.operation.v1.AsyncOperation async_operation = 2;
}

message GetBillingReportRequest {
// The id of the billing report to retrieve.
string billing_report_id = 1;
}

message GetBillingReportResponse {
// The billing report retrieved.
temporal.api.cloud.billing.v1.BillingReport billing_report = 1;
}
Loading
Loading