environments

package
v0.122.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

APIs to manage environment resources.

The Environments API provides management capabilities for different types of environments including workspace-level base environments that define the environment version and dependencies to be used in serverless notebooks and jobs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseEnvironmentType

type BaseEnvironmentType string

If changed, also update estore/namespaces/defaultbaseenvironments/latest.proto

const BaseEnvironmentTypeCpu BaseEnvironmentType = `CPU`
const BaseEnvironmentTypeGpu BaseEnvironmentType = `GPU`

func (*BaseEnvironmentType) Set

func (f *BaseEnvironmentType) Set(v string) error

Set raw string value and validate it against allowed values

func (*BaseEnvironmentType) String

func (f *BaseEnvironmentType) String() string

String representation for fmt.Print

func (*BaseEnvironmentType) Type

func (f *BaseEnvironmentType) Type() string

Type always returns BaseEnvironmentType to satisfy [pflag.Value] interface

func (*BaseEnvironmentType) Values

Values returns all possible values for BaseEnvironmentType.

There is no guarantee on the order of the values in the slice.

type CreateWorkspaceBaseEnvironmentOperationInterface

type CreateWorkspaceBaseEnvironmentOperationInterface interface {

	// Wait blocks until the long-running operation is completed. If no timeout is
	// specified, this will poll indefinitely. If a timeout is provided and the operation
	// didn't finish within the timeout, this function will return an error, otherwise
	// returns successful response and any errors encountered.
	Wait(ctx context.Context, opts ...api.Option) (*WorkspaceBaseEnvironment, error)

	// Name returns the name of the long-running operation. The name is assigned
	// by the server and is unique within the service from which the operation is created.
	Name() string

	// Metadata returns metadata associated with the long-running operation.
	// If the metadata is not available, the returned metadata and error are both nil.
	Metadata() (*WorkspaceBaseEnvironmentOperationMetadata, error)

	// Done reports whether the long-running operation has completed.
	Done() (bool, error)
}

type CreateWorkspaceBaseEnvironmentRequest

