|
| 1 | +# Fastly\Api\DdosProtectionApi |
| 2 | + |
| 3 | + |
| 4 | +```php |
| 5 | +$apiInstance = new Fastly\Api\DdosProtectionApi( |
| 6 | + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. |
| 7 | + // This is optional, `GuzzleHttp\Client` will be used as default. |
| 8 | + new GuzzleHttp\Client(), |
| 9 | + $config |
| 10 | +); |
| 11 | +``` |
| 12 | + |
| 13 | +## Methods |
| 14 | + |
| 15 | +> [!NOTE] |
| 16 | +> All URIs are relative to `https://api.fastly.com` |
| 17 | +
|
| 18 | +Method | HTTP request | Description |
| 19 | +------ | ------------ | ----------- |
| 20 | +[**ddosProtectionEventGet()**](DdosProtectionApi.md#ddosProtectionEventGet) | **GET** /ddos-protection/v1/events/{event_id} | Get event by ID |
| 21 | +[**ddosProtectionEventList()**](DdosProtectionApi.md#ddosProtectionEventList) | **GET** /ddos-protection/v1/events | Get events |
| 22 | +[**ddosProtectionEventRuleList()**](DdosProtectionApi.md#ddosProtectionEventRuleList) | **GET** /ddos-protection/v1/events/{event_id}/rules | Get all rules for an event |
| 23 | +[**ddosProtectionRuleGet()**](DdosProtectionApi.md#ddosProtectionRuleGet) | **GET** /ddos-protection/v1/rules/{rule_id} | Get a rule by ID |
| 24 | +[**ddosProtectionTrafficStatsRuleGet()**](DdosProtectionApi.md#ddosProtectionTrafficStatsRuleGet) | **GET** /ddos-protection/v1/events/{event_id}/rules/{rule_id}/traffic-stats | Get traffic stats for a rule |
| 25 | + |
| 26 | + |
| 27 | +## `ddosProtectionEventGet()` |
| 28 | + |
| 29 | +```php |
| 30 | +ddosProtectionEventGet($options): \Fastly\Model\DdosProtectionEvent // Get event by ID |
| 31 | +``` |
| 32 | + |
| 33 | +Get event by ID. |
| 34 | + |
| 35 | +### Example |
| 36 | +```php |
| 37 | + $options['event_id'] = 'event_id_example'; // string | Unique ID of the event. |
| 38 | + |
| 39 | +try { |
| 40 | + $result = $apiInstance->ddosProtectionEventGet($options); |
| 41 | +} catch (Exception $e) { |
| 42 | + echo 'Exception when calling DdosProtectionApi->ddosProtectionEventGet: ', $e->getMessage(), PHP_EOL; |
| 43 | +} |
| 44 | +``` |
| 45 | + |
| 46 | +### Options |
| 47 | + |
| 48 | +Note: the input parameter is an associative array with the keys listed below. |
| 49 | + |
| 50 | +Name | Type | Description | Notes |
| 51 | +------------- | ------------- | ------------- | ------------- |
| 52 | +**event_id** | **string** | Unique ID of the event. | |
| 53 | + |
| 54 | +### Return type |
| 55 | + |
| 56 | +[**\Fastly\Model\DdosProtectionEvent**](../Model/DdosProtectionEvent.md) |
| 57 | + |
| 58 | +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) |
| 59 | +[[Back to README]](../../README.md) |
| 60 | + |
| 61 | +## `ddosProtectionEventList()` |
| 62 | + |
| 63 | +```php |
| 64 | +ddosProtectionEventList($options): \Fastly\Model\InlineResponse2002 // Get events |
| 65 | +``` |
| 66 | + |
| 67 | +Get events. |
| 68 | + |
| 69 | +### Example |
| 70 | +```php |
| 71 | + $options['cursor'] = 'cursor_example'; // string | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. |
| 72 | +$options['limit'] = 20; // int | Limit how many results are returned. |
| 73 | +$options['service_id'] = 'service_id_example'; // string | Filter results based on a service_id. |
| 74 | +$options['from'] = 2023-01-01T02:30Z; // \DateTime | Represents the start of a date-time range expressed in RFC 3339 format. |
| 75 | +$options['to'] = 2023-01-01T02:30Z; // \DateTime | Represents the end of a date-time range expressed in RFC 3339 format. |
| 76 | +$options['name'] = 'name_example'; // string |
| 77 | + |
| 78 | +try { |
| 79 | + $result = $apiInstance->ddosProtectionEventList($options); |
| 80 | +} catch (Exception $e) { |
| 81 | + echo 'Exception when calling DdosProtectionApi->ddosProtectionEventList: ', $e->getMessage(), PHP_EOL; |
| 82 | +} |
| 83 | +``` |
| 84 | + |
| 85 | +### Options |
| 86 | + |
| 87 | +Note: the input parameter is an associative array with the keys listed below. |
| 88 | + |
| 89 | +Name | Type | Description | Notes |
| 90 | +------------- | ------------- | ------------- | ------------- |
| 91 | +**cursor** | **string** | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. | [optional] |
| 92 | +**limit** | **int** | Limit how many results are returned. | [optional] [defaults to 20] |
| 93 | +**service_id** | **string** | Filter results based on a service_id. | [optional] |
| 94 | +**from** | **\DateTime** | Represents the start of a date-time range expressed in RFC 3339 format. | [optional] |
| 95 | +**to** | **\DateTime** | Represents the end of a date-time range expressed in RFC 3339 format. | [optional] |
| 96 | +**name** | **string** | | [optional] |
| 97 | + |
| 98 | +### Return type |
| 99 | + |
| 100 | +[**\Fastly\Model\InlineResponse2002**](../Model/InlineResponse2002.md) |
| 101 | + |
| 102 | +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) |
| 103 | +[[Back to README]](../../README.md) |
| 104 | + |
| 105 | +## `ddosProtectionEventRuleList()` |
| 106 | + |
| 107 | +```php |
| 108 | +ddosProtectionEventRuleList($options): \Fastly\Model\InlineResponse2003 // Get all rules for an event |
| 109 | +``` |
| 110 | + |
| 111 | +Get all rules for an event. |
| 112 | + |
| 113 | +### Example |
| 114 | +```php |
| 115 | + $options['event_id'] = 'event_id_example'; // string | Unique ID of the event. |
| 116 | +$options['cursor'] = 'cursor_example'; // string | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. |
| 117 | +$options['limit'] = 20; // int | Limit how many results are returned. |
| 118 | + |
| 119 | +try { |
| 120 | + $result = $apiInstance->ddosProtectionEventRuleList($options); |
| 121 | +} catch (Exception $e) { |
| 122 | + echo 'Exception when calling DdosProtectionApi->ddosProtectionEventRuleList: ', $e->getMessage(), PHP_EOL; |
| 123 | +} |
| 124 | +``` |
| 125 | + |
| 126 | +### Options |
| 127 | + |
| 128 | +Note: the input parameter is an associative array with the keys listed below. |
| 129 | + |
| 130 | +Name | Type | Description | Notes |
| 131 | +------------- | ------------- | ------------- | ------------- |
| 132 | +**event_id** | **string** | Unique ID of the event. | |
| 133 | +**cursor** | **string** | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. | [optional] |
| 134 | +**limit** | **int** | Limit how many results are returned. | [optional] [defaults to 20] |
| 135 | + |
| 136 | +### Return type |
| 137 | + |
| 138 | +[**\Fastly\Model\InlineResponse2003**](../Model/InlineResponse2003.md) |
| 139 | + |
| 140 | +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) |
| 141 | +[[Back to README]](../../README.md) |
| 142 | + |
| 143 | +## `ddosProtectionRuleGet()` |
| 144 | + |
| 145 | +```php |
| 146 | +ddosProtectionRuleGet($options): \Fastly\Model\DdosProtectionRule // Get a rule by ID |
| 147 | +``` |
| 148 | + |
| 149 | +Get a rule by ID. |
| 150 | + |
| 151 | +### Example |
| 152 | +```php |
| 153 | + $options['rule_id'] = 'rule_id_example'; // string | Unique ID of the rule. |
| 154 | + |
| 155 | +try { |
| 156 | + $result = $apiInstance->ddosProtectionRuleGet($options); |
| 157 | +} catch (Exception $e) { |
| 158 | + echo 'Exception when calling DdosProtectionApi->ddosProtectionRuleGet: ', $e->getMessage(), PHP_EOL; |
| 159 | +} |
| 160 | +``` |
| 161 | + |
| 162 | +### Options |
| 163 | + |
| 164 | +Note: the input parameter is an associative array with the keys listed below. |
| 165 | + |
| 166 | +Name | Type | Description | Notes |
| 167 | +------------- | ------------- | ------------- | ------------- |
| 168 | +**rule_id** | **string** | Unique ID of the rule. | |
| 169 | + |
| 170 | +### Return type |
| 171 | + |
| 172 | +[**\Fastly\Model\DdosProtectionRule**](../Model/DdosProtectionRule.md) |
| 173 | + |
| 174 | +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) |
| 175 | +[[Back to README]](../../README.md) |
| 176 | + |
| 177 | +## `ddosProtectionTrafficStatsRuleGet()` |
| 178 | + |
| 179 | +```php |
| 180 | +ddosProtectionTrafficStatsRuleGet($options): \Fastly\Model\DdosProtectionTrafficStats // Get traffic stats for a rule |
| 181 | +``` |
| 182 | + |
| 183 | +Get traffic stats for a rule. |
| 184 | + |
| 185 | +### Example |
| 186 | +```php |
| 187 | + $options['event_id'] = 'event_id_example'; // string | Unique ID of the event. |
| 188 | +$options['rule_id'] = 'rule_id_example'; // string | Unique ID of the rule. |
| 189 | + |
| 190 | +try { |
| 191 | + $result = $apiInstance->ddosProtectionTrafficStatsRuleGet($options); |
| 192 | +} catch (Exception $e) { |
| 193 | + echo 'Exception when calling DdosProtectionApi->ddosProtectionTrafficStatsRuleGet: ', $e->getMessage(), PHP_EOL; |
| 194 | +} |
| 195 | +``` |
| 196 | + |
| 197 | +### Options |
| 198 | + |
| 199 | +Note: the input parameter is an associative array with the keys listed below. |
| 200 | + |
| 201 | +Name | Type | Description | Notes |
| 202 | +------------- | ------------- | ------------- | ------------- |
| 203 | +**event_id** | **string** | Unique ID of the event. | |
| 204 | +**rule_id** | **string** | Unique ID of the rule. | |
| 205 | + |
| 206 | +### Return type |
| 207 | + |
| 208 | +[**\Fastly\Model\DdosProtectionTrafficStats**](../Model/DdosProtectionTrafficStats.md) |
| 209 | + |
| 210 | +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) |
| 211 | +[[Back to README]](../../README.md) |
0 commit comments