Note
All URIs are relative to https://api.fastly.com
Method | HTTP request | Description |
---|---|---|
RequestSudoAccess | POST /sudo |
Request Sudo access |
Request Sudo access
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
sudoRequest := *openapiclient.NewSudoRequest("Username_example", "Password_example") // SudoRequest | (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.SudoAPI.RequestSudoAccess(ctx).SudoRequest(sudoRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SudoAPI.RequestSudoAccess`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `RequestSudoAccess`: SudoResponse
fmt.Fprintf(os.Stdout, "Response from `SudoAPI.RequestSudoAccess`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiRequestSudoAccessRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
sudoRequest | SudoRequest |
- Content-Type: application/json
- Accept: application/vnd.api+json, application/problem+json