The objects of the object store of the fleet, such as a file uploaded with osapi
client file upload. osapi behavior get --name object and
osapi behavior method get show the same.
Behavior
| |
|---|
| Name | object |
| Description | The objects of the object store of the fleet, such as a file uploaded with osapi client file upload |
| Placement | node |
| Internal | yes |
| API | no |
| CLI | no |
| Next | no |
| Platforms | debian, linux, darwin |
| Sudo | none |
| Runs | none |
| Writes | none |
| Keeps state | no |
| Uses | none |
| Used by | service |
Methods (1)
| NAME | VERB | ROUTE | PERMISSION | DESCRIPTION |
|---|
| get | read | - | - | Get an object of the object store |
Types (1)
| NAME | INPUT | OUTPUT |
|---|
| get | GetInput { name* } | Object { name, content, content_type, sha256 } |
Settings (0)
None. Declare them with behavior.Config.
Telemetry
| |
|---|
| Span | behavior.object.<method> |
| Child spans | none |
| Metrics | osapi_behavior_calls_total, osapi_behavior_duration_seconds, osapi_behavior_changes_total |
| Attributes | osapi.behavior.name, osapi.behavior.method, osapi.behavior.verb, osapi.behavior.outcome, osapi.behavior.changed |
| Recorded inputs | name (get) |
Method get
| |
|---|
| Name | get |
| Verb | read |
| Description | Get an object of the object store |
| Detail | Reads the object from the object store of the fleet, with the content type that its upload gave it, raw or template, and the SHA-256 of its content. A template is not rendered: the behavior that deploys it renders it. An agent with no object store reports skipped. |
| Route | other behaviors only; it is not served |
| Input type | GetInput |
| Output type | Object |
| FIELD | TYPE | REQUIRED | CONSTRAINTS | DESCRIPTION |
|---|
| name | string | yes | min length 1, max length 255 | The name of the object, as osapi client file upload stored it, such as nginx.conf |
Output (4)
| FIELD | TYPE | DESCRIPTION |
|---|
| name | string | The name of the object |
| content | string | The content of the object |
| content_type | string | raw, or template for an object whose content is a Go template |
| sha256 | string | The SHA-256 of the content, in hex |
Examples (2)
| EXAMPLE | INPUT | OUTPUT |
|---|
| A unit file | name=example.service | name=example.service, content=[Unit] Description=Example [Service] ExecStart=/usr/bin/example , content_type=raw, sha256=4d38310b40344ae465b2f1f88758809f31ef1aa8287c756a1d65c76ca27dc243 |
| A template | name=motd.tmpl | name=motd.tmpl, content=Welcome to {{ .Hostname }} , content_type=template, sha256=08c60853fd0933d9903a112a64bb4c742c03961a4e56af1940173403a09746e2 |