-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* init checkin * fixes stuff * fix build break * more changes * change endpoint_id --> id * more changes * more changes * more changes * address some of comments * more changes * more changes * remove /update suffix * more changes * more changes * more changes * changes * Sync Nexus Cloud API (#40) - Update endpoint name regex - Add endpoint description - Rename CloudWorkerTargetSpec to WorkerTargetSpec - Add next_page_token to GetNexusEndpointsResponse - Group nexus related request and responses together. * Remove /api/v1 prefix for HTTP paths * Fix spacing. * Nexus enum and oneof changes --------- Co-authored-by: nikki-dag <[email protected]> Co-authored-by: Nikki Dag <[email protected]>
- Loading branch information
1 parent
ad43975
commit 0a01b74
Showing
4 changed files
with
237 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
syntax = "proto3"; | ||
|
||
package temporal.api.cloud.nexus.v1; | ||
|
||
option go_package = "go.temporal.io/api/cloud/nexus/v1;nexus"; | ||
|
||
import "temporal/api/cloud/resource/v1/message.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
|
||
message EndpointSpec { | ||
// The name of the endpoint. Must be unique within an account. | ||
// The name must match `^[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9]$`. | ||
// This field is mutable. | ||
string name = 1; | ||
|
||
// Indicates where the endpoint should forward received nexus requests to. | ||
EndpointTargetSpec target_spec = 2; | ||
|
||
// The set of policies (e.g. authorization) for the endpoint. Each request's caller | ||
// must match with at least one of the specs to be accepted by the endpoint. | ||
// This field is mutable. | ||
repeated EndpointPolicySpec policy_specs = 3; | ||
|
||
// The markdown description of the endpoint - optional. | ||
string description = 4; | ||
} | ||
|
||
message EndpointTargetSpec { | ||
oneof variant { | ||
// A target spec for routing nexus requests to a specific cloud namespace worker. | ||
WorkerTargetSpec worker_target_spec = 1; | ||
} | ||
} | ||
|
||
message WorkerTargetSpec { | ||
// The target cloud namespace to route requests to. Namespace must be in same account as the endpoint. This field is mutable. | ||
string namespace_id = 1; | ||
|
||
// The task queue on the cloud namespace to route requests to. This field is mutable. | ||
string task_queue = 2; | ||
} | ||
|
||
message EndpointPolicySpec { | ||
oneof variant { | ||
// A policy spec that allows one caller namespace to access the endpoint. | ||
AllowedCloudNamespacePolicySpec allowed_cloud_namespace_policy_spec = 1; | ||
} | ||
} | ||
|
||
message AllowedCloudNamespacePolicySpec { | ||
// The namespace that is allowed to call into this endpoint. Calling namespace must be in same account as the endpoint. | ||
string namespace_id = 1; | ||
} | ||
|
||
// An endpoint that receives and then routes Nexus requests | ||
message Endpoint { | ||
// The id of the endpoint. This is generated by the server and is immutable. | ||
string id = 1; | ||
|
||
// The current version of the endpoint specification. | ||
// The next update operation must include this version. | ||
string resource_version = 2; | ||
|
||
// The endpoint specification. | ||
EndpointSpec spec = 3; | ||
|
||
// The current state of the endpoint. | ||
// For any failed state, reach out to Temporal Cloud support for remediation. | ||
temporal.api.cloud.resource.v1.ResourceState state = 4; | ||
|
||
// The id of any ongoing async operation that is creating, updating, or deleting the endpoint, if any. | ||
string async_operation_id = 5; | ||
|
||
// The date and time when the endpoint was created. | ||
google.protobuf.Timestamp created_time = 6; | ||
|
||
// The date and time when the endpoint was last modified. | ||
google.protobuf.Timestamp last_modified_time = 7; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
syntax = "proto3"; | ||
|
||
package temporal.api.cloud.resource.v1; | ||
|
||
option go_package = "go.temporal.io/api/cloud/resource/v1;resource"; | ||
option java_package = "io.temporal.api.cloud.resource.v1"; | ||
option java_multiple_files = true; | ||
option java_outer_classname = "MessageProto"; | ||
option ruby_package = "Temporalio::Api::Cloud::Resource::V1"; | ||
option csharp_namespace = "Temporalio.Api.Cloud.Resource.V1"; | ||
|
||
|
||
enum ResourceState { | ||
RESOURCE_STATE_UNSPECIFIED = 0; | ||
RESOURCE_STATE_ACTIVATING = 1; // The resource is being activated. | ||
RESOURCE_STATE_ACTIVATION_FAILED = 2; // The resource failed to activate. This is an error state. Reach out to support for remediation. | ||
RESOURCE_STATE_ACTIVE = 3; // The resource is active and ready to use. | ||
RESOURCE_STATE_UPDATING = 4; // The resource is being updated. | ||
RESOURCE_STATE_UPDATE_FAILED = 5; // The resource failed to update. This is an error state. Reach out to support for remediation. | ||
RESOURCE_STATE_DELETING = 6; // The resource is being deleted. | ||
RESOURCE_STATE_DELETE_FAILED = 7; // The resource failed to delete. This is an error state. Reach out to support for remediation. | ||
RESOURCE_STATE_DELETED = 8; // The resource has been deleted. | ||
RESOURCE_STATE_SUSPENDED = 9; // The resource is suspended and not available for use. Reach out to support for remediation. | ||
RESOURCE_STATE_EXPIRED = 10; // The resource has expired and is no longer available for use. | ||
} |