fastly 6.0.2 → 7.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +32 -0
- data/Gemfile.lock +1 -1
- data/README.md +7 -2
- data/docs/Backend.md +1 -0
- data/docs/BackendApi.md +4 -0
- data/docs/BackendResponse.md +1 -0
- data/docs/CacheSetting.md +2 -2
- data/docs/CacheSettingResponse.md +3 -3
- data/docs/CacheSettingsApi.md +8 -8
- data/docs/DomainApi.md +2 -2
- data/docs/GzipResponse.md +1 -1
- data/docs/Header.md +0 -2
- data/docs/HeaderApi.md +8 -8
- data/docs/HeaderResponse.md +3 -3
- data/docs/HeaderResponseAdditional.md +11 -0
- data/docs/{LoggingAzureblobAllOf.md → LoggingAzureblobAdditional.md} +1 -1
- data/docs/LoggingAzureblobApi.md +8 -8
- data/docs/LoggingAzureblobResponse.md +8 -8
- data/docs/{LoggingBigqueryAllOf.md → LoggingBigqueryAdditional.md} +1 -1
- data/docs/LoggingBigqueryApi.md +4 -4
- data/docs/LoggingBigqueryResponse.md +2 -2
- data/docs/{LoggingCloudfilesAllOf.md → LoggingCloudfilesAdditional.md} +1 -1
- data/docs/LoggingCloudfilesApi.md +8 -8
- data/docs/LoggingCloudfilesResponse.md +8 -8
- data/docs/LoggingCommon.md +0 -1
- data/docs/{LoggingPapertrail.md → LoggingCommonResponse.md} +2 -4
- data/docs/{LoggingLogshuttle.md → LoggingCommonResponseAllOf.md} +1 -4
- data/docs/LoggingCommonResponseAllOf1.md +10 -0
- data/docs/{LoggingDatadogAllOf.md → LoggingDatadogAdditional.md} +1 -1
- data/docs/LoggingDatadogApi.md +4 -4
- data/docs/LoggingDatadogResponse.md +2 -2
- data/docs/{LoggingDigitaloceanAllOf.md → LoggingDigitaloceanAdditional.md} +1 -1
- data/docs/LoggingDigitaloceanApi.md +8 -8
- data/docs/LoggingDigitaloceanResponse.md +8 -8
- data/docs/{LoggingElasticsearchAllOf.md → LoggingElasticsearchAdditional.md} +1 -1
- data/docs/LoggingElasticsearchApi.md +4 -4
- data/docs/LoggingElasticsearchResponse.md +2 -2
- data/docs/LoggingFormatVersionInteger.md +10 -0
- data/docs/LoggingFormatVersionString.md +10 -0
- data/docs/{LoggingFtpAllOf.md → LoggingFtpAdditional.md} +1 -2
- data/docs/LoggingFtpApi.md +12 -12
- data/docs/LoggingFtpResponse.md +9 -9
- data/docs/{LoggingFormatVersion.md → LoggingFtpResponseAllOf.md} +2 -1
- data/docs/{LoggingGcsAllOf.md → LoggingGcsAdditional.md} +1 -1
- data/docs/LoggingGcsApi.md +8 -8
- data/docs/LoggingGcsResponse.md +8 -8
- data/docs/LoggingGenericCommon.md +0 -2
- data/docs/LoggingGenericCommonResponse.md +14 -0
- data/docs/LoggingGenericCommonResponseAllOf.md +12 -0
- data/docs/LoggingGenericCommonResponseAllOf1.md +11 -0
- data/docs/{LoggingGooglePubsubAllOf.md → LoggingGooglePubsubAdditional.md} +1 -1
- data/docs/LoggingGooglePubsubResponse.md +2 -2
- data/docs/{LoggingHerokuAllOf.md → LoggingHerokuAdditional.md} +1 -1
- data/docs/LoggingHerokuApi.md +4 -4
- data/docs/LoggingHerokuResponse.md +2 -2
- data/docs/{LoggingHoneycombAllOf.md → LoggingHoneycombAdditional.md} +1 -1
- data/docs/LoggingHoneycombApi.md +8 -8
- data/docs/LoggingHoneycombResponse.md +2 -2
- data/docs/{LoggingHttpsAllOf.md → LoggingHttpsAdditional.md} +1 -1
- data/docs/LoggingHttpsApi.md +4 -4
- data/docs/LoggingHttpsResponse.md +2 -2
- data/docs/{LoggingKafkaAllOf.md → LoggingKafkaAdditional.md} +1 -1
- data/docs/LoggingKafkaApi.md +4 -4
- data/docs/LoggingKafkaResponse.md +6 -6
- data/docs/{LoggingKafka.md → LoggingKafkaResponsePost.md} +7 -2
- data/docs/{LoggingKinesis.md → LoggingKinesisAdditional.md} +1 -2
- data/docs/LoggingKinesisApi.md +2 -2
- data/docs/LoggingKinesisResponse.md +2 -2
- data/docs/{LoggingLogentriesAllOf.md → LoggingLogentriesAdditional.md} +1 -1
- data/docs/LoggingLogentriesApi.md +4 -4
- data/docs/LoggingLogentriesResponse.md +2 -2
- data/docs/{LoggingLogglyAllOf.md → LoggingLogglyAdditional.md} +1 -1
- data/docs/LoggingLogglyApi.md +4 -4
- data/docs/LoggingLogglyResponse.md +2 -2
- data/docs/{LoggingLogshuttleAllOf.md → LoggingLogshuttleAdditional.md} +1 -1
- data/docs/LoggingLogshuttleApi.md +4 -4
- data/docs/LoggingLogshuttleResponse.md +2 -2
- data/docs/{LoggingNewrelicAllOf.md → LoggingNewrelicAdditional.md} +1 -1
- data/docs/LoggingNewrelicApi.md +4 -4
- data/docs/LoggingNewrelicResponse.md +2 -2
- data/docs/LoggingNewrelicotlpAdditional.md +13 -0
- data/docs/LoggingNewrelicotlpApi.md +252 -0
- data/docs/LoggingNewrelicotlpResponse.md +22 -0
- data/docs/{LoggingOpenstackAllOf.md → LoggingOpenstackAdditional.md} +1 -1
- data/docs/LoggingOpenstackApi.md +8 -8
- data/docs/LoggingOpenstackResponse.md +8 -8
- data/docs/LoggingPapertrailApi.md +4 -4
- data/docs/LoggingPapertrailResponse.md +2 -2
- data/docs/LoggingPubsubApi.md +4 -4
- data/docs/{LoggingS3AllOf.md → LoggingS3Additional.md} +1 -1
- data/docs/LoggingS3Api.md +8 -8
- data/docs/LoggingS3Response.md +8 -8
- data/docs/{LoggingScalyrAllOf.md → LoggingScalyrAdditional.md} +1 -1
- data/docs/LoggingScalyrApi.md +4 -4
- data/docs/LoggingScalyrResponse.md +2 -2
- data/docs/{LoggingSftpAllOf.md → LoggingSftpAdditional.md} +1 -2
- data/docs/LoggingSftpApi.md +8 -8
- data/docs/LoggingSftpResponse.md +10 -10
- data/docs/LoggingSftpResponseAllOf.md +13 -0
- data/docs/{LoggingSplunkAllOf.md → LoggingSplunkAdditional.md} +1 -1
- data/docs/LoggingSplunkApi.md +4 -4
- data/docs/LoggingSplunkResponse.md +2 -2
- data/docs/{LoggingSumologicAllOf.md → LoggingSumologicAdditional.md} +1 -1
- data/docs/LoggingSumologicApi.md +4 -4
- data/docs/LoggingSumologicResponse.md +2 -2
- data/docs/{LoggingSyslogAllOf.md → LoggingSyslogAdditional.md} +1 -1
- data/docs/LoggingSyslogApi.md +4 -4
- data/docs/LoggingSyslogResponse.md +2 -2
- data/docs/{PoolAllOf.md → PoolAdditional.md} +1 -6
- data/docs/PoolApi.md +46 -22
- data/docs/PoolResponse.md +12 -11
- data/docs/PoolResponseAllOf.md +1 -1
- data/docs/PoolResponseCommon.md +15 -0
- data/docs/{Pool.md → PoolResponsePost.md} +14 -7
- data/docs/PoolResponsePostAllOf.md +10 -0
- data/docs/RequestSettingsAdditional.md +15 -0
- data/docs/RequestSettingsApi.md +10 -10
- data/docs/RequestSettingsResponse.md +11 -11
- data/docs/RequestSettingsResponseAllOf.md +15 -0
- data/docs/ResponseObject.md +1 -1
- data/docs/ResponseObjectResponse.md +2 -2
- data/docs/SecretStoreApi.md +3 -3
- data/docs/ServiceIdAndVersionString.md +11 -0
- data/docs/TlsCommonResponse.md +14 -0
- data/docs/{TlsCommon.md → TlsCommonResponseAllOf.md} +1 -2
- data/docs/TlsCommonResponseAllOf1.md +10 -0
- data/docs/TlsDomainsApi.md +2 -2
- data/docs/TlsSubscriptionsApi.md +4 -4
- data/lib/fastly/api/backend_api.rb +16 -0
- data/lib/fastly/api/cache_settings_api.rb +8 -8
- data/lib/fastly/api/domain_api.rb +3 -3
- data/lib/fastly/api/header_api.rb +12 -12
- data/lib/fastly/api/logging_azureblob_api.rb +12 -12
- data/lib/fastly/api/logging_bigquery_api.rb +6 -6
- data/lib/fastly/api/logging_cloudfiles_api.rb +12 -12
- data/lib/fastly/api/logging_datadog_api.rb +6 -6
- data/lib/fastly/api/logging_digitalocean_api.rb +12 -12
- data/lib/fastly/api/logging_elasticsearch_api.rb +6 -6
- data/lib/fastly/api/logging_ftp_api.rb +18 -18
- data/lib/fastly/api/logging_gcs_api.rb +12 -12
- data/lib/fastly/api/logging_heroku_api.rb +6 -6
- data/lib/fastly/api/logging_honeycomb_api.rb +12 -12
- data/lib/fastly/api/logging_https_api.rb +6 -6
- data/lib/fastly/api/logging_kafka_api.rb +6 -6
- data/lib/fastly/api/logging_kinesis_api.rb +7 -3
- data/lib/fastly/api/logging_logentries_api.rb +6 -6
- data/lib/fastly/api/logging_loggly_api.rb +6 -6
- data/lib/fastly/api/logging_logshuttle_api.rb +6 -6
- data/lib/fastly/api/logging_newrelic_api.rb +6 -6
- data/lib/fastly/api/logging_newrelicotlp_api.rb +473 -0
- data/lib/fastly/api/logging_openstack_api.rb +12 -12
- data/lib/fastly/api/logging_papertrail_api.rb +6 -6
- data/lib/fastly/api/logging_pubsub_api.rb +6 -6
- data/lib/fastly/api/logging_s3_api.rb +12 -12
- data/lib/fastly/api/logging_scalyr_api.rb +6 -6
- data/lib/fastly/api/logging_sftp_api.rb +12 -12
- data/lib/fastly/api/logging_splunk_api.rb +6 -6
- data/lib/fastly/api/logging_sumologic_api.rb +6 -6
- data/lib/fastly/api/logging_syslog_api.rb +6 -6
- data/lib/fastly/api/pool_api.rb +77 -41
- data/lib/fastly/api/rate_limiter_api.rb +2 -2
- data/lib/fastly/api/request_settings_api.rb +15 -15
- data/lib/fastly/api/secret_store_api.rb +2 -2
- data/lib/fastly/api/tls_domains_api.rb +2 -2
- data/lib/fastly/api/tls_subscriptions_api.rb +4 -4
- data/lib/fastly/configuration.rb +30 -0
- data/lib/fastly/models/backend.rb +29 -1
- data/lib/fastly/models/backend_response.rb +29 -1
- data/lib/fastly/models/cache_setting.rb +2 -2
- data/lib/fastly/models/cache_setting_response.rb +4 -4
- data/lib/fastly/models/gzip_response.rb +2 -2
- data/lib/fastly/models/header.rb +1 -23
- data/lib/fastly/models/header_response.rb +26 -25
- data/lib/fastly/models/header_response_additional.rb +229 -0
- data/lib/fastly/models/{logging_azureblob_all_of.rb → logging_azureblob_additional.rb} +3 -3
- data/lib/fastly/models/logging_azureblob_response.rb +82 -80
- data/lib/fastly/models/{logging_bigquery_all_of.rb → logging_bigquery_additional.rb} +3 -3
- data/lib/fastly/models/logging_bigquery_response.rb +20 -18
- data/lib/fastly/models/{logging_cloudfiles_all_of.rb → logging_cloudfiles_additional.rb} +3 -3
- data/lib/fastly/models/logging_cloudfiles_response.rb +83 -81
- data/lib/fastly/models/logging_common.rb +1 -25
- data/lib/fastly/models/{logging_loggly.rb → logging_common_response.rb} +17 -27
- data/lib/fastly/models/{logging_logshuttle.rb → logging_common_response_all_of.rb} +7 -60
- data/lib/fastly/models/logging_common_response_all_of1.rb +253 -0
- data/lib/fastly/models/{logging_datadog_all_of.rb → logging_datadog_additional.rb} +3 -3
- data/lib/fastly/models/logging_datadog_response.rb +19 -18
- data/lib/fastly/models/{logging_digitalocean_all_of.rb → logging_digitalocean_additional.rb} +3 -3
- data/lib/fastly/models/logging_digitalocean_response.rb +82 -80
- data/lib/fastly/models/{logging_elasticsearch_all_of.rb → logging_elasticsearch_additional.rb} +3 -3
- data/lib/fastly/models/logging_elasticsearch_response.rb +21 -18
- data/lib/fastly/models/logging_format_version_integer.rb +253 -0
- data/lib/fastly/models/logging_format_version_string.rb +253 -0
- data/lib/fastly/models/{logging_ftp_all_of.rb → logging_ftp_additional.rb} +4 -16
- data/lib/fastly/models/logging_ftp_response.rb +88 -85
- data/lib/fastly/models/logging_ftp_response_all_of.rb +219 -0
- data/lib/fastly/models/{logging_gcs_all_of.rb → logging_gcs_additional.rb} +3 -3
- data/lib/fastly/models/logging_gcs_response.rb +80 -77
- data/lib/fastly/models/logging_generic_common.rb +1 -25
- data/lib/fastly/models/{logging_sumologic.rb → logging_generic_common_response.rb} +60 -80
- data/lib/fastly/models/logging_generic_common_response_all_of.rb +286 -0
- data/lib/fastly/models/logging_generic_common_response_all_of1.rb +231 -0
- data/lib/fastly/models/{logging_google_pubsub_all_of.rb → logging_google_pubsub_additional.rb} +3 -3
- data/lib/fastly/models/logging_google_pubsub_response.rb +20 -18
- data/lib/fastly/models/{logging_heroku_all_of.rb → logging_heroku_additional.rb} +3 -3
- data/lib/fastly/models/logging_heroku_response.rb +19 -18
- data/lib/fastly/models/{logging_honeycomb_all_of.rb → logging_honeycomb_additional.rb} +3 -3
- data/lib/fastly/models/logging_honeycomb_response.rb +19 -18
- data/lib/fastly/models/{logging_https_all_of.rb → logging_https_additional.rb} +3 -3
- data/lib/fastly/models/logging_https_response.rb +21 -18
- data/lib/fastly/models/{logging_kafka_all_of.rb → logging_kafka_additional.rb} +3 -3
- data/lib/fastly/models/logging_kafka_response.rb +71 -69
- data/lib/fastly/models/{logging_kafka.rb → logging_kafka_response_post.rb} +72 -18
- data/lib/fastly/models/{logging_kinesis.rb → logging_kinesis_additional.rb} +4 -15
- data/lib/fastly/models/logging_kinesis_response.rb +51 -15
- data/lib/fastly/models/{logging_logentries_all_of.rb → logging_logentries_additional.rb} +3 -3
- data/lib/fastly/models/logging_logentries_response.rb +19 -18
- data/lib/fastly/models/{logging_loggly_all_of.rb → logging_loggly_additional.rb} +3 -3
- data/lib/fastly/models/logging_loggly_response.rb +19 -18
- data/lib/fastly/models/{logging_logshuttle_all_of.rb → logging_logshuttle_additional.rb} +3 -3
- data/lib/fastly/models/logging_logshuttle_response.rb +19 -18
- data/lib/fastly/models/{logging_newrelic_all_of.rb → logging_newrelic_additional.rb} +3 -3
- data/lib/fastly/models/logging_newrelic_response.rb +19 -18
- data/lib/fastly/models/logging_newrelicotlp_additional.rb +288 -0
- data/lib/fastly/models/{logging_newrelic.rb → logging_newrelicotlp_response.rb} +90 -24
- data/lib/fastly/models/{logging_openstack_all_of.rb → logging_openstack_additional.rb} +3 -3
- data/lib/fastly/models/logging_openstack_response.rb +82 -80
- data/lib/fastly/models/logging_papertrail_response.rb +19 -18
- data/lib/fastly/models/{logging_s3_all_of.rb → logging_s3_additional.rb} +3 -3
- data/lib/fastly/models/logging_s3_response.rb +84 -82
- data/lib/fastly/models/{logging_scalyr_all_of.rb → logging_scalyr_additional.rb} +3 -3
- data/lib/fastly/models/logging_scalyr_response.rb +19 -18
- data/lib/fastly/models/{logging_sftp_all_of.rb → logging_sftp_additional.rb} +4 -16
- data/lib/fastly/models/logging_sftp_response.rb +97 -94
- data/lib/fastly/models/{domain_check_item.rb → logging_sftp_response_all_of.rb} +44 -40
- data/lib/fastly/models/{logging_splunk_all_of.rb → logging_splunk_additional.rb} +3 -3
- data/lib/fastly/models/logging_splunk_response.rb +21 -18
- data/lib/fastly/models/{logging_sumologic_all_of.rb → logging_sumologic_additional.rb} +3 -3
- data/lib/fastly/models/logging_sumologic_response.rb +19 -18
- data/lib/fastly/models/{logging_syslog_all_of.rb → logging_syslog_additional.rb} +3 -3
- data/lib/fastly/models/logging_syslog_response.rb +21 -18
- data/lib/fastly/models/{pool_all_of.rb → pool_additional.rb} +4 -83
- data/lib/fastly/models/pool_response.rb +113 -125
- data/lib/fastly/models/pool_response_all_of.rb +10 -7
- data/lib/fastly/models/pool_response_common.rb +269 -0
- data/lib/fastly/models/{pool.rb → pool_response_post.rb} +142 -92
- data/lib/fastly/models/pool_response_post_all_of.rb +219 -0
- data/lib/fastly/models/rate_limiter.rb +2 -2
- data/lib/fastly/models/rate_limiter_response.rb +2 -2
- data/lib/fastly/models/{request_settings.rb → request_settings_additional.rb} +4 -64
- data/lib/fastly/models/request_settings_response.rb +96 -95
- data/lib/fastly/models/request_settings_response_all_of.rb +267 -0
- data/lib/fastly/models/response_object.rb +2 -2
- data/lib/fastly/models/response_object_response.rb +4 -4
- data/lib/fastly/models/{tls_subscription_response_data_all_of.rb → service_id_and_version_string.rb} +16 -16
- data/lib/fastly/models/{tls_common.rb → tls_common_response.rb} +15 -7
- data/lib/fastly/models/tls_common_response_all_of.rb +259 -0
- data/lib/fastly/models/tls_common_response_all_of1.rb +253 -0
- data/lib/fastly/models/tls_subscription_response_data.rb +0 -7
- data/lib/fastly/version.rb +1 -1
- data/lib/fastly.rb +50 -57
- data/sig.json +1 -1
- metadata +102 -116
- data/docs/DomainCheckItem.md +0 -11
- data/docs/LoggingAzureblob.md +0 -25
- data/docs/LoggingBigquery.md +0 -21
- data/docs/LoggingCloudfiles.md +0 -25
- data/docs/LoggingDatadog.md +0 -16
- data/docs/LoggingDigitalocean.md +0 -25
- data/docs/LoggingElasticsearch.md +0 -25
- data/docs/LoggingFtp.md +0 -27
- data/docs/LoggingGcs.md +0 -26
- data/docs/LoggingGooglePubsub.md +0 -19
- data/docs/LoggingHeroku.md +0 -16
- data/docs/LoggingHoneycomb.md +0 -16
- data/docs/LoggingHttps.md +0 -27
- data/docs/LoggingLogentries.md +0 -18
- data/docs/LoggingLoggly.md +0 -15
- data/docs/LoggingNewrelic.md +0 -16
- data/docs/LoggingOpenstack.md +0 -25
- data/docs/LoggingS3.md +0 -30
- data/docs/LoggingScalyr.md +0 -17
- data/docs/LoggingSftp.md +0 -27
- data/docs/LoggingSplunk.md +0 -23
- data/docs/LoggingSumologic.md +0 -16
- data/docs/LoggingSyslog.md +0 -25
- data/docs/RequestSettings.md +0 -21
- data/docs/TlsSubscriptionResponseDataAllOf.md +0 -11
- data/lib/fastly/models/logging_azureblob.rb +0 -480
- data/lib/fastly/models/logging_bigquery.rb +0 -387
- data/lib/fastly/models/logging_cloudfiles.rb +0 -478
- data/lib/fastly/models/logging_datadog.rb +0 -351
- data/lib/fastly/models/logging_digitalocean.rb +0 -467
- data/lib/fastly/models/logging_elasticsearch.rb +0 -446
- data/lib/fastly/models/logging_format_version.rb +0 -35
- data/lib/fastly/models/logging_ftp.rb +0 -484
- data/lib/fastly/models/logging_gcs.rb +0 -474
- data/lib/fastly/models/logging_google_pubsub.rb +0 -368
- data/lib/fastly/models/logging_heroku.rb +0 -337
- data/lib/fastly/models/logging_honeycomb.rb +0 -335
- data/lib/fastly/models/logging_https.rb +0 -501
- data/lib/fastly/models/logging_logentries.rb +0 -372
- data/lib/fastly/models/logging_openstack.rb +0 -465
- data/lib/fastly/models/logging_papertrail.rb +0 -339
- data/lib/fastly/models/logging_s3.rb +0 -527
- data/lib/fastly/models/logging_scalyr.rb +0 -363
- data/lib/fastly/models/logging_sftp.rb +0 -491
- data/lib/fastly/models/logging_splunk.rb +0 -426
- data/lib/fastly/models/logging_syslog.rb +0 -449
@@ -23,9 +23,9 @@ module Fastly
|
|
23
23
|
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
24
24
|
# @option opts [String] :name The name for the real-time logging configuration.
|
25
25
|
# @option opts [String] :placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`.
|
26
|
-
# @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2)
|
27
26
|
# @option opts [String] :response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute.
|
28
27
|
# @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (default to '%h %l %u %t \"%r\" %>s %b')
|
28
|
+
# @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2)
|
29
29
|
# @option opts [String] :token The data authentication token associated with this endpoint.
|
30
30
|
# @option opts [String] :url The URL to stream logs to.
|
31
31
|
# @return [LoggingLogshuttleResponse]
|
@@ -40,9 +40,9 @@ module Fastly
|
|
40
40
|
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
41
41
|
# @option opts [String] :name The name for the real-time logging configuration.
|
42
42
|
# @option opts [String] :placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`.
|
43
|
-
# @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2)
|
44
43
|
# @option opts [String] :response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute.
|
45
44
|
# @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (default to '%h %l %u %t \"%r\" %>s %b')
|
45
|
+
# @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2)
|
46
46
|
# @option opts [String] :token The data authentication token associated with this endpoint.
|
47
47
|
# @option opts [String] :url The URL to stream logs to.
|
48
48
|
# @return [Array<(LoggingLogshuttleResponse, Integer, Hash)>] LoggingLogshuttleResponse data, response status code and response headers
|
@@ -89,9 +89,9 @@ module Fastly
|
|
89
89
|
form_params = opts[:form_params] || {}
|
90
90
|
form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
|
91
91
|
form_params['placement'] = opts[:'placement'] if !opts[:'placement'].nil?
|
92
|
-
form_params['format_version'] = opts[:'format_version'] if !opts[:'format_version'].nil?
|
93
92
|
form_params['response_condition'] = opts[:'response_condition'] if !opts[:'response_condition'].nil?
|
94
93
|
form_params['format'] = opts[:'format'] if !opts[:'format'].nil?
|
94
|
+
form_params['format_version'] = opts[:'format_version'] if !opts[:'format_version'].nil?
|
95
95
|
form_params['token'] = opts[:'token'] if !opts[:'token'].nil?
|
96
96
|
form_params['url'] = opts[:'url'] if !opts[:'url'].nil?
|
97
97
|
|
@@ -352,9 +352,9 @@ module Fastly
|
|
352
352
|
# @option opts [String] :logging_logshuttle_name The name for the real-time logging configuration. (required)
|
353
353
|
# @option opts [String] :name The name for the real-time logging configuration.
|
354
354
|
# @option opts [String] :placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`.
|
355
|
-
# @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2)
|
356
355
|
# @option opts [String] :response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute.
|
357
356
|
# @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (default to '%h %l %u %t \"%r\" %>s %b')
|
357
|
+
# @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2)
|
358
358
|
# @option opts [String] :token The data authentication token associated with this endpoint.
|
359
359
|
# @option opts [String] :url The URL to stream logs to.
|
360
360
|
# @return [LoggingLogshuttleResponse]
|
@@ -370,9 +370,9 @@ module Fastly
|
|
370
370
|
# @option opts [String] :logging_logshuttle_name The name for the real-time logging configuration. (required)
|
371
371
|
# @option opts [String] :name The name for the real-time logging configuration.
|
372
372
|
# @option opts [String] :placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`.
|
373
|
-
# @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2)
|
374
373
|
# @option opts [String] :response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute.
|
375
374
|
# @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (default to '%h %l %u %t \"%r\" %>s %b')
|
375
|
+
# @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2)
|
376
376
|
# @option opts [String] :token The data authentication token associated with this endpoint.
|
377
377
|
# @option opts [String] :url The URL to stream logs to.
|
378
378
|
# @return [Array<(LoggingLogshuttleResponse, Integer, Hash)>] LoggingLogshuttleResponse data, response status code and response headers
|
@@ -424,9 +424,9 @@ module Fastly
|
|
424
424
|
form_params = opts[:form_params] || {}
|
425
425
|
form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
|
426
426
|
form_params['placement'] = opts[:'placement'] if !opts[:'placement'].nil?
|
427
|
-
form_params['format_version'] = opts[:'format_version'] if !opts[:'format_version'].nil?
|
428
427
|
form_params['response_condition'] = opts[:'response_condition'] if !opts[:'response_condition'].nil?
|
429
428
|
form_params['format'] = opts[:'format'] if !opts[:'format'].nil?
|
429
|
+
form_params['format_version'] = opts[:'format_version'] if !opts[:'format_version'].nil?
|
430
430
|
form_params['token'] = opts[:'token'] if !opts[:'token'].nil?
|
431
431
|
form_params['url'] = opts[:'url'] if !opts[:'url'].nil?
|
432
432
|
|
@@ -23,9 +23,9 @@ module Fastly
|
|
23
23
|
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
24
24
|
# @option opts [String] :name The name for the real-time logging configuration.
|
25
25
|
# @option opts [String] :placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`.
|
26
|
-
# @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2)
|
27
26
|
# @option opts [String] :response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute.
|
28
27
|
# @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that New Relic Logs can ingest. (default to '{\"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S}t\",\"time_elapsed\":\"%{time.elapsed.usec}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\"geo_city\":\"%{client.geo.city}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"request\":\"%{req.request}V\",\"host\":\"%{req.http.Fastly-Orig-Host}V\",\"url\":\"%{json.escape(req.url)}V\",\"request_referer\":\"%{json.escape(req.http.Referer)}V\",\"request_user_agent\":\"%{json.escape(req.http.User-Agent)}V\",\"request_accept_language\":\"%{json.escape(req.http.Accept-Language)}V\",\"request_accept_charset\":\"%{json.escape(req.http.Accept-Charset)}V\",\"cache_status\":\"%{regsub(fastly_info.state, \\\"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\\\", \\\"\\\\2\\\\3\\\") }V\"}')
|
28
|
+
# @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2)
|
29
29
|
# @option opts [String] :token The Insert API key from the Account page of your New Relic account. Required.
|
30
30
|
# @option opts [String] :region The region to which to stream logs. (default to 'US')
|
31
31
|
# @return [LoggingNewrelicResponse]
|
@@ -40,9 +40,9 @@ module Fastly
|
|
40
40
|
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
41
41
|
# @option opts [String] :name The name for the real-time logging configuration.
|
42
42
|
# @option opts [String] :placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`.
|
43
|
-
# @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2)
|
44
43
|
# @option opts [String] :response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute.
|
45
44
|
# @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that New Relic Logs can ingest. (default to '{\"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S}t\",\"time_elapsed\":\"%{time.elapsed.usec}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\"geo_city\":\"%{client.geo.city}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"request\":\"%{req.request}V\",\"host\":\"%{req.http.Fastly-Orig-Host}V\",\"url\":\"%{json.escape(req.url)}V\",\"request_referer\":\"%{json.escape(req.http.Referer)}V\",\"request_user_agent\":\"%{json.escape(req.http.User-Agent)}V\",\"request_accept_language\":\"%{json.escape(req.http.Accept-Language)}V\",\"request_accept_charset\":\"%{json.escape(req.http.Accept-Charset)}V\",\"cache_status\":\"%{regsub(fastly_info.state, \\\"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\\\", \\\"\\\\2\\\\3\\\") }V\"}')
|
45
|
+
# @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2)
|
46
46
|
# @option opts [String] :token The Insert API key from the Account page of your New Relic account. Required.
|
47
47
|
# @option opts [String] :region The region to which to stream logs. (default to 'US')
|
48
48
|
# @return [Array<(LoggingNewrelicResponse, Integer, Hash)>] LoggingNewrelicResponse data, response status code and response headers
|
@@ -93,9 +93,9 @@ module Fastly
|
|
93
93
|
form_params = opts[:form_params] || {}
|
94
94
|
form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
|
95
95
|
form_params['placement'] = opts[:'placement'] if !opts[:'placement'].nil?
|
96
|
-
form_params['format_version'] = opts[:'format_version'] if !opts[:'format_version'].nil?
|
97
96
|
form_params['response_condition'] = opts[:'response_condition'] if !opts[:'response_condition'].nil?
|
98
97
|
form_params['format'] = opts[:'format'] if !opts[:'format'].nil?
|
98
|
+
form_params['format_version'] = opts[:'format_version'] if !opts[:'format_version'].nil?
|
99
99
|
form_params['token'] = opts[:'token'] if !opts[:'token'].nil?
|
100
100
|
form_params['region'] = opts[:'region'] if !opts[:'region'].nil?
|
101
101
|
|
@@ -356,9 +356,9 @@ module Fastly
|
|
356
356
|
# @option opts [String] :logging_newrelic_name The name for the real-time logging configuration. (required)
|
357
357
|
# @option opts [String] :name The name for the real-time logging configuration.
|
358
358
|
# @option opts [String] :placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`.
|
359
|
-
# @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2)
|
360
359
|
# @option opts [String] :response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute.
|
361
360
|
# @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that New Relic Logs can ingest. (default to '{\"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S}t\",\"time_elapsed\":\"%{time.elapsed.usec}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\"geo_city\":\"%{client.geo.city}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"request\":\"%{req.request}V\",\"host\":\"%{req.http.Fastly-Orig-Host}V\",\"url\":\"%{json.escape(req.url)}V\",\"request_referer\":\"%{json.escape(req.http.Referer)}V\",\"request_user_agent\":\"%{json.escape(req.http.User-Agent)}V\",\"request_accept_language\":\"%{json.escape(req.http.Accept-Language)}V\",\"request_accept_charset\":\"%{json.escape(req.http.Accept-Charset)}V\",\"cache_status\":\"%{regsub(fastly_info.state, \\\"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\\\", \\\"\\\\2\\\\3\\\") }V\"}')
|
361
|
+
# @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2)
|
362
362
|
# @option opts [String] :token The Insert API key from the Account page of your New Relic account. Required.
|
363
363
|
# @option opts [String] :region The region to which to stream logs. (default to 'US')
|
364
364
|
# @return [LoggingNewrelicResponse]
|
@@ -374,9 +374,9 @@ module Fastly
|
|
374
374
|
# @option opts [String] :logging_newrelic_name The name for the real-time logging configuration. (required)
|
375
375
|
# @option opts [String] :name The name for the real-time logging configuration.
|
376
376
|
# @option opts [String] :placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`.
|
377
|
-
# @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2)
|
378
377
|
# @option opts [String] :response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute.
|
379
378
|
# @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that New Relic Logs can ingest. (default to '{\"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S}t\",\"time_elapsed\":\"%{time.elapsed.usec}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\"geo_city\":\"%{client.geo.city}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"request\":\"%{req.request}V\",\"host\":\"%{req.http.Fastly-Orig-Host}V\",\"url\":\"%{json.escape(req.url)}V\",\"request_referer\":\"%{json.escape(req.http.Referer)}V\",\"request_user_agent\":\"%{json.escape(req.http.User-Agent)}V\",\"request_accept_language\":\"%{json.escape(req.http.Accept-Language)}V\",\"request_accept_charset\":\"%{json.escape(req.http.Accept-Charset)}V\",\"cache_status\":\"%{regsub(fastly_info.state, \\\"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\\\", \\\"\\\\2\\\\3\\\") }V\"}')
|
379
|
+
# @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2)
|
380
380
|
# @option opts [String] :token The Insert API key from the Account page of your New Relic account. Required.
|
381
381
|
# @option opts [String] :region The region to which to stream logs. (default to 'US')
|
382
382
|
# @return [Array<(LoggingNewrelicResponse, Integer, Hash)>] LoggingNewrelicResponse data, response status code and response headers
|
@@ -432,9 +432,9 @@ module Fastly
|
|
432
432
|
form_params = opts[:form_params] || {}
|
433
433
|
form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
|
434
434
|
form_params['placement'] = opts[:'placement'] if !opts[:'placement'].nil?
|
435
|
-
form_params['format_version'] = opts[:'format_version'] if !opts[:'format_version'].nil?
|
436
435
|
form_params['response_condition'] = opts[:'response_condition'] if !opts[:'response_condition'].nil?
|
437
436
|
form_params['format'] = opts[:'format'] if !opts[:'format'].nil?
|
437
|
+
form_params['format_version'] = opts[:'format_version'] if !opts[:'format_version'].nil?
|
438
438
|
form_params['token'] = opts[:'token'] if !opts[:'token'].nil?
|
439
439
|
form_params['region'] = opts[:'region'] if !opts[:'region'].nil?
|
440
440
|
|
@@ -0,0 +1,473 @@
|
|
1
|
+
=begin
|
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://developer.fastly.com/reference/api/)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
Contact: oss@fastly.com
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'cgi'
|
12
|
+
|
13
|
+
module Fastly
|
14
|
+
class LoggingNewrelicotlpApi
|
15
|
+
attr_accessor :api_client
|
16
|
+
|
17
|
+
def initialize(api_client = ApiClient.default)
|
18
|
+
@api_client = api_client
|
19
|
+
end
|
20
|
+
# Create a New Relic OTLP endpoint
|
21
|
+
# Create a New Relic OTLP logging object for a particular service and version.
|
22
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
23
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
24
|
+
# @option opts [String] :name The name for the real-time logging configuration.
|
25
|
+
# @option opts [String] :placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`.
|
26
|
+
# @option opts [String] :response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute.
|
27
|
+
# @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (default to '{\"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S}t\",\"time_elapsed\":\"%{time.elapsed.usec}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\"geo_city\":\"%{client.geo.city}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"request\":\"%{req.request}V\",\"host\":\"%{req.http.Fastly-Orig-Host}V\",\"url\":\"%{json.escape(req.url)}V\",\"request_referer\":\"%{json.escape(req.http.Referer)}V\",\"request_user_agent\":\"%{json.escape(req.http.User-Agent)}V\",\"request_accept_language\":\"%{json.escape(req.http.Accept-Language)}V\",\"request_accept_charset\":\"%{json.escape(req.http.Accept-Charset)}V\",\"cache_status\":\"%{regsub(fastly_info.state, \\\"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\\\", \\\"\\\\2\\\\3\\\") }V\"}')
|
28
|
+
# @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2)
|
29
|
+
# @option opts [String] :token The Insert API key from the Account page of your New Relic account. Required.
|
30
|
+
# @option opts [String] :region The region to which to stream logs. (default to 'US')
|
31
|
+
# @option opts [String] :url (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing. (default to 'null')
|
32
|
+
# @return [LoggingNewrelicotlpResponse]
|
33
|
+
def create_log_newrelicotlp(opts = {})
|
34
|
+
data, _status_code, _headers = create_log_newrelicotlp_with_http_info(opts)
|
35
|
+
data
|
36
|
+
end
|
37
|
+
|
38
|
+
# Create a New Relic OTLP endpoint
|
39
|
+
# Create a New Relic OTLP logging object for a particular service and version.
|
40
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
41
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
42
|
+
# @option opts [String] :name The name for the real-time logging configuration.
|
43
|
+
# @option opts [String] :placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`.
|
44
|
+
# @option opts [String] :response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute.
|
45
|
+
# @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (default to '{\"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S}t\",\"time_elapsed\":\"%{time.elapsed.usec}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\"geo_city\":\"%{client.geo.city}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"request\":\"%{req.request}V\",\"host\":\"%{req.http.Fastly-Orig-Host}V\",\"url\":\"%{json.escape(req.url)}V\",\"request_referer\":\"%{json.escape(req.http.Referer)}V\",\"request_user_agent\":\"%{json.escape(req.http.User-Agent)}V\",\"request_accept_language\":\"%{json.escape(req.http.Accept-Language)}V\",\"request_accept_charset\":\"%{json.escape(req.http.Accept-Charset)}V\",\"cache_status\":\"%{regsub(fastly_info.state, \\\"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\\\", \\\"\\\\2\\\\3\\\") }V\"}')
|
46
|
+
# @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2)
|
47
|
+
# @option opts [String] :token The Insert API key from the Account page of your New Relic account. Required.
|
48
|
+
# @option opts [String] :region The region to which to stream logs. (default to 'US')
|
49
|
+
# @option opts [String] :url (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing. (default to 'null')
|
50
|
+
# @return [Array<(LoggingNewrelicotlpResponse, Integer, Hash)>] LoggingNewrelicotlpResponse data, response status code and response headers
|
51
|
+
def create_log_newrelicotlp_with_http_info(opts = {})
|
52
|
+
if @api_client.config.debugging
|
53
|
+
@api_client.config.logger.debug 'Calling API: LoggingNewrelicotlpApi.create_log_newrelicotlp ...'
|
54
|
+
end
|
55
|
+
# unbox the parameters from the hash
|
56
|
+
service_id = opts[:'service_id']
|
57
|
+
version_id = opts[:'version_id']
|
58
|
+
# verify the required parameter 'service_id' is set
|
59
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
60
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling LoggingNewrelicotlpApi.create_log_newrelicotlp"
|
61
|
+
end
|
62
|
+
# verify the required parameter 'version_id' is set
|
63
|
+
if @api_client.config.client_side_validation && version_id.nil?
|
64
|
+
fail ArgumentError, "Missing the required parameter 'version_id' when calling LoggingNewrelicotlpApi.create_log_newrelicotlp"
|
65
|
+
end
|
66
|
+
allowable_values = ["none", "waf_debug", "null"]
|
67
|
+
if @api_client.config.client_side_validation && opts[:'placement'] && !allowable_values.include?(opts[:'placement'])
|
68
|
+
fail ArgumentError, "invalid value for \"placement\", must be one of #{allowable_values}"
|
69
|
+
end
|
70
|
+
allowable_values = [1, 2]
|
71
|
+
if @api_client.config.client_side_validation && opts[:'format_version'] && !allowable_values.include?(opts[:'format_version'])
|
72
|
+
fail ArgumentError, "invalid value for \"format_version\", must be one of #{allowable_values}"
|
73
|
+
end
|
74
|
+
allowable_values = ["US", "EU"]
|
75
|
+
if @api_client.config.client_side_validation && opts[:'region'] && !allowable_values.include?(opts[:'region'])
|
76
|
+
fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
|
77
|
+
end
|
78
|
+
# resource path
|
79
|
+
local_var_path = '/service/{service_id}/version/{version_id}/logging/newrelicotlp'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s))
|
80
|
+
|
81
|
+
# query parameters
|
82
|
+
query_params = opts[:query_params] || {}
|
83
|
+
|
84
|
+
# header parameters
|
85
|
+
header_params = opts[:header_params] || {}
|
86
|
+
# HTTP header 'Accept' (if needed)
|
87
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
88
|
+
# HTTP header 'Content-Type'
|
89
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
90
|
+
if !content_type.nil?
|
91
|
+
header_params['Content-Type'] = content_type
|
92
|
+
end
|
93
|
+
|
94
|
+
# form parameters
|
95
|
+
form_params = opts[:form_params] || {}
|
96
|
+
form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
|
97
|
+
form_params['placement'] = opts[:'placement'] if !opts[:'placement'].nil?
|
98
|
+
form_params['response_condition'] = opts[:'response_condition'] if !opts[:'response_condition'].nil?
|
99
|
+
form_params['format'] = opts[:'format'] if !opts[:'format'].nil?
|
100
|
+
form_params['format_version'] = opts[:'format_version'] if !opts[:'format_version'].nil?
|
101
|
+
form_params['token'] = opts[:'token'] if !opts[:'token'].nil?
|
102
|
+
form_params['region'] = opts[:'region'] if !opts[:'region'].nil?
|
103
|
+
form_params['url'] = opts[:'url'] if !opts[:'url'].nil?
|
104
|
+
|
105
|
+
# http body (model)
|
106
|
+
post_body = opts[:debug_body]
|
107
|
+
|
108
|
+
# return_type
|
109
|
+
return_type = opts[:debug_return_type] || 'LoggingNewrelicotlpResponse'
|
110
|
+
|
111
|
+
# auth_names
|
112
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
113
|
+
|
114
|
+
new_options = opts.merge(
|
115
|
+
:operation => :"LoggingNewrelicotlpApi.create_log_newrelicotlp",
|
116
|
+
:header_params => header_params,
|
117
|
+
:query_params => query_params,
|
118
|
+
:form_params => form_params,
|
119
|
+
:body => post_body,
|
120
|
+
:auth_names => auth_names,
|
121
|
+
:return_type => return_type
|
122
|
+
)
|
123
|
+
|
124
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
125
|
+
if @api_client.config.debugging
|
126
|
+
@api_client.config.logger.debug "API called: LoggingNewrelicotlpApi#create_log_newrelicotlp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
127
|
+
end
|
128
|
+
return data, status_code, headers
|
129
|
+
end
|
130
|
+
|
131
|
+
# Delete a New Relic OTLP endpoint
|
132
|
+
# Delete the New Relic OTLP logging object for a particular service and version.
|
133
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
134
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
135
|
+
# @option opts [String] :logging_newrelicotlp_name The name for the real-time logging configuration. (required)
|
136
|
+
# @return [InlineResponse200]
|
137
|
+
def delete_log_newrelicotlp(opts = {})
|
138
|
+
data, _status_code, _headers = delete_log_newrelicotlp_with_http_info(opts)
|
139
|
+
data
|
140
|
+
end
|
141
|
+
|
142
|
+
# Delete a New Relic OTLP endpoint
|
143
|
+
# Delete the New Relic OTLP logging object for a particular service and version.
|
144
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
145
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
146
|
+
# @option opts [String] :logging_newrelicotlp_name The name for the real-time logging configuration. (required)
|
147
|
+
# @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
|
148
|
+
def delete_log_newrelicotlp_with_http_info(opts = {})
|
149
|
+
if @api_client.config.debugging
|
150
|
+
@api_client.config.logger.debug 'Calling API: LoggingNewrelicotlpApi.delete_log_newrelicotlp ...'
|
151
|
+
end
|
152
|
+
# unbox the parameters from the hash
|
153
|
+
service_id = opts[:'service_id']
|
154
|
+
version_id = opts[:'version_id']
|
155
|
+
logging_newrelicotlp_name = opts[:'logging_newrelicotlp_name']
|
156
|
+
# verify the required parameter 'service_id' is set
|
157
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
158
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling LoggingNewrelicotlpApi.delete_log_newrelicotlp"
|
159
|
+
end
|
160
|
+
# verify the required parameter 'version_id' is set
|
161
|
+
if @api_client.config.client_side_validation && version_id.nil?
|
162
|
+
fail ArgumentError, "Missing the required parameter 'version_id' when calling LoggingNewrelicotlpApi.delete_log_newrelicotlp"
|
163
|
+
end
|
164
|
+
# verify the required parameter 'logging_newrelicotlp_name' is set
|
165
|
+
if @api_client.config.client_side_validation && logging_newrelicotlp_name.nil?
|
166
|
+
fail ArgumentError, "Missing the required parameter 'logging_newrelicotlp_name' when calling LoggingNewrelicotlpApi.delete_log_newrelicotlp"
|
167
|
+
end
|
168
|
+
# resource path
|
169
|
+
local_var_path = '/service/{service_id}/version/{version_id}/logging/newrelicotlp/{logging_newrelicotlp_name}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)).sub('{' + 'logging_newrelicotlp_name' + '}', CGI.escape(logging_newrelicotlp_name.to_s))
|
170
|
+
|
171
|
+
# query parameters
|
172
|
+
query_params = opts[:query_params] || {}
|
173
|
+
|
174
|
+
# header parameters
|
175
|
+
header_params = opts[:header_params] || {}
|
176
|
+
# HTTP header 'Accept' (if needed)
|
177
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
178
|
+
|
179
|
+
# form parameters
|
180
|
+
form_params = opts[:form_params] || {}
|
181
|
+
|
182
|
+
# http body (model)
|
183
|
+
post_body = opts[:debug_body]
|
184
|
+
|
185
|
+
# return_type
|
186
|
+
return_type = opts[:debug_return_type] || 'InlineResponse200'
|
187
|
+
|
188
|
+
# auth_names
|
189
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
190
|
+
|
191
|
+
new_options = opts.merge(
|
192
|
+
:operation => :"LoggingNewrelicotlpApi.delete_log_newrelicotlp",
|
193
|
+
:header_params => header_params,
|
194
|
+
:query_params => query_params,
|
195
|
+
:form_params => form_params,
|
196
|
+
:body => post_body,
|
197
|
+
:auth_names => auth_names,
|
198
|
+
:return_type => return_type
|
199
|
+
)
|
200
|
+
|
201
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
202
|
+
if @api_client.config.debugging
|
203
|
+
@api_client.config.logger.debug "API called: LoggingNewrelicotlpApi#delete_log_newrelicotlp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
204
|
+
end
|
205
|
+
return data, status_code, headers
|
206
|
+
end
|
207
|
+
|
208
|
+
# Get a New Relic OTLP endpoint
|
209
|
+
# Get the details of a New Relic OTLP logging object for a particular service and version.
|
210
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
211
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
212
|
+
# @option opts [String] :logging_newrelicotlp_name The name for the real-time logging configuration. (required)
|
213
|
+
# @return [LoggingNewrelicotlpResponse]
|
214
|
+
def get_log_newrelicotlp(opts = {})
|
215
|
+
data, _status_code, _headers = get_log_newrelicotlp_with_http_info(opts)
|
216
|
+
data
|
217
|
+
end
|
218
|
+
|
219
|
+
# Get a New Relic OTLP endpoint
|
220
|
+
# Get the details of a New Relic OTLP logging object for a particular service and version.
|
221
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
222
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
223
|
+
# @option opts [String] :logging_newrelicotlp_name The name for the real-time logging configuration. (required)
|
224
|
+
# @return [Array<(LoggingNewrelicotlpResponse, Integer, Hash)>] LoggingNewrelicotlpResponse data, response status code and response headers
|
225
|
+
def get_log_newrelicotlp_with_http_info(opts = {})
|
226
|
+
if @api_client.config.debugging
|
227
|
+
@api_client.config.logger.debug 'Calling API: LoggingNewrelicotlpApi.get_log_newrelicotlp ...'
|
228
|
+
end
|
229
|
+
# unbox the parameters from the hash
|
230
|
+
service_id = opts[:'service_id']
|
231
|
+
version_id = opts[:'version_id']
|
232
|
+
logging_newrelicotlp_name = opts[:'logging_newrelicotlp_name']
|
233
|
+
# verify the required parameter 'service_id' is set
|
234
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
235
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling LoggingNewrelicotlpApi.get_log_newrelicotlp"
|
236
|
+
end
|
237
|
+
# verify the required parameter 'version_id' is set
|
238
|
+
if @api_client.config.client_side_validation && version_id.nil?
|
239
|
+
fail ArgumentError, "Missing the required parameter 'version_id' when calling LoggingNewrelicotlpApi.get_log_newrelicotlp"
|
240
|
+
end
|
241
|
+
# verify the required parameter 'logging_newrelicotlp_name' is set
|
242
|
+
if @api_client.config.client_side_validation && logging_newrelicotlp_name.nil?
|
243
|
+
fail ArgumentError, "Missing the required parameter 'logging_newrelicotlp_name' when calling LoggingNewrelicotlpApi.get_log_newrelicotlp"
|
244
|
+
end
|
245
|
+
# resource path
|
246
|
+
local_var_path = '/service/{service_id}/version/{version_id}/logging/newrelicotlp/{logging_newrelicotlp_name}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)).sub('{' + 'logging_newrelicotlp_name' + '}', CGI.escape(logging_newrelicotlp_name.to_s))
|
247
|
+
|
248
|
+
# query parameters
|
249
|
+
query_params = opts[:query_params] || {}
|
250
|
+
|
251
|
+
# header parameters
|
252
|
+
header_params = opts[:header_params] || {}
|
253
|
+
# HTTP header 'Accept' (if needed)
|
254
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
255
|
+
|
256
|
+
# form parameters
|
257
|
+
form_params = opts[:form_params] || {}
|
258
|
+
|
259
|
+
# http body (model)
|
260
|
+
post_body = opts[:debug_body]
|
261
|
+
|
262
|
+
# return_type
|
263
|
+
return_type = opts[:debug_return_type] || 'LoggingNewrelicotlpResponse'
|
264
|
+
|
265
|
+
# auth_names
|
266
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
267
|
+
|
268
|
+
new_options = opts.merge(
|
269
|
+
:operation => :"LoggingNewrelicotlpApi.get_log_newrelicotlp",
|
270
|
+
:header_params => header_params,
|
271
|
+
:query_params => query_params,
|
272
|
+
:form_params => form_params,
|
273
|
+
:body => post_body,
|
274
|
+
:auth_names => auth_names,
|
275
|
+
:return_type => return_type
|
276
|
+
)
|
277
|
+
|
278
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
279
|
+
if @api_client.config.debugging
|
280
|
+
@api_client.config.logger.debug "API called: LoggingNewrelicotlpApi#get_log_newrelicotlp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
281
|
+
end
|
282
|
+
return data, status_code, headers
|
283
|
+
end
|
284
|
+
|
285
|
+
# List New Relic OTLP endpoints
|
286
|
+
# List all of the New Relic OTLP logging objects for a particular service and version.
|
287
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
288
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
289
|
+
# @return [Array<LoggingNewrelicotlpResponse>]
|
290
|
+
def list_log_newrelicotlp(opts = {})
|
291
|
+
data, _status_code, _headers = list_log_newrelicotlp_with_http_info(opts)
|
292
|
+
data
|
293
|
+
end
|
294
|
+
|
295
|
+
# List New Relic OTLP endpoints
|
296
|
+
# List all of the New Relic OTLP logging objects for a particular service and version.
|
297
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
298
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
299
|
+
# @return [Array<(Array<LoggingNewrelicotlpResponse>, Integer, Hash)>] Array<LoggingNewrelicotlpResponse> data, response status code and response headers
|
300
|
+
def list_log_newrelicotlp_with_http_info(opts = {})
|
301
|
+
if @api_client.config.debugging
|
302
|
+
@api_client.config.logger.debug 'Calling API: LoggingNewrelicotlpApi.list_log_newrelicotlp ...'
|
303
|
+
end
|
304
|
+
# unbox the parameters from the hash
|
305
|
+
service_id = opts[:'service_id']
|
306
|
+
version_id = opts[:'version_id']
|
307
|
+
# verify the required parameter 'service_id' is set
|
308
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
309
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling LoggingNewrelicotlpApi.list_log_newrelicotlp"
|
310
|
+
end
|
311
|
+
# verify the required parameter 'version_id' is set
|
312
|
+
if @api_client.config.client_side_validation && version_id.nil?
|
313
|
+
fail ArgumentError, "Missing the required parameter 'version_id' when calling LoggingNewrelicotlpApi.list_log_newrelicotlp"
|
314
|
+
end
|
315
|
+
# resource path
|
316
|
+
local_var_path = '/service/{service_id}/version/{version_id}/logging/newrelicotlp'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s))
|
317
|
+
|
318
|
+
# query parameters
|
319
|
+
query_params = opts[:query_params] || {}
|
320
|
+
|
321
|
+
# header parameters
|
322
|
+
header_params = opts[:header_params] || {}
|
323
|
+
# HTTP header 'Accept' (if needed)
|
324
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
325
|
+
|
326
|
+
# form parameters
|
327
|
+
form_params = opts[:form_params] || {}
|
328
|
+
|
329
|
+
# http body (model)
|
330
|
+
post_body = opts[:debug_body]
|
331
|
+
|
332
|
+
# return_type
|
333
|
+
return_type = opts[:debug_return_type] || 'Array<LoggingNewrelicotlpResponse>'
|
334
|
+
|
335
|
+
# auth_names
|
336
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
337
|
+
|
338
|
+
new_options = opts.merge(
|
339
|
+
:operation => :"LoggingNewrelicotlpApi.list_log_newrelicotlp",
|
340
|
+
:header_params => header_params,
|
341
|
+
:query_params => query_params,
|
342
|
+
:form_params => form_params,
|
343
|
+
:body => post_body,
|
344
|
+
:auth_names => auth_names,
|
345
|
+
:return_type => return_type
|
346
|
+
)
|
347
|
+
|
348
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
349
|
+
if @api_client.config.debugging
|
350
|
+
@api_client.config.logger.debug "API called: LoggingNewrelicotlpApi#list_log_newrelicotlp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
351
|
+
end
|
352
|
+
return data, status_code, headers
|
353
|
+
end
|
354
|
+
|
355
|
+
# Update a New Relic log endpoint
|
356
|
+
# Update a New Relic OTLP logging object for a particular service and version.
|
357
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
358
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
359
|
+
# @option opts [String] :logging_newrelicotlp_name The name for the real-time logging configuration. (required)
|
360
|
+
# @option opts [String] :name The name for the real-time logging configuration.
|
361
|
+
# @option opts [String] :placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`.
|
362
|
+
# @option opts [String] :response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute.
|
363
|
+
# @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (default to '{\"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S}t\",\"time_elapsed\":\"%{time.elapsed.usec}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\"geo_city\":\"%{client.geo.city}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"request\":\"%{req.request}V\",\"host\":\"%{req.http.Fastly-Orig-Host}V\",\"url\":\"%{json.escape(req.url)}V\",\"request_referer\":\"%{json.escape(req.http.Referer)}V\",\"request_user_agent\":\"%{json.escape(req.http.User-Agent)}V\",\"request_accept_language\":\"%{json.escape(req.http.Accept-Language)}V\",\"request_accept_charset\":\"%{json.escape(req.http.Accept-Charset)}V\",\"cache_status\":\"%{regsub(fastly_info.state, \\\"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\\\", \\\"\\\\2\\\\3\\\") }V\"}')
|
364
|
+
# @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2)
|
365
|
+
# @option opts [String] :token The Insert API key from the Account page of your New Relic account. Required.
|
366
|
+
# @option opts [String] :region The region to which to stream logs. (default to 'US')
|
367
|
+
# @option opts [String] :url (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing. (default to 'null')
|
368
|
+
# @return [LoggingNewrelicotlpResponse]
|
369
|
+
def update_log_newrelicotlp(opts = {})
|
370
|
+
data, _status_code, _headers = update_log_newrelicotlp_with_http_info(opts)
|
371
|
+
data
|
372
|
+
end
|
373
|
+
|
374
|
+
# Update a New Relic log endpoint
|
375
|
+
# Update a New Relic OTLP logging object for a particular service and version.
|
376
|
+
# @option opts [String] :service_id Alphanumeric string identifying the service. (required)
|
377
|
+
# @option opts [Integer] :version_id Integer identifying a service version. (required)
|
378
|
+
# @option opts [String] :logging_newrelicotlp_name The name for the real-time logging configuration. (required)
|
379
|
+
# @option opts [String] :name The name for the real-time logging configuration.
|
380
|
+
# @option opts [String] :placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`.
|
381
|
+
# @option opts [String] :response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute.
|
382
|
+
# @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (default to '{\"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S}t\",\"time_elapsed\":\"%{time.elapsed.usec}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\"geo_city\":\"%{client.geo.city}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"request\":\"%{req.request}V\",\"host\":\"%{req.http.Fastly-Orig-Host}V\",\"url\":\"%{json.escape(req.url)}V\",\"request_referer\":\"%{json.escape(req.http.Referer)}V\",\"request_user_agent\":\"%{json.escape(req.http.User-Agent)}V\",\"request_accept_language\":\"%{json.escape(req.http.Accept-Language)}V\",\"request_accept_charset\":\"%{json.escape(req.http.Accept-Charset)}V\",\"cache_status\":\"%{regsub(fastly_info.state, \\\"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\\\", \\\"\\\\2\\\\3\\\") }V\"}')
|
383
|
+
# @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2)
|
384
|
+
# @option opts [String] :token The Insert API key from the Account page of your New Relic account. Required.
|
385
|
+
# @option opts [String] :region The region to which to stream logs. (default to 'US')
|
386
|
+
# @option opts [String] :url (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing. (default to 'null')
|
387
|
+
# @return [Array<(LoggingNewrelicotlpResponse, Integer, Hash)>] LoggingNewrelicotlpResponse data, response status code and response headers
|
388
|
+
def update_log_newrelicotlp_with_http_info(opts = {})
|
389
|
+
if @api_client.config.debugging
|
390
|
+
@api_client.config.logger.debug 'Calling API: LoggingNewrelicotlpApi.update_log_newrelicotlp ...'
|
391
|
+
end
|
392
|
+
# unbox the parameters from the hash
|
393
|
+
service_id = opts[:'service_id']
|
394
|
+
version_id = opts[:'version_id']
|
395
|
+
logging_newrelicotlp_name = opts[:'logging_newrelicotlp_name']
|
396
|
+
# verify the required parameter 'service_id' is set
|
397
|
+
if @api_client.config.client_side_validation && service_id.nil?
|
398
|
+
fail ArgumentError, "Missing the required parameter 'service_id' when calling LoggingNewrelicotlpApi.update_log_newrelicotlp"
|
399
|
+
end
|
400
|
+
# verify the required parameter 'version_id' is set
|
401
|
+
if @api_client.config.client_side_validation && version_id.nil?
|
402
|
+
fail ArgumentError, "Missing the required parameter 'version_id' when calling LoggingNewrelicotlpApi.update_log_newrelicotlp"
|
403
|
+
end
|
404
|
+
# verify the required parameter 'logging_newrelicotlp_name' is set
|
405
|
+
if @api_client.config.client_side_validation && logging_newrelicotlp_name.nil?
|
406
|
+
fail ArgumentError, "Missing the required parameter 'logging_newrelicotlp_name' when calling LoggingNewrelicotlpApi.update_log_newrelicotlp"
|
407
|
+
end
|
408
|
+
allowable_values = ["none", "waf_debug", "null"]
|
409
|
+
if @api_client.config.client_side_validation && opts[:'placement'] && !allowable_values.include?(opts[:'placement'])
|
410
|
+
fail ArgumentError, "invalid value for \"placement\", must be one of #{allowable_values}"
|
411
|
+
end
|
412
|
+
allowable_values = [1, 2]
|
413
|
+
if @api_client.config.client_side_validation && opts[:'format_version'] && !allowable_values.include?(opts[:'format_version'])
|
414
|
+
fail ArgumentError, "invalid value for \"format_version\", must be one of #{allowable_values}"
|
415
|
+
end
|
416
|
+
allowable_values = ["US", "EU"]
|
417
|
+
if @api_client.config.client_side_validation && opts[:'region'] && !allowable_values.include?(opts[:'region'])
|
418
|
+
fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
|
419
|
+
end
|
420
|
+
# resource path
|
421
|
+
local_var_path = '/service/{service_id}/version/{version_id}/logging/newrelicotlp/{logging_newrelicotlp_name}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)).sub('{' + 'logging_newrelicotlp_name' + '}', CGI.escape(logging_newrelicotlp_name.to_s))
|
422
|
+
|
423
|
+
# query parameters
|
424
|
+
query_params = opts[:query_params] || {}
|
425
|
+
|
426
|
+
# header parameters
|
427
|
+
header_params = opts[:header_params] || {}
|
428
|
+
# HTTP header 'Accept' (if needed)
|
429
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
430
|
+
# HTTP header 'Content-Type'
|
431
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
432
|
+
if !content_type.nil?
|
433
|
+
header_params['Content-Type'] = content_type
|
434
|
+
end
|
435
|
+
|
436
|
+
# form parameters
|
437
|
+
form_params = opts[:form_params] || {}
|
438
|
+
form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
|
439
|
+
form_params['placement'] = opts[:'placement'] if !opts[:'placement'].nil?
|
440
|
+
form_params['response_condition'] = opts[:'response_condition'] if !opts[:'response_condition'].nil?
|
441
|
+
form_params['format'] = opts[:'format'] if !opts[:'format'].nil?
|
442
|
+
form_params['format_version'] = opts[:'format_version'] if !opts[:'format_version'].nil?
|
443
|
+
form_params['token'] = opts[:'token'] if !opts[:'token'].nil?
|
444
|
+
form_params['region'] = opts[:'region'] if !opts[:'region'].nil?
|
445
|
+
form_params['url'] = opts[:'url'] if !opts[:'url'].nil?
|
446
|
+
|
447
|
+
# http body (model)
|
448
|
+
post_body = opts[:debug_body]
|
449
|
+
|
450
|
+
# return_type
|
451
|
+
return_type = opts[:debug_return_type] || 'LoggingNewrelicotlpResponse'
|
452
|
+
|
453
|
+
# auth_names
|
454
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
455
|
+
|
456
|
+
new_options = opts.merge(
|
457
|
+
:operation => :"LoggingNewrelicotlpApi.update_log_newrelicotlp",
|
458
|
+
:header_params => header_params,
|
459
|
+
:query_params => query_params,
|
460
|
+
:form_params => form_params,
|
461
|
+
:body => post_body,
|
462
|
+
:auth_names => auth_names,
|
463
|
+
:return_type => return_type
|
464
|
+
)
|
465
|
+
|
466
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
467
|
+
if @api_client.config.debugging
|
468
|
+
@api_client.config.logger.debug "API called: LoggingNewrelicotlpApi#update_log_newrelicotlp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
469
|
+
end
|
470
|
+
return data, status_code, headers
|
471
|
+
end
|
472
|
+
end
|
473
|
+
end
|