Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

Latest commit

 

History

History
1217 lines (796 loc) · 44.4 KB

VRFsApi.md

File metadata and controls

1217 lines (796 loc) · 44.4 KB

\VRFsApi

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

BgpDynamicNeighborsIdGet

BgpDynamicNeighbor BgpDynamicNeighborsIdGet(ctx, id).Include(include).Exclude(exclude).Execute()

Retrieve a BGP Dynamic Neighbor

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string BGP Dynamic Neighbor UUID

Other Parameters

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. |

Return type

BgpDynamicNeighbor

Authorization

x_auth_token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CreateBgpDynamicNeighbor

BgpDynamicNeighbor CreateBgpDynamicNeighbor(ctx, id).BgpDynamicNeighborCreateInput(bgpDynamicNeighborCreateInput).Include(include).Exclude(exclude).Execute()

Create a VRF BGP Dynamic Neighbor range

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Metal Gateway UUID

Other Parameters

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. |

Return type

BgpDynamicNeighbor

Authorization

x_auth_token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CreateVrf

Vrf CreateVrf(ctx, id).VrfCreateInput(vrfCreateInput).Include(include).Exclude(exclude).Execute()

Create a new VRF in the specified project

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Project UUID

Other Parameters

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. |

Return type

Vrf

Authorization

x_auth_token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CreateVrfRoute

VrfRoute CreateVrfRoute(ctx, id).VrfRouteCreateInput(vrfRouteCreateInput).Include(include).Exclude(exclude).Execute()

Create a VRF route

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string VRF UUID

Other Parameters

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. |

Return type

VrfRoute

Authorization

x_auth_token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteBgpDynamicNeighborById

BgpDynamicNeighbor DeleteBgpDynamicNeighborById(ctx, id).Include(include).Exclude(exclude).Execute()

Delete a VRF BGP Dynamic Neighbor

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string BGP Dynamic Neighbor UUID

Other Parameters

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. |

Return type

BgpDynamicNeighbor

Authorization

x_auth_token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteVrf

DeleteVrf(ctx, id).Execute()

Delete the VRF

Example

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)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string VRF UUID

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

x_auth_token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteVrfRouteById

VrfRoute DeleteVrfRouteById(ctx, id).Include(include).Exclude(exclude).Execute()

Delete a VRF Route

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string VRF Route UUID

Other Parameters

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. |

Return type

VrfRoute

Authorization

x_auth_token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

FindVrfById

Vrf FindVrfById(ctx, id).Include(include).Exclude(exclude).Execute()

Retrieve a VRF

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string VRF UUID

Other Parameters

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. |

Return type

Vrf

Authorization

x_auth_token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

FindVrfIpReservation

VrfIpReservation FindVrfIpReservation(ctx, vrfId, id).Include(include).Exclude(exclude).Execute()

Retrieve all VRF IP Reservations in the VRF

Example

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)
}

Path Parameters

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

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. |

Return type

VrfIpReservation

Authorization

x_auth_token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

FindVrfIpReservations

VrfIpReservationList FindVrfIpReservations(ctx, id).Include(include).Exclude(exclude).Execute()

Retrieve all VRF IP Reservations in the VRF

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string VRF UUID

Other Parameters

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. |

Return type

VrfIpReservationList

Authorization

x_auth_token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

FindVrfRouteById

VrfRoute FindVrfRouteById(ctx, id).Include(include).Exclude(exclude).Execute()

Retrieve a VRF Route

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string VRF Route UUID

Other Parameters

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. |

Return type

VrfRoute

Authorization

x_auth_token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

FindVrfs

VrfList FindVrfs(ctx, id).Include(include).Exclude(exclude).Metro(metro).Execute()

Retrieve all VRFs in the project

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Project UUID

Other Parameters

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 |

Return type

VrfList

Authorization

x_auth_token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetBgpDynamicNeighbors

BgpDynamicNeighborList GetBgpDynamicNeighbors(ctx, id).Include(include).Exclude(exclude).Execute()

List BGP Dynamic Neighbors

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Metal Gateway UUID

Other Parameters

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. |

Return type

BgpDynamicNeighborList

Authorization

x_auth_token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetVrfRoutes

VrfRouteList GetVrfRoutes(ctx, id).Include(include).Exclude(exclude).Execute()

Retrieve all routes in the VRF

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string VRF UUID

Other Parameters

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. |

Return type

VrfRouteList

Authorization

x_auth_token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateVrf

Vrf UpdateVrf(ctx, id).VrfUpdateInput(vrfUpdateInput).Include(include).Exclude(exclude).Execute()

Update the VRF

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string VRF UUID

Other Parameters

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. |

Return type

Vrf

Authorization

x_auth_token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateVrfRouteById

VrfRoute UpdateVrfRouteById(ctx, id).VrfRouteUpdateInput(vrfRouteUpdateInput).Include(include).Exclude(exclude).Execute()

Update a VRF Route

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string VRF Route UUID

Other Parameters

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. |

Return type

VrfRoute

Authorization

x_auth_token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]