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