fastly_api/models/
logging_s3_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 LoggingS3Additional {
13    /// The access key for your S3 account. Not required if `iam_role` is provided.
14    #[serde(rename = "access_key", skip_serializing_if = "Option::is_none")]
15    pub access_key: Option<String>,
16    /// The access control list (ACL) specific request header. See the AWS documentation for [Access Control List (ACL) Specific Request Headers](https://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadInitiate.html#initiate-mpu-acl-specific-request-headers) for more information.
17    #[serde(rename = "acl", skip_serializing_if = "Option::is_none")]
18    pub acl: Option<String>,
19    /// The bucket name for S3 account.
20    #[serde(rename = "bucket_name", skip_serializing_if = "Option::is_none")]
21    pub bucket_name: Option<String>,
22    /// The domain of the Amazon S3 endpoint.
23    #[serde(rename = "domain", skip_serializing_if = "Option::is_none")]
24    pub domain: Option<String>,
25    /// The Amazon Resource Name (ARN) for the IAM role granting Fastly access to S3. Not required if `access_key` and `secret_key` are provided.
26    #[serde(rename = "iam_role", skip_serializing_if = "Option::is_none")]
27    pub iam_role: Option<String>,
28    /// The path to upload logs to.
29    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
30    pub path: Option<String>,
31    /// A PGP public key that Fastly will use to encrypt your log files before writing them to disk.
32    #[serde(rename = "public_key", skip_serializing_if = "Option::is_none")]
33    pub public_key: Option<String>,
34    /// The S3 redundancy level.
35    #[serde(rename = "redundancy", skip_serializing_if = "Option::is_none")]
36    pub redundancy: Option<String>,
37    /// The secret key for your S3 account. Not required if `iam_role` is provided.
38    #[serde(rename = "secret_key", skip_serializing_if = "Option::is_none")]
39    pub secret_key: Option<String>,
40    /// Optional server-side KMS Key Id. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`.
41    #[serde(rename = "server_side_encryption_kms_key_id", skip_serializing_if = "Option::is_none")]
42    pub server_side_encryption_kms_key_id: Option<String>,
43    /// Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption.
44    #[serde(rename = "server_side_encryption", skip_serializing_if = "Option::is_none")]
45    pub server_side_encryption: Option<String>,
46    /// The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.)
47    #[serde(rename = "file_max_bytes", skip_serializing_if = "Option::is_none")]
48    pub file_max_bytes: Option<i32>,
49}
50
51impl LoggingS3Additional {
52    pub fn new() -> LoggingS3Additional {
53        LoggingS3Additional {
54            access_key: None,
55            acl: None,
56            bucket_name: None,
57            domain: None,
58            iam_role: None,
59            path: None,
60            public_key: None,
61            redundancy: None,
62            secret_key: None,
63            server_side_encryption_kms_key_id: None,
64            server_side_encryption: None,
65            file_max_bytes: None,
66        }
67    }
68}
69
70