Note
All URIs are relative to https://api.fastly.com
Method | HTTP request | Description |
---|---|---|
create_acl | POST /service/{service_id}/version/{version_id}/acl | Create a new ACL |
delete_acl | DELETE /service/{service_id}/version/{version_id}/acl/{acl_name} | Delete an ACL |
get_acl | GET /service/{service_id}/version/{version_id}/acl/{acl_name} | Describe an ACL |
list_acls | GET /service/{service_id}/version/{version_id}/acl | List ACLs |
update_acl | PUT /service/{service_id}/version/{version_id}/acl/{acl_name} | Update an ACL |
AclResponse create_acl(service_id, version_id)
Create a new ACL
Create a new ACL attached to the specified service version. A new, empty ACL must be attached to a draft version of a service. The version associated with the ACL must be activated to be used.
- Api Key Authentication (token):
import time
import fastly
from fastly.api import acl_api
from fastly.model.acl_response import AclResponse
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 = acl_api.AclApi(api_client)
service_id = "SU1Z0isxPaozGVKXdv0eY" # str | Alphanumeric string identifying the service.
version_id = 1 # int | Integer identifying a service version.
name = "test-acl" # str | Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace. (optional)
# example passing only required values which don't have defaults set
try:
# Create a new ACL
api_response = api_instance.create_acl(service_id, version_id)
pprint(api_response)
except fastly.ApiException as e:
print("Exception when calling AclApi->create_acl: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Create a new ACL
api_response = api_instance.create_acl(service_id, version_id, name=name)
pprint(api_response)
except fastly.ApiException as e:
print("Exception when calling AclApi->create_acl: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
service_id | str | Alphanumeric string identifying the service. | |
version_id | int | Integer identifying a service version. | |
name | str | Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace. | [optional] |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse200 delete_acl(service_id, version_id, acl_name)
Delete an ACL
Delete an ACL from the specified service version. To remove an ACL from use, the ACL must be deleted from a draft version and the version without the ACL must be activated.
- Api Key Authentication (token):
import time
import fastly
from fastly.api import acl_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 = acl_api.AclApi(api_client)
service_id = "SU1Z0isxPaozGVKXdv0eY" # str | Alphanumeric string identifying the service.
version_id = 1 # int | Integer identifying a service version.
acl_name = "test-acl" # str | Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace.
# example passing only required values which don't have defaults set
try:
# Delete an ACL
api_response = api_instance.delete_acl(service_id, version_id, acl_name)
pprint(api_response)
except fastly.ApiException as e:
print("Exception when calling AclApi->delete_acl: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
service_id | str | Alphanumeric string identifying the service. | |
version_id | int | Integer identifying a service version. | |
acl_name | str | Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AclResponse get_acl(service_id, version_id, acl_name)
Describe an ACL
Retrieve a single ACL by name for the version and service.
- Api Key Authentication (token):
import time
import fastly
from fastly.api import acl_api
from fastly.model.acl_response import AclResponse
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 = acl_api.AclApi(api_client)
service_id = "SU1Z0isxPaozGVKXdv0eY" # str | Alphanumeric string identifying the service.
version_id = 1 # int | Integer identifying a service version.
acl_name = "test-acl" # str | Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace.
# example passing only required values which don't have defaults set
try:
# Describe an ACL
api_response = api_instance.get_acl(service_id, version_id, acl_name)
pprint(api_response)
except fastly.ApiException as e:
print("Exception when calling AclApi->get_acl: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
service_id | str | Alphanumeric string identifying the service. | |
version_id | int | Integer identifying a service version. | |
acl_name | str | Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[AclResponse] list_acls(service_id, version_id)
List ACLs
List ACLs.
- Api Key Authentication (token):
import time
import fastly
from fastly.api import acl_api
from fastly.model.acl_response import AclResponse
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 = acl_api.AclApi(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 ACLs
api_response = api_instance.list_acls(service_id, version_id)
pprint(api_response)
except fastly.ApiException as e:
print("Exception when calling AclApi->list_acls: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
service_id | str | Alphanumeric string identifying the service. | |
version_id | int | Integer identifying a service version. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AclResponse update_acl(service_id, version_id, acl_name)
Update an ACL
Update an ACL for a particular service and version.
- Api Key Authentication (token):
import time
import fastly
from fastly.api import acl_api
from fastly.model.acl_response import AclResponse
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 = acl_api.AclApi(api_client)
service_id = "SU1Z0isxPaozGVKXdv0eY" # str | Alphanumeric string identifying the service.
version_id = 1 # int | Integer identifying a service version.
acl_name = "test-acl" # str | Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace.
name = "test-acl" # str | Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace. (optional)
# example passing only required values which don't have defaults set
try:
# Update an ACL
api_response = api_instance.update_acl(service_id, version_id, acl_name)
pprint(api_response)
except fastly.ApiException as e:
print("Exception when calling AclApi->update_acl: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Update an ACL
api_response = api_instance.update_acl(service_id, version_id, acl_name, name=name)
pprint(api_response)
except fastly.ApiException as e:
print("Exception when calling AclApi->update_acl: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
service_id | str | Alphanumeric string identifying the service. | |
version_id | int | Integer identifying a service version. | |
acl_name | str | Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace. | |
name | str | Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace. | [optional] |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]