feat(api): Add support for egress credentials for targets endpoint

pull/1648/head
Timothy Messier 5 years ago
parent 36f1ae75f7
commit 1da403a2d2
No known key found for this signature in database
GPG Key ID: EFD2F184F7600572

@ -159,6 +159,18 @@ func DefaultDescription() Option {
}
}
func WithEgressCredentialSourceIds(inEgressCredentialSourceIds []string) Option {
return func(o *options) {
o.postMap["egress_credential_source_ids"] = inEgressCredentialSourceIds
}
}
func DefaultEgressCredentialSourceIds() Option {
return func(o *options) {
o.postMap["egress_credential_source_ids"] = nil
}
}
func WithHostId(inHostId string) Option {
return func(o *options) {
o.postMap["host_id"] = inHostId

@ -33,6 +33,8 @@ type Target struct {
ApplicationCredentialLibraries []*CredentialLibrary `json:"application_credential_libraries,omitempty"`
ApplicationCredentialSourceIds []string `json:"application_credential_source_ids,omitempty"`
ApplicationCredentialSources []*CredentialSource `json:"application_credential_sources,omitempty"`
EgressCredentialSourceIds []string `json:"egress_credential_source_ids,omitempty"`
EgressCredentialSources []*CredentialSource `json:"egress_credential_sources,omitempty"`
Attributes map[string]interface{} `json:"attributes,omitempty"`
AuthorizedActions []string `json:"authorized_actions,omitempty"`

@ -649,6 +649,11 @@ var inputStructs = []*structInfo{
ProtoName: "application_credential_source_ids",
FieldType: "[]string",
},
{
Name: "EgressCredentialSourceIds",
ProtoName: "egress_credential_source_ids",
FieldType: "[]string",
},
},
versionEnabled: true,
typeOnCreate: true,

@ -2812,6 +2812,12 @@
"items": {
"type": "string"
}
},
"egress_credential_source_ids": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
@ -3048,6 +3054,12 @@
"items": {
"type": "string"
}
},
"egress_credential_source_ids": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
@ -3233,9 +3245,15 @@
"items": {
"type": "string"
}
},
"egress_credential_source_ids": {
"type": "array",
"items": {
"type": "string"
}
}
},
"description": "Sets the values for application_credential_source_ids. If any\ncredential_source_id field that is not set in the request will result in\nthose fields being cleared."
"description": "Sets the values for credential sources. Any credential_source_id field that\nis not set in the request will result in those fields being cleared."
}
}
],
@ -5054,6 +5072,22 @@
"description": "Output only. The application credential sources associated with this Target.",
"readOnly": true
},
"egress_credential_source_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Output only. The IDs of the egress credential source ids associated with this Target.",
"readOnly": true
},
"egress_credential_sources": {
"type": "array",
"items": {
"$ref": "#/definitions/controller.api.resources.targets.v1.CredentialSource"
},
"description": "Output only. The egress credential sources associated with this Target.",
"readOnly": true
},
"attributes": {
"type": "object",
"description": "The attributes that are applicable for the specific Target."

Loading…
Cancel
Save