Files
ZitPlane/auth/ui/v2/proto/zitadel/instance/v2/instance.proto
T

206 lines
6.3 KiB
Protocol Buffer

syntax = "proto3";
import "protoc-gen-openapiv2/options/annotations.proto";
import "zitadel/filter/v2/filter.proto";
import "zitadel/object/v2/object.proto";
import "validate/validate.proto";
import "google/protobuf/timestamp.proto";
package zitadel.instance.v2;
option go_package = "github.com/zitadel/zitadel/pkg/grpc/instance/v2;instance";
message Instance {
// ID is the unique identifier of the instance.
string id = 1 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"69629023906488334\""
}
];
// ChangeDate is the timestamp when the instance was last changed.
google.protobuf.Timestamp change_date = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"2025-01-23T10:34:18.051Z\"";
}
];
// CreationDate is the timestamp when the instance was created.
google.protobuf.Timestamp creation_date = 3 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"2025-01-23T10:34:18.051Z\"";
}
];
// State is the current state of the instance.
State state = 4;
// Name is the display name of the instance.
// This can be changed by the instance administrator.
string name = 5 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"ZITADEL\"";
}
];
// Version of the system the instance is running on.
// This is managed by the system and cannot be changed by the instance administrator.
string version = 6 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"1.0.0\"";
}
];
// CustomDomains are the domains that are assigned to the instance.
// The list includes auto-generated and manually added domains.
// They are all unique across all instances in the system.
// They're used to route requests to the correct instance.
repeated CustomDomain custom_domains = 7;
}
enum State {
STATE_UNSPECIFIED = 0;
STATE_CREATING = 1;
STATE_RUNNING = 2;
STATE_STOPPING = 3;
STATE_STOPPED = 4;
}
message CustomDomain {
// InstanceID is the unique identifier of the instance the domain belongs to.
string instance_id = 1;
// CreationDate is the timestamp when the domain was created.
google.protobuf.Timestamp creation_date = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"2025-01-23T10:34:18.051Z\"";
}
];
// Domain is the fully qualified domain name.
// It must be unique across all instances in the system.
string domain = 3 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"zitadel.com\""
}
];
// Primary states whether this domain is the primary domain of the instance.
// Each instance must have exactly one primary domain.
// The primary domain is used for various purposes and acts as fallback
// in those cases, e.g if no explicit domain is specified.
bool primary = 4;
// Generate states whether this domain was auto-generated by the system.
// Auto-generated domains follow a specific pattern and are created
// when a new instance is created.
// They cannot be deleted, but the primary domain can be changed
// to a manually added domain.
bool generated = 5;
}
enum FieldName {
FIELD_NAME_UNSPECIFIED = 0;
FIELD_NAME_ID = 1;
FIELD_NAME_NAME = 2;
FIELD_NAME_CREATION_DATE = 3;
}
message Filter {
oneof filter {
option (validate.required) = true;
// Filter for one or more specific instance IDs.
zitadel.filter.v2.InIDsFilter in_ids_filter = 1;
// Filter for instances that have at least one of the specified Custom Domains.
CustomDomainsFilter custom_domains_filter = 2;
}
}
message CustomDomainsFilter {
// The domains to query for. All instances that have at least one of the
// specified domains will be returned.
// A maximum of 20 domains can be specified.
repeated string domains = 1 [
(validate.rules).repeated = {max_items: 20, items: {string: {min_len: 1, max_len: 253}}},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
max_items: 20;
example: "[\"my-instace.zitadel.cloud\", \"auth.custom.com\"]";
}
];
}
message CustomDomainFilter {
oneof filter {
option (validate.required) = true;
// Filter for a specific Custom Domain.
DomainFilter domain_filter = 1;
// Filter whether the domain is auto-generated.
bool generated_filter = 2;
// Filter whether the domain is the primary domain of the instance.
bool primary_filter = 3;
}
}
message DomainFilter {
// The domain to filter for.
string domain = 1 [
(validate.rules).string = {max_len: 253},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
max_length: 253;
example: "\"zitadel.com\"";
}
];
// The method to use for text comparison.
// If not specified, EQUALS is used.
zitadel.object.v2.TextQueryMethod method = 2 [
(validate.rules).enum.defined_only = true
];
}
enum DomainFieldName {
DOMAIN_FIELD_NAME_UNSPECIFIED = 0;
DOMAIN_FIELD_NAME_DOMAIN = 1;
DOMAIN_FIELD_NAME_PRIMARY = 2;
DOMAIN_FIELD_NAME_GENERATED = 3;
DOMAIN_FIELD_NAME_CREATION_DATE = 4;
}
message TrustedDomain {
// InstanceID is the unique identifier of the instance the domain belongs to.
string instance_id = 1;
// The timestamp when the domain was created.
google.protobuf.Timestamp creation_date = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"2025-01-23T10:34:18.051Z\"";
}
];
// Domain is the fully qualified domain name.
string domain = 3 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"zitadel.com\""
}
];
}
message TrustedDomainFilter {
oneof filter {
option (validate.required) = true;
// Filter for a specific Trusted Domain.
DomainFilter domain_filter = 1;
}
}
enum TrustedDomainFieldName {
TRUSTED_DOMAIN_FIELD_NAME_UNSPECIFIED = 0;
TRUSTED_DOMAIN_FIELD_NAME_DOMAIN = 1;
TRUSTED_DOMAIN_FIELD_NAME_CREATION_DATE = 2;
}