SharesApi

All URIs are relative to https://nfs.de-fra.ionos.com

Method
HTTP request
Description

Delete /clusters/{clusterId}/shares/{shareId}

Delete Share

Get /clusters/{clusterId}/shares/{shareId}

Retrieve Share

Get /clusters/{clusterId}/shares

Retrieve Shares

Post /clusters/{clusterId}/shares

Create Share

Put /clusters/{clusterId}/shares/{shareId}

Ensure Share

ClustersSharesDelete

var result  = ClustersSharesDelete(ctx, clusterId, shareId)
                      .Execute()

Delete Share

Example

package main

import (
    "context"
    "fmt"
    "os"

    nfs "github.com/ionos-cloud/sdk-go-bundle/products/nfs"
    "github.com/ionos-cloud/sdk-go-bundle/shared"
)

func main() {
    clusterId := "e69b22a5-8fee-56b1-b6fb-4a07e4205ead" // string | The identifier (UUID) of the cluster.
    shareId := "7b1ef56d-dfc6-51fe-aff0-7af2d6747868" // string | The identifier (UUID) of the share.

    configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
    apiClient := nfs.NewAPIClient(configuration)
    resp, err := apiClient.SharesApi.ClustersSharesDelete(context.Background(), clusterId, shareId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SharesApi.ClustersSharesDelete``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
    }
}

Path Parameters

Name
Type
Description
Notes

ctx

context.Context

context for authentication, logging, cancellation, deadlines, tracing, etc.

clusterId

string

The identifier (UUID) of the cluster.

shareId

string

The identifier (UUID) of the share.

Other Parameters

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

Name

Type

Description

Notes

Return type

(empty response body)

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

ClustersSharesFindById

Retrieve Share

Example

Path Parameters

Name
Type
Description
Notes

ctx

context.Context

context for authentication, logging, cancellation, deadlines, tracing, etc.

clusterId

string

The identifier (UUID) of the cluster.

shareId

string

The share identifier.

Other Parameters

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

Name

Type

Description

Notes

Return type

ShareRead

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

ClustersSharesGet

Retrieve Shares

Example

Path Parameters

Name
Type
Description
Notes

ctx

context.Context

context for authentication, logging, cancellation, deadlines, tracing, etc.

clusterId

string

The identifier (UUID) of the cluster.

Other Parameters

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

Name
Type
Description
Notes

offset

int32

The first element from the total list of elements to include in the response. Use this parameter together with the limit for pagination.

[default to 0]

limit

int32

The maximum number of elements to return. Use this parameter together with the offset for pagination.

[default to 100]

Return type

ShareReadList

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

ClustersSharesPost

Create Share

Example

Path Parameters

Name
Type
Description
Notes

ctx

context.Context

context for authentication, logging, cancellation, deadlines, tracing, etc.

clusterId

string

The identifier (UUID) of the cluster.

Other Parameters

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

Name
Type
Description
Notes

shareCreate

Share to create.

Return type

ShareRead

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

ClustersSharesPut

Ensure Share

Example

Path Parameters

Name
Type
Description
Notes

ctx

context.Context

context for authentication, logging, cancellation, deadlines, tracing, etc.

clusterId

string

The identifier (UUID) of the cluster.

shareId

string

The identifier (UUID) of the share.

Other Parameters

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

Name
Type
Description
Notes

shareEnsure

Update Share

Return type

ShareRead

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

Last updated