diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b6f3ba..9298ee5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,29 @@ # Changelog +## [v4.7.0](https://github.com/fastly/fastly-rust/releases/tag/release/v4.7.0) (2024-06-27) + +**Bug fixes:** + +- bugfix(alerts-definitions): For Origin derived metrics, correct `all_bandwidth` type to `integer` + +**Enhancements:** + +- feat(logging-s3): Add `file_max_bytes` configuration field +- feat(alerts-definitions): Add `integration_id` parameter to the List Alert Definitions endpoint +- feat(alerts-definitions): For Origin derived metrics, add `all_status_4xx_excl_404_rate` and `all_status_404_rate` properties +- feat(alerts-definitions): For Domain derived metrics, add `status_4xx_excl_404_rate` and `status_404_rate` properties +- feat(alerts-definitions): For Stats derived metrics, add `status_4xx_excl_404_rate`, `status_404_rate`, `all_status_5xx_rate`, + `all_status_4xx_rate`, `all_status_gte_400_rate`, and `all_status_lt_500_rate` properties +- feat(billing-invoices): For invoice line items, added `ProductLine` property + +**Documentation:** + +- doc(billing-invoices): "Billing Invoices API" relabeled to "Invoices API" +- doc(billing-invoices): Updated documentation of `billing_start_date` and `billing_end_date` query parameters of + List of invoices endpoint +- doc(alerts-definitions): Updated documentation of several fields +- doc(notification-service): Updated documentation examples for several fields + ## [v4.6.0](https://github.com/fastly/fastly-rust/releases/tag/release/v4.6.0) (2024-05-24) **Bug fixes:** diff --git a/Cargo.toml b/Cargo.toml index 9c02030..f487599 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fastly-api" -version = "4.6.0" +version = "4.7.0" authors = ["Fastly "] edition = "2021" description = "Fastly API client" diff --git a/README.md b/README.md index fcebb47..5873a6f 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Rust 2021 Edition Add the following to `Cargo.toml` under `[dependencies]`: ```toml -fastly-api = "4.6.0" +fastly-api = "4.7.0" ``` ## Usage @@ -634,6 +634,8 @@ The fastly-rust API client currently does not support the following endpoints: - [`/stats`](https://www.fastly.com/documentation/reference/api/metrics-stats/historical-stats) (GET) - [`/tls/activations/{tls_activation_id}`](https://www.fastly.com/documentation/reference/api/tls/mutual-tls/activations) (GET, PATCH) - [`/tls/activations`](https://www.fastly.com/documentation/reference/api/tls/mutual-tls/activations) (GET) +- [`/tls/preview/domains/{tls_preview_domain_id}`](https://www.fastly.com/documentation/reference/api/) (GET, PATCH) +- [`/tls/preview/domains`](https://www.fastly.com/documentation/reference/api/) (GET, POST) - [`/v1/channel/{service_id}/ts/h/limit/{max_entries}`](https://www.fastly.com/documentation/reference/api/metrics-stats/origin-insights) (GET) - [`/v1/channel/{service_id}/ts/h`](https://www.fastly.com/documentation/reference/api/metrics-stats/origin-insights) (GET) - [`/v1/channel/{service_id}/ts/{start_timestamp}`](https://www.fastly.com/documentation/reference/api/metrics-stats/origin-insights) (GET) diff --git a/docs/Invoicelineitems.md b/docs/Invoicelineitems.md index 5350002..8d9bcb9 100644 --- a/docs/Invoicelineitems.md +++ b/docs/Invoicelineitems.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **units** | Option<**f32**> | Total number of units of usage. | **product_name** | Option<**String**> | The name of the product. | **product_group** | Option<**String**> | The broader classification of the product (e.g., `Compute` or `Full-Site Delivery`). | +**product_line** | Option<**String**> | The broader classification of the product (e.g., `Network Services` or `Security`). | **region** | Option<**String**> | The geographical area applicable for regionally based products. | **usage_type** | Option<**String**> | The unit of measure (e.g., `requests` or `bandwidth`). | diff --git a/docs/LoggingS3Additional.md b/docs/LoggingS3Additional.md index 7b4c915..49988e2 100644 --- a/docs/LoggingS3Additional.md +++ b/docs/LoggingS3Additional.md @@ -15,6 +15,7 @@ Name | Type | Description | Notes **secret_key** | Option<**String**> | The secret key for your S3 account. Not required if `iam_role` is provided. | **server_side_encryption_kms_key_id** | Option<**String**> | Optional server-side KMS Key Id. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. | [default to null] **server_side_encryption** | Option<**String**> | Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. | [default to null] +**file_max_bytes** | Option<**i32**> | 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.) | [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LoggingS3Api.md b/docs/LoggingS3Api.md index 29e938d..8c0c4ee 100644 --- a/docs/LoggingS3Api.md +++ b/docs/LoggingS3Api.md @@ -53,6 +53,7 @@ Name | Type | Description | Required | Notes **secret_key** | Option\<**String**> | The secret key for your S3 account. Not required if `iam_role` is provided. | | **server_side_encryption_kms_key_id** | Option\<**String**> | Optional server-side KMS Key Id. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. | |[default to null] **server_side_encryption** | Option\<**String**> | Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. | |[default to null] +**file_max_bytes** | Option\<**i32**> | 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.) | | ### Return type @@ -221,6 +222,7 @@ Name | Type | Description | Required | Notes **secret_key** | Option\<**String**> | The secret key for your S3 account. Not required if `iam_role` is provided. | | **server_side_encryption_kms_key_id** | Option\<**String**> | Optional server-side KMS Key Id. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. | |[default to null] **server_side_encryption** | Option\<**String**> | Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. | |[default to null] +**file_max_bytes** | Option\<**i32**> | 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.) | | ### Return type diff --git a/docs/LoggingS3Response.md b/docs/LoggingS3Response.md index 78c65ba..7fbfc5f 100644 --- a/docs/LoggingS3Response.md +++ b/docs/LoggingS3Response.md @@ -30,6 +30,7 @@ Name | Type | Description | Notes **secret_key** | Option<**String**> | The secret key for your S3 account. Not required if `iam_role` is provided. | **server_side_encryption_kms_key_id** | Option<**String**> | Optional server-side KMS Key Id. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. | [default to null] **server_side_encryption** | Option<**String**> | Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. | [default to null] +**file_max_bytes** | Option<**i32**> | 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.) | [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sig.json b/sig.json index a2ee922..d84bb6e 100644 --- a/sig.json +++ b/sig.json @@ -1 +1 @@ -{"G": "12e42c04", "D": "dd010b17"} +{"G": "5a2ccc65", "D": "ec7f026b"} diff --git a/src/apis/configuration.rs b/src/apis/configuration.rs index 0a43349..1694436 100644 --- a/src/apis/configuration.rs +++ b/src/apis/configuration.rs @@ -49,7 +49,7 @@ impl Default for Configuration { Configuration { base_path: "https://api.fastly.com".to_owned(), - user_agent: Some("fastly-rust/4.6.0/rust".to_owned()), + user_agent: Some("fastly-rust/4.7.0/rust".to_owned()), client: reqwest::Client::new(), basic_auth: None, oauth_access_token: None, diff --git a/src/apis/logging_s3_api.rs b/src/apis/logging_s3_api.rs index 3cee096..ea0d6bf 100644 --- a/src/apis/logging_s3_api.rs +++ b/src/apis/logging_s3_api.rs @@ -59,7 +59,9 @@ pub struct CreateLogAwsS3Params { /// Optional server-side KMS Key Id. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. pub server_side_encryption_kms_key_id: Option, /// Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. - pub server_side_encryption: Option + pub server_side_encryption: Option, + /// 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.) + pub file_max_bytes: Option } /// struct for passing parameters to the method [`delete_log_aws_s3`] @@ -143,7 +145,9 @@ pub struct UpdateLogAwsS3Params { /// Optional server-side KMS Key Id. Must be set if `server_side_encryption` is set to `aws:kms` or `AES256`. pub server_side_encryption_kms_key_id: Option, /// Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. - pub server_side_encryption: Option + pub server_side_encryption: Option, + /// 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.) + pub file_max_bytes: Option } @@ -211,6 +215,7 @@ pub async fn create_log_aws_s3(configuration: &mut configuration::Configuration, let secret_key = params.secret_key; let server_side_encryption_kms_key_id = params.server_side_encryption_kms_key_id; let server_side_encryption = params.server_side_encryption; + let file_max_bytes = params.file_max_bytes; let local_var_client = &local_var_configuration.client; @@ -293,6 +298,9 @@ pub async fn create_log_aws_s3(configuration: &mut configuration::Configuration, if let Some(local_var_param_value) = server_side_encryption { local_var_form_params.insert("server_side_encryption", local_var_param_value.to_string()); } + if let Some(local_var_param_value) = file_max_bytes { + local_var_form_params.insert("file_max_bytes", local_var_param_value.to_string()); + } local_var_req_builder = local_var_req_builder.form(&local_var_form_params); let local_var_req = local_var_req_builder.build()?; @@ -512,6 +520,7 @@ pub async fn update_log_aws_s3(configuration: &mut configuration::Configuration, let secret_key = params.secret_key; let server_side_encryption_kms_key_id = params.server_side_encryption_kms_key_id; let server_side_encryption = params.server_side_encryption; + let file_max_bytes = params.file_max_bytes; let local_var_client = &local_var_configuration.client; @@ -594,6 +603,9 @@ pub async fn update_log_aws_s3(configuration: &mut configuration::Configuration, if let Some(local_var_param_value) = server_side_encryption { local_var_form_params.insert("server_side_encryption", local_var_param_value.to_string()); } + if let Some(local_var_param_value) = file_max_bytes { + local_var_form_params.insert("file_max_bytes", local_var_param_value.to_string()); + } local_var_req_builder = local_var_req_builder.form(&local_var_form_params); let local_var_req = local_var_req_builder.build()?; diff --git a/src/models/invoicelineitems.rs b/src/models/invoicelineitems.rs index f8a554e..1ce701f 100644 --- a/src/models/invoicelineitems.rs +++ b/src/models/invoicelineitems.rs @@ -31,6 +31,9 @@ pub struct Invoicelineitems { /// The broader classification of the product (e.g., `Compute` or `Full-Site Delivery`). #[serde(rename = "ProductGroup", skip_serializing_if = "Option::is_none")] pub product_group: Option, + /// The broader classification of the product (e.g., `Network Services` or `Security`). + #[serde(rename = "ProductLine", skip_serializing_if = "Option::is_none")] + pub product_line: Option, /// The geographical area applicable for regionally based products. #[serde(rename = "Region", skip_serializing_if = "Option::is_none")] pub region: Option, @@ -49,6 +52,7 @@ impl Invoicelineitems { units: None, product_name: None, product_group: None, + product_line: None, region: None, usage_type: None, } diff --git a/src/models/logging_s3_additional.rs b/src/models/logging_s3_additional.rs index 8bf9c77..928e380 100644 --- a/src/models/logging_s3_additional.rs +++ b/src/models/logging_s3_additional.rs @@ -43,6 +43,9 @@ pub struct LoggingS3Additional { /// Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. #[serde(rename = "server_side_encryption", skip_serializing_if = "Option::is_none")] pub server_side_encryption: Option, + /// 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.) + #[serde(rename = "file_max_bytes", skip_serializing_if = "Option::is_none")] + pub file_max_bytes: Option, } impl LoggingS3Additional { @@ -59,6 +62,7 @@ impl LoggingS3Additional { secret_key: None, server_side_encryption_kms_key_id: None, server_side_encryption: None, + file_max_bytes: None, } } } diff --git a/src/models/logging_s3_response.rs b/src/models/logging_s3_response.rs index e9ee3ad..485d14c 100644 --- a/src/models/logging_s3_response.rs +++ b/src/models/logging_s3_response.rs @@ -86,6 +86,9 @@ pub struct LoggingS3Response { /// Set this to `AES256` or `aws:kms` to enable S3 Server Side Encryption. #[serde(rename = "server_side_encryption", skip_serializing_if = "Option::is_none")] pub server_side_encryption: Option, + /// 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.) + #[serde(rename = "file_max_bytes", skip_serializing_if = "Option::is_none")] + pub file_max_bytes: Option, } impl LoggingS3Response { @@ -117,6 +120,7 @@ impl LoggingS3Response { secret_key: None, server_side_encryption_kms_key_id: None, server_side_encryption: None, + file_max_bytes: None, } } }