All URIs are relative to https://api.equinix.com
Method | HTTP request | Description |
---|---|---|
AddToLag | Post /fabric/v4/ports/{portId}/physicalPorts/bulk | Add to Lag |
CreateBulkPort | Post /fabric/v4/ports/bulk | Create Port |
CreatePort | Post /fabric/v4/ports | Create Port |
GetPortByUuid | Get /fabric/v4/ports/{portId} | Get Port by uuid |
GetPorts | Get /fabric/v4/ports | Get All Ports |
GetVlans | Get /fabric/v4/ports/{portUuid}/linkProtocols | Get Vlans |
SearchPorts | Post /fabric/v4/ports/search | Search ports |
AllPhysicalPortsResponse AddToLag(ctx, portId).BulkPhysicalPort(bulkPhysicalPort).Execute()
Add to Lag
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/equinix/equinix-sdk-go/services/fabricv4"
)
func main() {
portId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Port UUID
bulkPhysicalPort := *openapiclient.NewBulkPhysicalPort() // BulkPhysicalPort |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PortsApi.AddToLag(context.Background(), portId).BulkPhysicalPort(bulkPhysicalPort).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PortsApi.AddToLag``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AddToLag`: AllPhysicalPortsResponse
fmt.Fprintf(os.Stdout, "Response from `PortsApi.AddToLag`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
portId | string | Port UUID |
Other parameters are passed through a pointer to a apiAddToLagRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
bulkPhysicalPort | BulkPhysicalPort | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AllPortsResponse CreateBulkPort(ctx).BulkPort(bulkPort).Execute()
Create Port
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/equinix/equinix-sdk-go/services/fabricv4"
)
func main() {
bulkPort := *openapiclient.NewBulkPort() // BulkPort |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PortsApi.CreateBulkPort(context.Background()).BulkPort(bulkPort).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PortsApi.CreateBulkPort``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateBulkPort`: AllPortsResponse
fmt.Fprintf(os.Stdout, "Response from `PortsApi.CreateBulkPort`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateBulkPortRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
bulkPort | BulkPort |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PortResponse CreatePort(ctx).Port(port).Execute()
Create Port
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/equinix/equinix-sdk-go/services/fabricv4"
)
func main() {
port := *openapiclient.NewPort(*openapiclient.NewSimplifiedAccount(), openapiclient.PortType("XF_PORT"), int32(123), openapiclient.PortResponse_physicalPortsType("1000BASE_LX"), openapiclient.PortResponse_connectivitySourceType("COLO"), *openapiclient.NewSimplifiedLocation(), *openapiclient.NewPortEncapsulation(), *openapiclient.NewPortSettings()) // Port |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PortsApi.CreatePort(context.Background()).Port(port).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PortsApi.CreatePort``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreatePort`: PortResponse
fmt.Fprintf(os.Stdout, "Response from `PortsApi.CreatePort`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreatePortRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
port | Port |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PortResponse GetPortByUuid(ctx, portId).Execute()
Get Port by uuid
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/equinix/equinix-sdk-go/services/fabricv4"
)
func main() {
portId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Port UUID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PortsApi.GetPortByUuid(context.Background(), portId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PortsApi.GetPortByUuid``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetPortByUuid`: PortResponse
fmt.Fprintf(os.Stdout, "Response from `PortsApi.GetPortByUuid`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
portId | string | Port UUID |
Other parameters are passed through a pointer to a apiGetPortByUuidRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AllPortsResponse GetPorts(ctx).Name(name).Execute()
Get All Ports
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/equinix/equinix-sdk-go/services/fabricv4"
)
func main() {
name := "name_example" // string | port name to be provided if specific port(s) to be retrieved (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PortsApi.GetPorts(context.Background()).Name(name).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PortsApi.GetPorts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetPorts`: AllPortsResponse
fmt.Fprintf(os.Stdout, "Response from `PortsApi.GetPorts`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetPortsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
name | string | port name to be provided if specific port(s) to be retrieved |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
LinkProtocolGetResponse GetVlans(ctx, portUuid).Execute()
Get Vlans
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/equinix/equinix-sdk-go/services/fabricv4"
)
func main() {
portUuid := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Port UUID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PortsApi.GetVlans(context.Background(), portUuid).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PortsApi.GetVlans``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetVlans`: LinkProtocolGetResponse
fmt.Fprintf(os.Stdout, "Response from `PortsApi.GetVlans`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
portUuid | string | Port UUID |
Other parameters are passed through a pointer to a apiGetVlansRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AllPortsResponse SearchPorts(ctx).PortV4SearchRequest(portV4SearchRequest).Execute()
Search ports
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/equinix/equinix-sdk-go/services/fabricv4"
)
func main() {
portV4SearchRequest := *openapiclient.NewPortV4SearchRequest() // PortV4SearchRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PortsApi.SearchPorts(context.Background()).PortV4SearchRequest(portV4SearchRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PortsApi.SearchPorts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SearchPorts`: AllPortsResponse
fmt.Fprintf(os.Stdout, "Response from `PortsApi.SearchPorts`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiSearchPortsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
portV4SearchRequest | PortV4SearchRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]