Note
All URIs are relative to https://api.fastly.com
Method | HTTP request | Description |
---|---|---|
CreateMutualTLSAuthentication | POST /tls/mutual_authentications |
Create a Mutual Authentication |
DeleteMutualTLS | DELETE /tls/mutual_authentications/{mutual_authentication_id} |
Delete a Mutual TLS |
GetMutualAuthentication | GET /tls/mutual_authentications/{mutual_authentication_id} |
Get a Mutual Authentication |
ListMutualAuthentications | GET /tls/mutual_authentications |
List Mutual Authentications |
PatchMutualAuthentication | PATCH /tls/mutual_authentications/{mutual_authentication_id} |
Update a Mutual Authentication |
Create a Mutual Authentication
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
mutualAuthentication := *openapiclient.NewMutualAuthentication() // MutualAuthentication | (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.MutualAuthenticationAPI.CreateMutualTLSAuthentication(ctx).MutualAuthentication(mutualAuthentication).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MutualAuthenticationAPI.CreateMutualTLSAuthentication`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateMutualTLSAuthentication`: MutualAuthenticationResponse
fmt.Fprintf(os.Stdout, "Response from `MutualAuthenticationAPI.CreateMutualTLSAuthentication`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateMutualTLSAuthenticationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
mutualAuthentication | MutualAuthentication |
- Content-Type: application/vnd.api+json
- Accept: application/vnd.api+json
Back to top | Back to API list | Back to README
Delete a Mutual TLS
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
mutualAuthenticationID := "mutualAuthenticationId_example" // string | Alphanumeric string identifying a mutual authentication.
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.MutualAuthenticationAPI.DeleteMutualTLS(ctx, mutualAuthenticationID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MutualAuthenticationAPI.DeleteMutualTLS`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
mutualAuthenticationID | string | Alphanumeric string identifying a mutual authentication. |
Other parameters are passed through a pointer to a apiDeleteMutualTLSRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
Back to top | Back to API list | Back to README
Get a Mutual Authentication
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
mutualAuthenticationID := "mutualAuthenticationId_example" // string | Alphanumeric string identifying a mutual authentication.
include := "include_example" // string | Comma-separated list of related objects to include (optional). Permitted values: `tls_activations`. Including TLS activations will provide you with the TLS domain names that are related to your Mutual TLS authentication. (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.MutualAuthenticationAPI.GetMutualAuthentication(ctx, mutualAuthenticationID).Include(include).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MutualAuthenticationAPI.GetMutualAuthentication`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetMutualAuthentication`: MutualAuthenticationResponse
fmt.Fprintf(os.Stdout, "Response from `MutualAuthenticationAPI.GetMutualAuthentication`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
mutualAuthenticationID | string | Alphanumeric string identifying a mutual authentication. |
Other parameters are passed through a pointer to a apiGetMutualAuthenticationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
include | string | Comma-separated list of related objects to include (optional). Permitted values: tls_activations . Including TLS activations will provide you with the TLS domain names that are related to your Mutual TLS authentication. |
- Content-Type: Not defined
- Accept: application/vnd.api+json
Back to top | Back to API list | Back to README
List Mutual Authentications
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
include := "include_example" // string | Comma-separated list of related objects to include (optional). Permitted values: `tls_activations`. Including TLS activations will provide you with the TLS domain names that are related to your Mutual TLS authentication. (optional)
pageNumber := int32(1) // int32 | Current page. (optional)
pageSize := int32(20) // int32 | Number of records per page. (optional) (default to 20)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.MutualAuthenticationAPI.ListMutualAuthentications(ctx).Include(include).PageNumber(pageNumber).PageSize(pageSize).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MutualAuthenticationAPI.ListMutualAuthentications`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListMutualAuthentications`: MutualAuthenticationsResponse
fmt.Fprintf(os.Stdout, "Response from `MutualAuthenticationAPI.ListMutualAuthentications`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListMutualAuthenticationsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
include | string | Comma-separated list of related objects to include (optional). Permitted values: tls_activations . Including TLS activations will provide you with the TLS domain names that are related to your Mutual TLS authentication. |
pageNumber |
- Content-Type: Not defined
- Accept: application/vnd.api+json
Back to top | Back to API list | Back to README
Update a Mutual Authentication
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
mutualAuthenticationID := "mutualAuthenticationId_example" // string | Alphanumeric string identifying a mutual authentication.
mutualAuthentication := *openapiclient.NewMutualAuthentication() // MutualAuthentication | (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.MutualAuthenticationAPI.PatchMutualAuthentication(ctx, mutualAuthenticationID).MutualAuthentication(mutualAuthentication).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MutualAuthenticationAPI.PatchMutualAuthentication`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PatchMutualAuthentication`: MutualAuthenticationResponse
fmt.Fprintf(os.Stdout, "Response from `MutualAuthenticationAPI.PatchMutualAuthentication`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
mutualAuthenticationID | string | Alphanumeric string identifying a mutual authentication. |
Other parameters are passed through a pointer to a apiPatchMutualAuthenticationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
mutualAuthentication | MutualAuthentication |
- Content-Type: application/vnd.api+json
- Accept: application/vnd.api+json