Skip to content

Latest commit

 

History

History
72 lines (45 loc) · 1.66 KB

TlsCsrsAPI.md

File metadata and controls

72 lines (45 loc) · 1.66 KB

TLSCsrsAPI

Note

All URIs are relative to https://api.fastly.com

Method HTTP request Description
CreateCsr POST /tls/certificate_signing_requests Create CSR

CreateCsr

Create CSR

Example

package main

import (
    "context"
    "fmt"
    "os"
    "github.com/fastly/fastly-go/fastly"
)

func main() {
    tlsCsr := *openapiclient.NewTLSCsr() // TLSCsr |  (optional)

    cfg := fastly.NewConfiguration()
    apiClient := fastly.NewAPIClient(cfg)
    ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
    resp, r, err := apiClient.TLSCsrsAPI.CreateCsr(ctx).TLSCsr(tlsCsr).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TLSCsrsAPI.CreateCsr`: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CreateCsr`: TLSCsrResponse
    fmt.Fprintf(os.Stdout, "Response from `TLSCsrsAPI.CreateCsr`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCreateCsrRequest struct via the builder pattern

Name Type Description Notes
tlsCsr TLSCsr

Return type

TLSCsrResponse

Authorization

API Token

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json

Back to top | Back to API list | Back to README