azure

package
v0.0.0-...-bf201e6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClustersAPI

type ClustersAPI struct {
	Client DBClient
}

ClustersAPI exposes the Clusters API

func (ClustersAPI) Create

Create creates a new Spark cluster

func (ClustersAPI) Delete

func (a ClustersAPI) Delete(req httpmodels.DeleteReq) error

Delete terminates a Spark cluster given its ID

func (ClustersAPI) Edit

func (a ClustersAPI) Edit(req httpmodels.EditReq) error

Edit edits the configuration of a cluster to match the provided attributes and size

func (ClustersAPI) Events

Events retrieves a list of events about the activity of a cluster

func (ClustersAPI) Get

Get retrieves the information for a cluster given its identifier

func (ClustersAPI) List

func (a ClustersAPI) List() (httpmodels.ListResp, error)

List return information about all pinned clusters, currently active clusters, up to 70 of the most recently terminated interactive clusters in the past 30 days, and up to 30 of the most recently terminated job clusters in the past 30 days

func (ClustersAPI) ListNodeTypes

func (a ClustersAPI) ListNodeTypes() (httpmodels.ListNodeTypesResp, error)

ListNodeTypes returns a list of supported Spark node types

func (ClustersAPI) PermanentDelete

func (a ClustersAPI) PermanentDelete(req httpmodels.PermanentDeleteReq) error

PermanentDelete permanently delete a cluster

func (ClustersAPI) Pin

func (a ClustersAPI) Pin(req httpmodels.PinReq) error

Pin ensure that an interactive cluster configuration is retained even after a cluster has been terminated for more than 30 days

func (ClustersAPI) Resize

func (a ClustersAPI) Resize(req httpmodels.ResizeReq) error

Resize resizes a cluster to have a desired number of workers. This will fail unless the cluster is in a RUNNING state.

func (ClustersAPI) Restart

func (a ClustersAPI) Restart(req httpmodels.RestartReq) error

Restart restart a Spark cluster given its ID. If the cluster is not in a RUNNING state, nothing will happen.

func (ClustersAPI) RuntimeVersions

func (a ClustersAPI) RuntimeVersions() (httpmodels.RuntimeVersionsResp, error)

RuntimeVersions return the list of available Runtime versions

func (ClustersAPI) Start

func (a ClustersAPI) Start(req httpmodels.StartReq) error

Start starts a terminated Spark cluster given its ID

func (ClustersAPI) Terminate

func (a ClustersAPI) Terminate(req httpmodels.DeleteReq) error

Terminate is an alias of Delete

func (ClustersAPI) Unpin

func (a ClustersAPI) Unpin(req httpmodels.UnpinReq) error

Unpin allows the cluster to eventually be removed from the list returned by the List API

type DBClient

type DBClient struct {
	Option databricks.DBClientOption
}

DBClient is the client for Azure implements DBClient

func NewDBClient

func NewDBClient(option *databricks.DBClientOption) *DBClient

func (DBClient) Clusters

func (c DBClient) Clusters() ClustersAPI

Clusters returns an instance of ClustersAPI

func (DBClient) Dbfs

func (c DBClient) Dbfs() DbfsAPI

Dbfs returns an instance of DbfsAPI

func (DBClient) Groups

func (c DBClient) Groups() GroupsAPI

Groups returns an instance of GroupAPI

func (DBClient) InstancePools

func (c DBClient) InstancePools() InstancePoolsAPI

InstancePools returns an instance of InstancePoolsAPI

func (DBClient) Jobs

func (c DBClient) Jobs() JobsAPI

Jobs returns an instance of JobsAPI

func (DBClient) Libraries

func (c DBClient) Libraries() LibrariesAPI

Libraries returns an instance of LibrariesAPI

func (DBClient) Secrets

func (c DBClient) Secrets() SecretsAPI

Secrets returns an instance of SecretsAPI

func (DBClient) Token

func (c DBClient) Token() TokenAPI

Token returns an instance of TokensAPI

func (DBClient) Workspace

func (c DBClient) Workspace() WorkspaceAPI

Workspace returns an instance of WorkspaceAPI

type DbfsAPI

type DbfsAPI struct {
	Client DBClient
}

DbfsAPI exposes the DBFS API

func (DbfsAPI) AddBlock

func (a DbfsAPI) AddBlock(req httpmodels.AddBlockReq) error

