Skip to content

Commit aadeee7

Browse files
author
github-actions
committed
Generated v2.2.0
1 parent 2322cb8 commit aadeee7

File tree

120 files changed

+4568
-507
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+4568
-507
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changelog
22

3+
## [v2.2.0](https://github.com/fastly/fastly-py/releases/tag/release/v2.2.0) (2023-06-20)
4+
5+
**Enhancements:**
6+
7+
- feat(realtime_measurements): add billable request processing time.
8+
- feat(tokens): add support for the 'get token' endpoint.
9+
10+
**Bug fixes:**
11+
12+
- fix(config): add realtime hostname.
13+
- fix(historical_stats): generate field results model.
14+
- fix(kv_store): remove the 'force' property from the 'delete store' endpoint.
15+
- feat(realtime_measurements): rename object store to kv store.
16+
317
## [v2.1.1](https://github.com/fastly/fastly-py/releases/tag/release/v2.1.1) (2023-05-22)
418

519
**Bug fixes:**

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
A Python client library for interacting with most facets of the [Fastly API](https://developer.fastly.com/reference/api).
44

5+
56
## Requirements
67

78
Python >=3.6
@@ -428,6 +429,7 @@ Class | Method | HTTP request | Description
428429
*TlsSubscriptionsApi* | [**get_tls_sub**](docs/TlsSubscriptionsApi.md#get_tls_sub) | **GET** /tls/subscriptions/{tls_subscription_id} | Get a TLS subscription
429430
*TlsSubscriptionsApi* | [**list_tls_subs**](docs/TlsSubscriptionsApi.md#list_tls_subs) | **GET** /tls/subscriptions | List TLS subscriptions
430431
*TlsSubscriptionsApi* | [**patch_tls_sub**](docs/TlsSubscriptionsApi.md#patch_tls_sub) | **PATCH** /tls/subscriptions/{tls_subscription_id} | Update a TLS subscription
432+
*TokensApi* | [**get_token**](docs/TokensApi.md#get_token) | **GET** /tokens/{token_id} | Get a token
431433
*TokensApi* | [**get_token_current**](docs/TokensApi.md#get_token_current) | **GET** /tokens/self | Get the current token
432434
*TokensApi* | [**list_tokens_customer**](docs/TokensApi.md#list_tokens_customer) | **GET** /customer/{customer_id}/tokens | List tokens for a customer
433435
*TokensApi* | [**list_tokens_user**](docs/TokensApi.md#list_tokens_user) | **GET** /tokens | List tokens for the authenticated user

docs/HistoricalFieldResults.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**value** | **[{str: (str,)}]** | |
7+
**value** | [**[HistoricalFieldResultsAttributes]**](HistoricalFieldResultsAttributes.md) | |
88

99
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1010

docs/HistoricalFieldResultsAttributes.md

Lines changed: 229 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# HistoricalFieldResultsAttributesAllOf
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**service_id** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] [readonly]
8+
**start_time** | **int** | | [optional]
9+
**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]
10+
11+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12+
13+

docs/KvStoreApi.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -132,22 +132,13 @@ with fastly.ApiClient(configuration) as api_client:
132132
# Create an instance of the API class
133133
api_instance = kv_store_api.KvStoreApi(api_client)
134134
store_id = "store_id_example" # str |
135-
force = True # bool | (optional)
136135

137136
# example passing only required values which don't have defaults set
138137
try:
139138
# Delete an kv store.
140139
api_instance.delete_store(store_id)
141140
except fastly.ApiException as e:
142141
print("Exception when calling KvStoreApi->delete_store: %s\n" % e)
143-
144-
# example passing only required values which don't have defaults set
145-
# and optional values
146-
try:
147-
# Delete an kv store.
148-
api_instance.delete_store(store_id, force=force)
149-
except fastly.ApiException as e:
150-
print("Exception when calling KvStoreApi->delete_store: %s\n" % e)
151142
```
152143

153144

@@ -156,7 +147,6 @@ with fastly.ApiClient(configuration) as api_client:
156147
Name | Type | Description | Notes
157148
------------- | ------------- | ------------- | -------------
158149
**store_id** | **str**| |
159-
**force** | **bool**| | [optional]
160150

161151
### Return type
162152

docs/KvStoreItemApi.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,13 @@ with fastly.ApiClient(configuration) as api_client:
4949
api_instance = kv_store_item_api.KvStoreItemApi(api_client)
5050
store_id = "store_id_example" # str |
5151
key_name = "key_name_example" # str |
52-
force = True # bool | (optional)
5352

5453
# example passing only required values which don't have defaults set
5554
try:
5655
# Delete kv store item.
5756
api_instance.delete_key_from_store(store_id, key_name)
5857
except fastly.ApiException as e:
5958
print("Exception when calling KvStoreItemApi->delete_key_from_store: %s\n" % e)
60-
61-
# example passing only required values which don't have defaults set
62-
# and optional values
63-
try:
64-
# Delete kv store item.
65-
api_instance.delete_key_from_store(store_id, key_name, force=force)
66-
except fastly.ApiException as e:
67-
print("Exception when calling KvStoreItemApi->delete_key_from_store: %s\n" % e)
6859
```
6960

7061

@@ -74,7 +65,6 @@ Name | Type | Description | Notes
7465
------------- | ------------- | ------------- | -------------
7566
**store_id** | **str**| |
7667
**key_name** | **str**| |
77-
**force** | **bool**| | [optional]
7868

7969
### Return type
8070

docs/RealtimeMeasurements.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Name | Type | Description | Notes
2424
**compute_execution_time_ms** | **float** | The amount of active CPU time used to process your requests (in milliseconds). | [optional]
2525
**compute_ram_used** | **int** | The amount of RAM used for your service by Fastly (in bytes). | [optional]
2626
**compute_request_time_ms** | **float** | The total, actual amount of time used to process your requests, including active CPU time (in milliseconds). | [optional]
27+
**compute_request_time_billed_ms** | **float** | The total amount of request processing time you will be billed for, measured in 50 millisecond increments. | [optional]
2728
**shield** | **int** | Number of requests from edge to the shield POP. | [optional]
2829
**ipv6** | **int** | Number of requests that were received over IPv6. | [optional]
2930
**imgopto** | **int** | Number of responses that came from the Fastly Image Optimizer service. If the service receives 10 requests for an image, this stat will be 10 regardless of how many times the image was transformed. | [optional]
@@ -203,10 +204,10 @@ Name | Type | Description | Notes
203204
**websocket_resp_body_bytes** | **int** | Total message content bytes sent to end users over passthrough WebSocket connections. | [optional]
204205
**fanout_recv_publishes** | **int** | Total published messages received from the publish API endpoint. | [optional]
205206
**fanout_send_publishes** | **int** | Total published messages sent to end users. | [optional]
206-
**object_store_class_a_operations** | **int** | The total number of class a operations for the object store. | [optional]
207-
**object_store_class_b_operations** | **int** | The total number of class b operations for the object store. | [optional]
208-
**object_store_read_requests** | **int** | Use object_store_class_b_operations. | [optional]
209-
**object_store_write_requests** | **int** | Use object_store_class_a_operations. | [optional]
207+
**kv_store_class_a_operations** | **int** | The total number of class a operations for the KV store. | [optional]
208+
**kv_store_class_b_operations** | **int** | The total number of class b operations for the KV store. | [optional]
209+
**object_store_class_a_operations** | **int** | Use kv_store_class_a_operations. | [optional]
210+
**object_store_class_b_operations** | **int** | Use kv_store_class_b_operations. | [optional]
210211
**fanout_req_header_bytes** | **int** | Total header bytes received from end users over Fanout connections. | [optional]
211212
**fanout_req_body_bytes** | **int** | Total body or message content bytes received from end users over Fanout connections. | [optional]
212213
**fanout_resp_header_bytes** | **int** | Total header bytes sent to end users over Fanout connections. | [optional]

docs/Results.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ Name | Type | Description | Notes
155155
**segblock_shield_fetches** | **int** | Number of `Range` requests to a shield for segments of resources when using segmented caching. | [optional]
156156
**compute_requests** | **int** | The total number of requests that were received for your service by Fastly. | [optional]
157157
**compute_request_time_ms** | **float** | The total, actual amount of time used to process your requests, including active CPU time (in milliseconds). | [optional]
158+
**compute_request_time_billed_ms** | **float** | The total amount of request processing time you will be billed for, measured in 50 millisecond increments. | [optional]
158159
**compute_ram_used** | **int** | The amount of RAM used for your service by Fastly (in bytes). | [optional]
159160
**compute_execution_time_ms** | **float** | The amount of active CPU time used to process your requests (in milliseconds). | [optional]
160161
**compute_req_header_bytes** | **int** | Total header bytes received by Compute@Edge. | [optional]
@@ -201,10 +202,10 @@ Name | Type | Description | Notes
201202
**websocket_conn_time_ms** | **int** | Total duration of passthrough WebSocket connections with end users. | [optional]
202203
**fanout_recv_publishes** | **int** | Total published messages received from the publish API endpoint. | [optional]
203204
**fanout_send_publishes** | **int** | Total published messages sent to end users. | [optional]
204-
**object_store_class_a_operations** | **int** | The total number of class a operations for the object store. | [optional]
205-
**object_store_class_b_operations** | **int** | The total number of class b operations for the object store. | [optional]
206-
**object_store_read_requests** | **int** | Use object_store_class_b_operations. | [optional]
207-
**object_store_write_requests** | **int** | Use object_store_class_a_operations. | [optional]
205+
**kv_store_class_a_operations** | **int** | The total number of class a operations for the KV store. | [optional]
206+
**kv_store_class_b_operations** | **int** | The total number of class b operations for the KV store. | [optional]
207+
**object_store_class_a_operations** | **int** | Use kv_store_class_a_operations. | [optional]
208+
**object_store_class_b_operations** | **int** | Use kv_store_class_b_operations. | [optional]
208209
**fanout_req_header_bytes** | **int** | Total header bytes received from end users over Fanout connections. | [optional]
209210
**fanout_req_body_bytes** | **int** | Total body or message content bytes received from end users over Fanout connections. | [optional]
210211
**fanout_resp_header_bytes** | **int** | Total header bytes sent to end users over Fanout connections. | [optional]

docs/TokensApi.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,96 @@ All URIs are relative to *https://api.fastly.com*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7+
[**get_token**](TokensApi.md#get_token) | **GET** /tokens/{token_id} | Get a token
78
[**get_token_current**](TokensApi.md#get_token_current) | **GET** /tokens/self | Get the current token
89
[**list_tokens_customer**](TokensApi.md#list_tokens_customer) | **GET** /customer/{customer_id}/tokens | List tokens for a customer
910
[**list_tokens_user**](TokensApi.md#list_tokens_user) | **GET** /tokens | List tokens for the authenticated user
1011
[**revoke_token**](TokensApi.md#revoke_token) | **DELETE** /tokens/{token_id} | Revoke a token
1112
[**revoke_token_current**](TokensApi.md#revoke_token_current) | **DELETE** /tokens/self | Revoke the current token
1213

1314

15+
# **get_token**
16+
> TokenResponse get_token(token_id)
17+
18+
Get a token
19+
20+
Get a single token by its id.
21+
22+
### Example
23+
24+
* Api Key Authentication (token):
25+
26+
```python
27+
import time
28+
import fastly
29+
from fastly.api import tokens_api
30+
from fastly.model.generic_token_error import GenericTokenError
31+
from fastly.model.token_response import TokenResponse
32+
from pprint import pprint
33+
# Defining the host is optional and defaults to https://api.fastly.com
34+
# See configuration.py for a list of all supported configuration parameters.
35+
configuration = fastly.Configuration(
36+
host = "https://api.fastly.com"
37+
)
38+
39+
# The client must configure the authentication and authorization parameters
40+
# in accordance with the API server security policy.
41+
# Examples for each auth method are provided below, use the example that
42+
# satisfies your auth use case.
43+
44+
# Configure API key authorization: token
45+
configuration.api_key['token'] = 'YOUR_API_KEY'
46+
47+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
48+
# configuration.api_key_prefix['token'] = 'Bearer'
49+
50+
# Enter a context with an instance of the API client
51+
with fastly.ApiClient(configuration) as api_client:
52+
# Create an instance of the API class
53+
api_instance = tokens_api.TokensApi(api_client)
54+
token_id = "5Yo3XXnrQpjc20u0ybrf2g" # str | Alphanumeric string identifying a token.
55+
56+
# example passing only required values which don't have defaults set
57+
try:
58+
# Get a token
59+
api_response = api_instance.get_token(token_id)
60+
pprint(api_response)
61+
except fastly.ApiException as e:
62+
print("Exception when calling TokensApi->get_token: %s\n" % e)
63+
```
64+
65+
66+
### Parameters
67+
68+
Name | Type | Description | Notes
69+
------------- | ------------- | ------------- | -------------
70+
**token_id** | **str**| Alphanumeric string identifying a token. |
71+
72+
### Return type
73+
74+
[**TokenResponse**](TokenResponse.md)
75+
76+
### Authorization
77+
78+
[token](../README.md#token)
79+
80+
### HTTP request headers
81+
82+
- **Content-Type**: Not defined
83+
- **Accept**: application/json
84+
85+
86+
### HTTP response details
87+
88+
| Status code | Description | Response headers |
89+
|-------------|-------------|------------------|
90+
**200** | OK | - |
91+
**401** | Missing or expired token. | - |
92+
**403** | Invalid token. | - |
93+
**404** | Token lookup failed. | - |
94+
95+
[[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)
96+
1497
# **get_token_current**
1598
> TokenResponse get_token_current()
1699

0 commit comments

Comments
 (0)