Skip to content

Latest commit

 

History

History
314 lines (204 loc) · 8.77 KB

File metadata and controls

314 lines (204 loc) · 8.77 KB

\VolumesAPI

All URIs are relative to https://dashboard.quantcdn.io

Method HTTP request Description
CreateVolume Post /api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/volumes Create a new volume
DeleteVolume Delete /api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/volumes/{volume} Delete a volume
GetVolume Get /api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/volumes/{volume} Get a volume
ListVolumes Get /api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/volumes Get all volumes for an environment

CreateVolume

Volume CreateVolume(ctx, organisation, application, environment).CreateVolumeRequest(createVolumeRequest).Execute()

Create a new volume

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/quantcdn/quant-admin-go"
)

func main() {
	organisation := "test-org" // string | The organisation ID
	application := "test-app" // string | The application ID
	environment := "test-env" // string | The environment ID
	createVolumeRequest := *openapiclient.NewCreateVolumeRequest("VolumeName_example") // CreateVolumeRequest | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.VolumesAPI.CreateVolume(context.Background(), organisation, application, environment).CreateVolumeRequest(createVolumeRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `VolumesAPI.CreateVolume``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CreateVolume`: Volume
	fmt.Fprintf(os.Stdout, "Response from `VolumesAPI.CreateVolume`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
organisation string The organisation ID
application string The application ID
environment string The environment ID

Other Parameters

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

Name Type Description Notes

createVolumeRequest | CreateVolumeRequest | |

Return type

Volume

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]

DeleteVolume

DeleteVolume(ctx, organisation, application, environment, volume).Execute()

Delete a volume

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/quantcdn/quant-admin-go"
)

func main() {
	organisation := "test-org" // string | The organisation ID
	application := "test-app" // string | The application ID
	environment := "test-env" // string | The environment ID
	volume := "volume_example" // string | The volume ID

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.VolumesAPI.DeleteVolume(context.Background(), organisation, application, environment, volume).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `VolumesAPI.DeleteVolume``: %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.
organisation string The organisation ID
application string The application ID
environment string The environment ID
volume string The volume ID

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

GetVolume

Volume GetVolume(ctx, organisation, application, environment, volume).Execute()

Get a volume

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/quantcdn/quant-admin-go"
)

func main() {
	organisation := "test-org" // string | The organisation ID
	application := "test-app" // string | The application ID
	environment := "test-env" // string | The environment ID
	volume := "volume_example" // string | The volume ID

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
organisation string The organisation ID
application string The application ID
environment string The environment ID
volume string The volume ID

Other Parameters

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

Name Type Description Notes

Return type

Volume

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]

ListVolumes

Volume ListVolumes(ctx, organisation, application, environment).Execute()

Get all volumes for an environment

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/quantcdn/quant-admin-go"
)

func main() {
	organisation := "test-org" // string | The organisation ID
	application := "test-app" // string | The application ID
	environment := "test-env" // string | The environment ID

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
organisation string The organisation ID
application string The application ID
environment string The environment ID

Other Parameters

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

Name Type Description Notes

Return type

Volume

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]