AddBlock appends a block of data to the stream specified by the input handle

func (DbfsAPI) Close

func (a DbfsAPI) Close(req httpmodels.CloseReq) error

Close closes the stream specified by the input handle

func (DbfsAPI) Create

Create opens a stream to write to a file and returns a handle to this stream

func (DbfsAPI) Delete

func (a DbfsAPI) Delete(req httpmodels.DeleteReq) error

Delete deletes the file or directory (optionally recursively delete all files in the directory)

func (DbfsAPI) GetStatus

GetStatus gets the file information of a file or directory

func (DbfsAPI) List

List lists the contents of a directory, or details of the file

func (DbfsAPI) Mkdirs

func (a DbfsAPI) Mkdirs(req httpmodels.MkdirsReq) error

Mkdirs creates the given directory and necessary parent directories if they do not exist

func (DbfsAPI) Move

func (a DbfsAPI) Move(req httpmodels.MoveReq) error

Move moves a file from one location to another location within DBFS

func (DbfsAPI) Put

func (a DbfsAPI) Put(req httpmodels.PutReq) error

Put uploads a file through the use of multipart form post

func (DbfsAPI) Read

Read returns the contents of a file

type GroupsAPI

type GroupsAPI struct {
	Client DBClient
}

GroupsAPI exposes the Groups API

func (GroupsAPI) AddMember

func (a GroupsAPI) AddMember(req httpmodels.AddMemberReq) error

AddMember adds a user or group to a group

func (GroupsAPI) Create

Create creates a new group with the given name

func (GroupsAPI) Delete

func (a GroupsAPI) Delete(deleteReq httpmodels.DeleteReq) error

Delete removes a group from this organization

func (GroupsAPI) List

func (a GroupsAPI) List() (httpmodels.ListResp, error)

List returns all of the groups in an organization

func (GroupsAPI) ListMembers

ListMembers returns all of the members of a particular group

func (GroupsAPI) ListParents

func (a GroupsAPI) ListParents(listParentsReq httpmodels.ListParentsReq) (httpmodels.ListParentsResp, error)

ListParents retrieves all groups in which a given user or group is a member

func (GroupsAPI) RemoveMember

func (a GroupsAPI) RemoveMember(removeMemberReq httpmodels.RemoveMemberReq) error

RemoveMember removes a user or group from a group

type InstancePoolsAPI

type InstancePoolsAPI struct {
	Client DBClient
}

InstancePoolsAPI exposes the InstancePools API

func (InstancePoolsAPI) Create

Create creates an instance pool

func (InstancePoolsAPI) Delete

Delete permanently deletes the instance pool.

func (InstancePoolsAPI) Edit

Edit modifies the configuration of an existing instance pool.

func (InstancePoolsAPI) Get

Get retrieves the information for an instance pool given its identifier.

func (InstancePoolsAPI) List

List returns information for all instance pools.

type JobsAPI

type JobsAPI struct {
	Client DBClient
}

JobsAPI exposes Jobs API endpoints

func (JobsAPI) Create

Create creates a new job

func (JobsAPI) Delete

func (a JobsAPI) Delete(req httpmodels.DeleteReq) error

Delete deletes a job by ID

func (JobsAPI) Get

Get gets a job by ID

func (JobsAPI) List

func (a JobsAPI) List() (httpmodels.ListResp, error)

List lists all jobs

func (JobsAPI) Reset

func (a JobsAPI) Reset(req httpmodels.ResetReq) error

Reset overwrites job settings

func (JobsAPI) RunNow

RunNow runs a job now and return the run_id of the triggered run

func (JobsAPI) RunsCancel

func (a JobsAPI) RunsCancel(req httpmodels.RunsCancelReq) error

RunsCancel cancels a run

func (JobsAPI) RunsDelete

func (a JobsAPI) RunsDelete(req httpmodels.RunsDeleteReq) error

RunsDelete deletes a non-active run. Returns an error if the run is active.

func (JobsAPI) RunsExport

RunsExport exports and retrieve the job run task

func (JobsAPI) RunsGet

RunsGet retrieve the metadata of a run

func (JobsAPI) RunsGetOutput

RunsGetOutput retrieves the output of a run

func (JobsAPI) RunsList

RunsList lists runs from most recently started to least

func (JobsAPI) RunsSubmit

RunsSubmit submit a one-time run

func (JobsAPI) Update

