@@ -121,6 +121,7 @@ type Manifest struct {
121
121
Owner Owner `json:"owner,omitempty" yaml:"owner,omitempty"`
122
122
Elasticsearch * ElasticsearchRequirements `json:"elasticsearch,omitempty" yaml:"elasticsearch,omitempty"`
123
123
Agent * AgentRequirements `json:"agent,omitempty" yaml:"agent,omitempty"`
124
+ DeploymentModes * DeploymentModes `json:"deployment_modes,omitempty" yaml:"deployment_modes,omitempty"`
124
125
125
126
sourceFile string
126
127
}
@@ -207,16 +208,17 @@ type Screenshots struct {
207
208
}
208
209
209
210
type Var struct {
210
- Name string `json:"name,omitempty" yaml:"name,omitempty"`
211
- Default any `json:"default,omitempty" yaml:"default,omitempty"`
212
- Description string `json:"description,omitempty" yaml:"description,omitempty"`
213
- Type string `json:"type,omitempty" yaml:"type,omitempty"`
214
- Title string `json:"title,omitempty" yaml:"title,omitempty"`
215
- Multi * bool `json:"multi,omitempty" yaml:"multi,omitempty"`
216
- Required * bool `json:"required,omitempty" yaml:"required,omitempty"`
217
- Secret * bool `json:"secret,omitempty" yaml:"secret,omitempty"`
218
- ShowUser * bool `json:"show_user,omitempty" yaml:"show_user,omitempty"`
219
- Options []Option `json:"options,omitempty" yaml:"options,omitempty"` // List of options for 'type: select'.
211
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
212
+ Default any `json:"default,omitempty" yaml:"default,omitempty"`
213
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
214
+ Type string `json:"type,omitempty" yaml:"type,omitempty"`
215
+ Title string `json:"title,omitempty" yaml:"title,omitempty"`
216
+ Multi * bool `json:"multi,omitempty" yaml:"multi,omitempty"`
217
+ Required * bool `json:"required,omitempty" yaml:"required,omitempty"`
218
+ Secret * bool `json:"secret,omitempty" yaml:"secret,omitempty"`
219
+ ShowUser * bool `json:"show_user,omitempty" yaml:"show_user,omitempty"`
220
+ Options []Option `json:"options,omitempty" yaml:"options,omitempty"` // List of options for 'type: select'.
221
+ HideInDeploymentModes []string `json:"hide_in_deployment_modes,omitempty" yaml:"hide_in_deployment_modes,omitempty"` // Whether this variable should be hidden in the UI for agent policies intended to some specific deployment modes.
220
222
221
223
FileMetadata `json:"-" yaml:"-"`
222
224
}
@@ -250,19 +252,33 @@ type Input struct {
250
252
}
251
253
252
254
type PolicyTemplate struct {
253
- Name string `json:"name,omitempty" yaml:"name,omitempty"`
254
- Title string `json:"title,omitempty" yaml:"title,omitempty"`
255
- Categories []string `json:"categories,omitempty" yaml:"categories,omitempty"`
256
- Description string `json:"description,omitempty" yaml:"description,omitempty"`
257
- DataStreams []string `json:"data_streams,omitempty" yaml:"data_streams,omitempty"`
258
- Inputs []Input `json:"inputs,omitempty" yaml:"inputs,omitempty"`
259
- Icons []Icons `json:"icons,omitempty" yaml:"icons,omitempty"`
260
- Screenshots []Screenshots `json:"screenshots,omitempty" yaml:"screenshots,omitempty"`
261
- Multiple * bool `json:"multiple,omitempty" yaml:"multiple,omitempty"`
262
- Type string `json:"type,omitempty" yaml:"type,omitempty"` // Type of data stream.
263
- Input string `json:"input,omitempty" yaml:"input,omitempty"`
264
- TemplatePath string `json:"template_path,omitempty" yaml:"template_path,omitempty"`
265
- Vars []Var `json:"vars,omitempty" yaml:"vars,omitempty"` // Policy template level variables.
255
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
256
+ Title string `json:"title,omitempty" yaml:"title,omitempty"`
257
+ Categories []string `json:"categories,omitempty" yaml:"categories,omitempty"`
258
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
259
+ DataStreams []string `json:"data_streams,omitempty" yaml:"data_streams,omitempty"`
260
+ Inputs []Input `json:"inputs,omitempty" yaml:"inputs,omitempty"`
261
+ Icons []Icons `json:"icons,omitempty" yaml:"icons,omitempty"`
262
+ Screenshots []Screenshots `json:"screenshots,omitempty" yaml:"screenshots,omitempty"`
263
+ Multiple * bool `json:"multiple,omitempty" yaml:"multiple,omitempty"`
264
+ Type string `json:"type,omitempty" yaml:"type,omitempty"` // Type of data stream.
265
+ Input string `json:"input,omitempty" yaml:"input,omitempty"`
266
+ TemplatePath string `json:"template_path,omitempty" yaml:"template_path,omitempty"`
267
+ Vars []Var `json:"vars,omitempty" yaml:"vars,omitempty"` // Policy template level variables.
268
+ DeploymentModes * DeploymentModes `json:"deployment_modes,omitempty" yaml:"deployment_modes,omitempty"`
269
+ }
270
+
271
+ // DeploymentModes options. The deployment mode refers to the mode used to deploy the Elastic Agents running this policy.
272
+ type DeploymentModes struct {
273
+ // Options specific to the default deployment mode, where agents are normally managed by users, explicitly enrolled to Fleet and visible in UIs.
274
+ Default struct {
275
+ Enabled * bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` // Defaults to true in Fleet.
276
+ } `json:"default,omitempty" yaml:"default,omitempty"`
277
+
278
+ // Options specific to the Agentless deployment mode. This mode is used in offerings where the Elastic Agents running these policies are fully managed for the user.
279
+ Agentless struct {
280
+ Enabled * bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
281
+ } `json:"agentless,omitempty" yaml:"agentless,omitempty"`
266
282
}
267
283
268
284
type Owner struct {
0 commit comments