lib/fastly/api/logging_s3_api.rb in fastly-8.2.0 vs lib/fastly/api/logging_s3_api.rb in fastly-8.4.0

- old
+ new

@@ -1,9 +1,9 @@ =begin #Fastly API -#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://developer.fastly.com/reference/api/) +#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/) The version of the OpenAPI document: 1.0.0 Contact: oss@fastly.com =end @@ -40,10 +40,11 @@ # @option opts [String] :public_key A PGP public key that Fastly will use to encrypt your log files before writing them to disk. (default to 'null') # @option opts [String] :redundancy The S3 redundancy level. (default to 'null') # @option opts [String] :secret_key The secret key for your S3 account. Not required if &#x60;iam_role&#x60; is provided. # @option opts [String] :server_side_encryption_kms_key_id Optional server-side KMS Key Id. Must be set if &#x60;server_side_encryption&#x60; is set to &#x60;aws:kms&#x60; or &#x60;AES256&#x60;. (default to 'null') # @option opts [String] :server_side_encryption Set this to &#x60;AES256&#x60; or &#x60;aws:kms&#x60; to enable S3 Server Side Encryption. (default to 'null') + # @option opts [Integer] :file_max_bytes 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 [LoggingS3Response] def create_log_aws_s3(opts = {}) data, _status_code, _headers = create_log_aws_s3_with_http_info(opts) data end @@ -71,10 +72,11 @@ # @option opts [String] :public_key A PGP public key that Fastly will use to encrypt your log files before writing them to disk. (default to 'null') # @option opts [String] :redundancy The S3 redundancy level. (default to 'null') # @option opts [String] :secret_key The secret key for your S3 account. Not required if &#x60;iam_role&#x60; is provided. # @option opts [String] :server_side_encryption_kms_key_id Optional server-side KMS Key Id. Must be set if &#x60;server_side_encryption&#x60; is set to &#x60;aws:kms&#x60; or &#x60;AES256&#x60;. (default to 'null') # @option opts [String] :server_side_encryption Set this to &#x60;AES256&#x60; or &#x60;aws:kms&#x60; to enable S3 Server Side Encryption. (default to 'null') + # @option opts [Integer] :file_max_bytes 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 [Array<(LoggingS3Response, Integer, Hash)>] LoggingS3Response data, response status code and response headers def create_log_aws_s3_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LoggingS3Api.create_log_aws_s3 ...' end @@ -103,10 +105,14 @@ end allowable_values = ["zstd", "snappy", "gzip"] if @api_client.config.client_side_validation && opts[:'compression_codec'] && !allowable_values.include?(opts[:'compression_codec']) fail ArgumentError, "invalid value for \"compression_codec\", must be one of #{allowable_values}" end + if @api_client.config.client_side_validation && !opts[:'file_max_bytes'].nil? && opts[:'file_max_bytes'] < 1048576 + fail ArgumentError, 'invalid value for "opts[:"file_max_bytes"]" when calling LoggingS3Api.create_log_aws_s3, must be greater than or equal to 1048576.' + end + # resource path local_var_path = '/service/{service_id}/version/{version_id}/logging/s3'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -142,10 +148,11 @@ form_params['public_key'] = opts[:'public_key'] if !opts[:'public_key'].nil? form_params['redundancy'] = opts[:'redundancy'] if !opts[:'redundancy'].nil? form_params['secret_key'] = opts[:'secret_key'] if !opts[:'secret_key'].nil? form_params['server_side_encryption_kms_key_id'] = opts[:'server_side_encryption_kms_key_id'] if !opts[:'server_side_encryption_kms_key_id'].nil? form_params['server_side_encryption'] = opts[:'server_side_encryption'] if !opts[:'server_side_encryption'].nil? + form_params['file_max_bytes'] = opts[:'file_max_bytes'] if !opts[:'file_max_bytes'].nil? # http body (model) post_body = opts[:debug_body] # return_type @@ -419,10 +426,11 @@ # @option opts [String] :public_key A PGP public key that Fastly will use to encrypt your log files before writing them to disk. (default to 'null') # @option opts [String] :redundancy The S3 redundancy level. (default to 'null') # @option opts [String] :secret_key The secret key for your S3 account. Not required if &#x60;iam_role&#x60; is provided. # @option opts [String] :server_side_encryption_kms_key_id Optional server-side KMS Key Id. Must be set if &#x60;server_side_encryption&#x60; is set to &#x60;aws:kms&#x60; or &#x60;AES256&#x60;. (default to 'null') # @option opts [String] :server_side_encryption Set this to &#x60;AES256&#x60; or &#x60;aws:kms&#x60; to enable S3 Server Side Encryption. (default to 'null') + # @option opts [Integer] :file_max_bytes 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 [LoggingS3Response] def update_log_aws_s3(opts = {}) data, _status_code, _headers = update_log_aws_s3_with_http_info(opts) data end @@ -451,10 +459,11 @@ # @option opts [String] :public_key A PGP public key that Fastly will use to encrypt your log files before writing them to disk. (default to 'null') # @option opts [String] :redundancy The S3 redundancy level. (default to 'null') # @option opts [String] :secret_key The secret key for your S3 account. Not required if &#x60;iam_role&#x60; is provided. # @option opts [String] :server_side_encryption_kms_key_id Optional server-side KMS Key Id. Must be set if &#x60;server_side_encryption&#x60; is set to &#x60;aws:kms&#x60; or &#x60;AES256&#x60;. (default to 'null') # @option opts [String] :server_side_encryption Set this to &#x60;AES256&#x60; or &#x60;aws:kms&#x60; to enable S3 Server Side Encryption. (default to 'null') + # @option opts [Integer] :file_max_bytes 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 [Array<(LoggingS3Response, Integer, Hash)>] LoggingS3Response data, response status code and response headers def update_log_aws_s3_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LoggingS3Api.update_log_aws_s3 ...' end @@ -488,10 +497,14 @@ end allowable_values = ["zstd", "snappy", "gzip"] if @api_client.config.client_side_validation && opts[:'compression_codec'] && !allowable_values.include?(opts[:'compression_codec']) fail ArgumentError, "invalid value for \"compression_codec\", must be one of #{allowable_values}" end + if @api_client.config.client_side_validation && !opts[:'file_max_bytes'].nil? && opts[:'file_max_bytes'] < 1048576 + fail ArgumentError, 'invalid value for "opts[:"file_max_bytes"]" when calling LoggingS3Api.update_log_aws_s3, must be greater than or equal to 1048576.' + end + # resource path local_var_path = '/service/{service_id}/version/{version_id}/logging/s3/{logging_s3_name}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)).sub('{' + 'logging_s3_name' + '}', CGI.escape(logging_s3_name.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -527,9 +540,10 @@ form_params['public_key'] = opts[:'public_key'] if !opts[:'public_key'].nil? form_params['redundancy'] = opts[:'redundancy'] if !opts[:'redundancy'].nil? form_params['secret_key'] = opts[:'secret_key'] if !opts[:'secret_key'].nil? form_params['server_side_encryption_kms_key_id'] = opts[:'server_side_encryption_kms_key_id'] if !opts[:'server_side_encryption_kms_key_id'].nil? form_params['server_side_encryption'] = opts[:'server_side_encryption'] if !opts[:'server_side_encryption'].nil? + form_params['file_max_bytes'] = opts[:'file_max_bytes'] if !opts[:'file_max_bytes'].nil? # http body (model) post_body = opts[:debug_body] # return_type