func (a JobsAPI) Update(req httpmodels.UpdateReq) error

Update adds, changes, or removes specific settings of an existing job

type LibrariesAPI

type LibrariesAPI struct {
	Client DBClient
}

LibrariesAPI exposes the Libraries API

func (LibrariesAPI) AllClusterStatuses

func (a LibrariesAPI) AllClusterStatuses() (httpmodels.AllClusterStatusesResp, error)

AllClusterStatuses gets the status of all libraries on all clusters

func (LibrariesAPI) ClusterStatus

ClusterStatus get the status of libraries on a cluster

func (LibrariesAPI) Install

func (a LibrariesAPI) Install(req httpmodels.InstallReq) error

Install installs libraries on a cluster

func (LibrariesAPI) Uninstall

func (a LibrariesAPI) Uninstall(req httpmodels.UninstallReq) error

Uninstall sets libraries to be uninstalled on a cluster

type SecretsAPI

type SecretsAPI struct {
	Client DBClient
}

SecretsAPI exposes the Secrets API

func (SecretsAPI) CreateSecretScope

func (a SecretsAPI) CreateSecretScope(req httpmodels.CreateSecretScopeReq) error

CreateSecretScope create an Azure Key Vault-backed or Databricks-backed scope

func (SecretsAPI) DeleteSecret

func (a SecretsAPI) DeleteSecret(req httpmodels.DeleteSecretReq) error

DeleteSecret deletes a secret depends on the type of scope backend

func (SecretsAPI) DeleteSecretACL

func (a SecretsAPI) DeleteSecretACL(req httpmodels.DeleteSecretACLReq) error

DeleteSecretACL deletes the given ACL on the given scope

func (SecretsAPI) DeleteSecretScope

func (a SecretsAPI) DeleteSecretScope(req httpmodels.DeleteSecretScopeReq) error

DeleteSecretScope deletes a secret scope

func (SecretsAPI) GetSecretACL

GetSecretACL describe the details about the given ACL, such as the group and permission

func (SecretsAPI) ListSecretACLs

ListSecretACLs lists the ACLs set on the given scope

func (SecretsAPI) ListSecretScopes

func (a SecretsAPI) ListSecretScopes() (httpmodels.ListSecretScopesResp, error)

ListSecretScopes lists all secret scopes available in the workspace

func (SecretsAPI) ListSecrets

ListSecrets lists the secret keys that are stored at this scope

func (SecretsAPI) PutSecret

func (a SecretsAPI) PutSecret(req httpmodels.PutSecretReq) error

PutSecret creates or modifies a bytes secret depends on the type of scope backend with

func (SecretsAPI) PutSecretACL

func (a SecretsAPI) PutSecretACL(req httpmodels.PutSecretACLReq) error

PutSecretACL creates or overwrites the ACL associated with the given principal (user or group) on the specified scope point

type TokenAPI

type TokenAPI struct {
	Client DBClient
}

TokenAPI exposes the Token API

func (TokenAPI) Create

Create creates and return a token

func (TokenAPI) List

func (a TokenAPI) List() (httpmodels.ListResp, error)

List lists all the valid tokens for a user-workspace pair

func (TokenAPI) Revoke

func (a TokenAPI) Revoke(req httpmodels.DeleteReq) error

Revoke revokes an access token

type WorkspaceAPI

type WorkspaceAPI struct {
	Client DBClient
}

WorkspaceAPI exposes the Workspace API

func (WorkspaceAPI) Delete

func (a WorkspaceAPI) Delete(req httpmodels.DeleteReq) error

Delete an object or a directory (and optionally recursively deletes all objects in the directory)

func (WorkspaceAPI) Export

Export a notebook or contents of an entire directory

func (WorkspaceAPI) GetStatus

Gets the status of an object or a directory

func (WorkspaceAPI) Import

func (a WorkspaceAPI) Import(req httpmodels.ImportReq) error

Import a notebook or the contents of an entire directory

func (WorkspaceAPI) List

List lists the contents of a directory, or the object if it is not a directory

func (WorkspaceAPI) Mkdirs

func (a WorkspaceAPI) Mkdirs(req httpmodels.MkdirsReq) error

Mkdirs creates the given directory and necessary parent directories if they do not exists

Directories

Path Synopsis
clusters
dbfs
groups
instance_pools
jobs
libraries
secrets
token
workspace

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL