diff --git a/.github/workflows/acc-test.yml b/.github/workflows/acc-test.yml index 83111ebf..bc852984 100644 --- a/.github/workflows/acc-test.yml +++ b/.github/workflows/acc-test.yml @@ -29,7 +29,6 @@ jobs: env: CORALOGIX_ENV: ${{ secrets.CORALOGIX_ENV }} CORALOGIX_API_KEY: ${{ secrets.CORALOGIX_API_KEY }} - CORALOGIX_ORG_KEY: ${{ secrets.CORALOGIX_ORG_KEY }} TEST_TEAM_ID: ${{ secrets.TEST_TEAM_ID }} run: | make testacc \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 849bc529..1e7a10d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -572,4 +572,11 @@ Breaking Changes: ## Release 1.15.1 New Features: #### resource/coralogix_alert -* adding `5Min` to `time_window` options for `unique_count` condition. \ No newline at end of file +* adding `5Min` to `time_window` options for `unique_count` condition. + +## Release 1.16.0 +Breaking Changes: +#### resource/coralogix_api_key +* Roles are replaced by "Presets" and "Permission" keys. Read more [here](https://coralogix.com/docs/api-keys/). + +Various documentation upgrades diff --git a/coralogix/clientset/grpc/apikeys/api_keys.pb.go b/coralogix/clientset/grpc/apikeys/api_keys.pb.go index d3fd21ec..8cd1691a 100644 --- a/coralogix/clientset/grpc/apikeys/api_keys.pb.go +++ b/coralogix/clientset/grpc/apikeys/api_keys.pb.go @@ -1,10 +1,10 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.25.1 -// source: api_keys.proto +// protoc-gen-go v1.34.1 +// protoc v5.26.1 +// source: com/coralogixapis/aaa/apikeys/v3/api_keys.proto -package __ +package v3 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -26,6 +26,7 @@ type Owner struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Owner: + // // *Owner_UserId // *Owner_TeamId // *Owner_OrganisationId @@ -35,7 +36,7 @@ type Owner struct { func (x *Owner) Reset() { *x = Owner{} if protoimpl.UnsafeEnabled { - mi := &file_api_keys_proto_msgTypes[0] + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -48,7 +49,7 @@ func (x *Owner) String() string { func (*Owner) ProtoMessage() {} func (x *Owner) ProtoReflect() protoreflect.Message { - mi := &file_api_keys_proto_msgTypes[0] + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -61,7 +62,7 @@ func (x *Owner) ProtoReflect() protoreflect.Message { // Deprecated: Use Owner.ProtoReflect.Descriptor instead. func (*Owner) Descriptor() ([]byte, []int) { - return file_api_keys_proto_rawDescGZIP(), []int{0} + return file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_rawDescGZIP(), []int{0} } func (m *Owner) GetOwner() isOwner_Owner { @@ -119,17 +120,18 @@ type KeyInfo struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Owner *Owner `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` - Active bool `protobuf:"varint,3,opt,name=active,proto3" json:"active,omitempty"` - Hashed bool `protobuf:"varint,4,opt,name=hashed,proto3" json:"hashed,omitempty"` - Roles []string `protobuf:"bytes,5,rep,name=roles,proto3" json:"roles,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Owner *Owner `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` + Active bool `protobuf:"varint,3,opt,name=active,proto3" json:"active,omitempty"` + Hashed bool `protobuf:"varint,4,opt,name=hashed,proto3" json:"hashed,omitempty"` + KeyPermissions *KeyInfo_KeyPermissions `protobuf:"bytes,5,opt,name=key_permissions,json=keyPermissions,proto3" json:"key_permissions,omitempty"` + Value *string `protobuf:"bytes,6,opt,name=value,proto3,oneof" json:"value,omitempty"` } func (x *KeyInfo) Reset() { *x = KeyInfo{} if protoimpl.UnsafeEnabled { - mi := &file_api_keys_proto_msgTypes[1] + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -142,7 +144,7 @@ func (x *KeyInfo) String() string { func (*KeyInfo) ProtoMessage() {} func (x *KeyInfo) ProtoReflect() protoreflect.Message { - mi := &file_api_keys_proto_msgTypes[1] + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -155,7 +157,7 @@ func (x *KeyInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use KeyInfo.ProtoReflect.Descriptor instead. func (*KeyInfo) Descriptor() ([]byte, []int) { - return file_api_keys_proto_rawDescGZIP(), []int{1} + return file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_rawDescGZIP(), []int{1} } func (x *KeyInfo) GetName() string { @@ -186,9 +188,71 @@ func (x *KeyInfo) GetHashed() bool { return false } -func (x *KeyInfo) GetRoles() []string { +func (x *KeyInfo) GetKeyPermissions() *KeyInfo_KeyPermissions { if x != nil { - return x.Roles + return x.KeyPermissions + } + return nil +} + +func (x *KeyInfo) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value + } + return "" +} + +type PresetInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Permissions []string `protobuf:"bytes,2,rep,name=permissions,proto3" json:"permissions,omitempty"` +} + +func (x *PresetInfo) Reset() { + *x = PresetInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PresetInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PresetInfo) ProtoMessage() {} + +func (x *PresetInfo) ProtoReflect() protoreflect.Message { + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PresetInfo.ProtoReflect.Descriptor instead. +func (*PresetInfo) Descriptor() ([]byte, []int) { + return file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_rawDescGZIP(), []int{2} +} + +func (x *PresetInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PresetInfo) GetPermissions() []string { + if x != nil { + return x.Permissions } return nil } @@ -198,16 +262,17 @@ type UpdateApiKeyRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - KeyId string `protobuf:"bytes,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` - NewName *string `protobuf:"bytes,2,opt,name=new_name,json=newName,proto3,oneof" json:"new_name,omitempty"` - IsActive *bool `protobuf:"varint,3,opt,name=is_active,json=isActive,proto3,oneof" json:"is_active,omitempty"` - Roles *UpdateApiKeyRequest_Roles `protobuf:"bytes,4,opt,name=roles,proto3,oneof" json:"roles,omitempty"` + KeyId string `protobuf:"bytes,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` + NewName *string `protobuf:"bytes,2,opt,name=new_name,json=newName,proto3,oneof" json:"new_name,omitempty"` + IsActive *bool `protobuf:"varint,3,opt,name=is_active,json=isActive,proto3,oneof" json:"is_active,omitempty"` + Presets *UpdateApiKeyRequest_Presets `protobuf:"bytes,4,opt,name=presets,proto3,oneof" json:"presets,omitempty"` + Permissions *UpdateApiKeyRequest_Permissions `protobuf:"bytes,5,opt,name=permissions,proto3,oneof" json:"permissions,omitempty"` } func (x *UpdateApiKeyRequest) Reset() { *x = UpdateApiKeyRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_keys_proto_msgTypes[2] + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -220,7 +285,7 @@ func (x *UpdateApiKeyRequest) String() string { func (*UpdateApiKeyRequest) ProtoMessage() {} func (x *UpdateApiKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_keys_proto_msgTypes[2] + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -233,7 +298,7 @@ func (x *UpdateApiKeyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateApiKeyRequest.ProtoReflect.Descriptor instead. func (*UpdateApiKeyRequest) Descriptor() ([]byte, []int) { - return file_api_keys_proto_rawDescGZIP(), []int{2} + return file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_rawDescGZIP(), []int{3} } func (x *UpdateApiKeyRequest) GetKeyId() string { @@ -257,9 +322,16 @@ func (x *UpdateApiKeyRequest) GetIsActive() bool { return false } -func (x *UpdateApiKeyRequest) GetRoles() *UpdateApiKeyRequest_Roles { +func (x *UpdateApiKeyRequest) GetPresets() *UpdateApiKeyRequest_Presets { if x != nil { - return x.Roles + return x.Presets + } + return nil +} + +func (x *UpdateApiKeyRequest) GetPermissions() *UpdateApiKeyRequest_Permissions { + if x != nil { + return x.Permissions } return nil } @@ -273,7 +345,7 @@ type UpdateApiKeyResponse struct { func (x *UpdateApiKeyResponse) Reset() { *x = UpdateApiKeyResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_keys_proto_msgTypes[3] + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -286,7 +358,7 @@ func (x *UpdateApiKeyResponse) String() string { func (*UpdateApiKeyResponse) ProtoMessage() {} func (x *UpdateApiKeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_keys_proto_msgTypes[3] + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -299,7 +371,7 @@ func (x *UpdateApiKeyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateApiKeyResponse.ProtoReflect.Descriptor instead. func (*UpdateApiKeyResponse) Descriptor() ([]byte, []int) { - return file_api_keys_proto_rawDescGZIP(), []int{3} + return file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_rawDescGZIP(), []int{4} } type DeleteApiKeyRequest struct { @@ -313,7 +385,7 @@ type DeleteApiKeyRequest struct { func (x *DeleteApiKeyRequest) Reset() { *x = DeleteApiKeyRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_keys_proto_msgTypes[4] + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -326,7 +398,7 @@ func (x *DeleteApiKeyRequest) String() string { func (*DeleteApiKeyRequest) ProtoMessage() {} func (x *DeleteApiKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_keys_proto_msgTypes[4] + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -339,7 +411,7 @@ func (x *DeleteApiKeyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteApiKeyRequest.ProtoReflect.Descriptor instead. func (*DeleteApiKeyRequest) Descriptor() ([]byte, []int) { - return file_api_keys_proto_rawDescGZIP(), []int{4} + return file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_rawDescGZIP(), []int{5} } func (x *DeleteApiKeyRequest) GetKeyId() string { @@ -358,7 +430,7 @@ type DeleteApiKeyResponse struct { func (x *DeleteApiKeyResponse) Reset() { *x = DeleteApiKeyResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_keys_proto_msgTypes[5] + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -371,7 +443,7 @@ func (x *DeleteApiKeyResponse) String() string { func (*DeleteApiKeyResponse) ProtoMessage() {} func (x *DeleteApiKeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_keys_proto_msgTypes[5] + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -384,7 +456,7 @@ func (x *DeleteApiKeyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteApiKeyResponse.ProtoReflect.Descriptor instead. func (*DeleteApiKeyResponse) Descriptor() ([]byte, []int) { - return file_api_keys_proto_rawDescGZIP(), []int{5} + return file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_rawDescGZIP(), []int{6} } type CreateApiKeyRequest struct { @@ -392,13 +464,16 @@ type CreateApiKeyRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - KeyInfo *KeyInfo `protobuf:"bytes,1,opt,name=key_info,json=keyInfo,proto3" json:"key_info,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Owner *Owner `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` + KeyPermissions *CreateApiKeyRequest_KeyPermissions `protobuf:"bytes,3,opt,name=key_permissions,json=keyPermissions,proto3" json:"key_permissions,omitempty"` + Hashed bool `protobuf:"varint,4,opt,name=hashed,proto3" json:"hashed,omitempty"` } func (x *CreateApiKeyRequest) Reset() { *x = CreateApiKeyRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_keys_proto_msgTypes[6] + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -411,7 +486,7 @@ func (x *CreateApiKeyRequest) String() string { func (*CreateApiKeyRequest) ProtoMessage() {} func (x *CreateApiKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_keys_proto_msgTypes[6] + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -424,16 +499,37 @@ func (x *CreateApiKeyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateApiKeyRequest.ProtoReflect.Descriptor instead. func (*CreateApiKeyRequest) Descriptor() ([]byte, []int) { - return file_api_keys_proto_rawDescGZIP(), []int{6} + return file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_rawDescGZIP(), []int{7} } -func (x *CreateApiKeyRequest) GetKeyInfo() *KeyInfo { +func (x *CreateApiKeyRequest) GetName() string { if x != nil { - return x.KeyInfo + return x.Name + } + return "" +} + +func (x *CreateApiKeyRequest) GetOwner() *Owner { + if x != nil { + return x.Owner + } + return nil +} + +func (x *CreateApiKeyRequest) GetKeyPermissions() *CreateApiKeyRequest_KeyPermissions { + if x != nil { + return x.KeyPermissions } return nil } +func (x *CreateApiKeyRequest) GetHashed() bool { + if x != nil { + return x.Hashed + } + return false +} + type CreateApiKeyResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -447,7 +543,7 @@ type CreateApiKeyResponse struct { func (x *CreateApiKeyResponse) Reset() { *x = CreateApiKeyResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_keys_proto_msgTypes[7] + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -460,7 +556,7 @@ func (x *CreateApiKeyResponse) String() string { func (*CreateApiKeyResponse) ProtoMessage() {} func (x *CreateApiKeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_keys_proto_msgTypes[7] + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -473,7 +569,7 @@ func (x *CreateApiKeyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateApiKeyResponse.ProtoReflect.Descriptor instead. func (*CreateApiKeyResponse) Descriptor() ([]byte, []int) { - return file_api_keys_proto_rawDescGZIP(), []int{7} + return file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_rawDescGZIP(), []int{8} } func (x *CreateApiKeyResponse) GetKeyId() string { @@ -508,7 +604,7 @@ type GetApiKeyRequest struct { func (x *GetApiKeyRequest) Reset() { *x = GetApiKeyRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_keys_proto_msgTypes[8] + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -521,7 +617,7 @@ func (x *GetApiKeyRequest) String() string { func (*GetApiKeyRequest) ProtoMessage() {} func (x *GetApiKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_keys_proto_msgTypes[8] + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -534,7 +630,7 @@ func (x *GetApiKeyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetApiKeyRequest.ProtoReflect.Descriptor instead. func (*GetApiKeyRequest) Descriptor() ([]byte, []int) { - return file_api_keys_proto_rawDescGZIP(), []int{8} + return file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_rawDescGZIP(), []int{9} } func (x *GetApiKeyRequest) GetKeyId() string { @@ -550,13 +646,12 @@ type GetApiKeyResponse struct { unknownFields protoimpl.UnknownFields KeyInfo *KeyInfo `protobuf:"bytes,1,opt,name=key_info,json=keyInfo,proto3" json:"key_info,omitempty"` - Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` } func (x *GetApiKeyResponse) Reset() { *x = GetApiKeyResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_keys_proto_msgTypes[9] + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -569,7 +664,7 @@ func (x *GetApiKeyResponse) String() string { func (*GetApiKeyResponse) ProtoMessage() {} func (x *GetApiKeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_keys_proto_msgTypes[9] + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -582,7 +677,7 @@ func (x *GetApiKeyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetApiKeyResponse.ProtoReflect.Descriptor instead. func (*GetApiKeyResponse) Descriptor() ([]byte, []int) { - return file_api_keys_proto_rawDescGZIP(), []int{9} + return file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_rawDescGZIP(), []int{10} } func (x *GetApiKeyResponse) GetKeyInfo() *KeyInfo { @@ -592,38 +687,86 @@ func (x *GetApiKeyResponse) GetKeyInfo() *KeyInfo { return nil } -func (x *GetApiKeyResponse) GetValue() string { - if x != nil && x.Value != nil { - return *x.Value +type KeyInfo_KeyPermissions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Presets []*PresetInfo `protobuf:"bytes,1,rep,name=presets,proto3" json:"presets,omitempty"` + Permissions []string `protobuf:"bytes,2,rep,name=permissions,proto3" json:"permissions,omitempty"` +} + +func (x *KeyInfo_KeyPermissions) Reset() { + *x = KeyInfo_KeyPermissions{} + if protoimpl.UnsafeEnabled { + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -type UpdateApiKeyRequest_Roles struct { +func (x *KeyInfo_KeyPermissions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KeyInfo_KeyPermissions) ProtoMessage() {} + +func (x *KeyInfo_KeyPermissions) ProtoReflect() protoreflect.Message { + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KeyInfo_KeyPermissions.ProtoReflect.Descriptor instead. +func (*KeyInfo_KeyPermissions) Descriptor() ([]byte, []int) { + return file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *KeyInfo_KeyPermissions) GetPresets() []*PresetInfo { + if x != nil { + return x.Presets + } + return nil +} + +func (x *KeyInfo_KeyPermissions) GetPermissions() []string { + if x != nil { + return x.Permissions + } + return nil +} + +type UpdateApiKeyRequest_Presets struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Roles []string `protobuf:"bytes,5,rep,name=roles,proto3" json:"roles,omitempty"` + Presets []string `protobuf:"bytes,1,rep,name=presets,proto3" json:"presets,omitempty"` } -func (x *UpdateApiKeyRequest_Roles) Reset() { - *x = UpdateApiKeyRequest_Roles{} +func (x *UpdateApiKeyRequest_Presets) Reset() { + *x = UpdateApiKeyRequest_Presets{} if protoimpl.UnsafeEnabled { - mi := &file_api_keys_proto_msgTypes[10] + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *UpdateApiKeyRequest_Roles) String() string { +func (x *UpdateApiKeyRequest_Presets) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdateApiKeyRequest_Roles) ProtoMessage() {} +func (*UpdateApiKeyRequest_Presets) ProtoMessage() {} -func (x *UpdateApiKeyRequest_Roles) ProtoReflect() protoreflect.Message { - mi := &file_api_keys_proto_msgTypes[10] +func (x *UpdateApiKeyRequest_Presets) ProtoReflect() protoreflect.Message { + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -634,176 +777,330 @@ func (x *UpdateApiKeyRequest_Roles) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdateApiKeyRequest_Roles.ProtoReflect.Descriptor instead. -func (*UpdateApiKeyRequest_Roles) Descriptor() ([]byte, []int) { - return file_api_keys_proto_rawDescGZIP(), []int{2, 0} +// Deprecated: Use UpdateApiKeyRequest_Presets.ProtoReflect.Descriptor instead. +func (*UpdateApiKeyRequest_Presets) Descriptor() ([]byte, []int) { + return file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_rawDescGZIP(), []int{3, 0} } -func (x *UpdateApiKeyRequest_Roles) GetRoles() []string { +func (x *UpdateApiKeyRequest_Presets) GetPresets() []string { if x != nil { - return x.Roles + return x.Presets } return nil } -var File_api_keys_proto protoreflect.FileDescriptor +type UpdateApiKeyRequest_Permissions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -var file_api_keys_proto_rawDesc = []byte{ - 0x0a, 0x0e, 0x61, 0x70, 0x69, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x61, 0x6c, 0x6f, 0x67, 0x69, 0x78, 0x61, - 0x70, 0x69, 0x73, 0x2e, 0x61, 0x61, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x6b, 0x65, 0x79, 0x73, 0x2e, - 0x76, 0x32, 0x22, 0x71, 0x0a, 0x05, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x07, 0x75, - 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, - 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, - 0x64, 0x12, 0x29, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x6f, 0x72, - 0x67, 0x61, 0x6e, 0x69, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x42, 0x07, 0x0a, 0x05, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0xa2, 0x01, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x61, 0x6c, - 0x6f, 0x67, 0x69, 0x78, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x61, 0x61, 0x61, 0x2e, 0x61, 0x70, 0x69, - 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x05, 0x6f, - 0x77, 0x6e, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x68, 0x61, 0x73, 0x68, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, 0x61, - 0x73, 0x68, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x22, 0x8a, 0x02, 0x0a, 0x13, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x08, 0x6e, 0x65, 0x77, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x6e, - 0x65, 0x77, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x69, 0x73, 0x5f, - 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x08, - 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, 0x12, 0x56, 0x0a, 0x05, 0x72, - 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x63, 0x6f, 0x6d, - 0x2e, 0x63, 0x6f, 0x72, 0x61, 0x6c, 0x6f, 0x67, 0x69, 0x78, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x61, - 0x61, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x48, 0x02, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, - 0x88, 0x01, 0x01, 0x1a, 0x1d, 0x0a, 0x05, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, - 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x72, 0x6f, 0x6c, - 0x65, 0x73, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, - 0x0c, 0x0a, 0x0a, 0x5f, 0x69, 0x73, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, 0x08, 0x0a, - 0x06, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2c, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x22, 0x16, 0x0a, - 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5b, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, - 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x08, - 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, + Permissions []string `protobuf:"bytes,1,rep,name=permissions,proto3" json:"permissions,omitempty"` +} + +func (x *UpdateApiKeyRequest_Permissions) Reset() { + *x = UpdateApiKeyRequest_Permissions{} + if protoimpl.UnsafeEnabled { + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateApiKeyRequest_Permissions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateApiKeyRequest_Permissions) ProtoMessage() {} + +func (x *UpdateApiKeyRequest_Permissions) ProtoReflect() protoreflect.Message { + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateApiKeyRequest_Permissions.ProtoReflect.Descriptor instead. +func (*UpdateApiKeyRequest_Permissions) Descriptor() ([]byte, []int) { + return file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_rawDescGZIP(), []int{3, 1} +} + +func (x *UpdateApiKeyRequest_Permissions) GetPermissions() []string { + if x != nil { + return x.Permissions + } + return nil +} + +type CreateApiKeyRequest_KeyPermissions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Presets []string `protobuf:"bytes,1,rep,name=presets,proto3" json:"presets,omitempty"` + Permissions []string `protobuf:"bytes,2,rep,name=permissions,proto3" json:"permissions,omitempty"` +} + +func (x *CreateApiKeyRequest_KeyPermissions) Reset() { + *x = CreateApiKeyRequest_KeyPermissions{} + if protoimpl.UnsafeEnabled { + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateApiKeyRequest_KeyPermissions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateApiKeyRequest_KeyPermissions) ProtoMessage() {} + +func (x *CreateApiKeyRequest_KeyPermissions) ProtoReflect() protoreflect.Message { + mi := &file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateApiKeyRequest_KeyPermissions.ProtoReflect.Descriptor instead. +func (*CreateApiKeyRequest_KeyPermissions) Descriptor() ([]byte, []int) { + return file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_rawDescGZIP(), []int{7, 0} +} + +func (x *CreateApiKeyRequest_KeyPermissions) GetPresets() []string { + if x != nil { + return x.Presets + } + return nil +} + +func (x *CreateApiKeyRequest_KeyPermissions) GetPermissions() []string { + if x != nil { + return x.Permissions + } + return nil +} + +var File_com_coralogixapis_aaa_apikeys_v3_api_keys_proto protoreflect.FileDescriptor + +var file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_rawDesc = []byte{ + 0x0a, 0x2f, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x61, 0x6c, 0x6f, 0x67, 0x69, 0x78, 0x61, + 0x70, 0x69, 0x73, 0x2f, 0x61, 0x61, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x6b, 0x65, 0x79, 0x73, 0x2f, + 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x61, 0x6c, 0x6f, 0x67, 0x69, 0x78, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x61, 0x61, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x6b, 0x65, 0x79, 0x73, + 0x2e, 0x76, 0x33, 0x22, 0x71, 0x0a, 0x05, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x07, + 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, + 0x49, 0x64, 0x12, 0x29, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x73, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x6f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x42, 0x07, 0x0a, + 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0x90, 0x03, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x61, + 0x6c, 0x6f, 0x67, 0x69, 0x78, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x61, 0x61, 0x61, 0x2e, 0x61, 0x70, + 0x69, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x05, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, + 0x61, 0x73, 0x68, 0x65, 0x64, 0x12, 0x61, 0x0a, 0x0f, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x61, 0x6c, 0x6f, 0x67, 0x69, 0x78, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x61, 0x61, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x76, - 0x32, 0x2e, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x49, 0x6e, - 0x66, 0x6f, 0x22, 0x57, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, - 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, - 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x29, 0x0a, 0x10, 0x47, - 0x65, 0x74, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x22, 0x7e, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x70, 0x69, - 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x08, 0x6b, - 0x65, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, - 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x61, 0x6c, 0x6f, 0x67, 0x69, 0x78, 0x61, 0x70, 0x69, - 0x73, 0x2e, 0x61, 0x61, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x76, 0x32, - 0x2e, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x32, 0x8b, 0x04, 0x0a, 0x0e, 0x41, 0x70, 0x69, 0x4b, 0x65, - 0x79, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7f, 0x0a, 0x0c, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x12, 0x35, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x63, 0x6f, 0x72, 0x61, 0x6c, 0x6f, 0x67, 0x69, 0x78, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x61, 0x61, - 0x61, 0x2e, 0x61, 0x70, 0x69, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x36, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x61, 0x6c, 0x6f, 0x67, 0x69, 0x78, - 0x61, 0x70, 0x69, 0x73, 0x2e, 0x61, 0x61, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x6b, 0x65, 0x79, 0x73, - 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x76, 0x0a, 0x09, 0x47, 0x65, - 0x74, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x12, 0x32, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, - 0x72, 0x61, 0x6c, 0x6f, 0x67, 0x69, 0x78, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x61, 0x61, 0x61, 0x2e, - 0x61, 0x70, 0x69, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x70, - 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x63, 0x6f, - 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x61, 0x6c, 0x6f, 0x67, 0x69, 0x78, 0x61, 0x70, 0x69, 0x73, 0x2e, - 0x61, 0x61, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x47, - 0x65, 0x74, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x7f, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, - 0x65, 0x79, 0x12, 0x35, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x61, 0x6c, 0x6f, 0x67, - 0x69, 0x78, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x61, 0x61, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x6b, 0x65, - 0x79, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, - 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x63, 0x6f, 0x72, 0x61, 0x6c, 0x6f, 0x67, 0x69, 0x78, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x61, 0x61, - 0x61, 0x2e, 0x61, 0x70, 0x69, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, + 0x33, 0x2e, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4b, 0x65, 0x79, 0x50, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0e, 0x6b, 0x65, 0x79, 0x50, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x88, 0x01, 0x01, 0x1a, 0x7a, 0x0a, 0x0e, 0x4b, 0x65, 0x79, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x46, 0x0a, 0x07, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x72, + 0x61, 0x6c, 0x6f, 0x67, 0x69, 0x78, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x61, 0x61, 0x61, 0x2e, 0x61, + 0x70, 0x69, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x12, 0x20, 0x0a, + 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x42, 0x0a, 0x0a, 0x50, 0x72, 0x65, + 0x73, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xc3, 0x03, + 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x08, + 0x6e, 0x65, 0x77, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x07, 0x6e, 0x65, 0x77, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, + 0x69, 0x73, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, + 0x01, 0x52, 0x08, 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x88, 0x01, 0x01, 0x12, 0x5c, + 0x0a, 0x07, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x3d, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x61, 0x6c, 0x6f, 0x67, 0x69, 0x78, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x61, 0x61, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x6b, 0x65, 0x79, 0x73, 0x2e, + 0x76, 0x33, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x48, 0x02, + 0x52, 0x07, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x88, 0x01, 0x01, 0x12, 0x68, 0x0a, 0x0b, + 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x41, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x61, 0x6c, 0x6f, 0x67, 0x69, + 0x78, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x61, 0x61, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x6b, 0x65, 0x79, + 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x03, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x88, 0x01, 0x01, 0x1a, 0x23, 0x0a, 0x07, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, + 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x1a, 0x2f, 0x0a, 0x0b, 0x50, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x0b, 0x0a, 0x09, + 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x69, 0x73, + 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x72, 0x65, 0x73, + 0x65, 0x74, 0x73, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, + 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x0a, 0x13, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x7f, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, + 0x65, 0x22, 0xbd, 0x02, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, + 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, + 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, + 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x61, 0x6c, 0x6f, 0x67, 0x69, 0x78, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x61, 0x61, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x76, 0x33, 0x2e, + 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x6d, 0x0a, 0x0f, + 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x61, + 0x6c, 0x6f, 0x67, 0x69, 0x78, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x61, 0x61, 0x61, 0x2e, 0x61, 0x70, + 0x69, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, + 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4b, 0x65, 0x79, + 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0e, 0x6b, 0x65, 0x79, + 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x68, + 0x61, 0x73, 0x68, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, 0x61, 0x73, + 0x68, 0x65, 0x64, 0x1a, 0x4c, 0x0a, 0x0e, 0x4b, 0x65, 0x79, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x12, + 0x20, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0x57, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x29, 0x0a, 0x10, 0x47, 0x65, + 0x74, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, + 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x6b, 0x65, 0x79, 0x49, 0x64, 0x22, 0x59, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x70, 0x69, 0x4b, + 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x08, 0x6b, 0x65, + 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, + 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x61, 0x6c, 0x6f, 0x67, 0x69, 0x78, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x61, 0x61, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x76, 0x33, 0x2e, + 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, + 0x32, 0x8b, 0x04, 0x0a, 0x0e, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x73, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x7f, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x12, 0x35, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x61, 0x6c, 0x6f, 0x67, 0x69, 0x78, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x61, 0x61, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x6b, - 0x65, 0x79, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, + 0x65, 0x79, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x61, 0x6c, 0x6f, 0x67, 0x69, 0x78, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x61, - 0x61, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x42, 0x03, 0x5a, 0x01, 0x2e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x61, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x76, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x41, 0x70, 0x69, 0x4b, 0x65, + 0x79, 0x12, 0x32, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x61, 0x6c, 0x6f, 0x67, 0x69, + 0x78, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x61, 0x61, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x6b, 0x65, 0x79, + 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x61, + 0x6c, 0x6f, 0x67, 0x69, 0x78, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x61, 0x61, 0x61, 0x2e, 0x61, 0x70, + 0x69, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x70, 0x69, 0x4b, + 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7f, 0x0a, 0x0c, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x12, 0x35, 0x2e, 0x63, + 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x61, 0x6c, 0x6f, 0x67, 0x69, 0x78, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x61, 0x61, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x76, 0x33, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x61, 0x6c, 0x6f, + 0x67, 0x69, 0x78, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x61, 0x61, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x6b, + 0x65, 0x79, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x69, + 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7f, 0x0a, + 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x12, 0x35, 0x2e, + 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x61, 0x6c, 0x6f, 0x67, 0x69, 0x78, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x61, 0x61, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x76, 0x33, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x61, 0x6c, + 0x6f, 0x67, 0x69, 0x78, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x61, 0x61, 0x61, 0x2e, 0x61, 0x70, 0x69, + 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, + 0x69, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_api_keys_proto_rawDescOnce sync.Once - file_api_keys_proto_rawDescData = file_api_keys_proto_rawDesc + file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_rawDescOnce sync.Once + file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_rawDescData = file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_rawDesc ) -func file_api_keys_proto_rawDescGZIP() []byte { - file_api_keys_proto_rawDescOnce.Do(func() { - file_api_keys_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_keys_proto_rawDescData) +func file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_rawDescGZIP() []byte { + file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_rawDescOnce.Do(func() { + file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_rawDescData = protoimpl.X.CompressGZIP(file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_rawDescData) }) - return file_api_keys_proto_rawDescData -} - -var file_api_keys_proto_msgTypes = make([]protoimpl.MessageInfo, 11) -var file_api_keys_proto_goTypes = []interface{}{ - (*Owner)(nil), // 0: com.coralogixapis.aaa.apikeys.v2.Owner - (*KeyInfo)(nil), // 1: com.coralogixapis.aaa.apikeys.v2.KeyInfo - (*UpdateApiKeyRequest)(nil), // 2: com.coralogixapis.aaa.apikeys.v2.UpdateApiKeyRequest - (*UpdateApiKeyResponse)(nil), // 3: com.coralogixapis.aaa.apikeys.v2.UpdateApiKeyResponse - (*DeleteApiKeyRequest)(nil), // 4: com.coralogixapis.aaa.apikeys.v2.DeleteApiKeyRequest - (*DeleteApiKeyResponse)(nil), // 5: com.coralogixapis.aaa.apikeys.v2.DeleteApiKeyResponse - (*CreateApiKeyRequest)(nil), // 6: com.coralogixapis.aaa.apikeys.v2.CreateApiKeyRequest - (*CreateApiKeyResponse)(nil), // 7: com.coralogixapis.aaa.apikeys.v2.CreateApiKeyResponse - (*GetApiKeyRequest)(nil), // 8: com.coralogixapis.aaa.apikeys.v2.GetApiKeyRequest - (*GetApiKeyResponse)(nil), // 9: com.coralogixapis.aaa.apikeys.v2.GetApiKeyResponse - (*UpdateApiKeyRequest_Roles)(nil), // 10: com.coralogixapis.aaa.apikeys.v2.UpdateApiKeyRequest.Roles -} -var file_api_keys_proto_depIdxs = []int32{ - 0, // 0: com.coralogixapis.aaa.apikeys.v2.KeyInfo.owner:type_name -> com.coralogixapis.aaa.apikeys.v2.Owner - 10, // 1: com.coralogixapis.aaa.apikeys.v2.UpdateApiKeyRequest.roles:type_name -> com.coralogixapis.aaa.apikeys.v2.UpdateApiKeyRequest.Roles - 1, // 2: com.coralogixapis.aaa.apikeys.v2.CreateApiKeyRequest.key_info:type_name -> com.coralogixapis.aaa.apikeys.v2.KeyInfo - 1, // 3: com.coralogixapis.aaa.apikeys.v2.GetApiKeyResponse.key_info:type_name -> com.coralogixapis.aaa.apikeys.v2.KeyInfo - 6, // 4: com.coralogixapis.aaa.apikeys.v2.ApiKeysService.CreateApiKey:input_type -> com.coralogixapis.aaa.apikeys.v2.CreateApiKeyRequest - 8, // 5: com.coralogixapis.aaa.apikeys.v2.ApiKeysService.GetApiKey:input_type -> com.coralogixapis.aaa.apikeys.v2.GetApiKeyRequest - 4, // 6: com.coralogixapis.aaa.apikeys.v2.ApiKeysService.DeleteApiKey:input_type -> com.coralogixapis.aaa.apikeys.v2.DeleteApiKeyRequest - 2, // 7: com.coralogixapis.aaa.apikeys.v2.ApiKeysService.UpdateApiKey:input_type -> com.coralogixapis.aaa.apikeys.v2.UpdateApiKeyRequest - 7, // 8: com.coralogixapis.aaa.apikeys.v2.ApiKeysService.CreateApiKey:output_type -> com.coralogixapis.aaa.apikeys.v2.CreateApiKeyResponse - 9, // 9: com.coralogixapis.aaa.apikeys.v2.ApiKeysService.GetApiKey:output_type -> com.coralogixapis.aaa.apikeys.v2.GetApiKeyResponse - 5, // 10: com.coralogixapis.aaa.apikeys.v2.ApiKeysService.DeleteApiKey:output_type -> com.coralogixapis.aaa.apikeys.v2.DeleteApiKeyResponse - 3, // 11: com.coralogixapis.aaa.apikeys.v2.ApiKeysService.UpdateApiKey:output_type -> com.coralogixapis.aaa.apikeys.v2.UpdateApiKeyResponse - 8, // [8:12] is the sub-list for method output_type - 4, // [4:8] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_api_keys_proto_init() } -func file_api_keys_proto_init() { - if File_api_keys_proto != nil { + return file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_rawDescData +} + +var file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_goTypes = []interface{}{ + (*Owner)(nil), // 0: com.coralogixapis.aaa.apikeys.v3.Owner + (*KeyInfo)(nil), // 1: com.coralogixapis.aaa.apikeys.v3.KeyInfo + (*PresetInfo)(nil), // 2: com.coralogixapis.aaa.apikeys.v3.PresetInfo + (*UpdateApiKeyRequest)(nil), // 3: com.coralogixapis.aaa.apikeys.v3.UpdateApiKeyRequest + (*UpdateApiKeyResponse)(nil), // 4: com.coralogixapis.aaa.apikeys.v3.UpdateApiKeyResponse + (*DeleteApiKeyRequest)(nil), // 5: com.coralogixapis.aaa.apikeys.v3.DeleteApiKeyRequest + (*DeleteApiKeyResponse)(nil), // 6: com.coralogixapis.aaa.apikeys.v3.DeleteApiKeyResponse + (*CreateApiKeyRequest)(nil), // 7: com.coralogixapis.aaa.apikeys.v3.CreateApiKeyRequest + (*CreateApiKeyResponse)(nil), // 8: com.coralogixapis.aaa.apikeys.v3.CreateApiKeyResponse + (*GetApiKeyRequest)(nil), // 9: com.coralogixapis.aaa.apikeys.v3.GetApiKeyRequest + (*GetApiKeyResponse)(nil), // 10: com.coralogixapis.aaa.apikeys.v3.GetApiKeyResponse + (*KeyInfo_KeyPermissions)(nil), // 11: com.coralogixapis.aaa.apikeys.v3.KeyInfo.KeyPermissions + (*UpdateApiKeyRequest_Presets)(nil), // 12: com.coralogixapis.aaa.apikeys.v3.UpdateApiKeyRequest.Presets + (*UpdateApiKeyRequest_Permissions)(nil), // 13: com.coralogixapis.aaa.apikeys.v3.UpdateApiKeyRequest.Permissions + (*CreateApiKeyRequest_KeyPermissions)(nil), // 14: com.coralogixapis.aaa.apikeys.v3.CreateApiKeyRequest.KeyPermissions +} +var file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_depIdxs = []int32{ + 0, // 0: com.coralogixapis.aaa.apikeys.v3.KeyInfo.owner:type_name -> com.coralogixapis.aaa.apikeys.v3.Owner + 11, // 1: com.coralogixapis.aaa.apikeys.v3.KeyInfo.key_permissions:type_name -> com.coralogixapis.aaa.apikeys.v3.KeyInfo.KeyPermissions + 12, // 2: com.coralogixapis.aaa.apikeys.v3.UpdateApiKeyRequest.presets:type_name -> com.coralogixapis.aaa.apikeys.v3.UpdateApiKeyRequest.Presets + 13, // 3: com.coralogixapis.aaa.apikeys.v3.UpdateApiKeyRequest.permissions:type_name -> com.coralogixapis.aaa.apikeys.v3.UpdateApiKeyRequest.Permissions + 0, // 4: com.coralogixapis.aaa.apikeys.v3.CreateApiKeyRequest.owner:type_name -> com.coralogixapis.aaa.apikeys.v3.Owner + 14, // 5: com.coralogixapis.aaa.apikeys.v3.CreateApiKeyRequest.key_permissions:type_name -> com.coralogixapis.aaa.apikeys.v3.CreateApiKeyRequest.KeyPermissions + 1, // 6: com.coralogixapis.aaa.apikeys.v3.GetApiKeyResponse.key_info:type_name -> com.coralogixapis.aaa.apikeys.v3.KeyInfo + 2, // 7: com.coralogixapis.aaa.apikeys.v3.KeyInfo.KeyPermissions.presets:type_name -> com.coralogixapis.aaa.apikeys.v3.PresetInfo + 7, // 8: com.coralogixapis.aaa.apikeys.v3.ApiKeysService.CreateApiKey:input_type -> com.coralogixapis.aaa.apikeys.v3.CreateApiKeyRequest + 9, // 9: com.coralogixapis.aaa.apikeys.v3.ApiKeysService.GetApiKey:input_type -> com.coralogixapis.aaa.apikeys.v3.GetApiKeyRequest + 5, // 10: com.coralogixapis.aaa.apikeys.v3.ApiKeysService.DeleteApiKey:input_type -> com.coralogixapis.aaa.apikeys.v3.DeleteApiKeyRequest + 3, // 11: com.coralogixapis.aaa.apikeys.v3.ApiKeysService.UpdateApiKey:input_type -> com.coralogixapis.aaa.apikeys.v3.UpdateApiKeyRequest + 8, // 12: com.coralogixapis.aaa.apikeys.v3.ApiKeysService.CreateApiKey:output_type -> com.coralogixapis.aaa.apikeys.v3.CreateApiKeyResponse + 10, // 13: com.coralogixapis.aaa.apikeys.v3.ApiKeysService.GetApiKey:output_type -> com.coralogixapis.aaa.apikeys.v3.GetApiKeyResponse + 6, // 14: com.coralogixapis.aaa.apikeys.v3.ApiKeysService.DeleteApiKey:output_type -> com.coralogixapis.aaa.apikeys.v3.DeleteApiKeyResponse + 4, // 15: com.coralogixapis.aaa.apikeys.v3.ApiKeysService.UpdateApiKey:output_type -> com.coralogixapis.aaa.apikeys.v3.UpdateApiKeyResponse + 12, // [12:16] is the sub-list for method output_type + 8, // [8:12] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_init() } +func file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_init() { + if File_com_coralogixapis_aaa_apikeys_v3_api_keys_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_api_keys_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Owner); i { case 0: return &v.state @@ -815,7 +1112,7 @@ func file_api_keys_proto_init() { return nil } } - file_api_keys_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*KeyInfo); i { case 0: return &v.state @@ -827,7 +1124,19 @@ func file_api_keys_proto_init() { return nil } } - file_api_keys_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PresetInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateApiKeyRequest); i { case 0: return &v.state @@ -839,7 +1148,7 @@ func file_api_keys_proto_init() { return nil } } - file_api_keys_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateApiKeyResponse); i { case 0: return &v.state @@ -851,7 +1160,7 @@ func file_api_keys_proto_init() { return nil } } - file_api_keys_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteApiKeyRequest); i { case 0: return &v.state @@ -863,7 +1172,7 @@ func file_api_keys_proto_init() { return nil } } - file_api_keys_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteApiKeyResponse); i { case 0: return &v.state @@ -875,7 +1184,7 @@ func file_api_keys_proto_init() { return nil } } - file_api_keys_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateApiKeyRequest); i { case 0: return &v.state @@ -887,7 +1196,7 @@ func file_api_keys_proto_init() { return nil } } - file_api_keys_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateApiKeyResponse); i { case 0: return &v.state @@ -899,7 +1208,7 @@ func file_api_keys_proto_init() { return nil } } - file_api_keys_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetApiKeyRequest); i { case 0: return &v.state @@ -911,7 +1220,7 @@ func file_api_keys_proto_init() { return nil } } - file_api_keys_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetApiKeyResponse); i { case 0: return &v.state @@ -923,8 +1232,44 @@ func file_api_keys_proto_init() { return nil } } - file_api_keys_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateApiKeyRequest_Roles); i { + file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KeyInfo_KeyPermissions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateApiKeyRequest_Presets); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateApiKeyRequest_Permissions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateApiKeyRequest_KeyPermissions); i { case 0: return &v.state case 1: @@ -936,29 +1281,29 @@ func file_api_keys_proto_init() { } } } - file_api_keys_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[0].OneofWrappers = []interface{}{ (*Owner_UserId)(nil), (*Owner_TeamId)(nil), (*Owner_OrganisationId)(nil), } - file_api_keys_proto_msgTypes[2].OneofWrappers = []interface{}{} - file_api_keys_proto_msgTypes[9].OneofWrappers = []interface{}{} + file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[1].OneofWrappers = []interface{}{} + file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes[3].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_api_keys_proto_rawDesc, + RawDescriptor: file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_rawDesc, NumEnums: 0, - NumMessages: 11, + NumMessages: 15, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_api_keys_proto_goTypes, - DependencyIndexes: file_api_keys_proto_depIdxs, - MessageInfos: file_api_keys_proto_msgTypes, + GoTypes: file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_goTypes, + DependencyIndexes: file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_depIdxs, + MessageInfos: file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_msgTypes, }.Build() - File_api_keys_proto = out.File - file_api_keys_proto_rawDesc = nil - file_api_keys_proto_goTypes = nil - file_api_keys_proto_depIdxs = nil + File_com_coralogixapis_aaa_apikeys_v3_api_keys_proto = out.File + file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_rawDesc = nil + file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_goTypes = nil + file_com_coralogixapis_aaa_apikeys_v3_api_keys_proto_depIdxs = nil } diff --git a/coralogix/clientset/grpc/apikeys/api_keys_grpc.pb.go b/coralogix/clientset/grpc/apikeys/api_keys_grpc.pb.go index 0d0ebe1a..28225232 100644 --- a/coralogix/clientset/grpc/apikeys/api_keys_grpc.pb.go +++ b/coralogix/clientset/grpc/apikeys/api_keys_grpc.pb.go @@ -1,10 +1,10 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v4.25.1 -// source: api_keys.proto +// - protoc-gen-go-grpc v1.3.0 +// - protoc v5.26.1 +// source: com/coralogixapis/aaa/apikeys/v3/api_keys.proto -package __ +package v3 import ( context "context" @@ -18,6 +18,13 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + ApiKeysService_CreateApiKey_FullMethodName = "/com.coralogixapis.aaa.apikeys.v3.ApiKeysService/CreateApiKey" + ApiKeysService_GetApiKey_FullMethodName = "/com.coralogixapis.aaa.apikeys.v3.ApiKeysService/GetApiKey" + ApiKeysService_DeleteApiKey_FullMethodName = "/com.coralogixapis.aaa.apikeys.v3.ApiKeysService/DeleteApiKey" + ApiKeysService_UpdateApiKey_FullMethodName = "/com.coralogixapis.aaa.apikeys.v3.ApiKeysService/UpdateApiKey" +) + // ApiKeysServiceClient is the client API for ApiKeysService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -38,7 +45,7 @@ func NewApiKeysServiceClient(cc grpc.ClientConnInterface) ApiKeysServiceClient { func (c *apiKeysServiceClient) CreateApiKey(ctx context.Context, in *CreateApiKeyRequest, opts ...grpc.CallOption) (*CreateApiKeyResponse, error) { out := new(CreateApiKeyResponse) - err := c.cc.Invoke(ctx, "/com.coralogixapis.aaa.apikeys.v2.ApiKeysService/CreateApiKey", in, out, opts...) + err := c.cc.Invoke(ctx, ApiKeysService_CreateApiKey_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -47,7 +54,7 @@ func (c *apiKeysServiceClient) CreateApiKey(ctx context.Context, in *CreateApiKe func (c *apiKeysServiceClient) GetApiKey(ctx context.Context, in *GetApiKeyRequest, opts ...grpc.CallOption) (*GetApiKeyResponse, error) { out := new(GetApiKeyResponse) - err := c.cc.Invoke(ctx, "/com.coralogixapis.aaa.apikeys.v2.ApiKeysService/GetApiKey", in, out, opts...) + err := c.cc.Invoke(ctx, ApiKeysService_GetApiKey_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -56,7 +63,7 @@ func (c *apiKeysServiceClient) GetApiKey(ctx context.Context, in *GetApiKeyReque func (c *apiKeysServiceClient) DeleteApiKey(ctx context.Context, in *DeleteApiKeyRequest, opts ...grpc.CallOption) (*DeleteApiKeyResponse, error) { out := new(DeleteApiKeyResponse) - err := c.cc.Invoke(ctx, "/com.coralogixapis.aaa.apikeys.v2.ApiKeysService/DeleteApiKey", in, out, opts...) + err := c.cc.Invoke(ctx, ApiKeysService_DeleteApiKey_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -65,7 +72,7 @@ func (c *apiKeysServiceClient) DeleteApiKey(ctx context.Context, in *DeleteApiKe func (c *apiKeysServiceClient) UpdateApiKey(ctx context.Context, in *UpdateApiKeyRequest, opts ...grpc.CallOption) (*UpdateApiKeyResponse, error) { out := new(UpdateApiKeyResponse) - err := c.cc.Invoke(ctx, "/com.coralogixapis.aaa.apikeys.v2.ApiKeysService/UpdateApiKey", in, out, opts...) + err := c.cc.Invoke(ctx, ApiKeysService_UpdateApiKey_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -122,7 +129,7 @@ func _ApiKeysService_CreateApiKey_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/com.coralogixapis.aaa.apikeys.v2.ApiKeysService/CreateApiKey", + FullMethod: ApiKeysService_CreateApiKey_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiKeysServiceServer).CreateApiKey(ctx, req.(*CreateApiKeyRequest)) @@ -140,7 +147,7 @@ func _ApiKeysService_GetApiKey_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/com.coralogixapis.aaa.apikeys.v2.ApiKeysService/GetApiKey", + FullMethod: ApiKeysService_GetApiKey_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiKeysServiceServer).GetApiKey(ctx, req.(*GetApiKeyRequest)) @@ -158,7 +165,7 @@ func _ApiKeysService_DeleteApiKey_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/com.coralogixapis.aaa.apikeys.v2.ApiKeysService/DeleteApiKey", + FullMethod: ApiKeysService_DeleteApiKey_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiKeysServiceServer).DeleteApiKey(ctx, req.(*DeleteApiKeyRequest)) @@ -176,7 +183,7 @@ func _ApiKeysService_UpdateApiKey_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/com.coralogixapis.aaa.apikeys.v2.ApiKeysService/UpdateApiKey", + FullMethod: ApiKeysService_UpdateApiKey_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiKeysServiceServer).UpdateApiKey(ctx, req.(*UpdateApiKeyRequest)) @@ -188,7 +195,7 @@ func _ApiKeysService_UpdateApiKey_Handler(srv interface{}, ctx context.Context, // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var ApiKeysService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "com.coralogixapis.aaa.apikeys.v2.ApiKeysService", + ServiceName: "com.coralogixapis.aaa.apikeys.v3.ApiKeysService", HandlerType: (*ApiKeysServiceServer)(nil), Methods: []grpc.MethodDesc{ { @@ -209,5 +216,5 @@ var ApiKeysService_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "api_keys.proto", + Metadata: "com/coralogixapis/aaa/apikeys/v3/api_keys.proto", } diff --git a/coralogix/data_source_coralogix_api_key.go b/coralogix/data_source_coralogix_api_key.go index 7defcc4f..939b250f 100644 --- a/coralogix/data_source_coralogix_api_key.go +++ b/coralogix/data_source_coralogix_api_key.go @@ -9,11 +9,12 @@ import ( "google.golang.org/protobuf/encoding/protojson" + "terraform-provider-coralogix/coralogix/clientset" + "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/resource" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "terraform-provider-coralogix/coralogix/clientset" ) var _ datasource.DataSourceWithConfigure = &ApiKeyDataSource{} @@ -64,7 +65,7 @@ func (d *ApiKeyDataSource) Read(ctx context.Context, req datasource.ReadRequest, return } - //Get refreshed Action value from Coralogix + //Get refreshed API Keys value from Coralogix id := data.ID.ValueString() log.Printf("[INFO] Reading ApiKey: %s", id) getApiKey := &apikeys.GetApiKeyRequest{ @@ -76,26 +77,26 @@ func (d *ApiKeyDataSource) Read(ctx context.Context, req datasource.ReadRequest, log.Printf("[ERROR] Received error: %s", err.Error()) if status.Code(err) == codes.NotFound { resp.Diagnostics.AddWarning(err.Error(), - fmt.Sprintf("Action %q is in state, but no longer exists in Coralogix backend", id), + fmt.Sprintf("API Keys %q is in state, but no longer exists in Coralogix backend", id), ) } else { resp.Diagnostics.AddError( - "Error reading Action", + "Error reading API Keys", formatRpcErrors(err, getApiKeyPath, protojson.Format(getApiKey)), ) } return } - log.Printf("[INFO] Received Action: %s", protojson.Format(getApiKeyResponse)) + log.Printf("[INFO] Received API Keys: %s", protojson.Format(getApiKeyResponse)) if getApiKeyResponse.KeyInfo.Hashed { resp.Diagnostics.AddError( - "Error reading Action", + "Error reading API Keys", "Reading an hashed key is impossible", ) return } - response, diags := flattenGetApiKeyResponse(ctx, &id, getApiKeyResponse, getApiKeyResponse.Value) + response, diags := flattenGetApiKeyResponse(ctx, &id, getApiKeyResponse, getApiKeyResponse.KeyInfo.Value) if diags.HasError() { resp.Diagnostics.Append(diags...) return diff --git a/coralogix/data_source_coralogix_api_key_test.go b/coralogix/data_source_coralogix_api_key_test.go index ab64a210..6573a1eb 100644 --- a/coralogix/data_source_coralogix_api_key_test.go +++ b/coralogix/data_source_coralogix_api_key_test.go @@ -23,6 +23,8 @@ func TestAccCoralogixDataSourceApiKey(t *testing.T) { resource.TestCheckResourceAttr(apiKeyDataSourceName, "owner.team_id", teamID), resource.TestCheckResourceAttr(apiKeyDataSourceName, "active", "true"), resource.TestCheckResourceAttr(apiKeyDataSourceName, "hashed", "false"), + resource.TestCheckResourceAttr(apiKeyResourceName, "permissions.#", "0"), + resource.TestCheckResourceAttr(apiKeyResourceName, "presets.#", "2"), ), }, }, diff --git a/coralogix/provider_test.go b/coralogix/provider_test.go index c6d04555..201f76fd 100644 --- a/coralogix/provider_test.go +++ b/coralogix/provider_test.go @@ -46,8 +46,4 @@ func testAccPreCheck(t *testing.T) { if os.Getenv("CORALOGIX_ENV") == "" { t.Fatalf("CORALOGIX_ENV must be set for acceptance tests") } - - if os.Getenv("CORALOGIX_ORG_KEY") == "" { - t.Fatalf("CORALOGIX_ORG_KEY must be set for acceptance tests") - } } diff --git a/coralogix/resource_coralogix_api_key.go b/coralogix/resource_coralogix_api_key.go index 0a9949aa..8db681b0 100644 --- a/coralogix/resource_coralogix_api_key.go +++ b/coralogix/resource_coralogix_api_key.go @@ -6,9 +6,14 @@ import ( "log" "reflect" "strconv" + "strings" + + "terraform-provider-coralogix/coralogix/clientset" + apikeys "terraform-provider-coralogix/coralogix/clientset/grpc/apikeys" "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator" "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/attr" "github.com/hashicorp/terraform-plugin-framework/diag" "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" @@ -18,18 +23,17 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" "github.com/hashicorp/terraform-plugin-framework/schema/validator" "github.com/hashicorp/terraform-plugin-framework/types" + "golang.org/x/exp/slices" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "google.golang.org/protobuf/encoding/protojson" - "terraform-provider-coralogix/coralogix/clientset" - apikeys "terraform-provider-coralogix/coralogix/clientset/grpc/apikeys" ) var ( - getApiKeyPath = "com.coralogixapis.aaa.apikeys.v2.ApiKeysService/GetApiKey" - createApiKeyPath = "com.coralogixapis.aaa.apikeys.v2.ApiKeysService/CreateApiKey" - deleteApiKeyPath = "com.coralogixapis.aaa.apikeys.v2.ApiKeysService/DeleteApiKey" - updateApiKeyPath = "com.coralogixapis.aaa.apikeys.v2.ApiKeysService/UpdateApiKey" + getApiKeyPath = apikeys.ApiKeysService_GetApiKey_FullMethodName + createApiKeyPath = apikeys.ApiKeysService_CreateApiKey_FullMethodName + deleteApiKeyPath = apikeys.ApiKeysService_DeleteApiKey_FullMethodName + updateApiKeyPath = apikeys.ApiKeysService_UpdateApiKey_FullMethodName ) func NewApiKeyResource() resource.Resource { @@ -66,8 +70,83 @@ func (r *ApiKeyResource) ImportState(ctx context.Context, req resource.ImportSta resource.ImportStatePassthroughID(ctx, path.Root("id"), req, resp) } -func (r *ApiKeyResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { - resp.Schema = schema.Schema{ +func resourceSchemaV1() schema.Schema { + return schema.Schema{ + Version: 1, + Attributes: map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + MarkdownDescription: "ApiKey ID.", + }, + "name": schema.StringAttribute{ + Required: true, + MarkdownDescription: "Api Key name.", + }, + "value": schema.StringAttribute{ + Computed: true, + Sensitive: true, + MarkdownDescription: "Api Key value.", + }, + "owner": schema.SingleNestedAttribute{ + Attributes: map[string]schema.Attribute{ + "team_id": schema.StringAttribute{ + Optional: true, + Validators: []validator.String{ + stringvalidator.ExactlyOneOf( + path.MatchRelative().AtParent().AtName("user_id"), + ), + }, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + }, + "user_id": schema.StringAttribute{ + Optional: true, + Validators: []validator.String{ + stringvalidator.ExactlyOneOf( + path.MatchRelative().AtParent().AtName("team_id"), + ), + }, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + }, + }, + Required: true, + MarkdownDescription: "Api Key Owner.It can either be a team_id or a user_id ", + }, + + "active": schema.BoolAttribute{ + Computed: true, + Optional: true, + Default: booldefault.StaticBool(true), + MarkdownDescription: "Api Key Is Active.", + }, + "hashed": schema.BoolAttribute{ + Computed: true, + MarkdownDescription: "Api Key Is Hashed.", + }, + "presets": schema.SetAttribute{ + Required: true, + ElementType: types.StringType, + MarkdownDescription: "Api Key Presets", + }, + "permissions": schema.SetAttribute{ + Required: true, + ElementType: types.StringType, + MarkdownDescription: "Api Key Permissions", + }, + }, + MarkdownDescription: "Coralogix Api keys.", + } +} + +func resourceSchemaV0() schema.Schema { + return schema.Schema{ + Version: 0, Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ @@ -140,14 +219,19 @@ func (r *ApiKeyResource) Schema(ctx context.Context, req resource.SchemaRequest, } } +func (r *ApiKeyResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { + resp.Schema = resourceSchemaV1() +} + type ApiKeyModel struct { - ID types.String `tfsdk:"id"` - Name types.String `tfsdk:"name"` - Owner *Owner `tfsdk:"owner"` - Active types.Bool `tfsdk:"active"` - Hashed types.Bool `tfsdk:"hashed"` - Roles types.Set `tfsdk:"roles"` - Value types.String `tfsdk:"value"` + ID types.String `tfsdk:"id"` + Name types.String `tfsdk:"name"` + Owner *Owner `tfsdk:"owner"` + Active types.Bool `tfsdk:"active"` + Hashed types.Bool `tfsdk:"hashed"` + Permissions types.Set `tfsdk:"permissions"` + Presets types.Set `tfsdk:"presets"` + Value types.String `tfsdk:"value"` } type Owner struct { @@ -238,14 +322,26 @@ func (r *ApiKeyResource) Update(ctx context.Context, req resource.UpdateRequest, if currentState.Name.ValueString() != desiredState.Name.ValueString() { updateApiKeyRequest.NewName = desiredState.Name.ValueStringPointer() } - if !reflect.DeepEqual(currentState.Roles.Elements(), desiredState.Roles.Elements()) { - roles, diags := typeStringSliceToStringSlice(ctx, desiredState.Roles.Elements()) + + if !reflect.DeepEqual(currentState.Permissions.Elements(), desiredState.Permissions.Elements()) { + permissions, diags := typeStringSliceToStringSlice(ctx, desiredState.Permissions.Elements()) if diags.HasError() { resp.Diagnostics.Append(diags...) return } - updateApiKeyRequest.Roles = &apikeys.UpdateApiKeyRequest_Roles{ - Roles: roles, + updateApiKeyRequest.Permissions = &apikeys.UpdateApiKeyRequest_Permissions{ + Permissions: permissions, + } + } + + if !reflect.DeepEqual(currentState.Presets.Elements(), desiredState.Presets.Elements()) { + presets, diags := typeStringSliceToStringSlice(ctx, desiredState.Presets.Elements()) + if diags.HasError() { + resp.Diagnostics.Append(diags...) + return + } + updateApiKeyRequest.Presets = &apikeys.UpdateApiKeyRequest_Presets{ + Presets: presets, } } @@ -327,7 +423,9 @@ func (r *ApiKeyResource) getKeyInfo(ctx context.Context, id *string, keyValue *s if diags.HasError() { return nil, diags } + log.Printf("[INFO] Get api key with ID: %s", getApiKeyRequest) getApiKeyResponse, err := r.client.GetApiKey(ctx, getApiKeyRequest) + if err != nil { log.Printf("[ERROR] Received error: %s", err.Error()) if status.Code(err) == codes.PermissionDenied || status.Code(err) == codes.Unauthenticated { @@ -348,6 +446,7 @@ func (r *ApiKeyResource) getKeyInfo(ctx context.Context, id *string, keyValue *s } return nil, diags } + log.Printf("[INFO] Got api key info: %s", protojson.Format(getApiKeyResponse)) key, diags := flattenGetApiKeyResponse(ctx, id, getApiKeyResponse, keyValue) if diags.HasError() { return nil, diags @@ -370,7 +469,16 @@ func makeDeleteApi(apiKeyId *string) (*apikeys.DeleteApiKeyRequest, diag.Diagnos func flattenGetApiKeyResponse(ctx context.Context, apiKeyId *string, response *apikeys.GetApiKeyResponse, keyValue *string) (*ApiKeyModel, diag.Diagnostics) { var diags diag.Diagnostics - roles, diags := types.SetValueFrom(ctx, types.StringType, response.KeyInfo.Roles) + permissions := stringSliceToTypeStringSet(response.KeyInfo.KeyPermissions.Permissions) + if permissions.IsNull() { + permissions = types.SetValueMust(types.StringType, []attr.Value{}) + } + presetNames := make([]attr.Value, len(response.KeyInfo.KeyPermissions.Presets)) + for i, p := range response.KeyInfo.KeyPermissions.Presets { + presetNames[i] = types.StringValue(p.Name) + } + + presets, diags := types.SetValueFrom(ctx, types.StringType, presetNames) if diags.HasError() { return nil, diags } @@ -380,26 +488,31 @@ func flattenGetApiKeyResponse(ctx context.Context, apiKeyId *string, response *a diags.AddError("Key argument is require", "Key value is required") return nil, diags } else if !response.KeyInfo.Hashed { - key = types.StringValue(response.GetValue()) + key = types.StringValue(response.KeyInfo.GetValue()) } else { key = types.StringValue(*keyValue) } owner := flattenOwner(response.KeyInfo.Owner) return &ApiKeyModel{ - ID: types.StringValue(*apiKeyId), - Value: key, - Name: types.StringValue(response.KeyInfo.Name), - Active: types.BoolValue(response.KeyInfo.Active), - Hashed: types.BoolValue(response.KeyInfo.Hashed), - Roles: roles, - Owner: &owner, + ID: types.StringValue(*apiKeyId), + Value: key, + Name: types.StringValue(response.KeyInfo.Name), + Active: types.BoolValue(response.KeyInfo.Active), + Hashed: types.BoolValue(response.KeyInfo.Hashed), + Permissions: permissions, + Presets: presets, + Owner: &owner, }, nil } func makeCreateApiKeyRequest(ctx context.Context, apiKeyModel *ApiKeyModel) (*apikeys.CreateApiKeyRequest, diag.Diagnostics) { - roles, diags := typeStringSliceToStringSlice(ctx, apiKeyModel.Roles.Elements()) + permissions, diags := typeStringSliceToStringSlice(ctx, apiKeyModel.Permissions.Elements()) + if diags.HasError() { + return nil, diags + } + presets, diags := typeStringSliceToStringSlice(ctx, apiKeyModel.Presets.Elements()) if diags.HasError() { return nil, diags } @@ -410,13 +523,13 @@ func makeCreateApiKeyRequest(ctx context.Context, apiKeyModel *ApiKeyModel) (*ap } return &apikeys.CreateApiKeyRequest{ - KeyInfo: &apikeys.KeyInfo{ - Name: apiKeyModel.Name.ValueString(), - Owner: &owner, - Active: apiKeyModel.Active.ValueBool(), - Hashed: apiKeyModel.Hashed.ValueBool(), - Roles: roles, + Name: apiKeyModel.Name.ValueString(), + Owner: &owner, + KeyPermissions: &apikeys.CreateApiKeyRequest_KeyPermissions{ + Presets: presets, + Permissions: permissions, }, + Hashed: false, // this has to be false or the GetApiKey will fail (encrypted keys are not readable) }, nil } @@ -455,3 +568,93 @@ func flattenOwner(owner *apikeys.Owner) Owner { return Owner{} } } + +func (r *ApiKeyResource) UpgradeState(context.Context) map[int64]resource.StateUpgrader { + schemaV0 := resourceSchemaV0() + + return map[int64]resource.StateUpgrader{ + 0: { + PriorSchema: &schemaV0, + + StateUpgrader: func(ctx context.Context, req resource.UpgradeStateRequest, resp *resource.UpgradeStateResponse) { + type ApiKeyModelV0 struct { + ID types.String `tfsdk:"id"` + Name types.String `tfsdk:"name"` + Owner *Owner `tfsdk:"owner"` + Active types.Bool `tfsdk:"active"` + Hashed types.Bool `tfsdk:"hashed"` + Value types.String `tfsdk:"value"` + Roles types.Set `tfsdk:"roles"` + } + + var dataV0 ApiKeyModelV0 + + resp.Diagnostics.Append(req.State.Get(ctx, &dataV0)...) + if resp.Diagnostics.HasError() { + return + } + permissions, diags := mapRolesToPermissions(dataV0.Roles) + + if diags.HasError() { + resp.Diagnostics.Append(diags...) + return + } + + dataV1 := ApiKeyModel{ + ID: dataV0.ID, + Name: dataV0.Name, + Owner: dataV0.Owner, + Active: dataV0.Active, + Hashed: dataV0.Hashed, + Value: dataV0.Value, + Permissions: permissions, + Presets: types.SetNull(types.StringType), + } + + diags = resp.State.Set(ctx, dataV1) + resp.Diagnostics.Append(diags...) + }, + }, + } +} + +func mapRolesToPermissions(roles types.Set) (types.Set, diag.Diagnostics) { + permissions := []string{} + for _, role := range roles.Elements() { + mappedPermissions, diags := mapRoleToPermission(role.(types.String)) + if diags.HasError() { + return types.SetNull(types.StringType), diags + } + for _, m := range mappedPermissions { + if !slices.Contains(permissions, m) { + permissions = append(permissions, m) + } + } + } + return stringSliceToTypeStringSet(permissions), diag.Diagnostics{} +} + +func mapRoleToPermission(role types.String) ([]string, diag.Diagnostics) { + diags := diag.Diagnostics{} + switch r := strings.ToLower(role.ValueString()); r { + case "rum ingress": + return []string{"rum-ingress:SendData"}, diags + case "send data": + return []string{ + "cloud-metadata-ingress:SendData", "logs.data-ingress:SendData", "metrics.data-ingress:SendData", "spans.data-ingress:SendData"}, diags + case "coralogix cli": + return []string{"data-usage:Read", "org-quota:Manage", "org-quota:Read", "org-teams:Manage", "org-teams:ReadConfig", "team-members:Manage", "team-members:ReadConfig", "team-scim:Manage", "team-scim:ReadConfig", "team-sso:Manage", "team-sso:ReadConfig", "team-quota:Manage", "team-quota:Read"}, diags + case "scim": + return []string{"team-groups:Manage", "team-groups:ReadConfig", "team-members:Manage", "team-members:ReadConfig", "team-roles:ReadConfig"}, diags + case "role management": + return []string{"team-roles:Manage", "team-roles:ReadConfig"}, diags + case "trigger webhook": + return []string{"contextual-data:SendData"}, diags + case "legacy api key": + return []string{"alerts:ReadConfig", "alerts:UpdateConfig", "cloud-metadata-enrichment:ReadConfig", "cloud-metadata-enrichment:UpdateConfig", "data-usage:Read", "geo-enrichment:ReadConfig", "geo-enrichment:UpdateConfig", "grafana:Read", "grafana:Update", "logs.data-setup#low:ReadConfig", "logs.data-setup#low:UpdateConfig", "logs.events2metrics:ReadConfig", "logs.events2metrics:UpdateConfig", "logs.tco:ReadPolicies", "logs.tco:UpdatePolicies", "metrics.data-analytics#high:Read", "metrics.data-analytics#low:Read", "metrics.data-setup#high:ReadConfig", "metrics.data-setup#high:UpdateConfig", "metrics.data-setup#low:ReadConfig", "metrics.data-setup#low:UpdateConfig", "metrics.recording-rules:ReadConfig", "metrics.recording-rules:UpdateConfig", "metrics.tco:ReadPolicies", "metrics.tco:UpdatePolicies", "outbound-webhooks:ReadConfig", "outbound-webhooks:UpdateConfig", "parsing-rules:ReadConfig", "parsing-rules:UpdateConfig", "security-enrichment:ReadConfig", "security-enrichment:UpdateConfig", "serverless:Read", "service-catalog:ReadDimensionsConfig", "service-catalog:ReadSLIConfig", "service-catalog:UpdateDimensionsConfig", "service-catalog:UpdateSLIConfig", "service-map:Read", "source-mapping:UploadMapping", "spans.data-api#high:ReadData", "spans.data-api#low:ReadData", "spans.data-setup#low:ReadConfig", "spans.data-setup#low:UpdateConfig", "spans.events2metrics:ReadConfig", "spans.events2metrics:UpdateConfig", "spans.tco:ReadPolicies", "spans.tco:UpdatePolicies", "team-actions:ReadConfig", "team-actions:UpdateConfig", "team-api-keys-security-settings:Manage", "team-api-keys-security-settings:ReadConfig", "team-api-keys:Manage", "team-api-keys:ReadConfig", "team-custom-enrichment:ReadConfig", "team-custom-enrichment:ReadData", "team-custom-enrichment:UpdateConfig", "team-custom-enrichment:UpdateData", "team-dashboards:Read", "team-dashboards:Update", "user-actions:ReadConfig", "user-actions:UpdateConfig", "user-dashboards:Read", "user-dashboards:Update", "version-benchmark-tags:Read", "logs.alerts:ReadConfig", "logs.alerts:UpdateConfig", "spans.alerts:ReadConfig", "spans.alerts:UpdateConfig", "metrics.alerts:ReadConfig", "metrics.alerts:UpdateConfig", "livetail:Read", "service-catalog:Read", "version-benchmark-tags:Update", "service-catalog:ReadApdexConfig", "service-catalog:UpdateApdexConfig", "service-catalog:Update", "team-quota:Manage", "team-quota:Read"}, diags + case "query data legacy": + return []string{"logs.data-api#high:ReadData", "logs.data-api#low:ReadData", "metrics.data-api#high:ReadData", "metrics.data-api#low:ReadData", "opensearch-dashboards:Read", "opensearch-dashboards:Update", "snowbit.cspm:Read", "snowbit.sspm:Read", "spans.data-api#high:ReadData", "spans.data-api#low:ReadData", "livetail:Read"}, diags + } + diags.AddError("Invalid role", fmt.Sprintf("Unable to translate role '%v' into permissions", role)) + return []string{}, diags +} diff --git a/coralogix/resource_coralogix_api_key_test.go b/coralogix/resource_coralogix_api_key_test.go index 7dc4170e..159dbc60 100644 --- a/coralogix/resource_coralogix_api_key_test.go +++ b/coralogix/resource_coralogix_api_key_test.go @@ -22,7 +22,9 @@ func TestApiKeyResource(t *testing.T) { resource.TestCheckResourceAttr(apiKeyResourceName, "name", "Test Key 3"), resource.TestCheckResourceAttr(apiKeyResourceName, "owner.team_id", teamID), resource.TestCheckResourceAttr(apiKeyResourceName, "active", "true"), - resource.TestCheckResourceAttr(apiKeyResourceName, "hashed", "false"), + resource.TestCheckResourceAttr(apiKeyResourceName, "permissions.#", "0"), + resource.TestCheckTypeSetElemAttr(apiKeyResourceName, "presets.*", "Alerts"), + resource.TestCheckTypeSetElemAttr(apiKeyResourceName, "presets.*", "APM"), ), }, { @@ -36,8 +38,9 @@ func TestApiKeyResource(t *testing.T) { resource.TestCheckResourceAttr(apiKeyResourceName, "name", "Test Key 5"), resource.TestCheckResourceAttr(apiKeyResourceName, "owner.team_id", teamID), resource.TestCheckResourceAttr(apiKeyResourceName, "active", "false"), - resource.TestCheckResourceAttr(apiKeyResourceName, "hashed", "false"), - ), + resource.TestCheckResourceAttr(apiKeyResourceName, "permissions.#", "0"), + resource.TestCheckTypeSetElemAttr(apiKeyResourceName, "presets.*", "Alerts"), + resource.TestCheckTypeSetElemAttr(apiKeyResourceName, "presets.*", "APM")), }, }, }) @@ -50,8 +53,8 @@ func testApiKeyResource() string { team_id : "" } active = true - hashed = false - roles = ["SCIM"] + permissions = [] + presets = ["Alerts", "APM"] } `, "", teamID, 1) } @@ -63,8 +66,8 @@ func updateApiKeyResource() string { team_id : "" } active = false - hashed = false - roles = ["SCIM"] + permissions = [] + presets = ["Alerts", "APM"] } `, "", teamID, 1) } diff --git a/docs/data-sources/api_key.md b/docs/data-sources/api_key.md index 280162e2..2573a480 100644 --- a/docs/data-sources/api_key.md +++ b/docs/data-sources/api_key.md @@ -10,7 +10,13 @@ description: |- Coralogix Api keys. +## Example Usage +```hcl +data "coralogix_api_key" "same_key_by_id" { + id = coralogix_api_key.example.id +} +``` ## Schema @@ -25,7 +31,8 @@ Coralogix Api keys. - `hashed` (Boolean) Api Key Is Hashed. - `name` (String) Api Key name. - `owner` (Attributes) Api Key Owner.It can either be a team_id or a user_id (see [below for nested schema](#nestedatt--owner)) -- `roles` (Set of String) Api Key Roles +- `permissions` (Set of String) Api Key Permissions +- `presets` (Set of String) Api Key Presets - `value` (String) Api Key value. diff --git a/docs/guides/api-keys.md b/docs/guides/api-keys.md new file mode 100644 index 00000000..65be927d --- /dev/null +++ b/docs/guides/api-keys.md @@ -0,0 +1,266 @@ +# Upgrading API Keys (from < 1.16) + +With version 1.16, the API Keys resource has been upgraded to the latest available version of the GRPC API which replaces "roles" with "presets" and "permissions". Read more [https://coralogix.com/docs/api-keys/](). This document is the guide on how you can update your existing Terraform files. + +## Legacy And New API Keys + +The change in the underlying permission model created two types of API keys with the old one being described as "legacy keys". Internally all keys have been transitioned to the new model, however there are two key differences: + +1. Legacy keys are "Custom" keys that have a custom set of permissions, instead of a preset +2. Legacy key permissions cannot be updated + +Therefore legacy keys can remain in use as long as no changes to the associated permissions are required. + +### Mapping Roles to Permissions + +Internally, existing roles are mapped to the following set of custom permissions: + + +| Role | Permissions | +|------------------------|------------------------------------------------------------------------------------------------------------| +| RUM Ingress | - rum-ingress:SendData | +| Send Data | - cloud-metadata-ingress:SendData
- logs.data-ingress:SendData
- metrics.data-ingress:SendData
- spans.data-ingress:SendData | +| Coralogix CLI | - data-usage:Read
- org-quota:Manage
- org-quota:Read
- org-teams:Manage
- org-teams:ReadConfig
- team-members:Manage
- team-members:ReadConfig
- team-scim:Manage
- team-scim:ReadConfig
- team-sso:Manage
- team-sso:ReadConfig
- team-quota:Manage
- team-quota:Read | +| SCIM | - team-groups:Manage
- team-groups:ReadConfig
- team-members:Manage
- team-members:ReadConfig
- team-roles:ReadConfig | +| Role Management | - team-roles:Manage
- team-roles:ReadConfig | +| Trigger Webhook | - contextual-data:SendData | +| Legacy Api Key | - alerts:ReadConfig
- alerts:UpdateConfig
- cloud-metadata-enrichment:ReadConfig
- cloud-metadata-enrichment:UpdateConfig
- data-usage:Read
- geo-enrichment:ReadConfig
- geo-enrichment:UpdateConfig
- grafana:Read
- grafana:Update
- logs.data-setup#low:ReadConfig
- logs.data-setup#low:UpdateConfig
- logs.events2metrics:ReadConfig
- logs.events2metrics:UpdateConfig
- logs.tco:ReadPolicies
- logs.tco:UpdatePolicies
- metrics.data-analytics#high:Read
- metrics.data-analytics#low:Read
- metrics.data-setup#high:ReadConfig
- metrics.data-setup#high:UpdateConfig
- metrics.data-setup#low:ReadConfig
- metrics.data-setup#low:UpdateConfig
- metrics.recording-rules:ReadConfig
- metrics.recording-rules:UpdateConfig
- metrics.tco:ReadPolicies
- metrics.tco:UpdatePolicies
- outbound-webhooks:ReadConfig
- outbound-webhooks:UpdateConfig
- parsing-rules:ReadConfig
- parsing-rules:UpdateConfig
- security-enrichment:ReadConfig
- security-enrichment:UpdateConfig
- serverless:Read
- service-catalog:ReadDimensionsConfig
- service-catalog:ReadSLIConfig
- service-catalog:UpdateDimensionsConfig
- service-catalog:UpdateSLIConfig
- service-map:Read
- source-mapping:UploadMapping
- spans.data-api#high:ReadData
- spans.data-api#low:ReadData
- spans.data-setup#low:ReadConfig
- spans.data-setup#low:UpdateConfig
- spans.events2metrics:ReadConfig
- spans.events2metrics:UpdateConfig
- spans.tco:ReadPolicies
- spans.tco:UpdatePolicies
- team-actions:ReadConfig
- team-actions:UpdateConfig
- team-api-keys-security-settings:Manage
- team-api-keys-security-settings:ReadConfig
- team-api-keys:Manage
- team-api-keys:ReadConfig
- team-custom-enrichment:ReadConfig
- team-custom-enrichment:ReadData
- team-custom-enrichment:UpdateConfig
- team-custom-enrichment:UpdateData
- team-dashboards:Read
- team-dashboards:Update
- user-actions:ReadConfig
- user-actions:UpdateConfig
- user-dashboards:Read
- user-dashboards:Update
- version-benchmark-tags:Read
- logs.alerts:ReadConfig
- logs.alerts:UpdateConfig
- spans.alerts:ReadConfig
- spans.alerts:UpdateConfig
- metrics.alerts:ReadConfig
- metrics.alerts:UpdateConfig
- livetail:Read
- service-catalog:Read
- version-benchmark-tags:Update
- service-catalog:ReadApdexConfig
- service-catalog:UpdateApdexConfig
- service-catalog:Update
- team-quota:Manage
- team-quota:Read | +| Query Data Legacy | - logs.data-api#high:ReadData
- logs.data-api#low:ReadData
- metrics.data-api#high:ReadData
- metrics.data-api#low:ReadData
- opensearch-dashboards:Read
- opensearch-dashboards:Update
- snowbit.cspm:Read
- snowbit.sspm:Read
- spans.data-api#high:ReadData
- spans.data-api#low:ReadData
- livetail:Read | + +If an API key had multiple roles, the permissions are merged. + +## Upgrade Procedure + +The new provider version upgrades the state automatically, however the `.tf` files need to reflect those updates as well - anything else would be considered a change by terraform. Here is a step by step upgrade guide: + +0. Upgrade the provider +1. Run `terraform refresh` +2. Locate the `coralogix_api_key` resources and create a property `permissions` corresponding to the roles in `roles`. Use the table above or examples below. +3. Add a property `presets = []` and remove the `roles` property +4. Run `terraform plan`, there should be no changes to the API keys requested + +## Examples + +**1.15.x:** + +```hcl +resource "coralogix_api_key" "example" { + name = "My SCIM KEY" + owner = { + team_id : "5633574" + } + active = true + roles = ["SCIM", "Legacy Api Key", "Role Management", "Send Data"] +} +``` + +**>1.16:** + +```hcl +resource "coralogix_api_key" "example" { + name = "My SCIM KEY" + owner = { + team_id : "5633574" + } + active = true + permissions = [ + "alerts:ReadConfig", + "alerts:UpdateConfig", + "cloud-metadata-enrichment:ReadConfig", + "cloud-metadata-enrichment:UpdateConfig", + "cloud-metadata-ingress:SendData", + "data-usage:Read", + "geo-enrichment:ReadConfig", + "geo-enrichment:UpdateConfig", + "grafana:Read", + "grafana:Update", + "incidents:Acknowledge", + "incidents:Assign", + "incidents:Close", + "incidents:Read", + "incidents:Snooze", + "livetail:Read", + "logs.alerts:ReadConfig", + "logs.alerts:UpdateConfig", + "logs.data-ingress:SendData", + "logs.data-setup#low:ReadConfig", + "logs.data-setup#low:UpdateConfig", + "logs.events2metrics:ReadConfig", + "logs.events2metrics:UpdateConfig", + "logs.tco:ReadPolicies", + "logs.tco:UpdatePolicies", + "metrics.alerts:ReadConfig", + "metrics.alerts:UpdateConfig", + "metrics.data-analytics#high:Read", + "metrics.data-analytics#low:Read", + "metrics.data-ingress:SendData", + "metrics.data-setup#high:ReadConfig", + "metrics.data-setup#high:UpdateConfig", + "metrics.data-setup#low:ReadConfig", + "metrics.data-setup#low:UpdateConfig", + "metrics.recording-rules:ReadConfig", + "metrics.recording-rules:UpdateConfig", + "metrics.tco:ReadPolicies", + "metrics.tco:UpdatePolicies", + "outbound-webhooks:ReadConfig", + "outbound-webhooks:UpdateConfig", + "parsing-rules:ReadConfig", + "parsing-rules:UpdateConfig", + "security-enrichment:ReadConfig", + "security-enrichment:UpdateConfig", + "serverless:Read", + "service-catalog:Read", + "service-catalog:ReadApdexConfig", + "service-catalog:ReadDimensionsConfig", + "service-catalog:ReadSLIConfig", + "service-catalog:Update", + "service-catalog:UpdateApdexConfig", + "service-catalog:UpdateDimensionsConfig", + "service-catalog:UpdateSLIConfig", + "service-map:Read", + "source-mapping:UploadMapping", + "spans.alerts:ReadConfig", + "spans.alerts:UpdateConfig", + "spans.data-api#high:ReadData", + "spans.data-api#low:ReadData", + "spans.data-ingress:SendData", + "spans.data-setup#low:ReadConfig", + "spans.data-setup#low:UpdateConfig", + "spans.events2metrics:ReadConfig", + "spans.events2metrics:UpdateConfig", + "spans.tco:ReadPolicies", + "spans.tco:UpdatePolicies", + "suppression-rules:ReadConfig", + "suppression-rules:UpdateConfig", + "team-actions:ReadConfig", + "team-actions:UpdateConfig", + "team-api-keys-security-settings:Manage", + "team-api-keys-security-settings:ReadConfig", + "team-api-keys:Manage", + "team-api-keys:ReadConfig", + "team-custom-enrichment:ReadConfig", + "team-custom-enrichment:ReadData", + "team-custom-enrichment:UpdateConfig", + "team-custom-enrichment:UpdateData", + "team-dashboards:Read", + "team-dashboards:Update", + "team-groups:Manage", + "team-groups:ReadConfig", + "team-members:Manage", + "team-members:ReadConfig", + "team-quota:Manage", + "team-quota:Read", + "team-roles:Manage", + "team-roles:ReadConfig", + "user-actions:ReadConfig", + "user-actions:UpdateConfig", + "user-dashboards:Read", + "user-dashboards:Update", + "version-benchmark-tags:Read", + "version-benchmark-tags:Update" + ] + presets = [] +} +``` + +--- + +**1.15.x:** + +```hcl +resource "coralogix_api_key" "example" { + name = "My RUM KEY" + owner = { + team_id : "5633574" + } + active = true + roles = ["RUM Ingress"] +} +``` + +**>1.16:** + +```hcl +resource "coralogix_api_key" "example" { + name = "My RUM KEY" + owner = { + team_id : "5633574" + } + active = true + permissions = [ + "rum-ingress:SendData" + ] + presets = [] +} +``` +--- + +**1.15.x:** + +```hcl +resource "coralogix_api_key" "example" { + name = "My WH KEY" + owner = { + team_id : "5633574" + } + active = true + roles = ["Trigger Webhook"] +} +``` + +**>1.16:** + +```hcl +resource "coralogix_api_key" "example" { + name = "My WH KEY" + owner = { + team_id : "5633574" + } + active = true + permissions = [ + "contextual-data:SendData" + ] + presets = [] +} +``` + +--- + +**1.15.x:** + +```hcl +resource "coralogix_api_key" "example" { + name = "My RBAC KEY" + owner = { + team_id : "5633574" + } + active = true + roles = ["SCIM", "Role Management"] +} +``` + +**>1.16:** + +```hcl +resource "coralogix_api_key" "example" { + name = "My RBAC KEY" + owner = { + team_id : "5633574" + } + active = true + permissions = [ + "team-roles:Manage", + "team-roles:ReadConfig", + "team-groups:Manage", + "team-groups:ReadConfig", + "team-members:Manage", + "team-members:ReadConfig" + ] + presets = [] +} +``` + +## Limitations + +- Encrypted (hashed) keys are unsupported in this provider, therefore all keys are created in plain text + diff --git a/docs/index.md b/docs/index.md index f4062d3f..831434db 100644 --- a/docs/index.md +++ b/docs/index.md @@ -79,7 +79,7 @@ $ export CORALOGIX_DOMAIN="" | Region | Domain | |---------|---------------------| -| APAC1 | app.coralogix.in | +| APAC1 | coralogix.in | | APAC2 | coralogixsg.com | | EUROPE1 | coralogix.com | | EUROPE2 | eu2.coralogix.com | diff --git a/docs/resources/api_key.md b/docs/resources/api_key.md index 5571c4de..a7489507 100644 --- a/docs/resources/api_key.md +++ b/docs/resources/api_key.md @@ -16,14 +16,16 @@ Coralogix Api keys. resource "coralogix_api_key" "example" { name = "My SCIM KEY" owner = { - team_id : "" + team_id : "4013254" } active = true hashed = false - roles = ["SCIM", "Legacy Api Key", "Role Management", "Send Data"] + presets = ["admin", "some-other-preset"] + permissions = ["Alerts/Write"] } ``` + ## Schema @@ -31,7 +33,8 @@ resource "coralogix_api_key" "example" { - `name` (String) Api Key name. - `owner` (Attributes) Api Key Owner.It can either be a team_id or a user_id (see [below for nested schema](#nestedatt--owner)) -- `roles` (Set of String) Api Key Roles +- `permissions` (Set of String) Api Key Permissions +- `presets` (Set of String) Api Key Presets ### Optional @@ -50,9 +53,3 @@ Optional: - `team_id` (String) - `user_id` (String) - -### Import - -```sh -terraform import coralogix_api_key.example -``` \ No newline at end of file diff --git a/docs/resources/custom_role.md b/docs/resources/custom_role.md index d985cb97..f8cedcf7 100644 --- a/docs/resources/custom_role.md +++ b/docs/resources/custom_role.md @@ -3,7 +3,7 @@ page_title: "coralogix_custom_role Resource - terraform-provider-coralogix" subcategory: "" description: |- - Coralogix Custom roles. +Coralogix Custom roles. --- # coralogix_custom_role (Resource) diff --git a/examples/apikeys/main.tf b/examples/apikeys/main.tf index 1a488b4d..fee7d79f 100644 --- a/examples/apikeys/main.tf +++ b/examples/apikeys/main.tf @@ -13,13 +13,13 @@ provider "coralogix" { } resource "coralogix_api_key" "example" { - name = "My SCIM KEY" + name = "My APM KEY" owner = { team_id : "4013254" } active = true - hashed = false - roles = ["SCIM", "Legacy Api Key", "Role Management", "Send Data"] + presets = ["APM"] + permissions = ["livetail:Read"] } data "coralogix_api_key" "same_key_by_id" {