mirror of https://github.com/hashicorp/boundary
Add TargetAliasAuthorizeSessionArgumentsHostId api options (#4397)
* Add host id api optionpull/4470/head
parent
ba21e076bb
commit
a6c96d69ae
@ -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
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue