Note
All URIs are relative to https://api.fastly.com
| Method | HTTP request | Description |
|---|---|---|
| GetTlsConfig | GET /tls/configurations/{tls_configuration_id} |
Get a TLS configuration |
| ListTlsConfigs | GET /tls/configurations |
List TLS configurations |
| UpdateTlsConfig | PATCH /tls/configurations/{tls_configuration_id} |
Update a TLS configuration |
Get a TLS configuration
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
tlsConfigurationId := "tlsConfigurationId_example" // string | Alphanumeric string identifying a TLS configuration.
include := "dns_records" // string | Include related objects. Optional, comma-separated values. Permitted values: `dns_records`. (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.TlsConfigurationsAPI.GetTlsConfig(ctx, tlsConfigurationId).Include(include).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TlsConfigurationsAPI.GetTlsConfig`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTlsConfig`: TlsConfigurationResponse
fmt.Fprintf(os.Stdout, "Response from `TlsConfigurationsAPI.GetTlsConfig`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| tlsConfigurationId | string | Alphanumeric string identifying a TLS configuration. |
Other parameters are passed through a pointer to a apiGetTlsConfigRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| include | string | Include related objects. Optional, comma-separated values. Permitted values: dns_records. |
- Content-Type: Not defined
- Accept: application/vnd.api+json
Back to top | Back to API list | Back to README
List TLS configurations
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
filterBulk := "filterBulk_example" // string | Optionally filters by the bulk attribute. (optional)
include := "dns_records" // string | Include related objects. Optional, comma-separated values. Permitted values: `dns_records`. (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.TlsConfigurationsAPI.ListTlsConfigs(ctx).FilterBulk(filterBulk).Include(include).PageNumber(pageNumber).PageSize(pageSize).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TlsConfigurationsAPI.ListTlsConfigs`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListTlsConfigs`: TlsConfigurationsResponse
fmt.Fprintf(os.Stdout, "Response from `TlsConfigurationsAPI.ListTlsConfigs`: %v\n", resp)
}Other parameters are passed through a pointer to a apiListTlsConfigsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| filterBulk | string | Optionally filters by the bulk attribute. | include |
- Content-Type: Not defined
- Accept: application/vnd.api+json
Back to top | Back to API list | Back to README
Update a TLS configuration
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
tlsConfigurationId := "tlsConfigurationId_example" // string | Alphanumeric string identifying a TLS configuration.
tlsConfiguration := *openapiclient.NewTlsConfiguration() // TlsConfiguration | (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.TlsConfigurationsAPI.UpdateTlsConfig(ctx, tlsConfigurationId).TlsConfiguration(tlsConfiguration).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TlsConfigurationsAPI.UpdateTlsConfig`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateTlsConfig`: TlsConfigurationResponse
fmt.Fprintf(os.Stdout, "Response from `TlsConfigurationsAPI.UpdateTlsConfig`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| tlsConfigurationId | string | Alphanumeric string identifying a TLS configuration. |
Other parameters are passed through a pointer to a apiUpdateTlsConfigRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| tlsConfiguration | TlsConfiguration |
- Content-Type: application/vnd.api+json
- Accept: application/vnd.api+json