All URIs are relative to https://api.equinix.com/metal/v1
Method | HTTP request | Description |
---|---|---|
BgpDynamicNeighborsIdGet | Get /bgp-dynamic-neighbors/{id} | Retrieve a BGP Dynamic Neighbor |
CreateBgpDynamicNeighbor | Post /metal-gateways/{id}/bgp-dynamic-neighbors | Create a VRF BGP Dynamic Neighbor range |
CreateVrf | Post /projects/{id}/vrfs | Create a new VRF in the specified project |
CreateVrfRoute | Post /vrfs/{id}/routes | Create a VRF route |
DeleteBgpDynamicNeighborById | Delete /bgp-dynamic-neighbors/{id} | Delete a VRF BGP Dynamic Neighbor |
DeleteVrf | Delete /vrfs/{id} | Delete the VRF |
DeleteVrfRouteById | Delete /routes/{id} | Delete a VRF Route |
FindVrfById | Get /vrfs/{id} | Retrieve a VRF |
FindVrfIpReservation | Get /vrfs/{vrf_id}/ips/{id} | Retrieve all VRF IP Reservations in the VRF |
FindVrfIpReservations | Get /vrfs/{id}/ips | Retrieve all VRF IP Reservations in the VRF |
FindVrfRouteById | Get /routes/{id} | Retrieve a VRF Route |
FindVrfs | Get /projects/{id}/vrfs | Retrieve all VRFs in the project |
GetBgpDynamicNeighbors | Get /metal-gateways/{id}/bgp-dynamic-neighbors | List BGP Dynamic Neighbors |
GetVrfRoutes | Get /vrfs/{id}/routes | Retrieve all routes in the VRF |
UpdateVrf | Put /vrfs/{id} | Update the VRF |
UpdateVrfRouteById | Put /routes/{id} | Update a VRF Route |
BgpDynamicNeighbor BgpDynamicNeighborsIdGet(ctx, id).Include(include).Exclude(exclude).Execute()
Retrieve a BGP Dynamic Neighbor
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/equinix-labs/metal-go/metal/v1"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | BGP Dynamic Neighbor UUID
include := []string{"Inner_example"} // []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
exclude := []string{"Inner_example"} // []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.VRFsApi.BgpDynamicNeighborsIdGet(context.Background(), id).Include(include).Exclude(exclude).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VRFsApi.BgpDynamicNeighborsIdGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `BgpDynamicNeighborsIdGet`: BgpDynamicNeighbor
fmt.Fprintf(os.Stdout, "Response from `VRFsApi.BgpDynamicNeighborsIdGet`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | BGP Dynamic Neighbor UUID |
Other parameters are passed through a pointer to a apiBgpDynamicNeighborsIdGetRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
include | []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | exclude | []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BgpDynamicNeighbor CreateBgpDynamicNeighbor(ctx, id).BgpDynamicNeighborCreateInput(bgpDynamicNeighborCreateInput).Include(include).Exclude(exclude).Execute()
Create a VRF BGP Dynamic Neighbor range
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/equinix-labs/metal-go/metal/v1"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Metal Gateway UUID
bgpDynamicNeighborCreateInput := *openapiclient.NewBgpDynamicNeighborCreateInput("192.168.1.0/25", int32(12345)) // BgpDynamicNeighborCreateInput |
include := []string{"Inner_example"} // []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
exclude := []string{"Inner_example"} // []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.VRFsApi.CreateBgpDynamicNeighbor(context.Background(), id).BgpDynamicNeighborCreateInput(bgpDynamicNeighborCreateInput).Include(include).Exclude(exclude).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VRFsApi.CreateBgpDynamicNeighbor``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateBgpDynamicNeighbor`: BgpDynamicNeighbor
fmt.Fprintf(os.Stdout, "Response from `VRFsApi.CreateBgpDynamicNeighbor`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Metal Gateway UUID |
Other parameters are passed through a pointer to a apiCreateBgpDynamicNeighborRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
bgpDynamicNeighborCreateInput | BgpDynamicNeighborCreateInput | | include | []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | exclude | []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Vrf CreateVrf(ctx, id).VrfCreateInput(vrfCreateInput).Include(include).Exclude(exclude).Execute()
Create a new VRF in the specified project
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/equinix-labs/metal-go/metal/v1"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Project UUID
vrfCreateInput := *openapiclient.NewVrfCreateInput("Metro_example", "Name_example") // VrfCreateInput | VRF to create
include := []string{"Inner_example"} // []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
exclude := []string{"Inner_example"} // []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.VRFsApi.CreateVrf(context.Background(), id).VrfCreateInput(vrfCreateInput).Include(include).Exclude(exclude).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VRFsApi.CreateVrf``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateVrf`: Vrf
fmt.Fprintf(os.Stdout, "Response from `VRFsApi.CreateVrf`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Project UUID |
Other parameters are passed through a pointer to a apiCreateVrfRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
vrfCreateInput | VrfCreateInput | VRF to create | include | []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | exclude | []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VrfRoute CreateVrfRoute(ctx, id).VrfRouteCreateInput(vrfRouteCreateInput).Include(include).Exclude(exclude).Execute()
Create a VRF route
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/equinix-labs/metal-go/metal/v1"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | VRF UUID
vrfRouteCreateInput := *openapiclient.NewVrfRouteCreateInput("0.0.0.0/0", "192.168.1.254") // VrfRouteCreateInput |
include := []string{"Inner_example"} // []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
exclude := []string{"Inner_example"} // []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.VRFsApi.CreateVrfRoute(context.Background(), id).VrfRouteCreateInput(vrfRouteCreateInput).Include(include).Exclude(exclude).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VRFsApi.CreateVrfRoute``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateVrfRoute`: VrfRoute
fmt.Fprintf(os.Stdout, "Response from `VRFsApi.CreateVrfRoute`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | VRF UUID |
Other parameters are passed through a pointer to a apiCreateVrfRouteRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
vrfRouteCreateInput | VrfRouteCreateInput | | include | []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | exclude | []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BgpDynamicNeighbor DeleteBgpDynamicNeighborById(ctx, id).Include(include).Exclude(exclude).Execute()
Delete a VRF BGP Dynamic Neighbor
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/equinix-labs/metal-go/metal/v1"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | BGP Dynamic Neighbor UUID
include := []string{"Inner_example"} // []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
exclude := []string{"Inner_example"} // []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.VRFsApi.DeleteBgpDynamicNeighborById(context.Background(), id).Include(include).Exclude(exclude).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VRFsApi.DeleteBgpDynamicNeighborById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteBgpDynamicNeighborById`: BgpDynamicNeighbor
fmt.Fprintf(os.Stdout, "Response from `VRFsApi.DeleteBgpDynamicNeighborById`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | BGP Dynamic Neighbor UUID |
Other parameters are passed through a pointer to a apiDeleteBgpDynamicNeighborByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
include | []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | exclude | []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteVrf(ctx, id).Execute()
Delete the VRF
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/equinix-labs/metal-go/metal/v1"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | VRF UUID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.VRFsApi.DeleteVrf(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VRFsApi.DeleteVrf``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | VRF UUID |
Other parameters are passed through a pointer to a apiDeleteVrfRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VrfRoute DeleteVrfRouteById(ctx, id).Include(include).Exclude(exclude).Execute()
Delete a VRF Route
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/equinix-labs/metal-go/metal/v1"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | VRF Route UUID
include := []string{"Inner_example"} // []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
exclude := []string{"Inner_example"} // []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.VRFsApi.DeleteVrfRouteById(context.Background(), id).Include(include).Exclude(exclude).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VRFsApi.DeleteVrfRouteById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteVrfRouteById`: VrfRoute
fmt.Fprintf(os.Stdout, "Response from `VRFsApi.DeleteVrfRouteById`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | VRF Route UUID |
Other parameters are passed through a pointer to a apiDeleteVrfRouteByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
include | []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | exclude | []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Vrf FindVrfById(ctx, id).Include(include).Exclude(exclude).Execute()
Retrieve a VRF
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/equinix-labs/metal-go/metal/v1"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | VRF UUID
include := []string{"Inner_example"} // []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
exclude := []string{"Inner_example"} // []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.VRFsApi.FindVrfById(context.Background(), id).Include(include).Exclude(exclude).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VRFsApi.FindVrfById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `FindVrfById`: Vrf
fmt.Fprintf(os.Stdout, "Response from `VRFsApi.FindVrfById`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | VRF UUID |
Other parameters are passed through a pointer to a apiFindVrfByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
include | []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | exclude | []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VrfIpReservation FindVrfIpReservation(ctx, vrfId, id).Include(include).Exclude(exclude).Execute()
Retrieve all VRF IP Reservations in the VRF
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/equinix-labs/metal-go/metal/v1"
)
func main() {
vrfId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | VRF UUID
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | IP UUID
include := []string{"Inner_example"} // []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
exclude := []string{"Inner_example"} // []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.VRFsApi.FindVrfIpReservation(context.Background(), vrfId, id).Include(include).Exclude(exclude).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VRFsApi.FindVrfIpReservation``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `FindVrfIpReservation`: VrfIpReservation
fmt.Fprintf(os.Stdout, "Response from `VRFsApi.FindVrfIpReservation`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
vrfId | string | VRF UUID | |
id | string | IP UUID |
Other parameters are passed through a pointer to a apiFindVrfIpReservationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
include | []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | exclude | []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VrfIpReservationList FindVrfIpReservations(ctx, id).Include(include).Exclude(exclude).Execute()
Retrieve all VRF IP Reservations in the VRF
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/equinix-labs/metal-go/metal/v1"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | VRF UUID
include := []string{"Inner_example"} // []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
exclude := []string{"Inner_example"} // []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.VRFsApi.FindVrfIpReservations(context.Background(), id).Include(include).Exclude(exclude).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VRFsApi.FindVrfIpReservations``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `FindVrfIpReservations`: VrfIpReservationList
fmt.Fprintf(os.Stdout, "Response from `VRFsApi.FindVrfIpReservations`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | VRF UUID |
Other parameters are passed through a pointer to a apiFindVrfIpReservationsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
include | []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | exclude | []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VrfRoute FindVrfRouteById(ctx, id).Include(include).Exclude(exclude).Execute()
Retrieve a VRF Route
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/equinix-labs/metal-go/metal/v1"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | VRF Route UUID
include := []string{"Inner_example"} // []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
exclude := []string{"Inner_example"} // []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.VRFsApi.FindVrfRouteById(context.Background(), id).Include(include).Exclude(exclude).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VRFsApi.FindVrfRouteById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `FindVrfRouteById`: VrfRoute
fmt.Fprintf(os.Stdout, "Response from `VRFsApi.FindVrfRouteById`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | VRF Route UUID |
Other parameters are passed through a pointer to a apiFindVrfRouteByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
include | []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | exclude | []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VrfList FindVrfs(ctx, id).Include(include).Exclude(exclude).Metro(metro).Execute()
Retrieve all VRFs in the project
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/equinix-labs/metal-go/metal/v1"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Project UUID
include := []string{"Inner_example"} // []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
exclude := []string{"Inner_example"} // []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional)
metro := "metro_example" // string | Filter by Metro ID (uuid) or Metro Code (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.VRFsApi.FindVrfs(context.Background(), id).Include(include).Exclude(exclude).Metro(metro).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VRFsApi.FindVrfs``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `FindVrfs`: VrfList
fmt.Fprintf(os.Stdout, "Response from `VRFsApi.FindVrfs`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Project UUID |
Other parameters are passed through a pointer to a apiFindVrfsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
include | []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | exclude | []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | metro | string | Filter by Metro ID (uuid) or Metro Code |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BgpDynamicNeighborList GetBgpDynamicNeighbors(ctx, id).Include(include).Exclude(exclude).Execute()
List BGP Dynamic Neighbors
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/equinix-labs/metal-go/metal/v1"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Metal Gateway UUID
include := []string{"Inner_example"} // []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
exclude := []string{"Inner_example"} // []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.VRFsApi.GetBgpDynamicNeighbors(context.Background(), id).Include(include).Exclude(exclude).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VRFsApi.GetBgpDynamicNeighbors``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetBgpDynamicNeighbors`: BgpDynamicNeighborList
fmt.Fprintf(os.Stdout, "Response from `VRFsApi.GetBgpDynamicNeighbors`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Metal Gateway UUID |
Other parameters are passed through a pointer to a apiGetBgpDynamicNeighborsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
include | []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | exclude | []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VrfRouteList GetVrfRoutes(ctx, id).Include(include).Exclude(exclude).Execute()
Retrieve all routes in the VRF
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/equinix-labs/metal-go/metal/v1"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | VRF UUID
include := []string{"Inner_example"} // []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
exclude := []string{"Inner_example"} // []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.VRFsApi.GetVrfRoutes(context.Background(), id).Include(include).Exclude(exclude).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VRFsApi.GetVrfRoutes``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetVrfRoutes`: VrfRouteList
fmt.Fprintf(os.Stdout, "Response from `VRFsApi.GetVrfRoutes`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | VRF UUID |
Other parameters are passed through a pointer to a apiGetVrfRoutesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
include | []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | exclude | []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Vrf UpdateVrf(ctx, id).VrfUpdateInput(vrfUpdateInput).Include(include).Exclude(exclude).Execute()
Update the VRF
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/equinix-labs/metal-go/metal/v1"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | VRF UUID
vrfUpdateInput := *openapiclient.NewVrfUpdateInput() // VrfUpdateInput | VRF to update
include := []string{"Inner_example"} // []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
exclude := []string{"Inner_example"} // []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.VRFsApi.UpdateVrf(context.Background(), id).VrfUpdateInput(vrfUpdateInput).Include(include).Exclude(exclude).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VRFsApi.UpdateVrf``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateVrf`: Vrf
fmt.Fprintf(os.Stdout, "Response from `VRFsApi.UpdateVrf`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | VRF UUID |
Other parameters are passed through a pointer to a apiUpdateVrfRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
vrfUpdateInput | VrfUpdateInput | VRF to update | include | []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | exclude | []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VrfRoute UpdateVrfRouteById(ctx, id).VrfRouteUpdateInput(vrfRouteUpdateInput).Include(include).Exclude(exclude).Execute()
Update a VRF Route
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/equinix-labs/metal-go/metal/v1"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | VRF Route UUID
vrfRouteUpdateInput := *openapiclient.NewVrfRouteUpdateInput() // VrfRouteUpdateInput |
include := []string{"Inner_example"} // []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
exclude := []string{"Inner_example"} // []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.VRFsApi.UpdateVrfRouteById(context.Background(), id).VrfRouteUpdateInput(vrfRouteUpdateInput).Include(include).Exclude(exclude).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `VRFsApi.UpdateVrfRouteById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateVrfRouteById`: VrfRoute
fmt.Fprintf(os.Stdout, "Response from `VRFsApi.UpdateVrfRouteById`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | VRF Route UUID |
Other parameters are passed through a pointer to a apiUpdateVrfRouteByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
vrfRouteUpdateInput | VrfRouteUpdateInput | | include | []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | exclude | []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]