Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) CreateNFSCluster(ctx context.Context, d *schema.ResourceData) (sdk.ClusterRead, *sdk.APIResponse, error)
- func (c *Client) CreateNFSShare(ctx context.Context, d *schema.ResourceData) (sdk.ShareRead, *sdk.APIResponse, error)
- func (c *Client) DeleteNFSCluster(ctx context.Context, d *schema.ResourceData) (*sdk.APIResponse, error)
- func (c *Client) DeleteNFSShare(ctx context.Context, clusterID, shareID string, location string) (*sdk.APIResponse, error)
- func (c *Client) GetNFSClusterByID(ctx context.Context, id string, location string) (sdk.ClusterRead, *sdk.APIResponse, error)
- func (c *Client) GetNFSShareByID(ctx context.Context, clusterID, shareID string, location string) (sdk.ShareRead, *sdk.APIResponse, error)
- func (c *Client) IsClusterDeleted(ctx context.Context, d *schema.ResourceData) (bool, error)
- func (c *Client) IsClusterReady(ctx context.Context, d *schema.ResourceData) (bool, error)
- func (c *Client) ListNFSClusters(ctx context.Context, d *schema.ResourceData) (sdk.ClusterReadList, *sdk.APIResponse, error)
- func (c *Client) ListNFSShares(ctx context.Context, d *schema.ResourceData) (sdk.ShareReadList, *sdk.APIResponse, error)
- func (c *Client) Location(location string) *Client
- func (c *Client) SetNFSClusterData(d *schema.ResourceData, cluster sdk.ClusterRead) error
- func (c *Client) SetNFSShareData(d *schema.ResourceData, share sdk.ShareRead) error
- func (c *Client) UpdateNFSCluster(ctx context.Context, d *schema.ResourceData) (sdk.ClusterRead, *sdk.APIResponse, error)
- func (c *Client) UpdateNFSShare(ctx context.Context, d *schema.ResourceData) (sdk.ShareRead, *sdk.APIResponse, error)
Constants ¶
This section is empty.
Variables ¶
var ValidNFSLocations = []string{"de/fra", "de/txl"}
ValidNFSLocations is a list of valid locations for the Network File Storage Cluster.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a wrapper for the NFS SDK
func NewClient ¶
func NewClient(username, password, token, url, version, terraformVersion string, insecure bool) *Client
NewClient returns a new NFS client
func (*Client) CreateNFSCluster ¶
func (c *Client) CreateNFSCluster(ctx context.Context, d *schema.ResourceData) (sdk.ClusterRead, *sdk.APIResponse, error)
CreateNFSCluster creates a new cluster
func (*Client) CreateNFSShare ¶
func (c *Client) CreateNFSShare(ctx context.Context, d *schema.ResourceData) (sdk.ShareRead, *sdk.APIResponse, error)
CreateNFSShare creates a new share
func (*Client) DeleteNFSCluster ¶
func (c *Client) DeleteNFSCluster(ctx context.Context, d *schema.ResourceData) (*sdk.APIResponse, error)
DeleteNFSCluster deletes a cluster given an ID
func (*Client) DeleteNFSShare ¶
func (c *Client) DeleteNFSShare(ctx context.Context, clusterID, shareID string, location string) (*sdk.APIResponse, error)
DeleteNFSShare deletes a share given an ID
func (*Client) GetNFSClusterByID ¶
func (c *Client) GetNFSClusterByID(ctx context.Context, id string, location string) (sdk.ClusterRead, *sdk.APIResponse, error)
GetNFSClusterByID returns a cluster given an ID
func (*Client) GetNFSShareByID ¶
func (c *Client) GetNFSShareByID(ctx context.Context, clusterID, shareID string, location string) (sdk.ShareRead, *sdk.APIResponse, error)
GetNFSShareByID returns a share given an ID
func (*Client) IsClusterDeleted ¶
IsClusterDeleted checks if the cluster is deleted
func (*Client) IsClusterReady ¶
IsClusterReady checks if the cluster is ready
func (*Client) ListNFSClusters ¶
func (c *Client) ListNFSClusters(ctx context.Context, d *schema.ResourceData) (sdk.ClusterReadList, *sdk.APIResponse, error)
ListNFSClusters returns a list of all clusters
func (*Client) ListNFSShares ¶
func (c *Client) ListNFSShares(ctx context.Context, d *schema.ResourceData) (sdk.ShareReadList, *sdk.APIResponse, error)
ListNFSShares returns a list of all shares
func (*Client) Location ¶
Location sets the location of the NFS client which modifies the Host URL:
- de/fra: https://nfs.de-fra.ionos.com
- de/txl: https://nfs.de-txl.ionos.com
func (*Client) SetNFSClusterData ¶
func (c *Client) SetNFSClusterData(d *schema.ResourceData, cluster sdk.ClusterRead) error
SetNFSClusterData sets the data of the cluster in the terraform resource
func (*Client) SetNFSShareData ¶
SetNFSShareData sets data from the SDK share to the resource data
func (*Client) UpdateNFSCluster ¶
func (c *Client) UpdateNFSCluster(ctx context.Context, d *schema.ResourceData) (sdk.ClusterRead, *sdk.APIResponse, error)
UpdateNFSCluster updates a cluster given an ID or creates a new one if it doesn't exist
func (*Client) UpdateNFSShare ¶
func (c *Client) UpdateNFSShare(ctx context.Context, d *schema.ResourceData) (sdk.ShareRead, *sdk.APIResponse, error)
UpdateNFSShare updates an existing share