feat(target): Add domain support for storage bucket association

This commit is contained in:
Louis Ruch authored and Timothy Messier committed 2023-05-31 12:18:15 +00:00
1 parent 8f9e218e1c
commit 0d96a20024
13 files changed
+372 -170

No files matched your search

+36
View File
@@ -259,6 +259,18 @@ func DefaultEgressWorkerFilter() Option {
}
}
func WithSshTargetEnableSessionRecording(inEnableSessionRecording bool) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
}
val := raw.(map[string]interface{})
val["enable_session_recording"] = inEnableSessionRecording
o.postMap["attributes"] = val
}
}
func WithHostId(inHostId string) Option {
return func(o *options) {
o.postMap["host_id"] = inHostId
@@ -337,6 +349,30 @@ func DefaultSessionMaxSeconds() Option {
}
}
func WithSshTargetStorageBucketId(inStorageBucketId string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
}
val := raw.(map[string]interface{})
val["storage_bucket_id"] = inStorageBucketId
o.postMap["attributes"] = val
}
}
func DefaultSshTargetStorageBucketId() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
}
val := raw.(map[string]interface{})
val["storage_bucket_id"] = nil
o.postMap["attributes"] = val
}
}
func WithWorkerFilter(inWorkerFilter string) Option {
return func(o *options) {
o.postMap["worker_filter"] = inWorkerFilter
+4 -2
View File
@@ -11,8 +11,10 @@ import (
)
type SshTargetAttributes struct {
DefaultPort uint32 `json:"default_port,omitempty"`
DefaultClientPort uint32 `json:"default_client_port,omitempty"`
DefaultPort uint32 `json:"default_port,omitempty"`
DefaultClientPort uint32 `json:"default_client_port,omitempty"`
StorageBucketId string `json:"storage_bucket_id,omitempty"`
EnableSessionRecording bool `json:"enable_session_recording,omitempty"`
}
func AttributesMapToSshTargetAttributes(in map[string]interface{}) (*SshTargetAttributes, error) {