Add TargetAliasAuthorizeSessionArgumentsHostId api options (#4397)

* Add host id api option
This commit is contained in:
Todd committed 2024-02-29 15:52:27 -08:00
1 parent ba21e076bb
commit a6c96d69ae
3 files changed
+79 -17

No files matched your search

+43
View File
@@ -0,0 +1,43 @@
// Code generated by "make api"; DO NOT EDIT.
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package aliases
func WithTargetAliasAuthorizeSessionArgumentsHostId(hid string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
}
attrVal := raw.(map[string]interface{})
argRaw, ok := attrVal["authorize_session_arguments"]
if !ok {
argRaw = interface{}(map[string]interface{}{})
}
argVal := argRaw.(map[string]interface{})
argVal["host_id"] = hid
attrVal["authorize_session_arguments"] = argVal
o.postMap["attributes"] = attrVal
}
}
func DefaultTargetAliasAuthorizeSessionArgumentsHostId() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
}
attrVal := raw.(map[string]interface{})
argRaw, ok := attrVal["authorize_session_arguments"]
if !ok {
argRaw = interface{}(map[string]interface{}{})
}
argVal := argRaw.(map[string]interface{})
argVal["host_id"] = nil
attrVal["authorize_session_arguments"] = argVal
o.postMap["attributes"] = attrVal
}
}