From c7902cc662cfa67c20eecf188e239169a7907c3e Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 1 Sep 2023 13:39:36 +0000 Subject: [PATCH] Generated v5.01 --- Changes | 7 + README.md | 9 +- docs/Backend.md | 1 + docs/BackendApi.md | 12 +- docs/BackendResponse.md | 1 + docs/LoggingNewrelicotlpAdditional.md | 18 + docs/LoggingNewrelicotlpApi.md | 321 ++++++++ docs/LoggingNewrelicotlpResponse.md | 27 + docs/SecretStoreApi.md | 4 +- docs/TlsDomainsApi.md | 4 +- docs/TlsSubscriptionsApi.md | 8 +- lib/WebService/Fastly.pm | 2 +- lib/WebService/Fastly/BackendApi.pm | 22 + lib/WebService/Fastly/Configuration.pm | 6 +- .../Fastly/LoggingNewrelicotlpApi.pm | 704 ++++++++++++++++++ lib/WebService/Fastly/Object/Backend.pm | 10 + .../Fastly/Object/BackendResponse.pm | 10 + .../Object/LoggingNewrelicotlpAdditional.pm | 212 ++++++ .../Object/LoggingNewrelicotlpResponse.pm | 302 ++++++++ lib/WebService/Fastly/SecretStoreApi.pm | 4 +- lib/WebService/Fastly/TlsDomainsApi.pm | 4 +- lib/WebService/Fastly/TlsSubscriptionsApi.pm | 8 +- sig.json | 2 +- 23 files changed, 1671 insertions(+), 27 deletions(-) create mode 100644 docs/LoggingNewrelicotlpAdditional.md create mode 100644 docs/LoggingNewrelicotlpApi.md create mode 100644 docs/LoggingNewrelicotlpResponse.md create mode 100644 lib/WebService/Fastly/LoggingNewrelicotlpApi.pm create mode 100644 lib/WebService/Fastly/Object/LoggingNewrelicotlpAdditional.pm create mode 100644 lib/WebService/Fastly/Object/LoggingNewrelicotlpResponse.pm diff --git a/Changes b/Changes index f01af7e1..880d6cf1 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,12 @@ Revision history for https://metacpan.org/dist/WebService-Fastly +5.01 2023-09-01 + * feat(backend): support share_key field. + * feat(events): support extra created_at filters. + * feat(logging/newrelic): add OTLP endpoints. + * feat(tls/subscriptions): support self_managed_http_challenge field. + * doc(secretstore): correct description for GET endpoint. + 5.00 2023-07-31 * refactor: general restructure OpenAPI schemas. * refactor(domain): remove explicit schema type for 'any'. diff --git a/README.md b/README.md index a6d7453c..1ccc6e23 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ WebService::Fastly - an interface to most facets of the Fastly API (https://deve # VERSION -5.00 +5.01 # SYNOPSIS @@ -338,6 +338,11 @@ Class | Method | HTTP request | Description *LoggingNewrelicApi* | [**get_log_newrelic**](docs/LoggingNewrelicApi.md#get_log_newrelic) | **GET** /service/{service_id}/version/{version_id}/logging/newrelic/{logging_newrelic_name} | Get a New Relic log endpoint *LoggingNewrelicApi* | [**list_log_newrelic**](docs/LoggingNewrelicApi.md#list_log_newrelic) | **GET** /service/{service_id}/version/{version_id}/logging/newrelic | List New Relic log endpoints *LoggingNewrelicApi* | [**update_log_newrelic**](docs/LoggingNewrelicApi.md#update_log_newrelic) | **PUT** /service/{service_id}/version/{version_id}/logging/newrelic/{logging_newrelic_name} | Update a New Relic log endpoint +*LoggingNewrelicotlpApi* | [**create_log_newrelicotlp**](docs/LoggingNewrelicotlpApi.md#create_log_newrelicotlp) | **POST** /service/{service_id}/version/{version_id}/logging/newrelicotlp | Create a New Relic OTLP endpoint +*LoggingNewrelicotlpApi* | [**delete_log_newrelicotlp**](docs/LoggingNewrelicotlpApi.md#delete_log_newrelicotlp) | **DELETE** /service/{service_id}/version/{version_id}/logging/newrelicotlp/{logging_newrelicotlp_name} | Delete a New Relic OTLP endpoint +*LoggingNewrelicotlpApi* | [**get_log_newrelicotlp**](docs/LoggingNewrelicotlpApi.md#get_log_newrelicotlp) | **GET** /service/{service_id}/version/{version_id}/logging/newrelicotlp/{logging_newrelicotlp_name} | Get a New Relic OTLP endpoint +*LoggingNewrelicotlpApi* | [**list_log_newrelicotlp**](docs/LoggingNewrelicotlpApi.md#list_log_newrelicotlp) | **GET** /service/{service_id}/version/{version_id}/logging/newrelicotlp | List New Relic OTLP endpoints +*LoggingNewrelicotlpApi* | [**update_log_newrelicotlp**](docs/LoggingNewrelicotlpApi.md#update_log_newrelicotlp) | **PUT** /service/{service_id}/version/{version_id}/logging/newrelicotlp/{logging_newrelicotlp_name} | Update a New Relic log endpoint *LoggingOpenstackApi* | [**create_log_openstack**](docs/LoggingOpenstackApi.md#create_log_openstack) | **POST** /service/{service_id}/version/{version_id}/logging/openstack | Create an OpenStack log endpoint *LoggingOpenstackApi* | [**delete_log_openstack**](docs/LoggingOpenstackApi.md#delete_log_openstack) | **DELETE** /service/{service_id}/version/{version_id}/logging/openstack/{logging_openstack_name} | Delete an OpenStack log endpoint *LoggingOpenstackApi* | [**get_log_openstack**](docs/LoggingOpenstackApi.md#get_log_openstack) | **GET** /service/{service_id}/version/{version_id}/logging/openstack/{logging_openstack_name} | Get an OpenStack log endpoint @@ -432,7 +437,7 @@ Class | Method | HTTP request | Description *SecretStoreApi* | [**client_key**](docs/SecretStoreApi.md#client_key) | **POST** /resources/stores/secret/client-key | Create new client key *SecretStoreApi* | [**create_secret_store**](docs/SecretStoreApi.md#create_secret_store) | **POST** /resources/stores/secret | Create new secret store *SecretStoreApi* | [**delete_secret_store**](docs/SecretStoreApi.md#delete_secret_store) | **DELETE** /resources/stores/secret/{store_id} | Delete secret store -*SecretStoreApi* | [**get_secret_store**](docs/SecretStoreApi.md#get_secret_store) | **GET** /resources/stores/secret/{store_id} | Create secret store by ID +*SecretStoreApi* | [**get_secret_store**](docs/SecretStoreApi.md#get_secret_store) | **GET** /resources/stores/secret/{store_id} | Get secret store by ID *SecretStoreApi* | [**get_secret_stores**](docs/SecretStoreApi.md#get_secret_stores) | **GET** /resources/stores/secret | Get all secret stores *SecretStoreApi* | [**signing_key**](docs/SecretStoreApi.md#signing_key) | **GET** /resources/stores/secret/signing-key | Get public key *SecretStoreItemApi* | [**create_secret**](docs/SecretStoreItemApi.md#create_secret) | **POST** /resources/stores/secret/{store_id}/secrets | Create a new secret in a store. diff --git a/docs/Backend.md b/docs/Backend.md index 9c49578a..863f3e90 100644 --- a/docs/Backend.md +++ b/docs/Backend.md @@ -27,6 +27,7 @@ Name | Type | Description | Notes **override_host** | **string** | If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. | [optional] **port** | **int** | Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. | [optional] **request_condition** | **string** | Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. | [optional] +**share_key** | **string** | Value that when shared across backends will enable those backends to share the same health check. | [optional] **shield** | **string** | Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). | [optional] **ssl_ca_cert** | **string** | CA certificate attached to origin. | [optional] **ssl_cert_hostname** | **string** | Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. | [optional] diff --git a/docs/BackendApi.md b/docs/BackendApi.md index 3cc0668c..57c1ac8c 100644 --- a/docs/BackendApi.md +++ b/docs/BackendApi.md @@ -17,7 +17,7 @@ Method | HTTP request | Description # **create_backend** -> BackendResponse create_backend(service_id => $service_id, version_id => $version_id, address => $address, auto_loadbalance => $auto_loadbalance, between_bytes_timeout => $between_bytes_timeout, client_cert => $client_cert, comment => $comment, connect_timeout => $connect_timeout, first_byte_timeout => $first_byte_timeout, healthcheck => $healthcheck, hostname => $hostname, ipv4 => $ipv4, ipv6 => $ipv6, keepalive_time => $keepalive_time, max_conn => $max_conn, max_tls_version => $max_tls_version, min_tls_version => $min_tls_version, name => $name, override_host => $override_host, port => $port, request_condition => $request_condition, shield => $shield, ssl_ca_cert => $ssl_ca_cert, ssl_cert_hostname => $ssl_cert_hostname, ssl_check_cert => $ssl_check_cert, ssl_ciphers => $ssl_ciphers, ssl_client_cert => $ssl_client_cert, ssl_client_key => $ssl_client_key, ssl_hostname => $ssl_hostname, ssl_sni_hostname => $ssl_sni_hostname, use_ssl => $use_ssl, weight => $weight) +> BackendResponse create_backend(service_id => $service_id, version_id => $version_id, address => $address, auto_loadbalance => $auto_loadbalance, between_bytes_timeout => $between_bytes_timeout, client_cert => $client_cert, comment => $comment, connect_timeout => $connect_timeout, first_byte_timeout => $first_byte_timeout, healthcheck => $healthcheck, hostname => $hostname, ipv4 => $ipv4, ipv6 => $ipv6, keepalive_time => $keepalive_time, max_conn => $max_conn, max_tls_version => $max_tls_version, min_tls_version => $min_tls_version, name => $name, override_host => $override_host, port => $port, request_condition => $request_condition, share_key => $share_key, shield => $shield, ssl_ca_cert => $ssl_ca_cert, ssl_cert_hostname => $ssl_cert_hostname, ssl_check_cert => $ssl_check_cert, ssl_ciphers => $ssl_ciphers, ssl_client_cert => $ssl_client_cert, ssl_client_key => $ssl_client_key, ssl_hostname => $ssl_hostname, ssl_sni_hostname => $ssl_sni_hostname, use_ssl => $use_ssl, weight => $weight) Create a backend @@ -56,6 +56,7 @@ my $name = "name_example"; # string | The name of the backend. my $override_host = "override_host_example"; # string | If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. my $port = 56; # int | Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. my $request_condition = "request_condition_example"; # string | Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. +my $share_key = "share_key_example"; # string | Value that when shared across backends will enable those backends to share the same health check. my $shield = "shield_example"; # string | Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). my $ssl_ca_cert = "ssl_ca_cert_example"; # string | CA certificate attached to origin. my $ssl_cert_hostname = "ssl_cert_hostname_example"; # string | Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. @@ -69,7 +70,7 @@ my $use_ssl = null; # boolean | Whether or not to require TLS for connections to my $weight = 56; # int | Weight used to load balance this backend against others. May be any positive integer. If `auto_loadbalance` is true, the chance of this backend being selected is equal to its own weight over the sum of all weights for backends that have `auto_loadbalance` set to true. eval { - my $result = $api_instance->create_backend(service_id => $service_id, version_id => $version_id, address => $address, auto_loadbalance => $auto_loadbalance, between_bytes_timeout => $between_bytes_timeout, client_cert => $client_cert, comment => $comment, connect_timeout => $connect_timeout, first_byte_timeout => $first_byte_timeout, healthcheck => $healthcheck, hostname => $hostname, ipv4 => $ipv4, ipv6 => $ipv6, keepalive_time => $keepalive_time, max_conn => $max_conn, max_tls_version => $max_tls_version, min_tls_version => $min_tls_version, name => $name, override_host => $override_host, port => $port, request_condition => $request_condition, shield => $shield, ssl_ca_cert => $ssl_ca_cert, ssl_cert_hostname => $ssl_cert_hostname, ssl_check_cert => $ssl_check_cert, ssl_ciphers => $ssl_ciphers, ssl_client_cert => $ssl_client_cert, ssl_client_key => $ssl_client_key, ssl_hostname => $ssl_hostname, ssl_sni_hostname => $ssl_sni_hostname, use_ssl => $use_ssl, weight => $weight); + my $result = $api_instance->create_backend(service_id => $service_id, version_id => $version_id, address => $address, auto_loadbalance => $auto_loadbalance, between_bytes_timeout => $between_bytes_timeout, client_cert => $client_cert, comment => $comment, connect_timeout => $connect_timeout, first_byte_timeout => $first_byte_timeout, healthcheck => $healthcheck, hostname => $hostname, ipv4 => $ipv4, ipv6 => $ipv6, keepalive_time => $keepalive_time, max_conn => $max_conn, max_tls_version => $max_tls_version, min_tls_version => $min_tls_version, name => $name, override_host => $override_host, port => $port, request_condition => $request_condition, share_key => $share_key, shield => $shield, ssl_ca_cert => $ssl_ca_cert, ssl_cert_hostname => $ssl_cert_hostname, ssl_check_cert => $ssl_check_cert, ssl_ciphers => $ssl_ciphers, ssl_client_cert => $ssl_client_cert, ssl_client_key => $ssl_client_key, ssl_hostname => $ssl_hostname, ssl_sni_hostname => $ssl_sni_hostname, use_ssl => $use_ssl, weight => $weight); print Dumper($result); }; if ($@) { @@ -102,6 +103,7 @@ Name | Type | Description | Notes **override_host** | **string**| If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. | [optional] **port** | **int**| Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. | [optional] **request_condition** | **string**| Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. | [optional] + **share_key** | **string**| Value that when shared across backends will enable those backends to share the same health check. | [optional] **shield** | **string**| Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). | [optional] **ssl_ca_cert** | **string**| CA certificate attached to origin. | [optional] **ssl_cert_hostname** | **string**| Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. | [optional] @@ -293,7 +295,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_backend** -> BackendResponse update_backend(service_id => $service_id, version_id => $version_id, backend_name => $backend_name, address => $address, auto_loadbalance => $auto_loadbalance, between_bytes_timeout => $between_bytes_timeout, client_cert => $client_cert, comment => $comment, connect_timeout => $connect_timeout, first_byte_timeout => $first_byte_timeout, healthcheck => $healthcheck, hostname => $hostname, ipv4 => $ipv4, ipv6 => $ipv6, keepalive_time => $keepalive_time, max_conn => $max_conn, max_tls_version => $max_tls_version, min_tls_version => $min_tls_version, name => $name, override_host => $override_host, port => $port, request_condition => $request_condition, shield => $shield, ssl_ca_cert => $ssl_ca_cert, ssl_cert_hostname => $ssl_cert_hostname, ssl_check_cert => $ssl_check_cert, ssl_ciphers => $ssl_ciphers, ssl_client_cert => $ssl_client_cert, ssl_client_key => $ssl_client_key, ssl_hostname => $ssl_hostname, ssl_sni_hostname => $ssl_sni_hostname, use_ssl => $use_ssl, weight => $weight) +> BackendResponse update_backend(service_id => $service_id, version_id => $version_id, backend_name => $backend_name, address => $address, auto_loadbalance => $auto_loadbalance, between_bytes_timeout => $between_bytes_timeout, client_cert => $client_cert, comment => $comment, connect_timeout => $connect_timeout, first_byte_timeout => $first_byte_timeout, healthcheck => $healthcheck, hostname => $hostname, ipv4 => $ipv4, ipv6 => $ipv6, keepalive_time => $keepalive_time, max_conn => $max_conn, max_tls_version => $max_tls_version, min_tls_version => $min_tls_version, name => $name, override_host => $override_host, port => $port, request_condition => $request_condition, share_key => $share_key, shield => $shield, ssl_ca_cert => $ssl_ca_cert, ssl_cert_hostname => $ssl_cert_hostname, ssl_check_cert => $ssl_check_cert, ssl_ciphers => $ssl_ciphers, ssl_client_cert => $ssl_client_cert, ssl_client_key => $ssl_client_key, ssl_hostname => $ssl_hostname, ssl_sni_hostname => $ssl_sni_hostname, use_ssl => $use_ssl, weight => $weight) Update a backend @@ -333,6 +335,7 @@ my $name = "name_example"; # string | The name of the backend. my $override_host = "override_host_example"; # string | If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. my $port = 56; # int | Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. my $request_condition = "request_condition_example"; # string | Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. +my $share_key = "share_key_example"; # string | Value that when shared across backends will enable those backends to share the same health check. my $shield = "shield_example"; # string | Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). my $ssl_ca_cert = "ssl_ca_cert_example"; # string | CA certificate attached to origin. my $ssl_cert_hostname = "ssl_cert_hostname_example"; # string | Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. @@ -346,7 +349,7 @@ my $use_ssl = null; # boolean | Whether or not to require TLS for connections to my $weight = 56; # int | Weight used to load balance this backend against others. May be any positive integer. If `auto_loadbalance` is true, the chance of this backend being selected is equal to its own weight over the sum of all weights for backends that have `auto_loadbalance` set to true. eval { - my $result = $api_instance->update_backend(service_id => $service_id, version_id => $version_id, backend_name => $backend_name, address => $address, auto_loadbalance => $auto_loadbalance, between_bytes_timeout => $between_bytes_timeout, client_cert => $client_cert, comment => $comment, connect_timeout => $connect_timeout, first_byte_timeout => $first_byte_timeout, healthcheck => $healthcheck, hostname => $hostname, ipv4 => $ipv4, ipv6 => $ipv6, keepalive_time => $keepalive_time, max_conn => $max_conn, max_tls_version => $max_tls_version, min_tls_version => $min_tls_version, name => $name, override_host => $override_host, port => $port, request_condition => $request_condition, shield => $shield, ssl_ca_cert => $ssl_ca_cert, ssl_cert_hostname => $ssl_cert_hostname, ssl_check_cert => $ssl_check_cert, ssl_ciphers => $ssl_ciphers, ssl_client_cert => $ssl_client_cert, ssl_client_key => $ssl_client_key, ssl_hostname => $ssl_hostname, ssl_sni_hostname => $ssl_sni_hostname, use_ssl => $use_ssl, weight => $weight); + my $result = $api_instance->update_backend(service_id => $service_id, version_id => $version_id, backend_name => $backend_name, address => $address, auto_loadbalance => $auto_loadbalance, between_bytes_timeout => $between_bytes_timeout, client_cert => $client_cert, comment => $comment, connect_timeout => $connect_timeout, first_byte_timeout => $first_byte_timeout, healthcheck => $healthcheck, hostname => $hostname, ipv4 => $ipv4, ipv6 => $ipv6, keepalive_time => $keepalive_time, max_conn => $max_conn, max_tls_version => $max_tls_version, min_tls_version => $min_tls_version, name => $name, override_host => $override_host, port => $port, request_condition => $request_condition, share_key => $share_key, shield => $shield, ssl_ca_cert => $ssl_ca_cert, ssl_cert_hostname => $ssl_cert_hostname, ssl_check_cert => $ssl_check_cert, ssl_ciphers => $ssl_ciphers, ssl_client_cert => $ssl_client_cert, ssl_client_key => $ssl_client_key, ssl_hostname => $ssl_hostname, ssl_sni_hostname => $ssl_sni_hostname, use_ssl => $use_ssl, weight => $weight); print Dumper($result); }; if ($@) { @@ -380,6 +383,7 @@ Name | Type | Description | Notes **override_host** | **string**| If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. | [optional] **port** | **int**| Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. | [optional] **request_condition** | **string**| Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. | [optional] + **share_key** | **string**| Value that when shared across backends will enable those backends to share the same health check. | [optional] **shield** | **string**| Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). | [optional] **ssl_ca_cert** | **string**| CA certificate attached to origin. | [optional] **ssl_cert_hostname** | **string**| Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. | [optional] diff --git a/docs/BackendResponse.md b/docs/BackendResponse.md index 20bdd2b0..e5bcb54e 100644 --- a/docs/BackendResponse.md +++ b/docs/BackendResponse.md @@ -27,6 +27,7 @@ Name | Type | Description | Notes **override_host** | **string** | If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. | [optional] **port** | **int** | Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. | [optional] **request_condition** | **string** | Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. | [optional] +**share_key** | **string** | Value that when shared across backends will enable those backends to share the same health check. | [optional] **shield** | **string** | Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). | [optional] **ssl_ca_cert** | **string** | CA certificate attached to origin. | [optional] **ssl_cert_hostname** | **string** | Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. | [optional] diff --git a/docs/LoggingNewrelicotlpAdditional.md b/docs/LoggingNewrelicotlpAdditional.md new file mode 100644 index 00000000..f754ea6c --- /dev/null +++ b/docs/LoggingNewrelicotlpAdditional.md @@ -0,0 +1,18 @@ +# WebService::Fastly::Object::LoggingNewrelicotlpAdditional + +## Load the model package +```perl +use WebService::Fastly::Object::LoggingNewrelicotlpAdditional; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [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"}'] +**token** | **string** | The Insert API key from the Account page of your New Relic account. Required. | [optional] +**region** | **string** | The region to which to stream logs. | [optional] [default to 'US'] +**url** | **string** | (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing. | [optional] [default to 'null'] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LoggingNewrelicotlpApi.md b/docs/LoggingNewrelicotlpApi.md new file mode 100644 index 00000000..6ec3504a --- /dev/null +++ b/docs/LoggingNewrelicotlpApi.md @@ -0,0 +1,321 @@ +# WebService::Fastly::LoggingNewrelicotlpApi + +## Load the API package +```perl +use WebService::Fastly::Object::LoggingNewrelicotlpApi; +``` + +All URIs are relative to *https://api.fastly.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_log_newrelicotlp**](LoggingNewrelicotlpApi.md#create_log_newrelicotlp) | **POST** /service/{service_id}/version/{version_id}/logging/newrelicotlp | Create a New Relic OTLP endpoint +[**delete_log_newrelicotlp**](LoggingNewrelicotlpApi.md#delete_log_newrelicotlp) | **DELETE** /service/{service_id}/version/{version_id}/logging/newrelicotlp/{logging_newrelicotlp_name} | Delete a New Relic OTLP endpoint +[**get_log_newrelicotlp**](LoggingNewrelicotlpApi.md#get_log_newrelicotlp) | **GET** /service/{service_id}/version/{version_id}/logging/newrelicotlp/{logging_newrelicotlp_name} | Get a New Relic OTLP endpoint +[**list_log_newrelicotlp**](LoggingNewrelicotlpApi.md#list_log_newrelicotlp) | **GET** /service/{service_id}/version/{version_id}/logging/newrelicotlp | List New Relic OTLP endpoints +[**update_log_newrelicotlp**](LoggingNewrelicotlpApi.md#update_log_newrelicotlp) | **PUT** /service/{service_id}/version/{version_id}/logging/newrelicotlp/{logging_newrelicotlp_name} | Update a New Relic log endpoint + + +# **create_log_newrelicotlp** +> LoggingNewrelicotlpResponse create_log_newrelicotlp(service_id => $service_id, version_id => $version_id, name => $name, placement => $placement, response_condition => $response_condition, format => $format, format_version => $format_version, token => $token, region => $region, url => $url) + +Create a New Relic OTLP endpoint + +Create a New Relic OTLP logging object for a particular service and version. + +### Example +```perl +use Data::Dumper; +use WebService::Fastly::LoggingNewrelicotlpApi; +my $api_instance = WebService::Fastly::LoggingNewrelicotlpApi->new( + + # Configure API key authorization: token + api_key => {'Fastly-Key' => 'YOUR_API_KEY'}, + # uncomment below to setup prefix (e.g. Bearer) for API key, if needed + #api_key_prefix => {'Fastly-Key' => 'Bearer'}, +); + +my $service_id = "service_id_example"; # string | Alphanumeric string identifying the service. +my $version_id = 56; # int | Integer identifying a service version. +my $name = "name_example"; # string | The name for the real-time logging configuration. +my $placement = "placement_example"; # string | 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`. +my $response_condition = "response_condition_example"; # string | The name of an existing condition in the configured endpoint, or leave blank to always execute. +my $format = '{"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"}'; # string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +my $format_version = 2; # int | 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`. +my $token = "token_example"; # string | The Insert API key from the Account page of your New Relic account. Required. +my $region = 'US'; # string | The region to which to stream logs. +my $url = 'null'; # string | (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing. + +eval { + my $result = $api_instance->create_log_newrelicotlp(service_id => $service_id, version_id => $version_id, name => $name, placement => $placement, response_condition => $response_condition, format => $format, format_version => $format_version, token => $token, region => $region, url => $url); + print Dumper($result); +}; +if ($@) { + warn "Exception when calling LoggingNewrelicotlpApi->create_log_newrelicotlp: $@\n"; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **service_id** | **string**| Alphanumeric string identifying the service. | + **version_id** | **int**| Integer identifying a service version. | + **name** | **string**| The name for the real-time logging configuration. | [optional] + **placement** | **string**| 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`. | [optional] + **response_condition** | **string**| The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] + **format** | **string**| A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [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"}'] + **format_version** | **int**| 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`. | [optional] [default to 2] + **token** | **string**| The Insert API key from the Account page of your New Relic account. Required. | [optional] + **region** | **string**| The region to which to stream logs. | [optional] [default to 'US'] + **url** | **string**| (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing. | [optional] [default to 'null'] + +### Return type + +[**LoggingNewrelicotlpResponse**](LoggingNewrelicotlpResponse.md) + +### Authorization + +[token](../README.md#token) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_log_newrelicotlp** +> InlineResponse200 delete_log_newrelicotlp(service_id => $service_id, version_id => $version_id, logging_newrelicotlp_name => $logging_newrelicotlp_name) + +Delete a New Relic OTLP endpoint + +Delete the New Relic OTLP logging object for a particular service and version. + +### Example +```perl +use Data::Dumper; +use WebService::Fastly::LoggingNewrelicotlpApi; +my $api_instance = WebService::Fastly::LoggingNewrelicotlpApi->new( + + # Configure API key authorization: token + api_key => {'Fastly-Key' => 'YOUR_API_KEY'}, + # uncomment below to setup prefix (e.g. Bearer) for API key, if needed + #api_key_prefix => {'Fastly-Key' => 'Bearer'}, +); + +my $service_id = "service_id_example"; # string | Alphanumeric string identifying the service. +my $version_id = 56; # int | Integer identifying a service version. +my $logging_newrelicotlp_name = "logging_newrelicotlp_name_example"; # string | The name for the real-time logging configuration. + +eval { + my $result = $api_instance->delete_log_newrelicotlp(service_id => $service_id, version_id => $version_id, logging_newrelicotlp_name => $logging_newrelicotlp_name); + print Dumper($result); +}; +if ($@) { + warn "Exception when calling LoggingNewrelicotlpApi->delete_log_newrelicotlp: $@\n"; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **service_id** | **string**| Alphanumeric string identifying the service. | + **version_id** | **int**| Integer identifying a service version. | + **logging_newrelicotlp_name** | **string**| The name for the real-time logging configuration. | + +### Return type + +[**InlineResponse200**](InlineResponse200.md) + +### Authorization + +[token](../README.md#token) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_log_newrelicotlp** +> LoggingNewrelicotlpResponse get_log_newrelicotlp(service_id => $service_id, version_id => $version_id, logging_newrelicotlp_name => $logging_newrelicotlp_name) + +Get a New Relic OTLP endpoint + +Get the details of a New Relic OTLP logging object for a particular service and version. + +### Example +```perl +use Data::Dumper; +use WebService::Fastly::LoggingNewrelicotlpApi; +my $api_instance = WebService::Fastly::LoggingNewrelicotlpApi->new( + + # Configure API key authorization: token + api_key => {'Fastly-Key' => 'YOUR_API_KEY'}, + # uncomment below to setup prefix (e.g. Bearer) for API key, if needed + #api_key_prefix => {'Fastly-Key' => 'Bearer'}, +); + +my $service_id = "service_id_example"; # string | Alphanumeric string identifying the service. +my $version_id = 56; # int | Integer identifying a service version. +my $logging_newrelicotlp_name = "logging_newrelicotlp_name_example"; # string | The name for the real-time logging configuration. + +eval { + my $result = $api_instance->get_log_newrelicotlp(service_id => $service_id, version_id => $version_id, logging_newrelicotlp_name => $logging_newrelicotlp_name); + print Dumper($result); +}; +if ($@) { + warn "Exception when calling LoggingNewrelicotlpApi->get_log_newrelicotlp: $@\n"; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **service_id** | **string**| Alphanumeric string identifying the service. | + **version_id** | **int**| Integer identifying a service version. | + **logging_newrelicotlp_name** | **string**| The name for the real-time logging configuration. | + +### Return type + +[**LoggingNewrelicotlpResponse**](LoggingNewrelicotlpResponse.md) + +### Authorization + +[token](../README.md#token) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_log_newrelicotlp** +> ARRAY[LoggingNewrelicotlpResponse] list_log_newrelicotlp(service_id => $service_id, version_id => $version_id) + +List New Relic OTLP endpoints + +List all of the New Relic OTLP logging objects for a particular service and version. + +### Example +```perl +use Data::Dumper; +use WebService::Fastly::LoggingNewrelicotlpApi; +my $api_instance = WebService::Fastly::LoggingNewrelicotlpApi->new( + + # Configure API key authorization: token + api_key => {'Fastly-Key' => 'YOUR_API_KEY'}, + # uncomment below to setup prefix (e.g. Bearer) for API key, if needed + #api_key_prefix => {'Fastly-Key' => 'Bearer'}, +); + +my $service_id = "service_id_example"; # string | Alphanumeric string identifying the service. +my $version_id = 56; # int | Integer identifying a service version. + +eval { + my $result = $api_instance->list_log_newrelicotlp(service_id => $service_id, version_id => $version_id); + print Dumper($result); +}; +if ($@) { + warn "Exception when calling LoggingNewrelicotlpApi->list_log_newrelicotlp: $@\n"; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **service_id** | **string**| Alphanumeric string identifying the service. | + **version_id** | **int**| Integer identifying a service version. | + +### Return type + +[**ARRAY[LoggingNewrelicotlpResponse]**](LoggingNewrelicotlpResponse.md) + +### Authorization + +[token](../README.md#token) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_log_newrelicotlp** +> LoggingNewrelicotlpResponse update_log_newrelicotlp(service_id => $service_id, version_id => $version_id, logging_newrelicotlp_name => $logging_newrelicotlp_name, name => $name, placement => $placement, response_condition => $response_condition, format => $format, format_version => $format_version, token => $token, region => $region, url => $url) + +Update a New Relic log endpoint + +Update a New Relic OTLP logging object for a particular service and version. + +### Example +```perl +use Data::Dumper; +use WebService::Fastly::LoggingNewrelicotlpApi; +my $api_instance = WebService::Fastly::LoggingNewrelicotlpApi->new( + + # Configure API key authorization: token + api_key => {'Fastly-Key' => 'YOUR_API_KEY'}, + # uncomment below to setup prefix (e.g. Bearer) for API key, if needed + #api_key_prefix => {'Fastly-Key' => 'Bearer'}, +); + +my $service_id = "service_id_example"; # string | Alphanumeric string identifying the service. +my $version_id = 56; # int | Integer identifying a service version. +my $logging_newrelicotlp_name = "logging_newrelicotlp_name_example"; # string | The name for the real-time logging configuration. +my $name = "name_example"; # string | The name for the real-time logging configuration. +my $placement = "placement_example"; # string | 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`. +my $response_condition = "response_condition_example"; # string | The name of an existing condition in the configured endpoint, or leave blank to always execute. +my $format = '{"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"}'; # string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +my $format_version = 2; # int | 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`. +my $token = "token_example"; # string | The Insert API key from the Account page of your New Relic account. Required. +my $region = 'US'; # string | The region to which to stream logs. +my $url = 'null'; # string | (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing. + +eval { + my $result = $api_instance->update_log_newrelicotlp(service_id => $service_id, version_id => $version_id, logging_newrelicotlp_name => $logging_newrelicotlp_name, name => $name, placement => $placement, response_condition => $response_condition, format => $format, format_version => $format_version, token => $token, region => $region, url => $url); + print Dumper($result); +}; +if ($@) { + warn "Exception when calling LoggingNewrelicotlpApi->update_log_newrelicotlp: $@\n"; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **service_id** | **string**| Alphanumeric string identifying the service. | + **version_id** | **int**| Integer identifying a service version. | + **logging_newrelicotlp_name** | **string**| The name for the real-time logging configuration. | + **name** | **string**| The name for the real-time logging configuration. | [optional] + **placement** | **string**| 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`. | [optional] + **response_condition** | **string**| The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] + **format** | **string**| A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [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"}'] + **format_version** | **int**| 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`. | [optional] [default to 2] + **token** | **string**| The Insert API key from the Account page of your New Relic account. Required. | [optional] + **region** | **string**| The region to which to stream logs. | [optional] [default to 'US'] + **url** | **string**| (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing. | [optional] [default to 'null'] + +### Return type + +[**LoggingNewrelicotlpResponse**](LoggingNewrelicotlpResponse.md) + +### Authorization + +[token](../README.md#token) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/LoggingNewrelicotlpResponse.md b/docs/LoggingNewrelicotlpResponse.md new file mode 100644 index 00000000..1dacf73a --- /dev/null +++ b/docs/LoggingNewrelicotlpResponse.md @@ -0,0 +1,27 @@ +# WebService::Fastly::Object::LoggingNewrelicotlpResponse + +## Load the model package +```perl +use WebService::Fastly::Object::LoggingNewrelicotlpResponse; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | The name for the real-time logging configuration. | [optional] +**placement** | **string** | 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`. | [optional] +**response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] +**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [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"}'] +**format_version** | **string** | 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`. | [optional] [default to '2'] +**token** | **string** | The Insert API key from the Account page of your New Relic account. Required. | [optional] +**region** | **string** | The region to which to stream logs. | [optional] [default to 'US'] +**url** | **string** | (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing. | [optional] [default to 'null'] +**created_at** | **DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] +**deleted_at** | **DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] +**updated_at** | **DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] +**service_id** | **string** | | [optional] [readonly] +**version** | **string** | | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SecretStoreApi.md b/docs/SecretStoreApi.md index 58a06659..9899d39d 100644 --- a/docs/SecretStoreApi.md +++ b/docs/SecretStoreApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**client_key**](SecretStoreApi.md#client_key) | **POST** /resources/stores/secret/client-key | Create new client key [**create_secret_store**](SecretStoreApi.md#create_secret_store) | **POST** /resources/stores/secret | Create new secret store [**delete_secret_store**](SecretStoreApi.md#delete_secret_store) | **DELETE** /resources/stores/secret/{store_id} | Delete secret store -[**get_secret_store**](SecretStoreApi.md#get_secret_store) | **GET** /resources/stores/secret/{store_id} | Create secret store by ID +[**get_secret_store**](SecretStoreApi.md#get_secret_store) | **GET** /resources/stores/secret/{store_id} | Get secret store by ID [**get_secret_stores**](SecretStoreApi.md#get_secret_stores) | **GET** /resources/stores/secret | Get all secret stores [**signing_key**](SecretStoreApi.md#signing_key) | **GET** /resources/stores/secret/signing-key | Get public key @@ -168,7 +168,7 @@ void (empty response body) # **get_secret_store** > SecretStoreResponse get_secret_store(store_id => $store_id) -Create secret store by ID +Get secret store by ID Get a secret store by ID. diff --git a/docs/TlsDomainsApi.md b/docs/TlsDomainsApi.md index fcba9182..8c6118e6 100644 --- a/docs/TlsDomainsApi.md +++ b/docs/TlsDomainsApi.md @@ -34,7 +34,7 @@ my $api_instance = WebService::Fastly::TlsDomainsApi->new( my $filter[in_use] = "filter[in_use]_example"; # string | Optional. Limit the returned domains to those currently using Fastly to terminate TLS with SNI (that is, domains considered \"in use\") Permitted values: true, false. my $filter[tls_certificates/id] = "filter[tls_certificates/id]_example"; # string | Optional. Limit the returned domains to those listed in the given TLS certificate's SAN list. my $filter[tls_subscriptions/id] = "filter[tls_subscriptions/id]_example"; # string | Optional. Limit the returned domains to those for a given TLS subscription. -my $include = "include_example"; # string | Include related objects. Optional, comma-separated values. Permitted values: `tls_activations`, `tls_certificates`, `tls_subscriptions`, `tls_subscriptions.tls_authorizations`, and `tls_authorizations.globalsign_email_challenge`. +my $include = "include_example"; # string | Include related objects. Optional, comma-separated values. Permitted values: `tls_activations`, `tls_certificates`, `tls_subscriptions`, `tls_subscriptions.tls_authorizations`, `tls_authorizations.globalsign_email_challenge`, and `tls_authorizations.self_managed_http_challenge`. my $page[number] = 1; # int | Current page. my $page[size] = 20; # int | Number of records per page. my $sort = created_at; # string | The order in which to list the results by creation date. @@ -55,7 +55,7 @@ Name | Type | Description | Notes **filter[in_use]** | **string**| Optional. Limit the returned domains to those currently using Fastly to terminate TLS with SNI (that is, domains considered \"in use\") Permitted values: true, false. | [optional] **filter[tls_certificates/id]** | **string**| Optional. Limit the returned domains to those listed in the given TLS certificate's SAN list. | [optional] **filter[tls_subscriptions/id]** | **string**| Optional. Limit the returned domains to those for a given TLS subscription. | [optional] - **include** | **string**| Include related objects. Optional, comma-separated values. Permitted values: `tls_activations`, `tls_certificates`, `tls_subscriptions`, `tls_subscriptions.tls_authorizations`, and `tls_authorizations.globalsign_email_challenge`. | [optional] + **include** | **string**| Include related objects. Optional, comma-separated values. Permitted values: `tls_activations`, `tls_certificates`, `tls_subscriptions`, `tls_subscriptions.tls_authorizations`, `tls_authorizations.globalsign_email_challenge`, and `tls_authorizations.self_managed_http_challenge`. | [optional] **page[number]** | **int**| Current page. | [optional] **page[size]** | **int**| Number of records per page. | [optional] [default to 20] **sort** | **string**| The order in which to list the results by creation date. | [optional] [default to 'created_at'] diff --git a/docs/TlsSubscriptionsApi.md b/docs/TlsSubscriptionsApi.md index 5b38f455..ac786176 100644 --- a/docs/TlsSubscriptionsApi.md +++ b/docs/TlsSubscriptionsApi.md @@ -250,7 +250,7 @@ my $api_instance = WebService::Fastly::TlsSubscriptionsApi->new( ); my $tls_subscription_id = "tls_subscription_id_example"; # string | Alphanumeric string identifying a TLS subscription. -my $include = tls_authorizations; # string | Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations` and `tls_authorizations.globalsign_email_challenge`. +my $include = tls_authorizations; # string | Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations`, `tls_authorizations.globalsign_email_challenge`, and `tls_authorizations.self_managed_http_challenge`. eval { my $result = $api_instance->get_tls_sub(tls_subscription_id => $tls_subscription_id, include => $include); @@ -266,7 +266,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **tls_subscription_id** | **string**| Alphanumeric string identifying a TLS subscription. | - **include** | **string**| Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations` and `tls_authorizations.globalsign_email_challenge`. | [optional] + **include** | **string**| Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations`, `tls_authorizations.globalsign_email_challenge`, and `tls_authorizations.self_managed_http_challenge`. | [optional] ### Return type @@ -305,7 +305,7 @@ my $api_instance = WebService::Fastly::TlsSubscriptionsApi->new( my $filter[state] = "filter[state]_example"; # string | Limit the returned subscriptions by state. Valid values are `pending`, `processing`, `issued`, `renewing`, and `failed`. Accepts parameters: `not` (e.g., `filter[state][not]=renewing`). my $filter[tls_domains/id] = "filter[tls_domains/id]_example"; # string | Limit the returned subscriptions to those that include the specific domain. my $filter[has_active_order] = null; # boolean | Limit the returned subscriptions to those that have currently active orders. Permitted values: `true`. -my $include = tls_authorizations; # string | Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations` and `tls_authorizations.globalsign_email_challenge`. +my $include = tls_authorizations; # string | Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations`, `tls_authorizations.globalsign_email_challenge`, and `tls_authorizations.self_managed_http_challenge`. my $page[number] = 1; # int | Current page. my $page[size] = 20; # int | Number of records per page. my $sort = created_at; # string | The order in which to list the results by creation date. @@ -326,7 +326,7 @@ Name | Type | Description | Notes **filter[state]** | **string**| Limit the returned subscriptions by state. Valid values are `pending`, `processing`, `issued`, `renewing`, and `failed`. Accepts parameters: `not` (e.g., `filter[state][not]=renewing`). | [optional] **filter[tls_domains/id]** | **string**| Limit the returned subscriptions to those that include the specific domain. | [optional] **filter[has_active_order]** | **boolean**| Limit the returned subscriptions to those that have currently active orders. Permitted values: `true`. | [optional] - **include** | **string**| Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations` and `tls_authorizations.globalsign_email_challenge`. | [optional] + **include** | **string**| Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations`, `tls_authorizations.globalsign_email_challenge`, and `tls_authorizations.self_managed_http_challenge`. | [optional] **page[number]** | **int**| Current page. | [optional] **page[size]** | **int**| Number of records per page. | [optional] [default to 20] **sort** | **string**| The order in which to list the results by creation date. | [optional] [default to 'created_at'] diff --git a/lib/WebService/Fastly.pm b/lib/WebService/Fastly.pm index 15cd93cc..a9480ec7 100644 --- a/lib/WebService/Fastly.pm +++ b/lib/WebService/Fastly.pm @@ -2,7 +2,7 @@ package WebService::Fastly; use strict; use 5.008_005; -our $VERSION = '5.00'; +our $VERSION = '5.01'; 1; __END__ diff --git a/lib/WebService/Fastly/BackendApi.pm b/lib/WebService/Fastly/BackendApi.pm index 38481254..16783de5 100644 --- a/lib/WebService/Fastly/BackendApi.pm +++ b/lib/WebService/Fastly/BackendApi.pm @@ -72,6 +72,7 @@ sub new { # @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) # @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) # @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) +# @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) # @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) # @param string $ssl_ca_cert CA certificate attached to origin. (optional) # @param string $ssl_cert_hostname Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. (optional) @@ -190,6 +191,11 @@ sub new { description => 'Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests.', required => '0', }, + 'share_key' => { + data_type => 'string', + description => 'Value that when shared across backends will enable those backends to share the same health check.', + required => '0', + }, 'shield' => { data_type => 'string', description => 'Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding).', @@ -391,6 +397,11 @@ sub create_backend { $form_params->{'request_condition'} = $self->{api_client}->to_form_value($args{'request_condition'}); } + # form params + if ( exists $args{'share_key'} ) { + $form_params->{'share_key'} = $self->{api_client}->to_form_value($args{'share_key'}); + } + # form params if ( exists $args{'shield'} ) { $form_params->{'shield'} = $self->{api_client}->to_form_value($args{'shield'}); @@ -779,6 +790,7 @@ sub list_backends { # @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) # @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) # @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) +# @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) # @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) # @param string $ssl_ca_cert CA certificate attached to origin. (optional) # @param string $ssl_cert_hostname Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. (optional) @@ -902,6 +914,11 @@ sub list_backends { description => 'Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests.', required => '0', }, + 'share_key' => { + data_type => 'string', + description => 'Value that when shared across backends will enable those backends to share the same health check.', + required => '0', + }, 'shield' => { data_type => 'string', description => 'Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding).', @@ -1115,6 +1132,11 @@ sub update_backend { $form_params->{'request_condition'} = $self->{api_client}->to_form_value($args{'request_condition'}); } + # form params + if ( exists $args{'share_key'} ) { + $form_params->{'share_key'} = $self->{api_client}->to_form_value($args{'share_key'}); + } + # form params if ( exists $args{'shield'} ) { $form_params->{'shield'} = $self->{api_client}->to_form_value($args{'shield'}); diff --git a/lib/WebService/Fastly/Configuration.pm b/lib/WebService/Fastly/Configuration.pm index 7b45099e..a119369c 100644 --- a/lib/WebService/Fastly/Configuration.pm +++ b/lib/WebService/Fastly/Configuration.pm @@ -24,7 +24,7 @@ use utf8; use Log::Any qw($log); use Carp; -use constant VERSION => '5.00'; +use constant VERSION => '5.01'; =head1 Name @@ -44,7 +44,7 @@ default: 180 String. custom UserAgent header -default: fastly-perl/5.00 +default: fastly-perl/5.01 =item api_key: (optional) @@ -93,7 +93,7 @@ sub new { # class/static variables $p{http_timeout} //= 180; - $p{http_user_agent} //= 'fastly-perl/5.00'; + $p{http_user_agent} //= 'fastly-perl/5.01'; # authentication setting $p{api_key} //= {}; diff --git a/lib/WebService/Fastly/LoggingNewrelicotlpApi.pm b/lib/WebService/Fastly/LoggingNewrelicotlpApi.pm new file mode 100644 index 00000000..1e3115c9 --- /dev/null +++ b/lib/WebService/Fastly/LoggingNewrelicotlpApi.pm @@ -0,0 +1,704 @@ +=begin comment + +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/) + +The version of the API Spec document: 1.0.0 +Contact: oss@fastly.com + +=end comment + +=cut + +# +# NOTE: This class is auto generated. +# Do not edit the class manually. +# +package WebService::Fastly::LoggingNewrelicotlpApi; + +require 5.6.0; +use strict; +use warnings; +use utf8; +use Exporter; +use Carp qw( croak ); +use Log::Any qw($log); + +use WebService::Fastly::ApiClient; + +use base "Class::Data::Inheritable"; + +__PACKAGE__->mk_classdata('method_documentation' => {}); + +sub new { + my $class = shift; + my $api_client; + + if ($_[0] && ref $_[0] && ref $_[0] eq 'WebService::Fastly::ApiClient' ) { + $api_client = $_[0]; + } else { + $api_client = WebService::Fastly::ApiClient->new(@_); + } + + bless { api_client => $api_client }, $class; + +} + + +# +# create_log_newrelicotlp +# +# Create a New Relic OTLP endpoint +# +# @param string $service_id Alphanumeric string identifying the service. (required) +# @param int $version_id Integer identifying a service version. (required) +# @param string $name The name for the real-time logging configuration. (optional) +# @param 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`. (optional) +# @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) +# @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, 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"}') +# @param int $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`. (optional, default to 2) +# @param string $token The Insert API key from the Account page of your New Relic account. Required. (optional) +# @param string $region The region to which to stream logs. (optional, default to 'US') +# @param string $url (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing. (optional, default to 'null') +{ + my $params = { + 'service_id' => { + data_type => 'string', + description => 'Alphanumeric string identifying the service.', + required => '1', + }, + 'version_id' => { + data_type => 'int', + description => 'Integer identifying a service version.', + required => '1', + }, + 'name' => { + data_type => 'string', + description => 'The name for the real-time logging configuration.', + required => '0', + }, + 'placement' => { + data_type => 'string', + description => '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`. ', + required => '0', + }, + 'response_condition' => { + data_type => 'string', + description => 'The name of an existing condition in the configured endpoint, or leave blank to always execute.', + required => '0', + }, + 'format' => { + data_type => 'string', + description => 'A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).', + required => '0', + }, + 'format_version' => { + data_type => 'int', + description => '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`. ', + required => '0', + }, + 'token' => { + data_type => 'string', + description => 'The Insert API key from the Account page of your New Relic account. Required.', + required => '0', + }, + 'region' => { + data_type => 'string', + description => 'The region to which to stream logs.', + required => '0', + }, + 'url' => { + data_type => 'string', + description => '(Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing.', + required => '0', + }, + }; + __PACKAGE__->method_documentation->{ 'create_log_newrelicotlp' } = { + summary => 'Create a New Relic OTLP endpoint', + params => $params, + returns => 'LoggingNewrelicotlpResponse', + }; +} +# @return LoggingNewrelicotlpResponse +# +sub create_log_newrelicotlp { + my ($self, %args) = @_; + + # verify the required parameter 'service_id' is set + unless (exists $args{'service_id'}) { + croak("Missing the required parameter 'service_id' when calling create_log_newrelicotlp"); + } + + # verify the required parameter 'version_id' is set + unless (exists $args{'version_id'}) { + croak("Missing the required parameter 'version_id' when calling create_log_newrelicotlp"); + } + + # parse inputs + my $_resource_path = '/service/{service_id}/version/{version_id}/logging/newrelicotlp'; + + my $_method = 'POST'; + my $query_params = {}; + my $header_params = {}; + my $form_params = {}; + + # 'Accept' and 'Content-Type' header + my $_header_accept = $self->{api_client}->select_header_accept('application/json'); + if ($_header_accept) { + $header_params->{'Accept'} = $_header_accept; + } + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/x-www-form-urlencoded'); + + # path params + if ( exists $args{'service_id'}) { + my $_base_variable = "{" . "service_id" . "}"; + my $_base_value = $self->{api_client}->to_path_value($args{'service_id'}); + $_resource_path =~ s/$_base_variable/$_base_value/g; + } + + # path params + if ( exists $args{'version_id'}) { + my $_base_variable = "{" . "version_id" . "}"; + my $_base_value = $self->{api_client}->to_path_value($args{'version_id'}); + $_resource_path =~ s/$_base_variable/$_base_value/g; + } + + # form params + if ( exists $args{'name'} ) { + $form_params->{'name'} = $self->{api_client}->to_form_value($args{'name'}); + } + + # form params + if ( exists $args{'placement'} ) { + $form_params->{'placement'} = $self->{api_client}->to_form_value($args{'placement'}); + } + + # form params + if ( exists $args{'response_condition'} ) { + $form_params->{'response_condition'} = $self->{api_client}->to_form_value($args{'response_condition'}); + } + + # form params + if ( exists $args{'format'} ) { + $form_params->{'format'} = $self->{api_client}->to_form_value($args{'format'}); + } + + # form params + if ( exists $args{'format_version'} ) { + $form_params->{'format_version'} = $self->{api_client}->to_form_value($args{'format_version'}); + } + + # form params + if ( exists $args{'token'} ) { + $form_params->{'token'} = $self->{api_client}->to_form_value($args{'token'}); + } + + # form params + if ( exists $args{'region'} ) { + $form_params->{'region'} = $self->{api_client}->to_form_value($args{'region'}); + } + + # form params + if ( exists $args{'url'} ) { + $form_params->{'url'} = $self->{api_client}->to_form_value($args{'url'}); + } + + my $_body_data; + # authentication setting, if any + my $auth_settings = [qw(token )]; + + # make the API Call + my $response = $self->{api_client}->call_api($_resource_path, $_method, + $query_params, $form_params, + $header_params, $_body_data, $auth_settings); + if (!$response) { + return; + } + my $_response_object = $self->{api_client}->deserialize('LoggingNewrelicotlpResponse', $response); + return $_response_object; +} + +# +# delete_log_newrelicotlp +# +# Delete a New Relic OTLP endpoint +# +# @param string $service_id Alphanumeric string identifying the service. (required) +# @param int $version_id Integer identifying a service version. (required) +# @param string $logging_newrelicotlp_name The name for the real-time logging configuration. (required) +{ + my $params = { + 'service_id' => { + data_type => 'string', + description => 'Alphanumeric string identifying the service.', + required => '1', + }, + 'version_id' => { + data_type => 'int', + description => 'Integer identifying a service version.', + required => '1', + }, + 'logging_newrelicotlp_name' => { + data_type => 'string', + description => 'The name for the real-time logging configuration.', + required => '1', + }, + }; + __PACKAGE__->method_documentation->{ 'delete_log_newrelicotlp' } = { + summary => 'Delete a New Relic OTLP endpoint', + params => $params, + returns => 'InlineResponse200', + }; +} +# @return InlineResponse200 +# +sub delete_log_newrelicotlp { + my ($self, %args) = @_; + + # verify the required parameter 'service_id' is set + unless (exists $args{'service_id'}) { + croak("Missing the required parameter 'service_id' when calling delete_log_newrelicotlp"); + } + + # verify the required parameter 'version_id' is set + unless (exists $args{'version_id'}) { + croak("Missing the required parameter 'version_id' when calling delete_log_newrelicotlp"); + } + + # verify the required parameter 'logging_newrelicotlp_name' is set + unless (exists $args{'logging_newrelicotlp_name'}) { + croak("Missing the required parameter 'logging_newrelicotlp_name' when calling delete_log_newrelicotlp"); + } + + # parse inputs + my $_resource_path = '/service/{service_id}/version/{version_id}/logging/newrelicotlp/{logging_newrelicotlp_name}'; + + my $_method = 'DELETE'; + my $query_params = {}; + my $header_params = {}; + my $form_params = {}; + + # 'Accept' and 'Content-Type' header + my $_header_accept = $self->{api_client}->select_header_accept('application/json'); + if ($_header_accept) { + $header_params->{'Accept'} = $_header_accept; + } + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); + + # path params + if ( exists $args{'service_id'}) { + my $_base_variable = "{" . "service_id" . "}"; + my $_base_value = $self->{api_client}->to_path_value($args{'service_id'}); + $_resource_path =~ s/$_base_variable/$_base_value/g; + } + + # path params + if ( exists $args{'version_id'}) { + my $_base_variable = "{" . "version_id" . "}"; + my $_base_value = $self->{api_client}->to_path_value($args{'version_id'}); + $_resource_path =~ s/$_base_variable/$_base_value/g; + } + + # path params + if ( exists $args{'logging_newrelicotlp_name'}) { + my $_base_variable = "{" . "logging_newrelicotlp_name" . "}"; + my $_base_value = $self->{api_client}->to_path_value($args{'logging_newrelicotlp_name'}); + $_resource_path =~ s/$_base_variable/$_base_value/g; + } + + my $_body_data; + # authentication setting, if any + my $auth_settings = [qw(token )]; + + # make the API Call + my $response = $self->{api_client}->call_api($_resource_path, $_method, + $query_params, $form_params, + $header_params, $_body_data, $auth_settings); + if (!$response) { + return; + } + my $_response_object = $self->{api_client}->deserialize('InlineResponse200', $response); + return $_response_object; +} + +# +# get_log_newrelicotlp +# +# Get a New Relic OTLP endpoint +# +# @param string $service_id Alphanumeric string identifying the service. (required) +# @param int $version_id Integer identifying a service version. (required) +# @param string $logging_newrelicotlp_name The name for the real-time logging configuration. (required) +{ + my $params = { + 'service_id' => { + data_type => 'string', + description => 'Alphanumeric string identifying the service.', + required => '1', + }, + 'version_id' => { + data_type => 'int', + description => 'Integer identifying a service version.', + required => '1', + }, + 'logging_newrelicotlp_name' => { + data_type => 'string', + description => 'The name for the real-time logging configuration.', + required => '1', + }, + }; + __PACKAGE__->method_documentation->{ 'get_log_newrelicotlp' } = { + summary => 'Get a New Relic OTLP endpoint', + params => $params, + returns => 'LoggingNewrelicotlpResponse', + }; +} +# @return LoggingNewrelicotlpResponse +# +sub get_log_newrelicotlp { + my ($self, %args) = @_; + + # verify the required parameter 'service_id' is set + unless (exists $args{'service_id'}) { + croak("Missing the required parameter 'service_id' when calling get_log_newrelicotlp"); + } + + # verify the required parameter 'version_id' is set + unless (exists $args{'version_id'}) { + croak("Missing the required parameter 'version_id' when calling get_log_newrelicotlp"); + } + + # verify the required parameter 'logging_newrelicotlp_name' is set + unless (exists $args{'logging_newrelicotlp_name'}) { + croak("Missing the required parameter 'logging_newrelicotlp_name' when calling get_log_newrelicotlp"); + } + + # parse inputs + my $_resource_path = '/service/{service_id}/version/{version_id}/logging/newrelicotlp/{logging_newrelicotlp_name}'; + + my $_method = 'GET'; + my $query_params = {}; + my $header_params = {}; + my $form_params = {}; + + # 'Accept' and 'Content-Type' header + my $_header_accept = $self->{api_client}->select_header_accept('application/json'); + if ($_header_accept) { + $header_params->{'Accept'} = $_header_accept; + } + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); + + # path params + if ( exists $args{'service_id'}) { + my $_base_variable = "{" . "service_id" . "}"; + my $_base_value = $self->{api_client}->to_path_value($args{'service_id'}); + $_resource_path =~ s/$_base_variable/$_base_value/g; + } + + # path params + if ( exists $args{'version_id'}) { + my $_base_variable = "{" . "version_id" . "}"; + my $_base_value = $self->{api_client}->to_path_value($args{'version_id'}); + $_resource_path =~ s/$_base_variable/$_base_value/g; + } + + # path params + if ( exists $args{'logging_newrelicotlp_name'}) { + my $_base_variable = "{" . "logging_newrelicotlp_name" . "}"; + my $_base_value = $self->{api_client}->to_path_value($args{'logging_newrelicotlp_name'}); + $_resource_path =~ s/$_base_variable/$_base_value/g; + } + + my $_body_data; + # authentication setting, if any + my $auth_settings = [qw(token )]; + + # make the API Call + my $response = $self->{api_client}->call_api($_resource_path, $_method, + $query_params, $form_params, + $header_params, $_body_data, $auth_settings); + if (!$response) { + return; + } + my $_response_object = $self->{api_client}->deserialize('LoggingNewrelicotlpResponse', $response); + return $_response_object; +} + +# +# list_log_newrelicotlp +# +# List New Relic OTLP endpoints +# +# @param string $service_id Alphanumeric string identifying the service. (required) +# @param int $version_id Integer identifying a service version. (required) +{ + my $params = { + 'service_id' => { + data_type => 'string', + description => 'Alphanumeric string identifying the service.', + required => '1', + }, + 'version_id' => { + data_type => 'int', + description => 'Integer identifying a service version.', + required => '1', + }, + }; + __PACKAGE__->method_documentation->{ 'list_log_newrelicotlp' } = { + summary => 'List New Relic OTLP endpoints', + params => $params, + returns => 'ARRAY[LoggingNewrelicotlpResponse]', + }; +} +# @return ARRAY[LoggingNewrelicotlpResponse] +# +sub list_log_newrelicotlp { + my ($self, %args) = @_; + + # verify the required parameter 'service_id' is set + unless (exists $args{'service_id'}) { + croak("Missing the required parameter 'service_id' when calling list_log_newrelicotlp"); + } + + # verify the required parameter 'version_id' is set + unless (exists $args{'version_id'}) { + croak("Missing the required parameter 'version_id' when calling list_log_newrelicotlp"); + } + + # parse inputs + my $_resource_path = '/service/{service_id}/version/{version_id}/logging/newrelicotlp'; + + my $_method = 'GET'; + my $query_params = {}; + my $header_params = {}; + my $form_params = {}; + + # 'Accept' and 'Content-Type' header + my $_header_accept = $self->{api_client}->select_header_accept('application/json'); + if ($_header_accept) { + $header_params->{'Accept'} = $_header_accept; + } + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); + + # path params + if ( exists $args{'service_id'}) { + my $_base_variable = "{" . "service_id" . "}"; + my $_base_value = $self->{api_client}->to_path_value($args{'service_id'}); + $_resource_path =~ s/$_base_variable/$_base_value/g; + } + + # path params + if ( exists $args{'version_id'}) { + my $_base_variable = "{" . "version_id" . "}"; + my $_base_value = $self->{api_client}->to_path_value($args{'version_id'}); + $_resource_path =~ s/$_base_variable/$_base_value/g; + } + + my $_body_data; + # authentication setting, if any + my $auth_settings = [qw(token )]; + + # make the API Call + my $response = $self->{api_client}->call_api($_resource_path, $_method, + $query_params, $form_params, + $header_params, $_body_data, $auth_settings); + if (!$response) { + return; + } + my $_response_object = $self->{api_client}->deserialize('ARRAY[LoggingNewrelicotlpResponse]', $response); + return $_response_object; +} + +# +# update_log_newrelicotlp +# +# Update a New Relic log endpoint +# +# @param string $service_id Alphanumeric string identifying the service. (required) +# @param int $version_id Integer identifying a service version. (required) +# @param string $logging_newrelicotlp_name The name for the real-time logging configuration. (required) +# @param string $name The name for the real-time logging configuration. (optional) +# @param 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`. (optional) +# @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) +# @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, 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"}') +# @param int $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`. (optional, default to 2) +# @param string $token The Insert API key from the Account page of your New Relic account. Required. (optional) +# @param string $region The region to which to stream logs. (optional, default to 'US') +# @param string $url (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing. (optional, default to 'null') +{ + my $params = { + 'service_id' => { + data_type => 'string', + description => 'Alphanumeric string identifying the service.', + required => '1', + }, + 'version_id' => { + data_type => 'int', + description => 'Integer identifying a service version.', + required => '1', + }, + 'logging_newrelicotlp_name' => { + data_type => 'string', + description => 'The name for the real-time logging configuration.', + required => '1', + }, + 'name' => { + data_type => 'string', + description => 'The name for the real-time logging configuration.', + required => '0', + }, + 'placement' => { + data_type => 'string', + description => '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`. ', + required => '0', + }, + 'response_condition' => { + data_type => 'string', + description => 'The name of an existing condition in the configured endpoint, or leave blank to always execute.', + required => '0', + }, + 'format' => { + data_type => 'string', + description => 'A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).', + required => '0', + }, + 'format_version' => { + data_type => 'int', + description => '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`. ', + required => '0', + }, + 'token' => { + data_type => 'string', + description => 'The Insert API key from the Account page of your New Relic account. Required.', + required => '0', + }, + 'region' => { + data_type => 'string', + description => 'The region to which to stream logs.', + required => '0', + }, + 'url' => { + data_type => 'string', + description => '(Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing.', + required => '0', + }, + }; + __PACKAGE__->method_documentation->{ 'update_log_newrelicotlp' } = { + summary => 'Update a New Relic log endpoint', + params => $params, + returns => 'LoggingNewrelicotlpResponse', + }; +} +# @return LoggingNewrelicotlpResponse +# +sub update_log_newrelicotlp { + my ($self, %args) = @_; + + # verify the required parameter 'service_id' is set + unless (exists $args{'service_id'}) { + croak("Missing the required parameter 'service_id' when calling update_log_newrelicotlp"); + } + + # verify the required parameter 'version_id' is set + unless (exists $args{'version_id'}) { + croak("Missing the required parameter 'version_id' when calling update_log_newrelicotlp"); + } + + # verify the required parameter 'logging_newrelicotlp_name' is set + unless (exists $args{'logging_newrelicotlp_name'}) { + croak("Missing the required parameter 'logging_newrelicotlp_name' when calling update_log_newrelicotlp"); + } + + # parse inputs + my $_resource_path = '/service/{service_id}/version/{version_id}/logging/newrelicotlp/{logging_newrelicotlp_name}'; + + my $_method = 'PUT'; + my $query_params = {}; + my $header_params = {}; + my $form_params = {}; + + # 'Accept' and 'Content-Type' header + my $_header_accept = $self->{api_client}->select_header_accept('application/json'); + if ($_header_accept) { + $header_params->{'Accept'} = $_header_accept; + } + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/x-www-form-urlencoded'); + + # path params + if ( exists $args{'service_id'}) { + my $_base_variable = "{" . "service_id" . "}"; + my $_base_value = $self->{api_client}->to_path_value($args{'service_id'}); + $_resource_path =~ s/$_base_variable/$_base_value/g; + } + + # path params + if ( exists $args{'version_id'}) { + my $_base_variable = "{" . "version_id" . "}"; + my $_base_value = $self->{api_client}->to_path_value($args{'version_id'}); + $_resource_path =~ s/$_base_variable/$_base_value/g; + } + + # path params + if ( exists $args{'logging_newrelicotlp_name'}) { + my $_base_variable = "{" . "logging_newrelicotlp_name" . "}"; + my $_base_value = $self->{api_client}->to_path_value($args{'logging_newrelicotlp_name'}); + $_resource_path =~ s/$_base_variable/$_base_value/g; + } + + # form params + if ( exists $args{'name'} ) { + $form_params->{'name'} = $self->{api_client}->to_form_value($args{'name'}); + } + + # form params + if ( exists $args{'placement'} ) { + $form_params->{'placement'} = $self->{api_client}->to_form_value($args{'placement'}); + } + + # form params + if ( exists $args{'response_condition'} ) { + $form_params->{'response_condition'} = $self->{api_client}->to_form_value($args{'response_condition'}); + } + + # form params + if ( exists $args{'format'} ) { + $form_params->{'format'} = $self->{api_client}->to_form_value($args{'format'}); + } + + # form params + if ( exists $args{'format_version'} ) { + $form_params->{'format_version'} = $self->{api_client}->to_form_value($args{'format_version'}); + } + + # form params + if ( exists $args{'token'} ) { + $form_params->{'token'} = $self->{api_client}->to_form_value($args{'token'}); + } + + # form params + if ( exists $args{'region'} ) { + $form_params->{'region'} = $self->{api_client}->to_form_value($args{'region'}); + } + + # form params + if ( exists $args{'url'} ) { + $form_params->{'url'} = $self->{api_client}->to_form_value($args{'url'}); + } + + my $_body_data; + # authentication setting, if any + my $auth_settings = [qw(token )]; + + # make the API Call + my $response = $self->{api_client}->call_api($_resource_path, $_method, + $query_params, $form_params, + $header_params, $_body_data, $auth_settings); + if (!$response) { + return; + } + my $_response_object = $self->{api_client}->deserialize('LoggingNewrelicotlpResponse', $response); + return $_response_object; +} + +1; diff --git a/lib/WebService/Fastly/Object/Backend.pm b/lib/WebService/Fastly/Object/Backend.pm index 9e26b09d..315296dd 100644 --- a/lib/WebService/Fastly/Object/Backend.pm +++ b/lib/WebService/Fastly/Object/Backend.pm @@ -291,6 +291,13 @@ __PACKAGE__->method_documentation({ format => '', read_only => 'false', }, + 'share_key' => { + datatype => 'string', + base_name => 'share_key', + description => 'Value that when shared across backends will enable those backends to share the same health check.', + format => '', + read_only => 'false', + }, 'shield' => { datatype => 'string', base_name => 'shield', @@ -390,6 +397,7 @@ __PACKAGE__->openapi_types( { 'override_host' => 'string', 'port' => 'int', 'request_condition' => 'string', + 'share_key' => 'string', 'shield' => 'string', 'ssl_ca_cert' => 'string', 'ssl_cert_hostname' => 'string', @@ -423,6 +431,7 @@ __PACKAGE__->attribute_map( { 'override_host' => 'override_host', 'port' => 'port', 'request_condition' => 'request_condition', + 'share_key' => 'share_key', 'shield' => 'shield', 'ssl_ca_cert' => 'ssl_ca_cert', 'ssl_cert_hostname' => 'ssl_cert_hostname', @@ -449,6 +458,7 @@ __PACKAGE__->openapi_nullable( { 'max_tls_version' => 'true', 'min_tls_version' => 'true', 'override_host' => 'true', + 'share_key' => 'true', 'shield' => 'true', 'ssl_ca_cert' => 'true', 'ssl_cert_hostname' => 'true', diff --git a/lib/WebService/Fastly/Object/BackendResponse.pm b/lib/WebService/Fastly/Object/BackendResponse.pm index e3798195..49dd1477 100644 --- a/lib/WebService/Fastly/Object/BackendResponse.pm +++ b/lib/WebService/Fastly/Object/BackendResponse.pm @@ -295,6 +295,13 @@ __PACKAGE__->method_documentation({ format => '', read_only => 'false', }, + 'share_key' => { + datatype => 'string', + base_name => 'share_key', + description => 'Value that when shared across backends will enable those backends to share the same health check.', + format => '', + read_only => 'false', + }, 'shield' => { datatype => 'string', base_name => 'shield', @@ -436,6 +443,7 @@ __PACKAGE__->openapi_types( { 'override_host' => 'string', 'port' => 'int', 'request_condition' => 'string', + 'share_key' => 'string', 'shield' => 'string', 'ssl_ca_cert' => 'string', 'ssl_cert_hostname' => 'string', @@ -475,6 +483,7 @@ __PACKAGE__->attribute_map( { 'override_host' => 'override_host', 'port' => 'port', 'request_condition' => 'request_condition', + 'share_key' => 'share_key', 'shield' => 'shield', 'ssl_ca_cert' => 'ssl_ca_cert', 'ssl_cert_hostname' => 'ssl_cert_hostname', @@ -507,6 +516,7 @@ __PACKAGE__->openapi_nullable( { 'max_tls_version' => 'true', 'min_tls_version' => 'true', 'override_host' => 'true', + 'share_key' => 'true', 'shield' => 'true', 'ssl_ca_cert' => 'true', 'ssl_cert_hostname' => 'true', diff --git a/lib/WebService/Fastly/Object/LoggingNewrelicotlpAdditional.pm b/lib/WebService/Fastly/Object/LoggingNewrelicotlpAdditional.pm new file mode 100644 index 00000000..2e166038 --- /dev/null +++ b/lib/WebService/Fastly/Object/LoggingNewrelicotlpAdditional.pm @@ -0,0 +1,212 @@ +=begin comment + +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/) + +The version of the API Spec document: 1.0.0 +Contact: oss@fastly.com + +=end comment + +=cut + +# +# NOTE: This class is auto generated. +# Do not edit the class manually. +# +package WebService::Fastly::Object::LoggingNewrelicotlpAdditional; + +require 5.6.0; +use strict; +use warnings; +use utf8; +use JSON::MaybeXS qw(decode_json); +use Data::Dumper; +use Module::Runtime qw(use_module); +use Log::Any qw($log); +use Date::Parse; +use DateTime; + + +use base ("Class::Accessor", "Class::Data::Inheritable"); + +# +# +# +# NOTE: This class is auto generated. Do not edit the class manually. +# + +=begin comment + +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/) + +The version of the API Spec document: 1.0.0 +Contact: oss@fastly.com + +=end comment + +=cut + +# +# NOTE: This class is auto generated. +# Do not edit the class manually. +# +__PACKAGE__->mk_classdata('attribute_map' => {}); +__PACKAGE__->mk_classdata('openapi_types' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('class_documentation' => {}); +__PACKAGE__->mk_classdata('openapi_nullable' => {}); + +# new plain object +sub new { + my ($class, %args) = @_; + + my $self = bless {}, $class; + + $self->init(%args); + + return $self; +} + +# initialize the object +sub init +{ + my ($self, %args) = @_; + + foreach my $attribute (keys %{$self->attribute_map}) { + my $args_key = $self->attribute_map->{$attribute}; + $self->$attribute( $args{ $args_key } ); + } +} + +# return perl hash +sub to_hash { + my $self = shift; + my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self)); + + return $_hash; +} + +# used by JSON for serialization +sub TO_JSON { + my $self = shift; + my $_data = {}; + foreach my $_key (keys %{$self->attribute_map}) { + $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; + } + + return $_data; +} + +# from Perl hashref +sub from_hash { + my ($self, $hash) = @_; + + # loop through attributes and use openapi_types to deserialize the data + while ( my ($_key, $_type) = each %{$self->openapi_types} ) { + my $_json_attribute = $self->attribute_map->{$_key}; + my $_is_nullable = ($self->openapi_nullable->{$_key} || 'false') eq 'true'; + if ($_type =~ /^array\[(.+)\]$/i) { # array + my $_subclass = $1; + my @_array = (); + foreach my $_element (@{$hash->{$_json_attribute}}) { + push @_array, $self->_deserialize($_subclass, $_element, $_is_nullable); + } + $self->{$_key} = \@_array; + } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash + my $_subclass = $1; + my %_hash = (); + while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { + $_hash{$_key} = $self->_deserialize($_subclass, $_element, $_is_nullable); + } + $self->{$_key} = \%_hash; + } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime + $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}, $_is_nullable); + } else { + $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); + } + } + + return $self; +} + +# deserialize non-array data +sub _deserialize { + my ($self, $type, $data, $is_nullable) = @_; + $log->debugf("deserializing %s with %s",Dumper($data), $type); + + if (!(defined $data) && $is_nullable) { + return undef; + } + if ($type eq 'DateTime') { + return DateTime->from_epoch(epoch => str2time($data)); + } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { + return $data; + } else { # hash(model) + my $_instance = eval "WebService::Fastly::Object::$type->new()"; + return $_instance->from_hash($data); + } +} + + +__PACKAGE__->class_documentation({description => '', + class => 'LoggingNewrelicotlpAdditional', + required => [], # TODO +} ); + +__PACKAGE__->method_documentation({ + 'format' => { + datatype => 'string', + base_name => 'format', + description => 'A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).', + format => '', + read_only => 'false', + }, + 'token' => { + datatype => 'string', + base_name => 'token', + description => 'The Insert API key from the Account page of your New Relic account. Required.', + format => '', + read_only => 'false', + }, + 'region' => { + datatype => 'string', + base_name => 'region', + description => 'The region to which to stream logs.', + format => '', + read_only => 'false', + }, + 'url' => { + datatype => 'string', + base_name => 'url', + description => '(Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing.', + format => '', + read_only => 'false', + }, +}); + +__PACKAGE__->openapi_types( { + 'format' => 'string', + 'token' => 'string', + 'region' => 'string', + 'url' => 'string' +} ); + +__PACKAGE__->attribute_map( { + 'format' => 'format', + 'token' => 'token', + 'region' => 'region', + 'url' => 'url' +} ); + +__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); + +__PACKAGE__->openapi_nullable( { + 'url' => 'true', +} ); + + +1; diff --git a/lib/WebService/Fastly/Object/LoggingNewrelicotlpResponse.pm b/lib/WebService/Fastly/Object/LoggingNewrelicotlpResponse.pm new file mode 100644 index 00000000..fdcf1048 --- /dev/null +++ b/lib/WebService/Fastly/Object/LoggingNewrelicotlpResponse.pm @@ -0,0 +1,302 @@ +=begin comment + +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/) + +The version of the API Spec document: 1.0.0 +Contact: oss@fastly.com + +=end comment + +=cut + +# +# NOTE: This class is auto generated. +# Do not edit the class manually. +# +package WebService::Fastly::Object::LoggingNewrelicotlpResponse; + +require 5.6.0; +use strict; +use warnings; +use utf8; +use JSON::MaybeXS qw(decode_json); +use Data::Dumper; +use Module::Runtime qw(use_module); +use Log::Any qw($log); +use Date::Parse; +use DateTime; + +use WebService::Fastly::Object::LoggingCommonResponse; +use WebService::Fastly::Object::LoggingNewrelicotlpAdditional; +use WebService::Fastly::Object::ServiceIdAndVersionString; +use WebService::Fastly::Object::Timestamps; + +use base ("Class::Accessor", "Class::Data::Inheritable"); + +# +# +# +# NOTE: This class is auto generated. Do not edit the class manually. +# + +=begin comment + +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/) + +The version of the API Spec document: 1.0.0 +Contact: oss@fastly.com + +=end comment + +=cut + +# +# NOTE: This class is auto generated. +# Do not edit the class manually. +# +__PACKAGE__->mk_classdata('attribute_map' => {}); +__PACKAGE__->mk_classdata('openapi_types' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('class_documentation' => {}); +__PACKAGE__->mk_classdata('openapi_nullable' => {}); + +# new plain object +sub new { + my ($class, %args) = @_; + + my $self = bless {}, $class; + + $self->init(%args); + + return $self; +} + +# initialize the object +sub init +{ + my ($self, %args) = @_; + + foreach my $attribute (keys %{$self->attribute_map}) { + my $args_key = $self->attribute_map->{$attribute}; + $self->$attribute( $args{ $args_key } ); + } +} + +# return perl hash +sub to_hash { + my $self = shift; + my $_hash = decode_json(JSON()->new->allow_blessed->convert_blessed->encode($self)); + + return $_hash; +} + +# used by JSON for serialization +sub TO_JSON { + my $self = shift; + my $_data = {}; + foreach my $_key (keys %{$self->attribute_map}) { + $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; + } + + return $_data; +} + +# from Perl hashref +sub from_hash { + my ($self, $hash) = @_; + + # loop through attributes and use openapi_types to deserialize the data + while ( my ($_key, $_type) = each %{$self->openapi_types} ) { + my $_json_attribute = $self->attribute_map->{$_key}; + my $_is_nullable = ($self->openapi_nullable->{$_key} || 'false') eq 'true'; + if ($_type =~ /^array\[(.+)\]$/i) { # array + my $_subclass = $1; + my @_array = (); + foreach my $_element (@{$hash->{$_json_attribute}}) { + push @_array, $self->_deserialize($_subclass, $_element, $_is_nullable); + } + $self->{$_key} = \@_array; + } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash + my $_subclass = $1; + my %_hash = (); + while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { + $_hash{$_key} = $self->_deserialize($_subclass, $_element, $_is_nullable); + } + $self->{$_key} = \%_hash; + } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime + $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}, $_is_nullable); + } else { + $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); + } + } + + return $self; +} + +# deserialize non-array data +sub _deserialize { + my ($self, $type, $data, $is_nullable) = @_; + $log->debugf("deserializing %s with %s",Dumper($data), $type); + + if (!(defined $data) && $is_nullable) { + return undef; + } + if ($type eq 'DateTime') { + return DateTime->from_epoch(epoch => str2time($data)); + } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { + return $data; + } else { # hash(model) + my $_instance = eval "WebService::Fastly::Object::$type->new()"; + return $_instance->from_hash($data); + } +} + + +__PACKAGE__->class_documentation({description => '', + class => 'LoggingNewrelicotlpResponse', + required => [], # TODO +} ); + +__PACKAGE__->method_documentation({ + 'name' => { + datatype => 'string', + base_name => 'name', + description => 'The name for the real-time logging configuration.', + format => '', + read_only => 'false', + }, + 'placement' => { + datatype => 'string', + base_name => 'placement', + description => '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`. ', + format => '', + read_only => 'false', + }, + 'response_condition' => { + datatype => 'string', + base_name => 'response_condition', + description => 'The name of an existing condition in the configured endpoint, or leave blank to always execute.', + format => '', + read_only => 'false', + }, + 'format' => { + datatype => 'string', + base_name => 'format', + description => 'A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).', + format => '', + read_only => 'false', + }, + 'format_version' => { + datatype => 'string', + base_name => 'format_version', + description => '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`. ', + format => '', + read_only => 'false', + }, + 'token' => { + datatype => 'string', + base_name => 'token', + description => 'The Insert API key from the Account page of your New Relic account. Required.', + format => '', + read_only => 'false', + }, + 'region' => { + datatype => 'string', + base_name => 'region', + description => 'The region to which to stream logs.', + format => '', + read_only => 'false', + }, + 'url' => { + datatype => 'string', + base_name => 'url', + description => '(Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing.', + format => '', + read_only => 'false', + }, + 'created_at' => { + datatype => 'DateTime', + base_name => 'created_at', + description => 'Date and time in ISO 8601 format.', + format => 'date-time', + read_only => 'true', + }, + 'deleted_at' => { + datatype => 'DateTime', + base_name => 'deleted_at', + description => 'Date and time in ISO 8601 format.', + format => 'date-time', + read_only => 'true', + }, + 'updated_at' => { + datatype => 'DateTime', + base_name => 'updated_at', + description => 'Date and time in ISO 8601 format.', + format => 'date-time', + read_only => 'true', + }, + 'service_id' => { + datatype => 'string', + base_name => 'service_id', + description => '', + format => '', + read_only => 'true', + }, + 'version' => { + datatype => 'string', + base_name => 'version', + description => '', + format => '', + read_only => 'true', + }, +}); + +__PACKAGE__->openapi_types( { + 'name' => 'string', + 'placement' => 'string', + 'response_condition' => 'string', + 'format' => 'string', + 'format_version' => 'string', + 'token' => 'string', + 'region' => 'string', + 'url' => 'string', + 'created_at' => 'DateTime', + 'deleted_at' => 'DateTime', + 'updated_at' => 'DateTime', + 'service_id' => 'string', + 'version' => 'string' +} ); + +__PACKAGE__->attribute_map( { + 'name' => 'name', + 'placement' => 'placement', + 'response_condition' => 'response_condition', + 'format' => 'format', + 'format_version' => 'format_version', + 'token' => 'token', + 'region' => 'region', + 'url' => 'url', + 'created_at' => 'created_at', + 'deleted_at' => 'deleted_at', + 'updated_at' => 'updated_at', + 'service_id' => 'service_id', + 'version' => 'version' +} ); + +__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); + +__PACKAGE__->openapi_nullable( { + 'placement' => 'true', + 'response_condition' => 'true', + 'url' => 'true', + 'created_at' => 'true', + 'deleted_at' => 'true', + 'updated_at' => 'true', +} ); + + +1; diff --git a/lib/WebService/Fastly/SecretStoreApi.pm b/lib/WebService/Fastly/SecretStoreApi.pm index 40a3b9ed..bfed2957 100644 --- a/lib/WebService/Fastly/SecretStoreApi.pm +++ b/lib/WebService/Fastly/SecretStoreApi.pm @@ -221,7 +221,7 @@ sub delete_secret_store { # # get_secret_store # -# Create secret store by ID +# Get secret store by ID # # @param string $store_id (required) { @@ -233,7 +233,7 @@ sub delete_secret_store { }, }; __PACKAGE__->method_documentation->{ 'get_secret_store' } = { - summary => 'Create secret store by ID', + summary => 'Get secret store by ID', params => $params, returns => 'SecretStoreResponse', }; diff --git a/lib/WebService/Fastly/TlsDomainsApi.pm b/lib/WebService/Fastly/TlsDomainsApi.pm index 563d315a..c296c408 100644 --- a/lib/WebService/Fastly/TlsDomainsApi.pm +++ b/lib/WebService/Fastly/TlsDomainsApi.pm @@ -54,7 +54,7 @@ sub new { # @param string $filter[in_use] Optional. Limit the returned domains to those currently using Fastly to terminate TLS with SNI (that is, domains considered \"in use\") Permitted values: true, false. (optional) # @param string $filter[tls_certificates/id] Optional. Limit the returned domains to those listed in the given TLS certificate's SAN list. (optional) # @param string $filter[tls_subscriptions/id] Optional. Limit the returned domains to those for a given TLS subscription. (optional) -# @param string $include Include related objects. Optional, comma-separated values. Permitted values: `tls_activations`, `tls_certificates`, `tls_subscriptions`, `tls_subscriptions.tls_authorizations`, and `tls_authorizations.globalsign_email_challenge`. (optional) +# @param string $include Include related objects. Optional, comma-separated values. Permitted values: `tls_activations`, `tls_certificates`, `tls_subscriptions`, `tls_subscriptions.tls_authorizations`, `tls_authorizations.globalsign_email_challenge`, and `tls_authorizations.self_managed_http_challenge`. (optional) # @param int $page[number] Current page. (optional) # @param int $page[size] Number of records per page. (optional, default to 20) # @param string $sort The order in which to list the results by creation date. (optional, default to 'created_at') @@ -77,7 +77,7 @@ sub new { }, 'include' => { data_type => 'string', - description => 'Include related objects. Optional, comma-separated values. Permitted values: `tls_activations`, `tls_certificates`, `tls_subscriptions`, `tls_subscriptions.tls_authorizations`, and `tls_authorizations.globalsign_email_challenge`. ', + description => 'Include related objects. Optional, comma-separated values. Permitted values: `tls_activations`, `tls_certificates`, `tls_subscriptions`, `tls_subscriptions.tls_authorizations`, `tls_authorizations.globalsign_email_challenge`, and `tls_authorizations.self_managed_http_challenge`. ', required => '0', }, 'page[number]' => { diff --git a/lib/WebService/Fastly/TlsSubscriptionsApi.pm b/lib/WebService/Fastly/TlsSubscriptionsApi.pm index bc0c41f0..5364179f 100644 --- a/lib/WebService/Fastly/TlsSubscriptionsApi.pm +++ b/lib/WebService/Fastly/TlsSubscriptionsApi.pm @@ -381,7 +381,7 @@ sub delete_tls_sub { # Get a TLS subscription # # @param string $tls_subscription_id Alphanumeric string identifying a TLS subscription. (required) -# @param string $include Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations` and `tls_authorizations.globalsign_email_challenge`. (optional) +# @param string $include Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations`, `tls_authorizations.globalsign_email_challenge`, and `tls_authorizations.self_managed_http_challenge`. (optional) { my $params = { 'tls_subscription_id' => { @@ -391,7 +391,7 @@ sub delete_tls_sub { }, 'include' => { data_type => 'string', - description => 'Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations` and `tls_authorizations.globalsign_email_challenge`. ', + description => 'Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations`, `tls_authorizations.globalsign_email_challenge`, and `tls_authorizations.self_managed_http_challenge`. ', required => '0', }, }; @@ -461,7 +461,7 @@ sub get_tls_sub { # @param string $filter[state] Limit the returned subscriptions by state. Valid values are `pending`, `processing`, `issued`, `renewing`, and `failed`. Accepts parameters: `not` (e.g., `filter[state][not]=renewing`). (optional) # @param string $filter[tls_domains/id] Limit the returned subscriptions to those that include the specific domain. (optional) # @param boolean $filter[has_active_order] Limit the returned subscriptions to those that have currently active orders. Permitted values: `true`. (optional) -# @param string $include Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations` and `tls_authorizations.globalsign_email_challenge`. (optional) +# @param string $include Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations`, `tls_authorizations.globalsign_email_challenge`, and `tls_authorizations.self_managed_http_challenge`. (optional) # @param int $page[number] Current page. (optional) # @param int $page[size] Number of records per page. (optional, default to 20) # @param string $sort The order in which to list the results by creation date. (optional, default to 'created_at') @@ -484,7 +484,7 @@ sub get_tls_sub { }, 'include' => { data_type => 'string', - description => 'Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations` and `tls_authorizations.globalsign_email_challenge`. ', + description => 'Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations`, `tls_authorizations.globalsign_email_challenge`, and `tls_authorizations.self_managed_http_challenge`. ', required => '0', }, 'page[number]' => { diff --git a/sig.json b/sig.json index 65857946..af51c000 100644 --- a/sig.json +++ b/sig.json @@ -1 +1 @@ -{"G": "2914592f", "D": "7e4f4edd"} +{"G": "a5d4c17e", "D": "6ddfaf95"}