type CreateWorkspaceBaseEnvironmentRequest struct {
	// A unique identifier for this request. A random UUID is recommended. This
	// request is only idempotent if a request_id is provided.
	RequestId string `json:"-" url:"request_id,omitempty"`
	// Required. The workspace base environment to create.
	WorkspaceBaseEnvironment WorkspaceBaseEnvironment `json:"workspace_base_environment"`
	// The ID to use for the workspace base environment, which will become the
	// final component of the resource name. This value should be 4-63
	// characters, and valid characters are /[a-z][0-9]-/.
	WorkspaceBaseEnvironmentId string `json:"-" url:"workspace_base_environment_id,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (CreateWorkspaceBaseEnvironmentRequest) MarshalJSON

func (s CreateWorkspaceBaseEnvironmentRequest) MarshalJSON() ([]byte, error)

func (*CreateWorkspaceBaseEnvironmentRequest) UnmarshalJSON

func (s *CreateWorkspaceBaseEnvironmentRequest) UnmarshalJSON(b []byte) error

type DatabricksServiceExceptionWithDetailsProto

type DatabricksServiceExceptionWithDetailsProto struct {
	Details []json.RawMessage `json:"details,omitempty"`

	ErrorCode ErrorCode `json:"error_code,omitempty"`

	Message string `json:"message,omitempty"`

	StackTrace string `json:"stack_trace,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

Databricks Error that is returned by all Databricks APIs.

func (DatabricksServiceExceptionWithDetailsProto) MarshalJSON

func (*DatabricksServiceExceptionWithDetailsProto) UnmarshalJSON

type DefaultWorkspaceBaseEnvironment

type DefaultWorkspaceBaseEnvironment struct {
	// The default workspace base environment for CPU compute. Format:
	// workspace-base-environments/{workspace_base_environment}
	CpuWorkspaceBaseEnvironment string `json:"cpu_workspace_base_environment,omitempty"`
	// The default workspace base environment for GPU compute. Format:
	// workspace-base-environments/{workspace_base_environment}
	GpuWorkspaceBaseEnvironment string `json:"gpu_workspace_base_environment,omitempty"`
	// The resource name of this singleton resource. Format:
	// default-workspace-base-environment
	Name string `json:"name,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

A singleton resource representing the default workspace base environment configuration. This resource contains the workspace base environments that are used as defaults for serverless notebooks and jobs in the workspace, for both CPU and GPU compute types.

func (DefaultWorkspaceBaseEnvironment) MarshalJSON

func (s DefaultWorkspaceBaseEnvironment) MarshalJSON() ([]byte, error)

func (*DefaultWorkspaceBaseEnvironment) UnmarshalJSON

func (s *DefaultWorkspaceBaseEnvironment) UnmarshalJSON(b []byte) error

type DeleteWorkspaceBaseEnvironmentRequest

type DeleteWorkspaceBaseEnvironmentRequest struct {
	// Required. The resource name of the workspace base environment to delete.
	// Format: workspace-base-environments/{workspace_base_environment}
	Name string `json:"-" url:"-"`
}

type EnvironmentsAPI

type EnvironmentsAPI struct {
	// contains filtered or unexported fields
}

APIs to manage environment resources.

The Environments API provides management capabilities for different types of environments including workspace-level base environments that define the environment version and dependencies to be used in serverless notebooks and jobs.

func NewEnvironments

func NewEnvironments(client *client.DatabricksClient) *EnvironmentsAPI

func (*EnvironmentsAPI) DeleteWorkspaceBaseEnvironment

func (a *EnvironmentsAPI) DeleteWorkspaceBaseEnvironment(ctx context.Context, request DeleteWorkspaceBaseEnvironmentRequest) error

func (*EnvironmentsAPI) GetDefaultWorkspaceBaseEnvironment

func (a *EnvironmentsAPI) GetDefaultWorkspaceBaseEnvironment(ctx context.Context, request GetDefaultWorkspaceBaseEnvironmentRequest) (*DefaultWorkspaceBaseEnvironment, error)

func (*EnvironmentsAPI) GetOperation

func (a *EnvironmentsAPI) GetOperation(ctx context.Context, request GetOperationRequest) (*Operation, error)

func (*EnvironmentsAPI) GetWorkspaceBaseEnvironment

func (a *EnvironmentsAPI) GetWorkspaceBaseEnvironment(ctx context.Context, request GetWorkspaceBaseEnvironmentRequest) (*WorkspaceBaseEnvironment, error)

func (*EnvironmentsAPI) ListWorkspaceBaseEnvironments

func (a *EnvironmentsAPI) ListWorkspaceBaseEnvironments(ctx context.Context, request ListWorkspaceBaseEnvironmentsRequest) listing.Iterator[WorkspaceBaseEnvironment]

Lists all WorkspaceBaseEnvironments in the workspace.

func (*EnvironmentsAPI) ListWorkspaceBaseEnvironmentsAll

func (a *EnvironmentsAPI) ListWorkspaceBaseEnvironmentsAll(ctx context.Context, request ListWorkspaceBaseEnvironmentsRequest) ([]WorkspaceBaseEnvironment, error)

Lists all WorkspaceBaseEnvironments in the workspace.

func (*EnvironmentsAPI) UpdateDefaultWorkspaceBaseEnvironment

func (a *EnvironmentsAPI) UpdateDefaultWorkspaceBaseEnvironment(ctx context.Context, request UpdateDefaultWorkspaceBaseEnvironmentRequest) (*DefaultWorkspaceBaseEnvironment, error)

type EnvironmentsInterface

type EnvironmentsInterface interface {
	CreateWorkspaceBaseEnvironment(ctx context.Context, request CreateWorkspaceBaseEnvironmentRequest) (CreateWorkspaceBaseEnvironmentOperationInterface, error)

	// Deletes a WorkspaceBaseEnvironment. Deleting a base environment may impact
	// linked notebooks and jobs. This operation is irreversible and should be
	// performed only when you are certain the environment is no longer needed.
	DeleteWorkspaceBaseEnvironment(ctx context.Context, request DeleteWorkspaceBaseEnvironmentRequest) error

	// Gets the default WorkspaceBaseEnvironment configuration for the workspace.
	// Returns the current default base environment settings for both CPU and GPU
	// compute.
	GetDefaultWorkspaceBaseEnvironment(ctx context.Context, request GetDefaultWorkspaceBaseEnvironmentRequest) (*DefaultWorkspaceBaseEnvironment, error)

	// Gets the status of a long-running operation. Clients can use this method to
	// poll the operation result.
	GetOperation(ctx context.Context, request GetOperationRequest) (*Operation, error)

	// Retrieves a WorkspaceBaseEnvironment by its name.
	GetWorkspaceBaseEnvironment(ctx context.Context, request GetWorkspaceBaseEnvironmentRequest) (*WorkspaceBaseEnvironment, error)

	// Lists all WorkspaceBaseEnvironments in the workspace.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListWorkspaceBaseEnvironments(ctx context.Context, request ListWorkspaceBaseEnvironmentsRequest) listing.Iterator[WorkspaceBaseEnvironment]

	// Lists all WorkspaceBaseEnvironments in the workspace.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListWorkspaceBaseEnvironmentsAll(ctx context.Context, request ListWorkspaceBaseEnvironmentsRequest) ([]WorkspaceBaseEnvironment, error)

	RefreshWorkspaceBaseEnvironment(ctx context.Context, request RefreshWorkspaceBaseEnvironmentRequest) (RefreshWorkspaceBaseEnvironmentOperationInterface, error)

	// Updates the default WorkspaceBaseEnvironment configuration for the workspace.
	// Sets the specified base environments as the workspace defaults for CPU and/or
	// GPU compute.
	UpdateDefaultWorkspaceBaseEnvironment(ctx context.Context, request UpdateDefaultWorkspaceBaseEnvironmentRequest) (*DefaultWorkspaceBaseEnvironment, error)

	UpdateWorkspaceBaseEnvironment(ctx context.Context, request UpdateWorkspaceBaseEnvironmentRequest) (UpdateWorkspaceBaseEnvironmentOperationInterface, error)
}

type EnvironmentsService deprecated

type EnvironmentsService interface {

	// Creates a new WorkspaceBaseEnvironment. This is a long-running operation.
	// The operation will asynchronously generate a materialized environment to
	// optimize dependency resolution and is only marked as done when the
	// materialized environment has been successfully generated or has failed.
	CreateWorkspaceBaseEnvironment(ctx context.Context, request CreateWorkspaceBaseEnvironmentRequest) (*Operation, error)

	// Deletes a WorkspaceBaseEnvironment. Deleting a base environment may
	// impact linked notebooks and jobs. This operation is irreversible and
	// should be performed only when you are certain the environment is no
	// longer needed.
	DeleteWorkspaceBaseEnvironment(ctx context.Context, request DeleteWorkspaceBaseEnvironmentRequest) error

	// Gets the default WorkspaceBaseEnvironment configuration for the
	// workspace. Returns the current default base environment settings for both
	// CPU and GPU compute.
	GetDefaultWorkspaceBaseEnvironment(ctx context.Context, request GetDefaultWorkspaceBaseEnvironmentRequest) (*DefaultWorkspaceBaseEnvironment, error)

	// Gets the status of a long-running operation. Clients can use this method
	// to poll the operation result.
	GetOperation(ctx context.Context, request GetOperationRequest) (*Operation, error)

	// Retrieves a WorkspaceBaseEnvironment by its name.
	GetWorkspaceBaseEnvironment(ctx context.Context, request GetWorkspaceBaseEnvironmentRequest) (*WorkspaceBaseEnvironment, error)

	// Lists all WorkspaceBaseEnvironments in the workspace.
	ListWorkspaceBaseEnvironments(ctx context.Context, request ListWorkspaceBaseEnvironmentsRequest) (*ListWorkspaceBaseEnvironmentsResponse, error)

	// Refreshes the materialized environment for a WorkspaceBaseEnvironment.
	// This is a long-running operation. The operation will asynchronously
	// regenerate the materialized environment and is only marked as done when
	// the materialized environment has been successfully generated or has
	// failed. The existing materialized environment remains available until it
	// expires.
	RefreshWorkspaceBaseEnvironment(ctx context.Context, request RefreshWorkspaceBaseEnvironmentRequest) (*Operation, error)

	// Updates the default WorkspaceBaseEnvironment configuration for the
	// workspace. Sets the specified base environments as the workspace defaults
	// for CPU and/or GPU compute.
	UpdateDefaultWorkspaceBaseEnvironment(ctx context.Context, request UpdateDefaultWorkspaceBaseEnvironmentRequest) (*DefaultWorkspaceBaseEnvironment, error)

	// Updates an existing WorkspaceBaseEnvironment. This is a long-running
	// operation. The operation will asynchronously regenerate the materialized
	// environment and is only marked as done when the materialized environment
	// has been successfully generated or has failed. The existing materialized
	// environment remains available until it expires.
	UpdateWorkspaceBaseEnvironment(ctx context.Context, request UpdateWorkspaceBaseEnvironmentRequest) (*Operation, error)
}

APIs to manage environment resources.

The Environments API provides management capabilities for different types of environments including workspace-level base environments that define the environment version and dependencies to be used in serverless notebooks and jobs.

Deprecated: Do not use this interface, it will be removed in a future version of the SDK.

type ErrorCode

type ErrorCode string

Error codes returned by Databricks APIs to indicate specific failure conditions.

const ErrorCodeAborted ErrorCode = `ABORTED`
const ErrorCodeAlreadyExists ErrorCode = `ALREADY_EXISTS`
const ErrorCodeBadRequest ErrorCode = `BAD_REQUEST`
const ErrorCodeCancelled ErrorCode = `CANCELLED`
const ErrorCodeCatalogAlreadyExists ErrorCode = `CATALOG_ALREADY_EXISTS`
const ErrorCodeCatalogDoesNotExist ErrorCode = `CATALOG_DOES_NOT_EXIST`
const ErrorCodeCatalogNotEmpty ErrorCode = `CATALOG_NOT_EMPTY`
const ErrorCodeCouldNotAcquireLock ErrorCode = `COULD_NOT_ACQUIRE_LOCK`
const ErrorCodeCustomerUnauthorized ErrorCode = `CUSTOMER_UNAUTHORIZED`
const ErrorCodeDacAlreadyExists ErrorCode = `DAC_ALREADY_EXISTS`
const ErrorCodeDacDoesNotExist ErrorCode = `DAC_DOES_NOT_EXIST`
const ErrorCodeDataLoss ErrorCode = `DATA_LOSS`
const ErrorCodeDeadlineExceeded ErrorCode = `DEADLINE_EXCEEDED`
const ErrorCodeDeploymentTimeout ErrorCode = `DEPLOYMENT_TIMEOUT`
const ErrorCodeDirectoryNotEmpty ErrorCode = `DIRECTORY_NOT_EMPTY`
const ErrorCodeDirectoryProtected ErrorCode = `DIRECTORY_PROTECTED`
const ErrorCodeDryRunFailed ErrorCode = `DRY_RUN_FAILED`
const ErrorCodeEndpointNotFound ErrorCode = `ENDPOINT_NOT_FOUND`
const ErrorCodeExternalLocationAlreadyExists ErrorCode = `EXTERNAL_LOCATION_ALREADY_EXISTS`
const ErrorCodeExternalLocationDoesNotExist ErrorCode = `EXTERNAL_LOCATION_DOES_NOT_EXIST`
const ErrorCodeFeatureDisabled ErrorCode = `FEATURE_DISABLED`
const ErrorCodeGitConflict ErrorCode = `GIT_CONFLICT`
const ErrorCodeGitRemoteError ErrorCode = `GIT_REMOTE_ERROR`
const ErrorCodeGitSensitiveTokenDetected ErrorCode = `GIT_SENSITIVE_TOKEN_DETECTED`
const ErrorCodeGitUnknownRef ErrorCode = `GIT_UNKNOWN_REF`
const ErrorCodeGitUrlNotOnAllowList ErrorCode = `GIT_URL_NOT_ON_ALLOW_LIST`
const ErrorCodeInsecurePartnerResponse ErrorCode = `INSECURE_PARTNER_RESPONSE`
const ErrorCodeInternalError ErrorCode = `INTERNAL_ERROR`
const ErrorCodeInvalidParameterValue ErrorCode = `INVALID_PARAMETER_VALUE`
const ErrorCodeInvalidState ErrorCode = `INVALID_STATE`
const ErrorCodeInvalidStateTransition ErrorCode = `INVALID_STATE_TRANSITION`
const ErrorCodeIoError ErrorCode = `IO_ERROR`
const ErrorCodeIpynbFileInRepo ErrorCode = `IPYNB_FILE_IN_REPO`
const ErrorCodeMalformedPartnerResponse ErrorCode = `MALFORMED_PARTNER_RESPONSE`
const ErrorCodeMalformedRequest ErrorCode = `MALFORMED_REQUEST`
const ErrorCodeManagedResourceGroupDoesNotExist ErrorCode = `MANAGED_RESOURCE_GROUP_DOES_NOT_EXIST`
const ErrorCodeMaxBlockSizeExceeded ErrorCode = `MAX_BLOCK_SIZE_EXCEEDED`
const ErrorCodeMaxChildNodeSizeExceeded ErrorCode = `MAX_CHILD_NODE_SIZE_EXCEEDED`
const ErrorCodeMaxListSizeExceeded ErrorCode = `MAX_LIST_SIZE_EXCEEDED`
const ErrorCodeMaxNotebookSizeExceeded ErrorCode = `MAX_NOTEBOOK_SIZE_EXCEEDED`
const ErrorCodeMaxReadSizeExceeded ErrorCode = `MAX_READ_SIZE_EXCEEDED`
const ErrorCodeMetastoreAlreadyExists ErrorCode = `METASTORE_ALREADY_EXISTS`
const ErrorCodeMetastoreDoesNotExist ErrorCode = `METASTORE_DOES_NOT_EXIST`
const ErrorCodeMetastoreNotEmpty ErrorCode = `METASTORE_NOT_EMPTY`
const ErrorCodeNotFound ErrorCode = `NOT_FOUND`
const ErrorCodeNotImplemented ErrorCode = `NOT_IMPLEMENTED`
const ErrorCodePartialDelete ErrorCode = `PARTIAL_DELETE`
const ErrorCodePermissionDenied ErrorCode = `PERMISSION_DENIED`
const ErrorCodePermissionNotPropagated ErrorCode = `PERMISSION_NOT_PROPAGATED`
const ErrorCodePrincipalDoesNotExist ErrorCode = `PRINCIPAL_DOES_NOT_EXIST`
const ErrorCodeProjectsOperationTimeout ErrorCode = `PROJECTS_OPERATION_TIMEOUT`
const ErrorCodeProviderAlreadyExists ErrorCode = `PROVIDER_ALREADY_EXISTS`
const ErrorCodeProviderDoesNotExist ErrorCode = `PROVIDER_DOES_NOT_EXIST`
const ErrorCodeProviderShareNotAccessible ErrorCode = `PROVIDER_SHARE_NOT_ACCESSIBLE`
const ErrorCodeQuotaExceeded ErrorCode = `QUOTA_EXCEEDED`
const ErrorCodeRecipientAlreadyExists ErrorCode = `RECIPIENT_ALREADY_EXISTS`
const ErrorCodeRecipientDoesNotExist ErrorCode = `RECIPIENT_DOES_NOT_EXIST`
const ErrorCodeRequestLimitExceeded ErrorCode = `REQUEST_LIMIT_EXCEEDED`
const ErrorCodeResourceAlreadyExists ErrorCode = `RESOURCE_ALREADY_EXISTS`
const ErrorCodeResourceConflict ErrorCode = `RESOURCE_CONFLICT`
const ErrorCodeResourceDoesNotExist ErrorCode = `RESOURCE_DOES_NOT_EXIST`
const ErrorCodeResourceExhausted ErrorCode = `RESOURCE_EXHAUSTED`
const ErrorCodeResourceLimitExceeded ErrorCode = `RESOURCE_LIMIT_EXCEEDED`
const ErrorCodeSchemaAlreadyExists ErrorCode = `SCHEMA_ALREADY_EXISTS`
const ErrorCodeSchemaDoesNotExist ErrorCode = `SCHEMA_DOES_NOT_EXIST`
const ErrorCodeSchemaNotEmpty ErrorCode = `SCHEMA_NOT_EMPTY`
const ErrorCodeSearchQueryTooLong ErrorCode = `SEARCH_QUERY_TOO_LONG`
const ErrorCodeSearchQueryTooShort ErrorCode = `SEARCH_QUERY_TOO_SHORT`
const ErrorCodeServiceUnderMaintenance ErrorCode = `SERVICE_UNDER_MAINTENANCE`
const ErrorCodeShareAlreadyExists ErrorCode = `SHARE_ALREADY_EXISTS`
const ErrorCodeShareDoesNotExist ErrorCode = `SHARE_DOES_NOT_EXIST`
const ErrorCodeStorageCredentialAlreadyExists ErrorCode = `STORAGE_CREDENTIAL_ALREADY_EXISTS`
const ErrorCodeStorageCredentialDoesNotExist ErrorCode = `STORAGE_CREDENTIAL_DOES_NOT_EXIST`
const ErrorCodeTableAlreadyExists ErrorCode = `TABLE_ALREADY_EXISTS`
const ErrorCodeTableDoesNotExist ErrorCode = `TABLE_DOES_NOT_EXIST`
const ErrorCodeTemporarilyUnavailable ErrorCode = `TEMPORARILY_UNAVAILABLE`
const ErrorCodeUnauthenticated ErrorCode = `UNAUTHENTICATED`
const ErrorCodeUnavailable ErrorCode = `UNAVAILABLE`
const ErrorCodeUnknown ErrorCode = `UNKNOWN`
const ErrorCodeUnparseableHttpError ErrorCode = `UNPARSEABLE_HTTP_ERROR`
const ErrorCodeWorkspaceTemporarilyUnavailable ErrorCode = `WORKSPACE_TEMPORARILY_UNAVAILABLE`

func (*ErrorCode) Set

func (f *ErrorCode) Set(v string) error

Set raw string value and validate it against allowed values

func (*ErrorCode) String

func (f *ErrorCode) String() string

String representation for fmt.Print

func (*ErrorCode) Type

func (f *ErrorCode) Type() string

Type always returns ErrorCode to satisfy [pflag.Value] interface

func (*ErrorCode) Values

func (f *ErrorCode) Values() []ErrorCode

Values returns all possible values for ErrorCode.

There is no guarantee on the order of the values in the slice.

type GetDefaultWorkspaceBaseEnvironmentRequest

type GetDefaultWorkspaceBaseEnvironmentRequest struct {
	// A static resource name of the default workspace base environment. Format:
	// default-workspace-base-environment
	Name string `json:"-" url:"-"`
}

type GetOperationRequest

type GetOperationRequest struct {
	// The name of the operation resource.
	Name string `json:"-" url:"-"`
}

type GetWorkspaceBaseEnvironmentRequest

type GetWorkspaceBaseEnvironmentRequest struct {
	// Required. The resource name of the workspace base environment to
	// retrieve. Format:
	// workspace-base-environments/{workspace_base_environment}
	Name string `json:"-" url:"-"`
}

type ListWorkspaceBaseEnvironmentsRequest

type ListWorkspaceBaseEnvironmentsRequest struct {
	// The maximum number of environments to return per page. Default is 1000.
	PageSize int `json:"-" url:"page_size,omitempty"`
	// Page token for pagination. Received from a previous
	// ListWorkspaceBaseEnvironments call.
	PageToken string `json:"-" url:"page_token,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (ListWorkspaceBaseEnvironmentsRequest) MarshalJSON

func (s ListWorkspaceBaseEnvironmentsRequest) MarshalJSON() ([]byte, error)

func (*ListWorkspaceBaseEnvironmentsRequest) UnmarshalJSON

func (s *ListWorkspaceBaseEnvironmentsRequest) UnmarshalJSON(b []byte) error

type ListWorkspaceBaseEnvironmentsResponse

type ListWorkspaceBaseEnvironmentsResponse struct {
	// Token to retrieve the next page of results. Empty if there are no more
	// results.
	NextPageToken string `json:"next_page_token,omitempty"`
	// The list of workspace base environments.
	WorkspaceBaseEnvironments []WorkspaceBaseEnvironment `json:"workspace_base_environments,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

Response message for ListWorkspaceBaseEnvironments.

func (ListWorkspaceBaseEnvironmentsResponse) MarshalJSON

func (s ListWorkspaceBaseEnvironmentsResponse) MarshalJSON() ([]byte, error)

func (*ListWorkspaceBaseEnvironmentsResponse) UnmarshalJSON

func (s *ListWorkspaceBaseEnvironmentsResponse) UnmarshalJSON(b []byte) error

type Operation

type Operation struct {
	// If the value is `false`, it means the operation is still in progress. If
	// `true`, the operation is completed, and either `error` or `response` is
	// available.
	Done bool `json:"done,omitempty"`
	// The error result of the operation in case of failure or cancellation.
	Error *DatabricksServiceExceptionWithDetailsProto `json:"error,omitempty"`
	// Service-specific metadata associated with the operation. It typically
	// contains progress information and common metadata such as create time.
	// Some services might not provide such metadata.
	Metadata json.RawMessage `json:"metadata,omitempty"`
	// The server-assigned name, which is only unique within the same service
	// that originally returns it. If you use the default HTTP mapping, the
	// `name` should be a resource name ending with `operations/{unique_id}`.
	Name string `json:"name,omitempty"`
	// The normal, successful response of the operation.
	Response json.RawMessage `json:"response,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

This resource represents a long-running operation that is the result of a network API call.

func (Operation) MarshalJSON

func (s Operation) MarshalJSON() ([]byte, error)

func (*Operation) UnmarshalJSON

func (s *Operation) UnmarshalJSON(b []byte) error

type RefreshWorkspaceBaseEnvironmentOperationInterface

type RefreshWorkspaceBaseEnvironmentOperationInterface interface {

	// Wait blocks until the long-running operation is completed. If no timeout is
	// specified, this will poll indefinitely. If a timeout is provided and the operation
	// didn't finish within the timeout, this function will return an error, otherwise
	// returns successful response and any errors encountered.
	Wait(ctx context.Context, opts ...api.Option) (*WorkspaceBaseEnvironment, error)

	// Name returns the name of the long-running operation. The name is assigned
	// by the server and is unique within the service from which the operation is created.
	Name() string

	// Metadata returns metadata associated with the long-running operation.
	// If the metadata is not available, the returned metadata and error are both nil.
	Metadata() (*WorkspaceBaseEnvironmentOperationMetadata, error)

	// Done reports whether the long-running operation has completed.
	Done() (bool, error)
}

type RefreshWorkspaceBaseEnvironmentRequest

type RefreshWorkspaceBaseEnvironmentRequest struct {
	// Required. The resource name of the workspace base environment to delete.
	// Format: workspace-base-environments/{workspace_base_environment}
	Name string `json:"-" url:"-"`
}

Request message for RefreshWorkspaceBaseEnvironments.

type UpdateDefaultWorkspaceBaseEnvironmentRequest

type UpdateDefaultWorkspaceBaseEnvironmentRequest struct {
	// Required. The default workspace base environment configuration to update.
	DefaultWorkspaceBaseEnvironment DefaultWorkspaceBaseEnvironment `json:"default_workspace_base_environment"`
	// The resource name of this singleton resource. Format:
	// default-workspace-base-environment
	Name string `json:"-" url:"-"`
	// Field mask specifying which fields to update. Use comma as the separator
	// for multiple fields (no space). The special value '*' indicates that all
	// fields should be updated (full replacement). Valid field paths:
	// cpu_workspace_base_environment, gpu_workspace_base_environment
	//
	// To unset one or both defaults, include the field path(s) in the mask and
	// omit them from the request body. To unset both, you must list both paths
	// explicitly — the wildcard '*' cannot be used to unset fields.
	UpdateMask fieldmask.FieldMask `json:"-" url:"update_mask"`
}

type UpdateWorkspaceBaseEnvironmentOperationInterface

type UpdateWorkspaceBaseEnvironmentOperationInterface interface {

	// Wait blocks until the long-running operation is completed. If no timeout is
	// specified, this will poll indefinitely. If a timeout is provided and the operation
	// didn't finish within the timeout, this function will return an error, otherwise
	// returns successful response and any errors encountered.
	Wait(ctx context.Context, opts ...api.Option) (*WorkspaceBaseEnvironment, error)

	// Name returns the name of the long-running operation. The name is assigned
	// by the server and is unique within the service from which the operation is created.
	Name() string

	// Metadata returns metadata associated with the long-running operation.
	// If the metadata is not available, the returned metadata and error are both nil.
	Metadata() (*WorkspaceBaseEnvironmentOperationMetadata, error)

	// Done reports whether the long-running operation has completed.
	Done() (bool, error)
}

type UpdateWorkspaceBaseEnvironmentRequest

type UpdateWorkspaceBaseEnvironmentRequest struct {
	Name string `json:"-" url:"-"`
	// Required. The workspace base environment with updated fields. The name
	// field is used to identify the environment to update.
	WorkspaceBaseEnvironment WorkspaceBaseEnvironment `json:"workspace_base_environment"`
}

type WorkspaceBaseEnvironment

type WorkspaceBaseEnvironment struct {
	// The type of base environment (CPU or GPU).
	BaseEnvironmentType BaseEnvironmentType `json:"base_environment_type,omitempty"`
	// Timestamp when the environment was created.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// User ID of the creator.
	CreatorUserId string `json:"creator_user_id,omitempty"`
	// Human-readable display name for the workspace base environment.
	DisplayName string `json:"display_name"`
	// The WSFS or UC Volumes path to the environment YAML file.
	Filepath string `json:"filepath,omitempty"`
	// Whether this is the default environment for the workspace.
	IsDefault bool `json:"is_default,omitempty"`
	// User ID of the last user who updated the environment.
	LastUpdatedUserId string `json:"last_updated_user_id,omitempty"`
	// Status message providing additional details about the environment status.
	Message string `json:"message,omitempty"`
	// The resource name of the workspace base environment. Format:
	// workspace-base-environments/{workspace-base-environment}
	Name string `json:"name,omitempty"`
	// The status of the materialized workspace base environment.
	Status WorkspaceBaseEnvironmentCacheStatus `json:"status,omitempty"`
	// Timestamp when the environment was last updated.
	UpdateTime *time.Time `json:"update_time,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

A WorkspaceBaseEnvironment defines a workspace-level environment configuration consisting of an environment version and a list of dependencies.

func (WorkspaceBaseEnvironment) MarshalJSON

func (s WorkspaceBaseEnvironment) MarshalJSON() ([]byte, error)

func (*WorkspaceBaseEnvironment) UnmarshalJSON

func (s *WorkspaceBaseEnvironment) UnmarshalJSON(b []byte) error

type WorkspaceBaseEnvironmentCacheStatus

type WorkspaceBaseEnvironmentCacheStatus string

Status of the environment materialization.

const WorkspaceBaseEnvironmentCacheStatusCreated WorkspaceBaseEnvironmentCacheStatus = `CREATED`
const WorkspaceBaseEnvironmentCacheStatusExpired WorkspaceBaseEnvironmentCacheStatus = `EXPIRED`
const WorkspaceBaseEnvironmentCacheStatusFailed WorkspaceBaseEnvironmentCacheStatus = `FAILED`
const WorkspaceBaseEnvironmentCacheStatusInvalid WorkspaceBaseEnvironmentCacheStatus = `INVALID`
const WorkspaceBaseEnvironmentCacheStatusPending WorkspaceBaseEnvironmentCacheStatus = `PENDING`
const WorkspaceBaseEnvironmentCacheStatusRefreshing WorkspaceBaseEnvironmentCacheStatus = `REFRESHING`

func (*WorkspaceBaseEnvironmentCacheStatus) Set

Set raw string value and validate it against allowed values

func (*WorkspaceBaseEnvironmentCacheStatus) String

String representation for fmt.Print

func (*WorkspaceBaseEnvironmentCacheStatus) Type

Type always returns WorkspaceBaseEnvironmentCacheStatus to satisfy [pflag.Value] interface

func (*WorkspaceBaseEnvironmentCacheStatus) Values

Values returns all possible values for WorkspaceBaseEnvironmentCacheStatus.

There is no guarantee on the order of the values in the slice.

type WorkspaceBaseEnvironmentOperationMetadata

type WorkspaceBaseEnvironmentOperationMetadata struct {
}

Metadata for the WorkspaceBaseEnvironment long-running operations. This message tracks the progress of the workspace base environment long-running process.

Jump to

Keyboard shortcuts

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