Note
All URIs are relative to https://api.fastly.com
| Method | HTTP request | Description |
|---|---|---|
| BulkUpdateAclEntries | PATCH /service/{service_id}/acl/{acl_id}/entries |
Update multiple ACL entries |
| CreateAclEntry | POST /service/{service_id}/acl/{acl_id}/entry |
Create an ACL entry |
| DeleteAclEntry | DELETE /service/{service_id}/acl/{acl_id}/entry/{acl_entry_id} |
Delete an ACL entry |
| GetAclEntry | GET /service/{service_id}/acl/{acl_id}/entry/{acl_entry_id} |
Describe an ACL entry |
| ListAclEntries | GET /service/{service_id}/acl/{acl_id}/entries |
List ACL entries |
| UpdateAclEntry | PATCH /service/{service_id}/acl/{acl_id}/entry/{acl_entry_id} |
Update an ACL entry |
Update multiple ACL entries
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
serviceId := "serviceId_example" // string | Alphanumeric string identifying the service.
aclId := "aclId_example" // string | Alphanumeric string identifying a ACL.
bulkUpdateAclEntriesRequest := *openapiclient.NewBulkUpdateAclEntriesRequest() // BulkUpdateAclEntriesRequest | (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.AclEntryAPI.BulkUpdateAclEntries(ctx, serviceId, aclId).BulkUpdateAclEntriesRequest(bulkUpdateAclEntriesRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AclEntryAPI.BulkUpdateAclEntries`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `BulkUpdateAclEntries`: InlineResponse200
fmt.Fprintf(os.Stdout, "Response from `AclEntryAPI.BulkUpdateAclEntries`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| serviceId | string | Alphanumeric string identifying the service. | |
| aclId | string | Alphanumeric string identifying a ACL. |
Other parameters are passed through a pointer to a apiBulkUpdateAclEntriesRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| bulkUpdateAclEntriesRequest | BulkUpdateAclEntriesRequest |
- Content-Type: application/json
- Accept: application/json
Back to top | Back to API list | Back to README
Create an ACL entry
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
serviceId := "serviceId_example" // string | Alphanumeric string identifying the service.
aclId := "aclId_example" // string | Alphanumeric string identifying a ACL.
aclEntry := *openapiclient.NewAclEntry() // AclEntry | (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.AclEntryAPI.CreateAclEntry(ctx, serviceId, aclId).AclEntry(aclEntry).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AclEntryAPI.CreateAclEntry`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateAclEntry`: AclEntryResponse
fmt.Fprintf(os.Stdout, "Response from `AclEntryAPI.CreateAclEntry`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| serviceId | string | Alphanumeric string identifying the service. | |
| aclId | string | Alphanumeric string identifying a ACL. |
Other parameters are passed through a pointer to a apiCreateAclEntryRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| aclEntry | AclEntry |
- Content-Type: application/json
- Accept: application/json
Back to top | Back to API list | Back to README
Delete an ACL entry
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
serviceId := "serviceId_example" // string | Alphanumeric string identifying the service.
aclId := "aclId_example" // string | Alphanumeric string identifying a ACL.
aclEntryId := "aclEntryId_example" // string | Alphanumeric string identifying an ACL Entry.
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.AclEntryAPI.DeleteAclEntry(ctx, serviceId, aclId, aclEntryId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AclEntryAPI.DeleteAclEntry`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteAclEntry`: InlineResponse200
fmt.Fprintf(os.Stdout, "Response from `AclEntryAPI.DeleteAclEntry`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| serviceId | string | Alphanumeric string identifying the service. | |
| aclId | string | Alphanumeric string identifying a ACL. | |
| aclEntryId | string | Alphanumeric string identifying an ACL Entry. |
Other parameters are passed through a pointer to a apiDeleteAclEntryRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
Back to top | Back to API list | Back to README
Describe an ACL entry
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
serviceId := "serviceId_example" // string | Alphanumeric string identifying the service.
aclId := "aclId_example" // string | Alphanumeric string identifying a ACL.
aclEntryId := "aclEntryId_example" // string | Alphanumeric string identifying an ACL Entry.
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.AclEntryAPI.GetAclEntry(ctx, serviceId, aclId, aclEntryId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AclEntryAPI.GetAclEntry`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAclEntry`: AclEntryResponse
fmt.Fprintf(os.Stdout, "Response from `AclEntryAPI.GetAclEntry`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| serviceId | string | Alphanumeric string identifying the service. | |
| aclId | string | Alphanumeric string identifying a ACL. | |
| aclEntryId | string | Alphanumeric string identifying an ACL Entry. |
Other parameters are passed through a pointer to a apiGetAclEntryRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
Back to top | Back to API list | Back to README
List ACL entries
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
serviceId := "serviceId_example" // string | Alphanumeric string identifying the service.
aclId := "aclId_example" // string | Alphanumeric string identifying a ACL.
page := int32(1) // int32 | Current page. (optional)
perPage := int32(20) // int32 | Number of records per page. (optional) (default to 20)
sort := "created" // string | Field on which to sort. (optional) (default to "created")
direction := "ascend" // string | Direction in which to sort results. (optional) (default to "ascend")
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.AclEntryAPI.ListAclEntries(ctx, serviceId, aclId).Page(page).PerPage(perPage).Sort(sort).Direction(direction).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AclEntryAPI.ListAclEntries`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListAclEntries`: []AclEntryResponse
fmt.Fprintf(os.Stdout, "Response from `AclEntryAPI.ListAclEntries`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| serviceId | string | Alphanumeric string identifying the service. | |
| aclId | string | Alphanumeric string identifying a ACL. |
Other parameters are passed through a pointer to a apiListAclEntriesRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| page | int32 | Current page. | perPage |
- Content-Type: Not defined
- Accept: application/json
Back to top | Back to API list | Back to README
Update an ACL entry
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
serviceId := "serviceId_example" // string | Alphanumeric string identifying the service.
aclId := "aclId_example" // string | Alphanumeric string identifying a ACL.
aclEntryId := "aclEntryId_example" // string | Alphanumeric string identifying an ACL Entry.
aclEntry := *openapiclient.NewAclEntry() // AclEntry | (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.AclEntryAPI.UpdateAclEntry(ctx, serviceId, aclId, aclEntryId).AclEntry(aclEntry).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AclEntryAPI.UpdateAclEntry`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateAclEntry`: AclEntryResponse
fmt.Fprintf(os.Stdout, "Response from `AclEntryAPI.UpdateAclEntry`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| serviceId | string | Alphanumeric string identifying the service. | |
| aclId | string | Alphanumeric string identifying a ACL. | |
| aclEntryId | string | Alphanumeric string identifying an ACL Entry. |
Other parameters are passed through a pointer to a apiUpdateAclEntryRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| aclEntry | AclEntry |
- Content-Type: application/json
- Accept: application/json