fastly-api 15.0.0

Fastly API client
Documentation
# AutomationTokensApi

> [!NOTE]
> All URIs are relative to `https://api.fastly.com`

Method | HTTP request | Description
------ | ------------ | -----------
[**create_automation_token**]AutomationTokensApi.md#create_automation_token | **POST** /automation-tokens | Create Automation Token
[**get_automation_token_id**]AutomationTokensApi.md#get_automation_token_id | **GET** /automation-tokens/{id} | Retrieve an Automation Token by ID
[**get_automation_tokens_id_services**]AutomationTokensApi.md#get_automation_tokens_id_services | **GET** /automation-tokens/{id}/services | List Automation Token Services
[**get_automation_tokens_id_workspaces**]AutomationTokensApi.md#get_automation_tokens_id_workspaces | **GET** /automation-tokens/{id}/workspaces | List Automation Token Workspaces
[**list_automation_tokens**]AutomationTokensApi.md#list_automation_tokens | **GET** /automation-tokens | List Customer Automation Tokens
[**revoke_automation_token_id**]AutomationTokensApi.md#revoke_automation_token_id | **DELETE** /automation-tokens/{id} | Revoke an Automation Token by ID



## create_automation_token

Creates a new automation token.

```rust
let cfg = &Configuration::default();
let params = CreateAutomationTokenParams {
    // parameters
};
create_automation_token(cfg, params)
```

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**automation_token_create_request** | Option\<[**AutomationTokenCreateRequest**]AutomationTokenCreateRequest.md> |  |  |

### Return type

[**crate::models::AutomationTokenCreateResponse**](AutomationTokenCreateResponse.md)

### Authorization

[token](../README.md#token)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json, application/problem+json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


## get_automation_token_id

Retrieves an automation token by ID.

```rust
let cfg = &Configuration::default();
let params = GetAutomationTokenIdParams {
    // parameters
};
get_automation_token_id(cfg, params)
```

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **String** |  | [required] |

### Return type

[**crate::models::AutomationTokenResponse**](AutomationTokenResponse.md)

### Authorization

[token](../README.md#token)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json, application/problem+json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


## get_automation_tokens_id_services

List of services associated with the automation token.

```rust
let cfg = &Configuration::default();
let params = GetAutomationTokensIdServicesParams {
    // parameters
};
get_automation_tokens_id_services(cfg, params)
```

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **String** |  | [required] |
**per_page** | Option\<**i32**> |  |  |
**page** | Option\<**i32**> |  |  |

### Return type

[**crate::models::InlineResponse2004**](InlineResponse2004.md)

### Authorization

[token](../README.md#token)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json, application/problem+json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


## get_automation_tokens_id_workspaces

Lists the Next-Gen WAF workspaces accessible by an automation token. Only applicable for tokens with roles that support workspace access (such as Next-Gen WAF roles).

```rust
let cfg = &Configuration::default();
let params = GetAutomationTokensIdWorkspacesParams {
    // parameters
};
get_automation_tokens_id_workspaces(cfg, params)
```

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **String** | The alphanumeric string identifying the automation token. | [required] |
**limit** | Option\<**i32**> | Maximum number of workspaces to return per page. |  |[default to 20]
**cursor** | Option\<**String**> | Pagination cursor from a previous response. Pass the `next_cursor` value to retrieve the next page, or `previous_cursor` to go back. |  |

### Return type

[**crate::models::AutomationTokenWorkspacesResponse**](AutomationTokenWorkspacesResponse.md)

### Authorization

[token](../README.md#token)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json, application/problem+json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


## list_automation_tokens

Lists all automation tokens for a customer.

```rust
let cfg = &Configuration::default();
let params = ListAutomationTokensParams {
    // parameters
};
list_automation_tokens(cfg, params)
```

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**per_page** | Option\<**i32**> |  |  |
**page** | Option\<**i32**> |  |  |

### Return type

[**Vec&lt;crate::models::AutomationTokenResponse&gt;**](AutomationTokenResponse.md)

### Authorization

[token](../README.md#token)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json, application/problem+json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


## revoke_automation_token_id

Revoke an automation token by ID.

```rust
let cfg = &Configuration::default();
let params = RevokeAutomationTokenIdParams {
    // parameters
};
revoke_automation_token_id(cfg, params)
```

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **String** |  | [required] |

### Return type

[**crate::models::AutomationTokenErrorResponse**](AutomationTokenErrorResponse.md)

### Authorization

[token](../README.md#token)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json, application/problem+json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)