Skip to content

Latest commit

 

History

History
494 lines (312 loc) · 14.7 KB

PrecisionTimeApi.md

File metadata and controls

494 lines (312 loc) · 14.7 KB

\PrecisionTimeApi

All URIs are relative to https://api.equinix.com

Method HTTP request Description
CreateTimeServices Post /fabric/v4/timeServices Create Time Service
DeleteTimeServiceById Delete /fabric/v4/timeServices/{serviceId} Delete time service
GetTimeServicesById Get /fabric/v4/timeServices/{serviceId} Get Time Service
GetTimeServicesConnectionsByServiceId Get /fabric/v4/timeServices/{serviceId}/connections Get Connection Links
GetTimeServicesPackageByCode Get /fabric/v4/timeServicePackages/{packageCode} Get Package By Code
GetTimeServicesPackages Get /fabric/v4/timeServicePackages Get Packages
UpdateTimeServicesById Patch /fabric/v4/timeServices/{serviceId} Patch time service

CreateTimeServices

PrecisionTimeServiceCreateResponse CreateTimeServices(ctx).PrecisionTimeServiceRequest(precisionTimeServiceRequest).Execute()

Create Time Service

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/equinix/equinix-sdk-go/services/fabricv4"
)

func main() {
	precisionTimeServiceRequest := *openapiclient.NewPrecisionTimeServiceRequest(openapiclient.precisionTimeServiceRequest_type("NTP"), "Name_example", *openapiclient.NewPrecisionTimePackageRequest(openapiclient.getTimeServicesPackageByCode_packageCode_parameter("NTP_STANDARD")), []openapiclient.FabricConnectionUuid{*openapiclient.NewFabricConnectionUuid("Uuid_example")}, *openapiclient.NewIpv4()) // PrecisionTimeServiceRequest | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.PrecisionTimeApi.CreateTimeServices(context.Background()).PrecisionTimeServiceRequest(precisionTimeServiceRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PrecisionTimeApi.CreateTimeServices``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CreateTimeServices`: PrecisionTimeServiceCreateResponse
	fmt.Fprintf(os.Stdout, "Response from `PrecisionTimeApi.CreateTimeServices`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
precisionTimeServiceRequest PrecisionTimeServiceRequest

Return type

PrecisionTimeServiceCreateResponse

Authorization

BearerAuth

HTTP request headers

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

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

DeleteTimeServiceById

PrecisionTimeServiceCreateResponse DeleteTimeServiceById(ctx, serviceId).Execute()

Delete time service

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/equinix/equinix-sdk-go/services/fabricv4"
)

func main() {
	serviceId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Service UUID

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.PrecisionTimeApi.DeleteTimeServiceById(context.Background(), serviceId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PrecisionTimeApi.DeleteTimeServiceById``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `DeleteTimeServiceById`: PrecisionTimeServiceCreateResponse
	fmt.Fprintf(os.Stdout, "Response from `PrecisionTimeApi.DeleteTimeServiceById`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

PrecisionTimeServiceCreateResponse

Authorization

BearerAuth

HTTP request headers

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

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

GetTimeServicesById

PrecisionTimeServiceCreateResponse GetTimeServicesById(ctx, serviceId).Execute()

Get Time Service

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/equinix/equinix-sdk-go/services/fabricv4"
)

func main() {
	serviceId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Service UUID

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.PrecisionTimeApi.GetTimeServicesById(context.Background(), serviceId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PrecisionTimeApi.GetTimeServicesById``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetTimeServicesById`: PrecisionTimeServiceCreateResponse
	fmt.Fprintf(os.Stdout, "Response from `PrecisionTimeApi.GetTimeServicesById`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

PrecisionTimeServiceCreateResponse

Authorization

BearerAuth

HTTP request headers

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

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

GetTimeServicesConnectionsByServiceId

PrecisionTimeServiceConnectionsResponse GetTimeServicesConnectionsByServiceId(ctx, serviceId).Execute()

Get Connection Links

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/equinix/equinix-sdk-go/services/fabricv4"
)

func main() {
	serviceId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Service UUID

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.PrecisionTimeApi.GetTimeServicesConnectionsByServiceId(context.Background(), serviceId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PrecisionTimeApi.GetTimeServicesConnectionsByServiceId``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetTimeServicesConnectionsByServiceId`: PrecisionTimeServiceConnectionsResponse
	fmt.Fprintf(os.Stdout, "Response from `PrecisionTimeApi.GetTimeServicesConnectionsByServiceId`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

PrecisionTimeServiceConnectionsResponse

Authorization

BearerAuth

HTTP request headers

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

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

GetTimeServicesPackageByCode

PrecisionTimePackageResponse GetTimeServicesPackageByCode(ctx, packageCode).Execute()

Get Package By Code

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/equinix/equinix-sdk-go/services/fabricv4"
)

func main() {
	packageCode := openapiclient.getTimeServicesPackageByCode_packageCode_parameter("NTP_STANDARD") // GetTimeServicesPackageByCodePackageCodeParameter | Package Code

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.PrecisionTimeApi.GetTimeServicesPackageByCode(context.Background(), packageCode).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PrecisionTimeApi.GetTimeServicesPackageByCode``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetTimeServicesPackageByCode`: PrecisionTimePackageResponse
	fmt.Fprintf(os.Stdout, "Response from `PrecisionTimeApi.GetTimeServicesPackageByCode`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
packageCode GetTimeServicesPackageByCodePackageCodeParameter Package Code

Other Parameters

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

Name Type Description Notes

Return type

PrecisionTimePackageResponse

Authorization

BearerAuth

HTTP request headers

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

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

GetTimeServicesPackages

PrecisionTimeServicePackagesResponse GetTimeServicesPackages(ctx).Execute()

Get Packages

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/equinix/equinix-sdk-go/services/fabricv4"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.PrecisionTimeApi.GetTimeServicesPackages(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PrecisionTimeApi.GetTimeServicesPackages``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetTimeServicesPackages`: PrecisionTimeServicePackagesResponse
	fmt.Fprintf(os.Stdout, "Response from `PrecisionTimeApi.GetTimeServicesPackages`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

PrecisionTimeServicePackagesResponse

Authorization

BearerAuth

HTTP request headers

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

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

UpdateTimeServicesById

PrecisionTimeServiceCreateResponse UpdateTimeServicesById(ctx, serviceId).PrecisionTimeChangeOperation(precisionTimeChangeOperation).Execute()

Patch time service

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/equinix/equinix-sdk-go/services/fabricv4"
)

func main() {
	serviceId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Service UUID
	precisionTimeChangeOperation := []openapiclient.PrecisionTimeChangeOperation{*openapiclient.NewPrecisionTimeChangeOperation(openapiclient.precisionTimeChangeOperation_op("replace"), openapiclient.precisionTimeChangeOperation_path("/ipv4"), interface{}(123))} // []PrecisionTimeChangeOperation | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.PrecisionTimeApi.UpdateTimeServicesById(context.Background(), serviceId).PrecisionTimeChangeOperation(precisionTimeChangeOperation).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PrecisionTimeApi.UpdateTimeServicesById``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `UpdateTimeServicesById`: PrecisionTimeServiceCreateResponse
	fmt.Fprintf(os.Stdout, "Response from `PrecisionTimeApi.UpdateTimeServicesById`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

precisionTimeChangeOperation | []PrecisionTimeChangeOperation | |

Return type

PrecisionTimeServiceCreateResponse

Authorization

BearerAuth

HTTP request headers

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

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