All URIs are relative to https://api.aptible.com
Method | HTTP request | Description |
---|---|---|
GetVpnTunnel | Get /vpn_tunnels/{id} | show vpn_tunnel |
ListVpnTunnelsForStack | Get /stacks/{stack_id}/vpn_tunnels | list vpn_tunnels |
VpnTunnel GetVpnTunnel(ctx, id).Execute()
show vpn_tunnel
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/aptible/aptible-api-go/aptibleapi"
)
func main() {
id := int32(56) // int32 | id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.VpnTunnelsAPI.GetVpnTunnel(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VpnTunnelsAPI.GetVpnTunnel``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetVpnTunnel`: VpnTunnel
fmt.Fprintf(os.Stdout, "Response from `VpnTunnelsAPI.GetVpnTunnel`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | int32 | id |
Other parameters are passed through a pointer to a apiGetVpnTunnelRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/hal+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListVpnTunnelsForStack200Response ListVpnTunnelsForStack(ctx, stackId).Page(page).Execute()
list vpn_tunnels
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/aptible/aptible-api-go/aptibleapi"
)
func main() {
stackId := int32(56) // int32 | stack_id
page := int32(56) // int32 | current page of results for pagination (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.VpnTunnelsAPI.ListVpnTunnelsForStack(context.Background(), stackId).Page(page).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VpnTunnelsAPI.ListVpnTunnelsForStack``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListVpnTunnelsForStack`: ListVpnTunnelsForStack200Response
fmt.Fprintf(os.Stdout, "Response from `VpnTunnelsAPI.ListVpnTunnelsForStack`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
stackId | int32 | stack_id |
Other parameters are passed through a pointer to a apiListVpnTunnelsForStackRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
page | int32 | current page of results for pagination |
ListVpnTunnelsForStack200Response
- Content-Type: Not defined
- Accept: application/hal+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]