diff --git a/CHANGELOG.md b/CHANGELOG.md index e752af7..c151e32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [v4.1.0](https://github.com/fastly/fastly-py/releases/tag/release/v4.1.0) (2023-09-01) + +**Enhancements:** + +- 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. + +**Documentation:** + +- doc(secretstore): correct description for GET endpoint. + ## [v4.0.0](https://github.com/fastly/fastly-py/releases/tag/release/v4.0.0) (2023-07-31) **Breaking:** diff --git a/README.md b/README.md index 3b92da3..3b3285c 100644 --- a/README.md +++ b/README.md @@ -345,6 +345,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 @@ -439,7 +444,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 3c5166b..1872dec 100644 --- a/docs/Backend.md +++ b/docs/Backend.md @@ -23,6 +23,7 @@ Name | Type | Description | Notes **override_host** | **str, none_type** | 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** | **str** | 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** | **str, none_type** | Value that when shared across backends will enable those backends to share the same health check. | [optional] **shield** | **str, none_type** | Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). | [optional] **ssl_ca_cert** | **str, none_type** | CA certificate attached to origin. | [optional] **ssl_cert_hostname** | **str, none_type** | 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 508322d..167a944 100644 --- a/docs/BackendApi.md +++ b/docs/BackendApi.md @@ -70,6 +70,7 @@ with fastly.ApiClient(configuration) as api_client: override_host = "override_host_example" # str, none_type | 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 = 1 # 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 = "request_condition_example" # str | 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 = "C" # str, none_type | Value that when shared across backends will enable those backends to share the same health check. (optional) shield = "shield_example" # str, none_type | Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) ssl_ca_cert = "ssl_ca_cert_example" # str, none_type | CA certificate attached to origin. (optional) ssl_cert_hostname = "ssl_cert_hostname_example" # str, none_type | Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. (optional) @@ -94,7 +95,7 @@ with fastly.ApiClient(configuration) as api_client: # and optional values try: # Create a backend - api_response = api_instance.create_backend(service_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) + api_response = api_instance.create_backend(service_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) pprint(api_response) except fastly.ApiException as e: print("Exception when calling BackendApi->create_backend: %s\n" % e) @@ -126,6 +127,7 @@ Name | Type | Description | Notes **override_host** | **str, none_type**| 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** | **str**| 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** | **str, none_type**| Value that when shared across backends will enable those backends to share the same health check. | [optional] **shield** | **str, none_type**| Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). | [optional] **ssl_ca_cert** | **str, none_type**| CA certificate attached to origin. | [optional] **ssl_cert_hostname** | **str, none_type**| Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. | [optional] @@ -464,6 +466,7 @@ with fastly.ApiClient(configuration) as api_client: override_host = "override_host_example" # str, none_type | 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 = 1 # 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 = "request_condition_example" # str | 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 = "C" # str, none_type | Value that when shared across backends will enable those backends to share the same health check. (optional) shield = "shield_example" # str, none_type | Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) ssl_ca_cert = "ssl_ca_cert_example" # str, none_type | CA certificate attached to origin. (optional) ssl_cert_hostname = "ssl_cert_hostname_example" # str, none_type | Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. (optional) @@ -488,7 +491,7 @@ with fastly.ApiClient(configuration) as api_client: # and optional values try: # Update a backend - api_response = api_instance.update_backend(service_id, version_id, 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) + api_response = api_instance.update_backend(service_id, version_id, 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) pprint(api_response) except fastly.ApiException as e: print("Exception when calling BackendApi->update_backend: %s\n" % e) @@ -521,6 +524,7 @@ Name | Type | Description | Notes **override_host** | **str, none_type**| 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** | **str**| 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** | **str, none_type**| Value that when shared across backends will enable those backends to share the same health check. | [optional] **shield** | **str, none_type**| Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). | [optional] **ssl_ca_cert** | **str, none_type**| CA certificate attached to origin. | [optional] **ssl_cert_hostname** | **str, none_type**| 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 3179a1d..79ac86b 100644 --- a/docs/BackendResponse.md +++ b/docs/BackendResponse.md @@ -23,6 +23,7 @@ Name | Type | Description | Notes **override_host** | **str, none_type** | 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** | **str** | 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** | **str, none_type** | Value that when shared across backends will enable those backends to share the same health check. | [optional] **shield** | **str, none_type** | Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). | [optional] **ssl_ca_cert** | **str, none_type** | CA certificate attached to origin. | [optional] **ssl_cert_hostname** | **str, none_type** | Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. | [optional] diff --git a/docs/DirectorApi.md b/docs/DirectorApi.md index ef79d33..65dafca 100644 --- a/docs/DirectorApi.md +++ b/docs/DirectorApi.md @@ -73,6 +73,7 @@ with fastly.ApiClient(configuration) as api_client: override_host="override_host_example", port=1, request_condition="request_condition_example", + share_key="C", shield="shield_example", ssl_ca_cert="ssl_ca_cert_example", ssl_cert_hostname="ssl_cert_hostname_example", diff --git a/docs/LoggingNewrelicotlpAdditional.md b/docs/LoggingNewrelicotlpAdditional.md new file mode 100644 index 0000000..949074d --- /dev/null +++ b/docs/LoggingNewrelicotlpAdditional.md @@ -0,0 +1,15 @@ +# LoggingNewrelicotlpAdditional + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**format** | **str** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] if omitted the server will use the default value of "{"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** | **str** | The Insert API key from the Account page of your New Relic account. Required. | [optional] +**region** | **str** | The region to which to stream logs. | [optional] if omitted the server will use the default value of "US" +**url** | **str, none_type** | (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing. | [optional] if omitted the server will use the default value of "null" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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 0000000..6c84675 --- /dev/null +++ b/docs/LoggingNewrelicotlpApi.md @@ -0,0 +1,469 @@ +# fastly.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, version_id) + +Create a New Relic OTLP endpoint + +Create a New Relic OTLP logging object for a particular service and version. + +### Example + +* Api Key Authentication (token): + +```python +import time +import fastly +from fastly.api import logging_newrelicotlp_api +from fastly.model.logging_newrelicotlp_response import LoggingNewrelicotlpResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.fastly.com +# See configuration.py for a list of all supported configuration parameters. +configuration = fastly.Configuration( + host = "https://api.fastly.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: token +configuration.api_key['token'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# Enter a context with an instance of the API client +with fastly.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = logging_newrelicotlp_api.LoggingNewrelicotlpApi(api_client) + service_id = "SU1Z0isxPaozGVKXdv0eY" # str | Alphanumeric string identifying the service. + version_id = 1 # int | Integer identifying a service version. + name = "test-log-endpoint" # str | The name for the real-time logging configuration. (optional) + placement = "none" # str, none_type | 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 = "response_condition_example" # str, none_type | The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) + 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"}" # str | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional) if omitted the server will use the default value of "{"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 = 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`. (optional) if omitted the server will use the default value of 2 + token = "token_example" # str | The Insert API key from the Account page of your New Relic account. Required. (optional) + region = "US" # str | The region to which to stream logs. (optional) if omitted the server will use the default value of "US" + url = "null" # str, none_type | (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing. (optional) if omitted the server will use the default value of "null" + + # example passing only required values which don't have defaults set + try: + # Create a New Relic OTLP endpoint + api_response = api_instance.create_log_newrelicotlp(service_id, version_id) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling LoggingNewrelicotlpApi->create_log_newrelicotlp: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Create a New Relic OTLP endpoint + api_response = api_instance.create_log_newrelicotlp(service_id, version_id, name=name, placement=placement, response_condition=response_condition, format=format, format_version=format_version, token=token, region=region, url=url) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling LoggingNewrelicotlpApi->create_log_newrelicotlp: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **service_id** | **str**| Alphanumeric string identifying the service. | + **version_id** | **int**| Integer identifying a service version. | + **name** | **str**| The name for the real-time logging configuration. | [optional] + **placement** | **str, none_type**| 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** | **str, none_type**| The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] + **format** | **str**| A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] if omitted the server will use the default value of "{"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] if omitted the server will use the default value of 2 + **token** | **str**| The Insert API key from the Account page of your New Relic account. Required. | [optional] + **region** | **str**| The region to which to stream logs. | [optional] if omitted the server will use the default value of "US" + **url** | **str, none_type**| (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing. | [optional] if omitted the server will use the default value of "null" + +### Return type + +[**LoggingNewrelicotlpResponse**](LoggingNewrelicotlpResponse.md) + +### Authorization + +[token](../README.md#token) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[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, version_id, logging_newrelicotlp_name) + +Delete a New Relic OTLP endpoint + +Delete the New Relic OTLP logging object for a particular service and version. + +### Example + +* Api Key Authentication (token): + +```python +import time +import fastly +from fastly.api import logging_newrelicotlp_api +from fastly.model.inline_response200 import InlineResponse200 +from pprint import pprint +# Defining the host is optional and defaults to https://api.fastly.com +# See configuration.py for a list of all supported configuration parameters. +configuration = fastly.Configuration( + host = "https://api.fastly.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: token +configuration.api_key['token'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# Enter a context with an instance of the API client +with fastly.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = logging_newrelicotlp_api.LoggingNewrelicotlpApi(api_client) + service_id = "SU1Z0isxPaozGVKXdv0eY" # str | Alphanumeric string identifying the service. + version_id = 1 # int | Integer identifying a service version. + logging_newrelicotlp_name = "test-log-endpoint" # str | The name for the real-time logging configuration. + + # example passing only required values which don't have defaults set + try: + # Delete a New Relic OTLP endpoint + api_response = api_instance.delete_log_newrelicotlp(service_id, version_id, logging_newrelicotlp_name) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling LoggingNewrelicotlpApi->delete_log_newrelicotlp: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **service_id** | **str**| Alphanumeric string identifying the service. | + **version_id** | **int**| Integer identifying a service version. | + **logging_newrelicotlp_name** | **str**| 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 + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[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, version_id, 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 + +* Api Key Authentication (token): + +```python +import time +import fastly +from fastly.api import logging_newrelicotlp_api +from fastly.model.logging_newrelicotlp_response import LoggingNewrelicotlpResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.fastly.com +# See configuration.py for a list of all supported configuration parameters. +configuration = fastly.Configuration( + host = "https://api.fastly.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: token +configuration.api_key['token'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# Enter a context with an instance of the API client +with fastly.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = logging_newrelicotlp_api.LoggingNewrelicotlpApi(api_client) + service_id = "SU1Z0isxPaozGVKXdv0eY" # str | Alphanumeric string identifying the service. + version_id = 1 # int | Integer identifying a service version. + logging_newrelicotlp_name = "test-log-endpoint" # str | The name for the real-time logging configuration. + + # example passing only required values which don't have defaults set + try: + # Get a New Relic OTLP endpoint + api_response = api_instance.get_log_newrelicotlp(service_id, version_id, logging_newrelicotlp_name) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling LoggingNewrelicotlpApi->get_log_newrelicotlp: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **service_id** | **str**| Alphanumeric string identifying the service. | + **version_id** | **int**| Integer identifying a service version. | + **logging_newrelicotlp_name** | **str**| 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 + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[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** +> [LoggingNewrelicotlpResponse] list_log_newrelicotlp(service_id, version_id) + +List New Relic OTLP endpoints + +List all of the New Relic OTLP logging objects for a particular service and version. + +### Example + +* Api Key Authentication (token): + +```python +import time +import fastly +from fastly.api import logging_newrelicotlp_api +from fastly.model.logging_newrelicotlp_response import LoggingNewrelicotlpResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.fastly.com +# See configuration.py for a list of all supported configuration parameters. +configuration = fastly.Configuration( + host = "https://api.fastly.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: token +configuration.api_key['token'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# Enter a context with an instance of the API client +with fastly.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = logging_newrelicotlp_api.LoggingNewrelicotlpApi(api_client) + service_id = "SU1Z0isxPaozGVKXdv0eY" # str | Alphanumeric string identifying the service. + version_id = 1 # int | Integer identifying a service version. + + # example passing only required values which don't have defaults set + try: + # List New Relic OTLP endpoints + api_response = api_instance.list_log_newrelicotlp(service_id, version_id) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling LoggingNewrelicotlpApi->list_log_newrelicotlp: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **service_id** | **str**| Alphanumeric string identifying the service. | + **version_id** | **int**| Integer identifying a service version. | + +### Return type + +[**[LoggingNewrelicotlpResponse]**](LoggingNewrelicotlpResponse.md) + +### Authorization + +[token](../README.md#token) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[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, version_id, logging_newrelicotlp_name) + +Update a New Relic log endpoint + +Update a New Relic OTLP logging object for a particular service and version. + +### Example + +* Api Key Authentication (token): + +```python +import time +import fastly +from fastly.api import logging_newrelicotlp_api +from fastly.model.logging_newrelicotlp_response import LoggingNewrelicotlpResponse +from pprint import pprint +# Defining the host is optional and defaults to https://api.fastly.com +# See configuration.py for a list of all supported configuration parameters. +configuration = fastly.Configuration( + host = "https://api.fastly.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: token +configuration.api_key['token'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# Enter a context with an instance of the API client +with fastly.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = logging_newrelicotlp_api.LoggingNewrelicotlpApi(api_client) + service_id = "SU1Z0isxPaozGVKXdv0eY" # str | Alphanumeric string identifying the service. + version_id = 1 # int | Integer identifying a service version. + logging_newrelicotlp_name = "test-log-endpoint" # str | The name for the real-time logging configuration. + name = "test-log-endpoint" # str | The name for the real-time logging configuration. (optional) + placement = "none" # str, none_type | 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 = "response_condition_example" # str, none_type | The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) + 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"}" # str | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional) if omitted the server will use the default value of "{"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 = 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`. (optional) if omitted the server will use the default value of 2 + token = "token_example" # str | The Insert API key from the Account page of your New Relic account. Required. (optional) + region = "US" # str | The region to which to stream logs. (optional) if omitted the server will use the default value of "US" + url = "null" # str, none_type | (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing. (optional) if omitted the server will use the default value of "null" + + # example passing only required values which don't have defaults set + try: + # Update a New Relic log endpoint + api_response = api_instance.update_log_newrelicotlp(service_id, version_id, logging_newrelicotlp_name) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling LoggingNewrelicotlpApi->update_log_newrelicotlp: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # Update a New Relic log endpoint + api_response = api_instance.update_log_newrelicotlp(service_id, version_id, logging_newrelicotlp_name, name=name, placement=placement, response_condition=response_condition, format=format, format_version=format_version, token=token, region=region, url=url) + pprint(api_response) + except fastly.ApiException as e: + print("Exception when calling LoggingNewrelicotlpApi->update_log_newrelicotlp: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **service_id** | **str**| Alphanumeric string identifying the service. | + **version_id** | **int**| Integer identifying a service version. | + **logging_newrelicotlp_name** | **str**| The name for the real-time logging configuration. | + **name** | **str**| The name for the real-time logging configuration. | [optional] + **placement** | **str, none_type**| 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** | **str, none_type**| The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] + **format** | **str**| A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] if omitted the server will use the default value of "{"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] if omitted the server will use the default value of 2 + **token** | **str**| The Insert API key from the Account page of your New Relic account. Required. | [optional] + **region** | **str**| The region to which to stream logs. | [optional] if omitted the server will use the default value of "US" + **url** | **str, none_type**| (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing. | [optional] if omitted the server will use the default value of "null" + +### Return type + +[**LoggingNewrelicotlpResponse**](LoggingNewrelicotlpResponse.md) + +### Authorization + +[token](../README.md#token) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[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 0000000..ab1d81a --- /dev/null +++ b/docs/LoggingNewrelicotlpResponse.md @@ -0,0 +1,24 @@ +# LoggingNewrelicotlpResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name for the real-time logging configuration. | [optional] +**placement** | **str, none_type** | 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** | **str, none_type** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] +**format** | **str** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] if omitted the server will use the default value of "{"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** | **str** | 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] if omitted the server will use the default value of "2" +**token** | **str** | The Insert API key from the Account page of your New Relic account. Required. | [optional] +**region** | **str** | The region to which to stream logs. | [optional] if omitted the server will use the default value of "US" +**url** | **str, none_type** | (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing. | [optional] if omitted the server will use the default value of "null" +**created_at** | **datetime, none_type** | Date and time in ISO 8601 format. | [optional] [readonly] +**deleted_at** | **datetime, none_type** | Date and time in ISO 8601 format. | [optional] [readonly] +**updated_at** | **datetime, none_type** | Date and time in ISO 8601 format. | [optional] [readonly] +**service_id** | **str** | | [optional] [readonly] +**version** | **str** | | [optional] [readonly] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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 2e4abe8..518207a 100644 --- a/docs/SecretStoreApi.md +++ b/docs/SecretStoreApi.md @@ -7,7 +7,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 @@ -247,7 +247,7 @@ void (empty response body) # **get_secret_store** > SecretStoreResponse get_secret_store(store_id) -Create secret store by ID +Get secret store by ID Get a secret store by ID. @@ -286,7 +286,7 @@ with fastly.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set try: - # Create secret store by ID + # Get secret store by ID api_response = api_instance.get_secret_store(store_id) pprint(api_response) except fastly.ApiException as e: diff --git a/docs/TlsDomainsApi.md b/docs/TlsDomainsApi.md index e3849d7..46c3ca2 100644 --- a/docs/TlsDomainsApi.md +++ b/docs/TlsDomainsApi.md @@ -48,7 +48,7 @@ with fastly.ApiClient(configuration) as api_client: filter_in_use = "filter[in_use]_example" # str | 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 = "filter[tls_certificates.id]_example" # str | Optional. Limit the returned domains to those listed in the given TLS certificate's SAN list. (optional) filter_tls_subscriptions_id = "filter[tls_subscriptions.id]_example" # str | Optional. Limit the returned domains to those for a given TLS subscription. (optional) - include = "include_example" # str | 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 = "include_example" # str | 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 = 1 # int | Current page. (optional) page_size = 20 # int | Number of records per page. (optional) if omitted the server will use the default value of 20 sort = "created_at" # str | The order in which to list the results by creation date. (optional) if omitted the server will use the default value of "created_at" @@ -71,7 +71,7 @@ Name | Type | Description | Notes **filter_in_use** | **str**| 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** | **str**| Optional. Limit the returned domains to those listed in the given TLS certificate's SAN list. | [optional] **filter_tls_subscriptions_id** | **str**| Optional. Limit the returned domains to those for a given TLS subscription. | [optional] - **include** | **str**| 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** | **str**| 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] if omitted the server will use the default value of 20 **sort** | **str**| The order in which to list the results by creation date. | [optional] if omitted the server will use the default value of "created_at" diff --git a/docs/TlsSubscriptionsApi.md b/docs/TlsSubscriptionsApi.md index 13348e0..e828598 100644 --- a/docs/TlsSubscriptionsApi.md +++ b/docs/TlsSubscriptionsApi.md @@ -388,7 +388,7 @@ with fastly.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = tls_subscriptions_api.TlsSubscriptionsApi(api_client) tls_subscription_id = "sU3guUGZzb2W9Euo4Mo0r" # str | Alphanumeric string identifying a TLS subscription. - include = "tls_authorizations" # str | Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations` and `tls_authorizations.globalsign_email_challenge`. (optional) + include = "tls_authorizations" # str | Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations`, `tls_authorizations.globalsign_email_challenge`, and `tls_authorizations.self_managed_http_challenge`. (optional) # example passing only required values which don't have defaults set try: @@ -414,7 +414,7 @@ with fastly.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **tls_subscription_id** | **str**| Alphanumeric string identifying a TLS subscription. | - **include** | **str**| Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations` and `tls_authorizations.globalsign_email_challenge`. | [optional] + **include** | **str**| 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 @@ -479,7 +479,7 @@ with fastly.ApiClient(configuration) as api_client: filter_state = "filter[state]_example" # str | 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 = "filter[tls_domains.id]_example" # str | Limit the returned subscriptions to those that include the specific domain. (optional) filter_has_active_order = True # bool | Limit the returned subscriptions to those that have currently active orders. Permitted values: `true`. (optional) - include = "tls_authorizations" # str | Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations` and `tls_authorizations.globalsign_email_challenge`. (optional) + include = "tls_authorizations" # str | 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 = 1 # int | Current page. (optional) page_size = 20 # int | Number of records per page. (optional) if omitted the server will use the default value of 20 sort = "created_at" # str | The order in which to list the results by creation date. (optional) if omitted the server will use the default value of "created_at" @@ -502,7 +502,7 @@ Name | Type | Description | Notes **filter_state** | **str**| 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** | **str**| Limit the returned subscriptions to those that include the specific domain. | [optional] **filter_has_active_order** | **bool**| Limit the returned subscriptions to those that have currently active orders. Permitted values: `true`. | [optional] - **include** | **str**| Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations` and `tls_authorizations.globalsign_email_challenge`. | [optional] + **include** | **str**| 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] if omitted the server will use the default value of 20 **sort** | **str**| The order in which to list the results by creation date. | [optional] if omitted the server will use the default value of "created_at" diff --git a/fastly/__init__.py b/fastly/__init__.py index 9b5810f..515f106 100644 --- a/fastly/__init__.py +++ b/fastly/__init__.py @@ -10,7 +10,7 @@ """ -__version__ = "4.0.0" +__version__ = "4.1.0" # import ApiClient from fastly.api_client import ApiClient diff --git a/fastly/api/backend_api.py b/fastly/api/backend_api.py index ab22372..3fcaf81 100644 --- a/fastly/api/backend_api.py +++ b/fastly/api/backend_api.py @@ -73,6 +73,7 @@ def __init__(self, api_client=None): 'override_host', 'port', 'request_condition', + 'share_key', 'shield', 'ssl_ca_cert', 'ssl_cert_hostname', @@ -100,6 +101,7 @@ def __init__(self, api_client=None): 'max_tls_version', 'min_tls_version', 'override_host', + 'share_key', 'shield', 'ssl_ca_cert', 'ssl_cert_hostname', @@ -113,10 +115,17 @@ def __init__(self, api_client=None): 'enum': [ ], 'validation': [ + 'share_key', ] }, root_map={ 'validations': { + ('share_key',): { + + 'regex': { + 'pattern': r'^[A-Za-z0-9]+$', # noqa: E501 + }, + }, }, 'allowed_values': { }, @@ -163,6 +172,8 @@ def __init__(self, api_client=None): (int,), 'request_condition': (str,), + 'share_key': + (str, none_type,), 'shield': (str, none_type,), 'ssl_ca_cert': @@ -208,6 +219,7 @@ def __init__(self, api_client=None): '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', @@ -242,6 +254,7 @@ def __init__(self, api_client=None): 'override_host': 'form', 'port': 'form', 'request_condition': 'form', + 'share_key': 'form', 'shield': 'form', 'ssl_ca_cert': 'form', 'ssl_cert_hostname': 'form', @@ -513,6 +526,7 @@ def __init__(self, api_client=None): 'override_host', 'port', 'request_condition', + 'share_key', 'shield', 'ssl_ca_cert', 'ssl_cert_hostname', @@ -541,6 +555,7 @@ def __init__(self, api_client=None): 'max_tls_version', 'min_tls_version', 'override_host', + 'share_key', 'shield', 'ssl_ca_cert', 'ssl_cert_hostname', @@ -554,10 +569,17 @@ def __init__(self, api_client=None): 'enum': [ ], 'validation': [ + 'share_key', ] }, root_map={ 'validations': { + ('share_key',): { + + 'regex': { + 'pattern': r'^[A-Za-z0-9]+$', # noqa: E501 + }, + }, }, 'allowed_values': { }, @@ -606,6 +628,8 @@ def __init__(self, api_client=None): (int,), 'request_condition': (str,), + 'share_key': + (str, none_type,), 'shield': (str, none_type,), 'ssl_ca_cert': @@ -652,6 +676,7 @@ def __init__(self, api_client=None): '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', @@ -687,6 +712,7 @@ def __init__(self, api_client=None): 'override_host': 'form', 'port': 'form', 'request_condition': 'form', + 'share_key': 'form', 'shield': 'form', 'ssl_ca_cert': 'form', 'ssl_cert_hostname': 'form', @@ -754,6 +780,7 @@ def create_backend( override_host (str, none_type): 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 (str): 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 (str, none_type): Value that when shared across backends will enable those backends to share the same health check.. [optional] shield (str, none_type): Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding).. [optional] ssl_ca_cert (str, none_type): CA certificate attached to origin.. [optional] ssl_cert_hostname (str, none_type): Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all.. [optional] @@ -1122,6 +1149,7 @@ def update_backend( override_host (str, none_type): 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 (str): 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 (str, none_type): Value that when shared across backends will enable those backends to share the same health check.. [optional] shield (str, none_type): Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding).. [optional] ssl_ca_cert (str, none_type): CA certificate attached to origin.. [optional] ssl_cert_hostname (str, none_type): Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all.. [optional] diff --git a/fastly/api/logging_newrelicotlp_api.py b/fastly/api/logging_newrelicotlp_api.py new file mode 100644 index 0000000..1d02f8c --- /dev/null +++ b/fastly/api/logging_newrelicotlp_api.py @@ -0,0 +1,941 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.api_client import ApiClient, Endpoint as _Endpoint +from fastly.model_utils import ( # noqa: F401 + check_allowed_values, + check_validations, + date, + datetime, + file_type, + none_type, + validate_and_convert_types +) +from fastly.model.inline_response200 import InlineResponse200 +from fastly.model.logging_newrelicotlp_response import LoggingNewrelicotlpResponse + + +class LoggingNewrelicotlpApi(object): + """NOTE: This class is auto generated. + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + self.create_log_newrelicotlp_endpoint = _Endpoint( + settings={ + 'response_type': (LoggingNewrelicotlpResponse,), + 'auth': [ + 'token' + ], + 'endpoint_path': '/service/{service_id}/version/{version_id}/logging/newrelicotlp', + 'operation_id': 'create_log_newrelicotlp', + 'http_method': 'POST', + 'servers': [ + { + 'url': "https://api.fastly.com", + 'description': "No description provided", + }, + ] + }, + params_map={ + 'all': [ + 'service_id', + 'version_id', + 'name', + 'placement', + 'response_condition', + 'format', + 'format_version', + 'token', + 'region', + 'url', + ], + 'required': [ + 'service_id', + 'version_id', + ], + 'nullable': [ + 'placement', + 'response_condition', + 'url', + ], + 'enum': [ + 'placement', + 'format_version', + 'region', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('placement',): { + 'None': None, + "NONE": "none", + "WAF_DEBUG": "waf_debug", + "NULL": "null" + }, + ('format_version',): { + + "v1": 1, + "v2": 2 + }, + ('region',): { + + "US": "US", + "EU": "EU" + }, + }, + 'openapi_types': { + 'service_id': + (str,), + 'version_id': + (int,), + 'name': + (str,), + 'placement': + (str, none_type,), + 'response_condition': + (str, none_type,), + 'format': + (str,), + 'format_version': + (int,), + 'token': + (str,), + 'region': + (str,), + 'url': + (str, none_type,), + }, + 'attribute_map': { + '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', + }, + 'location_map': { + 'service_id': 'path', + 'version_id': 'path', + 'name': 'form', + 'placement': 'form', + 'response_condition': 'form', + 'format': 'form', + 'format_version': 'form', + 'token': 'form', + 'region': 'form', + 'url': 'form', + }, + 'path_params_allow_reserved_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/x-www-form-urlencoded' + ] + }, + api_client=api_client + ) + self.delete_log_newrelicotlp_endpoint = _Endpoint( + settings={ + 'response_type': (InlineResponse200,), + 'auth': [ + 'token' + ], + 'endpoint_path': '/service/{service_id}/version/{version_id}/logging/newrelicotlp/{logging_newrelicotlp_name}', + 'operation_id': 'delete_log_newrelicotlp', + 'http_method': 'DELETE', + 'servers': [ + { + 'url': "https://api.fastly.com", + 'description': "No description provided", + }, + ] + }, + params_map={ + 'all': [ + 'service_id', + 'version_id', + 'logging_newrelicotlp_name', + ], + 'required': [ + 'service_id', + 'version_id', + 'logging_newrelicotlp_name', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'service_id': + (str,), + 'version_id': + (int,), + 'logging_newrelicotlp_name': + (str,), + }, + 'attribute_map': { + 'service_id': 'service_id', + 'version_id': 'version_id', + 'logging_newrelicotlp_name': 'logging_newrelicotlp_name', + }, + 'location_map': { + 'service_id': 'path', + 'version_id': 'path', + 'logging_newrelicotlp_name': 'path', + }, + 'path_params_allow_reserved_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.get_log_newrelicotlp_endpoint = _Endpoint( + settings={ + 'response_type': (LoggingNewrelicotlpResponse,), + 'auth': [ + 'token' + ], + 'endpoint_path': '/service/{service_id}/version/{version_id}/logging/newrelicotlp/{logging_newrelicotlp_name}', + 'operation_id': 'get_log_newrelicotlp', + 'http_method': 'GET', + 'servers': [ + { + 'url': "https://api.fastly.com", + 'description': "No description provided", + }, + ] + }, + params_map={ + 'all': [ + 'service_id', + 'version_id', + 'logging_newrelicotlp_name', + ], + 'required': [ + 'service_id', + 'version_id', + 'logging_newrelicotlp_name', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'service_id': + (str,), + 'version_id': + (int,), + 'logging_newrelicotlp_name': + (str,), + }, + 'attribute_map': { + 'service_id': 'service_id', + 'version_id': 'version_id', + 'logging_newrelicotlp_name': 'logging_newrelicotlp_name', + }, + 'location_map': { + 'service_id': 'path', + 'version_id': 'path', + 'logging_newrelicotlp_name': 'path', + }, + 'path_params_allow_reserved_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.list_log_newrelicotlp_endpoint = _Endpoint( + settings={ + 'response_type': ([LoggingNewrelicotlpResponse],), + 'auth': [ + 'token' + ], + 'endpoint_path': '/service/{service_id}/version/{version_id}/logging/newrelicotlp', + 'operation_id': 'list_log_newrelicotlp', + 'http_method': 'GET', + 'servers': [ + { + 'url': "https://api.fastly.com", + 'description': "No description provided", + }, + ] + }, + params_map={ + 'all': [ + 'service_id', + 'version_id', + ], + 'required': [ + 'service_id', + 'version_id', + ], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'service_id': + (str,), + 'version_id': + (int,), + }, + 'attribute_map': { + 'service_id': 'service_id', + 'version_id': 'version_id', + }, + 'location_map': { + 'service_id': 'path', + 'version_id': 'path', + }, + 'path_params_allow_reserved_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [], + }, + api_client=api_client + ) + self.update_log_newrelicotlp_endpoint = _Endpoint( + settings={ + 'response_type': (LoggingNewrelicotlpResponse,), + 'auth': [ + 'token' + ], + 'endpoint_path': '/service/{service_id}/version/{version_id}/logging/newrelicotlp/{logging_newrelicotlp_name}', + 'operation_id': 'update_log_newrelicotlp', + 'http_method': 'PUT', + 'servers': [ + { + 'url': "https://api.fastly.com", + 'description': "No description provided", + }, + ] + }, + params_map={ + 'all': [ + 'service_id', + 'version_id', + 'logging_newrelicotlp_name', + 'name', + 'placement', + 'response_condition', + 'format', + 'format_version', + 'token', + 'region', + 'url', + ], + 'required': [ + 'service_id', + 'version_id', + 'logging_newrelicotlp_name', + ], + 'nullable': [ + 'placement', + 'response_condition', + 'url', + ], + 'enum': [ + 'placement', + 'format_version', + 'region', + ], + 'validation': [ + ] + }, + root_map={ + 'validations': { + }, + 'allowed_values': { + ('placement',): { + 'None': None, + "NONE": "none", + "WAF_DEBUG": "waf_debug", + "NULL": "null" + }, + ('format_version',): { + + "v1": 1, + "v2": 2 + }, + ('region',): { + + "US": "US", + "EU": "EU" + }, + }, + 'openapi_types': { + 'service_id': + (str,), + 'version_id': + (int,), + 'logging_newrelicotlp_name': + (str,), + 'name': + (str,), + 'placement': + (str, none_type,), + 'response_condition': + (str, none_type,), + 'format': + (str,), + 'format_version': + (int,), + 'token': + (str,), + 'region': + (str,), + 'url': + (str, none_type,), + }, + 'attribute_map': { + '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', + }, + 'location_map': { + 'service_id': 'path', + 'version_id': 'path', + 'logging_newrelicotlp_name': 'path', + 'name': 'form', + 'placement': 'form', + 'response_condition': 'form', + 'format': 'form', + 'format_version': 'form', + 'token': 'form', + 'region': 'form', + 'url': 'form', + }, + 'path_params_allow_reserved_map': { + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/x-www-form-urlencoded' + ] + }, + api_client=api_client + ) + + def create_log_newrelicotlp( + self, + service_id, + version_id, + **kwargs + ): + """Create a New Relic OTLP endpoint # noqa: E501 + + Create a New Relic OTLP logging object for a particular service and version. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_log_newrelicotlp(service_id, version_id, async_req=True) + >>> result = thread.get() + + Args: + service_id (str): Alphanumeric string identifying the service. + version_id (int): Integer identifying a service version. + + Keyword Args: + name (str): The name for the real-time logging configuration.. [optional] + placement (str, none_type): 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 (str, none_type): The name of an existing condition in the configured endpoint, or leave blank to always execute.. [optional] + format (str): A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).. [optional] if omitted the server will use the default value of "{"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] if omitted the server will use the default value of 2 + token (str): The Insert API key from the Account page of your New Relic account. Required.. [optional] + region (str): The region to which to stream logs.. [optional] if omitted the server will use the default value of "US" + url (str, none_type): (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing.. [optional] if omitted the server will use the default value of "null" + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + LoggingNewrelicotlpResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['service_id'] = \ + service_id + kwargs['version_id'] = \ + version_id + return self.create_log_newrelicotlp_endpoint.call_with_http_info(**kwargs) + + def delete_log_newrelicotlp( + self, + service_id, + version_id, + logging_newrelicotlp_name, + **kwargs + ): + """Delete a New Relic OTLP endpoint # noqa: E501 + + Delete the New Relic OTLP logging object for a particular service and version. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_log_newrelicotlp(service_id, version_id, logging_newrelicotlp_name, async_req=True) + >>> result = thread.get() + + Args: + service_id (str): Alphanumeric string identifying the service. + version_id (int): Integer identifying a service version. + logging_newrelicotlp_name (str): The name for the real-time logging configuration. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + InlineResponse200 + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['service_id'] = \ + service_id + kwargs['version_id'] = \ + version_id + kwargs['logging_newrelicotlp_name'] = \ + logging_newrelicotlp_name + return self.delete_log_newrelicotlp_endpoint.call_with_http_info(**kwargs) + + def get_log_newrelicotlp( + self, + service_id, + version_id, + logging_newrelicotlp_name, + **kwargs + ): + """Get a New Relic OTLP endpoint # noqa: E501 + + Get the details of a New Relic OTLP logging object for a particular service and version. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_log_newrelicotlp(service_id, version_id, logging_newrelicotlp_name, async_req=True) + >>> result = thread.get() + + Args: + service_id (str): Alphanumeric string identifying the service. + version_id (int): Integer identifying a service version. + logging_newrelicotlp_name (str): The name for the real-time logging configuration. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + LoggingNewrelicotlpResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['service_id'] = \ + service_id + kwargs['version_id'] = \ + version_id + kwargs['logging_newrelicotlp_name'] = \ + logging_newrelicotlp_name + return self.get_log_newrelicotlp_endpoint.call_with_http_info(**kwargs) + + def list_log_newrelicotlp( + self, + service_id, + version_id, + **kwargs + ): + """List New Relic OTLP endpoints # noqa: E501 + + List all of the New Relic OTLP logging objects for a particular service and version. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_log_newrelicotlp(service_id, version_id, async_req=True) + >>> result = thread.get() + + Args: + service_id (str): Alphanumeric string identifying the service. + version_id (int): Integer identifying a service version. + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + [LoggingNewrelicotlpResponse] + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['service_id'] = \ + service_id + kwargs['version_id'] = \ + version_id + return self.list_log_newrelicotlp_endpoint.call_with_http_info(**kwargs) + + def update_log_newrelicotlp( + self, + service_id, + version_id, + logging_newrelicotlp_name, + **kwargs + ): + """Update a New Relic log endpoint # noqa: E501 + + Update a New Relic OTLP logging object for a particular service and version. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_log_newrelicotlp(service_id, version_id, logging_newrelicotlp_name, async_req=True) + >>> result = thread.get() + + Args: + service_id (str): Alphanumeric string identifying the service. + version_id (int): Integer identifying a service version. + logging_newrelicotlp_name (str): The name for the real-time logging configuration. + + Keyword Args: + name (str): The name for the real-time logging configuration.. [optional] + placement (str, none_type): 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 (str, none_type): The name of an existing condition in the configured endpoint, or leave blank to always execute.. [optional] + format (str): A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).. [optional] if omitted the server will use the default value of "{"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] if omitted the server will use the default value of 2 + token (str): The Insert API key from the Account page of your New Relic account. Required.. [optional] + region (str): The region to which to stream logs.. [optional] if omitted the server will use the default value of "US" + url (str, none_type): (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing.. [optional] if omitted the server will use the default value of "null" + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + LoggingNewrelicotlpResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['service_id'] = \ + service_id + kwargs['version_id'] = \ + version_id + kwargs['logging_newrelicotlp_name'] = \ + logging_newrelicotlp_name + return self.update_log_newrelicotlp_endpoint.call_with_http_info(**kwargs) + diff --git a/fastly/api/rate_limiter_api.py b/fastly/api/rate_limiter_api.py index 121fc07..acd3802 100644 --- a/fastly/api/rate_limiter_api.py +++ b/fastly/api/rate_limiter_api.py @@ -173,6 +173,7 @@ def __init__(self, api_client=None): "LOGGLY": "loggly", "LOGSHUTTLE": "logshuttle", "NEWRELIC": "newrelic", + "NEWRELICOTLP": "newrelicotlp", "OPENSTACK": "openstack", "PAPERTRAIL": "papertrail", "PUBSUB": "pubsub", @@ -577,6 +578,7 @@ def __init__(self, api_client=None): "LOGGLY": "loggly", "LOGSHUTTLE": "logshuttle", "NEWRELIC": "newrelic", + "NEWRELICOTLP": "newrelicotlp", "OPENSTACK": "openstack", "PAPERTRAIL": "papertrail", "PUBSUB": "pubsub", diff --git a/fastly/api/secret_store_api.py b/fastly/api/secret_store_api.py index 2d246be..c39b8d3 100644 --- a/fastly/api/secret_store_api.py +++ b/fastly/api/secret_store_api.py @@ -602,7 +602,7 @@ def get_secret_store( store_id, **kwargs ): - """Create secret store by ID # noqa: E501 + """Get secret store by ID # noqa: E501 Get a secret store by ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an diff --git a/fastly/api/tls_domains_api.py b/fastly/api/tls_domains_api.py index 5781565..8e2117b 100644 --- a/fastly/api/tls_domains_api.py +++ b/fastly/api/tls_domains_api.py @@ -150,7 +150,7 @@ def list_tls_domains( filter_in_use (str): 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 (str): Optional. Limit the returned domains to those listed in the given TLS certificate's SAN list.. [optional] filter_tls_subscriptions_id (str): Optional. Limit the returned domains to those for a given TLS subscription.. [optional] - include (str): 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 (str): 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] if omitted the server will use the default value of 20 sort (str): The order in which to list the results by creation date.. [optional] if omitted the server will use the default value of "created_at" diff --git a/fastly/api/tls_subscriptions_api.py b/fastly/api/tls_subscriptions_api.py index f1faf8c..ca0fb57 100644 --- a/fastly/api/tls_subscriptions_api.py +++ b/fastly/api/tls_subscriptions_api.py @@ -862,7 +862,7 @@ def get_tls_sub( tls_subscription_id (str): Alphanumeric string identifying a TLS subscription. Keyword Args: - include (str): Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations` and `tls_authorizations.globalsign_email_challenge`. . [optional] + include (str): 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_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -941,7 +941,7 @@ def list_tls_subs( filter_state (str): 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 (str): Limit the returned subscriptions to those that include the specific domain.. [optional] filter_has_active_order (bool): Limit the returned subscriptions to those that have currently active orders. Permitted values: `true`. . [optional] - include (str): Include related objects. Optional, comma-separated values. Permitted values: `tls_authorizations` and `tls_authorizations.globalsign_email_challenge`. . [optional] + include (str): 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] if omitted the server will use the default value of 20 sort (str): The order in which to list the results by creation date.. [optional] if omitted the server will use the default value of "created_at" diff --git a/fastly/api_client.py b/fastly/api_client.py index 0d702c4..0ead702 100644 --- a/fastly/api_client.py +++ b/fastly/api_client.py @@ -79,7 +79,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'fastly-py/4.0.0' + self.user_agent = 'fastly-py/4.1.0' # The last observed value of http header Fastly-RateLimit-Remaining self.rate_limit_remaining = DEFAULT_RATELIMIT diff --git a/fastly/apis/__init__.py b/fastly/apis/__init__.py index 491ba83..b00ce01 100644 --- a/fastly/apis/__init__.py +++ b/fastly/apis/__init__.py @@ -77,6 +77,7 @@ from fastly.api.logging_loggly_api import LoggingLogglyApi from fastly.api.logging_logshuttle_api import LoggingLogshuttleApi from fastly.api.logging_newrelic_api import LoggingNewrelicApi +from fastly.api.logging_newrelicotlp_api import LoggingNewrelicotlpApi from fastly.api.logging_openstack_api import LoggingOpenstackApi from fastly.api.logging_papertrail_api import LoggingPapertrailApi from fastly.api.logging_pubsub_api import LoggingPubsubApi diff --git a/fastly/configuration.py b/fastly/configuration.py index 5d02a50..5643869 100644 --- a/fastly/configuration.py +++ b/fastly/configuration.py @@ -446,7 +446,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 1.0.0\n"\ - "SDK Package Version: 4.0.0".\ + "SDK Package Version: 4.1.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/fastly/model/backend.py b/fastly/model/backend.py index b3635bf..d5b91cd 100644 --- a/fastly/model/backend.py +++ b/fastly/model/backend.py @@ -56,6 +56,11 @@ class Backend(ModelNormal): } validations = { + ('share_key',): { + 'regex': { + 'pattern': r'^[A-Za-z0-9]+$', # noqa: E501 + }, + }, } @cached_property @@ -98,6 +103,7 @@ def openapi_types(): 'override_host': (str, none_type,), # noqa: E501 'port': (int,), # noqa: E501 'request_condition': (str,), # noqa: E501 + 'share_key': (str, none_type,), # noqa: E501 'shield': (str, none_type,), # noqa: E501 'ssl_ca_cert': (str, none_type,), # noqa: E501 'ssl_cert_hostname': (str, none_type,), # noqa: E501 @@ -136,6 +142,7 @@ def discriminator(): 'override_host': 'override_host', # noqa: E501 'port': 'port', # noqa: E501 'request_condition': 'request_condition', # noqa: E501 + 'share_key': 'share_key', # noqa: E501 'shield': 'shield', # noqa: E501 'ssl_ca_cert': 'ssl_ca_cert', # noqa: E501 'ssl_cert_hostname': 'ssl_cert_hostname', # noqa: E501 @@ -209,6 +216,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 override_host (str, none_type): 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] # noqa: E501 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] # noqa: E501 request_condition (str): 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] # noqa: E501 + share_key (str, none_type): Value that when shared across backends will enable those backends to share the same health check.. [optional] # noqa: E501 shield (str, none_type): Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding).. [optional] # noqa: E501 ssl_ca_cert (str, none_type): CA certificate attached to origin.. [optional] # noqa: E501 ssl_cert_hostname (str, none_type): Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all.. [optional] # noqa: E501 @@ -320,6 +328,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 override_host (str, none_type): 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] # noqa: E501 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] # noqa: E501 request_condition (str): 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] # noqa: E501 + share_key (str, none_type): Value that when shared across backends will enable those backends to share the same health check.. [optional] # noqa: E501 shield (str, none_type): Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding).. [optional] # noqa: E501 ssl_ca_cert (str, none_type): CA certificate attached to origin.. [optional] # noqa: E501 ssl_cert_hostname (str, none_type): Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all.. [optional] # noqa: E501 diff --git a/fastly/model/backend_response.py b/fastly/model/backend_response.py index 0a8c6c7..ad33430 100644 --- a/fastly/model/backend_response.py +++ b/fastly/model/backend_response.py @@ -66,6 +66,11 @@ class BackendResponse(ModelComposed): } validations = { + ('share_key',): { + 'regex': { + 'pattern': r'^[A-Za-z0-9]+$', # noqa: E501 + }, + }, } @cached_property @@ -110,6 +115,7 @@ def openapi_types(): 'override_host': (str, none_type,), # noqa: E501 'port': (int,), # noqa: E501 'request_condition': (str,), # noqa: E501 + 'share_key': (str, none_type,), # noqa: E501 'shield': (str, none_type,), # noqa: E501 'ssl_ca_cert': (str, none_type,), # noqa: E501 'ssl_cert_hostname': (str, none_type,), # noqa: E501 @@ -154,6 +160,7 @@ def discriminator(): 'override_host': 'override_host', # noqa: E501 'port': 'port', # noqa: E501 'request_condition': 'request_condition', # noqa: E501 + 'share_key': 'share_key', # noqa: E501 'shield': 'shield', # noqa: E501 'ssl_ca_cert': 'ssl_ca_cert', # noqa: E501 'ssl_cert_hostname': 'ssl_cert_hostname', # noqa: E501 @@ -237,6 +244,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 override_host (str, none_type): 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] # noqa: E501 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] # noqa: E501 request_condition (str): 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] # noqa: E501 + share_key (str, none_type): Value that when shared across backends will enable those backends to share the same health check.. [optional] # noqa: E501 shield (str, none_type): Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding).. [optional] # noqa: E501 ssl_ca_cert (str, none_type): CA certificate attached to origin.. [optional] # noqa: E501 ssl_cert_hostname (str, none_type): Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all.. [optional] # noqa: E501 @@ -372,6 +380,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 override_host (str, none_type): 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] # noqa: E501 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] # noqa: E501 request_condition (str): 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] # noqa: E501 + share_key (str, none_type): Value that when shared across backends will enable those backends to share the same health check.. [optional] # noqa: E501 shield (str, none_type): Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding).. [optional] # noqa: E501 ssl_ca_cert (str, none_type): CA certificate attached to origin.. [optional] # noqa: E501 ssl_cert_hostname (str, none_type): Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all.. [optional] # noqa: E501 diff --git a/fastly/model/logging_newrelicotlp_additional.py b/fastly/model/logging_newrelicotlp_additional.py new file mode 100644 index 0000000..290cba4 --- /dev/null +++ b/fastly/model/logging_newrelicotlp_additional.py @@ -0,0 +1,269 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + + +class LoggingNewrelicotlpAdditional(ModelNormal): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('region',): { + 'US': "US", + 'EU': "EU", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'format': (str,), # noqa: E501 + 'token': (str,), # noqa: E501 + 'region': (str,), # noqa: E501 + 'url': (str, none_type,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'format': 'format', # noqa: E501 + 'token': 'token', # noqa: E501 + 'region': 'region', # noqa: E501 + 'url': 'url', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LoggingNewrelicotlpAdditional - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + format (str): A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).. [optional] if omitted the server will use the default value of "{"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"}" # noqa: E501 + token (str): The Insert API key from the Account page of your New Relic account. Required.. [optional] # noqa: E501 + region (str): The region to which to stream logs.. [optional] if omitted the server will use the default value of "US" # noqa: E501 + url (str, none_type): (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing.. [optional] if omitted the server will use the default value of "null" # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """LoggingNewrelicotlpAdditional - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + format (str): A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).. [optional] if omitted the server will use the default value of "{"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"}" # noqa: E501 + token (str): The Insert API key from the Account page of your New Relic account. Required.. [optional] # noqa: E501 + region (str): The region to which to stream logs.. [optional] if omitted the server will use the default value of "US" # noqa: E501 + url (str, none_type): (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing.. [optional] if omitted the server will use the default value of "null" # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in kwargs.items(): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/fastly/model/logging_newrelicotlp_response.py b/fastly/model/logging_newrelicotlp_response.py new file mode 100644 index 0000000..6341355 --- /dev/null +++ b/fastly/model/logging_newrelicotlp_response.py @@ -0,0 +1,385 @@ +""" + 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/) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: oss@fastly.com +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fastly.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from fastly.exceptions import ApiAttributeError + + +def lazy_import(): + from fastly.model.logging_common_response import LoggingCommonResponse + from fastly.model.logging_newrelicotlp_additional import LoggingNewrelicotlpAdditional + from fastly.model.service_id_and_version_string import ServiceIdAndVersionString + from fastly.model.timestamps import Timestamps + globals()['LoggingCommonResponse'] = LoggingCommonResponse + globals()['LoggingNewrelicotlpAdditional'] = LoggingNewrelicotlpAdditional + globals()['ServiceIdAndVersionString'] = ServiceIdAndVersionString + globals()['Timestamps'] = Timestamps + + +class LoggingNewrelicotlpResponse(ModelComposed): + """NOTE: This class is auto generated. + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('placement',): { + 'None': None, + 'NONE': "none", + 'WAF_DEBUG': "waf_debug", + 'NULL': "null", + }, + ('format_version',): { + 'v1': "1", + 'v2': "2", + }, + ('region',): { + 'US': "US", + 'EU': "EU", + }, + } + + validations = { + } + + @cached_property + def additional_properties_type(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + 'name': (str,), # noqa: E501 + 'placement': (str, none_type,), # noqa: E501 + 'response_condition': (str, none_type,), # noqa: E501 + 'format': (str,), # noqa: E501 + 'format_version': (str,), # noqa: E501 + 'token': (str,), # noqa: E501 + 'region': (str,), # noqa: E501 + 'url': (str, none_type,), # noqa: E501 + 'created_at': (datetime, none_type,), # noqa: E501 + 'deleted_at': (datetime, none_type,), # noqa: E501 + 'updated_at': (datetime, none_type,), # noqa: E501 + 'service_id': (str,), # noqa: E501 + 'version': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'name': 'name', # noqa: E501 + 'placement': 'placement', # noqa: E501 + 'response_condition': 'response_condition', # noqa: E501 + 'format': 'format', # noqa: E501 + 'format_version': 'format_version', # noqa: E501 + 'token': 'token', # noqa: E501 + 'region': 'region', # noqa: E501 + 'url': 'url', # noqa: E501 + 'created_at': 'created_at', # noqa: E501 + 'deleted_at': 'deleted_at', # noqa: E501 + 'updated_at': 'updated_at', # noqa: E501 + 'service_id': 'service_id', # noqa: E501 + 'version': 'version', # noqa: E501 + } + + read_only_vars = { + 'created_at', # noqa: E501 + 'deleted_at', # noqa: E501 + 'updated_at', # noqa: E501 + 'service_id', # noqa: E501 + 'version', # noqa: E501 + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LoggingNewrelicotlpResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): The name for the real-time logging configuration.. [optional] # noqa: E501 + placement (str, none_type): 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] # noqa: E501 + response_condition (str, none_type): The name of an existing condition in the configured endpoint, or leave blank to always execute.. [optional] # noqa: E501 + format (str): A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).. [optional] if omitted the server will use the default value of "{"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"}" # noqa: E501 + format_version (str): 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] if omitted the server will use the default value of "2" # noqa: E501 + token (str): The Insert API key from the Account page of your New Relic account. Required.. [optional] # noqa: E501 + region (str): The region to which to stream logs.. [optional] if omitted the server will use the default value of "US" # noqa: E501 + url (str, none_type): (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing.. [optional] if omitted the server will use the default value of "null" # noqa: E501 + created_at (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 + deleted_at (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 + updated_at (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 + service_id (str): [optional] # noqa: E501 + version (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """LoggingNewrelicotlpResponse - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + name (str): The name for the real-time logging configuration.. [optional] # noqa: E501 + placement (str, none_type): 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] # noqa: E501 + response_condition (str, none_type): The name of an existing condition in the configured endpoint, or leave blank to always execute.. [optional] # noqa: E501 + format (str): A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).. [optional] if omitted the server will use the default value of "{"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"}" # noqa: E501 + format_version (str): 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] if omitted the server will use the default value of "2" # noqa: E501 + token (str): The Insert API key from the Account page of your New Relic account. Required.. [optional] # noqa: E501 + region (str): The region to which to stream logs.. [optional] if omitted the server will use the default value of "US" # noqa: E501 + url (str, none_type): (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing.. [optional] if omitted the server will use the default value of "null" # noqa: E501 + created_at (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 + deleted_at (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 + updated_at (datetime, none_type): Date and time in ISO 8601 format.. [optional] # noqa: E501 + service_id (str): [optional] # noqa: E501 + version (str): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + LoggingCommonResponse, + LoggingNewrelicotlpAdditional, + ServiceIdAndVersionString, + Timestamps, + ], + 'oneOf': [ + ], + } diff --git a/fastly/model/rate_limiter.py b/fastly/model/rate_limiter.py index d8cb1f8..07488fa 100644 --- a/fastly/model/rate_limiter.py +++ b/fastly/model/rate_limiter.py @@ -93,6 +93,7 @@ class RateLimiter(ModelNormal): 'LOGGLY': "loggly", 'LOGSHUTTLE': "logshuttle", 'NEWRELIC': "newrelic", + 'NEWRELICOTLP': "newrelicotlp", 'OPENSTACK': "openstack", 'PAPERTRAIL': "papertrail", 'PUBSUB': "pubsub", diff --git a/fastly/model/rate_limiter_response.py b/fastly/model/rate_limiter_response.py index 4937304..dca067f 100644 --- a/fastly/model/rate_limiter_response.py +++ b/fastly/model/rate_limiter_response.py @@ -103,6 +103,7 @@ class RateLimiterResponse(ModelComposed): 'LOGGLY': "loggly", 'LOGSHUTTLE': "logshuttle", 'NEWRELIC': "newrelic", + 'NEWRELICOTLP': "newrelicotlp", 'OPENSTACK': "openstack", 'PAPERTRAIL': "papertrail", 'PUBSUB': "pubsub", diff --git a/fastly/models/__init__.py b/fastly/models/__init__.py index cc74026..f2d387f 100644 --- a/fastly/models/__init__.py +++ b/fastly/models/__init__.py @@ -257,6 +257,8 @@ from fastly.model.logging_message_type import LoggingMessageType from fastly.model.logging_newrelic_additional import LoggingNewrelicAdditional from fastly.model.logging_newrelic_response import LoggingNewrelicResponse +from fastly.model.logging_newrelicotlp_additional import LoggingNewrelicotlpAdditional +from fastly.model.logging_newrelicotlp_response import LoggingNewrelicotlpResponse from fastly.model.logging_openstack_additional import LoggingOpenstackAdditional from fastly.model.logging_openstack_response import LoggingOpenstackResponse from fastly.model.logging_papertrail_response import LoggingPapertrailResponse diff --git a/setup.py b/setup.py index ec301f1..6d4e7c0 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ from pathlib import Path NAME = "fastly" -VERSION = "4.0.0" +VERSION = "4.1.0" # To install the library, run the following # # python setup.py install diff --git a/sig.json b/sig.json index 6585794..af51c00 100644 --- a/sig.json +++ b/sig.json @@ -1 +1 @@ -{"G": "2914592f", "D": "7e4f4edd"} +{"G": "a5d4c17e", "D": "6ddfaf95"}