fastly_api/models/logging_elasticsearch_additional.rs
1/*
2 * Fastly API
3 *
4 * Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://www.fastly.com/documentation/reference/api/)
5 *
6 */
7
8
9
10
11#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct LoggingElasticsearchAdditional {
13 /// The name of the Elasticsearch index to send documents (logs) to. The index must follow the Elasticsearch [index format rules](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html). We support [strftime](https://www.man7.org/linux/man-pages/man3/strftime.3.html) interpolated variables inside braces prefixed with a pound symbol. For example, `#{%F}` will interpolate as `YYYY-MM-DD` with today's date.
14 #[serde(rename = "index", skip_serializing_if = "Option::is_none")]
15 pub index: Option<String>,
16 /// The URL to stream logs to. Must use HTTPS.
17 #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
18 pub url: Option<String>,
19 /// The ID of the Elasticsearch ingest pipeline to apply pre-process transformations to before indexing. Learn more about creating a pipeline in the [Elasticsearch docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest.html).
20 #[serde(rename = "pipeline", skip_serializing_if = "Option::is_none")]
21 pub pipeline: Option<String>,
22 /// Basic Auth username.
23 #[serde(rename = "user", skip_serializing_if = "Option::is_none")]
24 pub user: Option<String>,
25 /// Basic Auth password.
26 #[serde(rename = "password", skip_serializing_if = "Option::is_none")]
27 pub password: Option<String>,
28 /// A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Elasticsearch can ingest.
29 #[serde(rename = "format", skip_serializing_if = "Option::is_none")]
30 pub format: Option<String>,
31}
32
33impl LoggingElasticsearchAdditional {
34 pub fn new() -> LoggingElasticsearchAdditional {
35 LoggingElasticsearchAdditional {
36 index: None,
37 url: None,
38 pipeline: None,
39 user: None,
40 password: None,
41 format: None,
42 }
43 }
44}
45
46