Help us shape the future of Go! Take the 2026 Go Developer Survey

computemigrations

package
v0.192.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Manage migrations of Classic compute workloads to Serverless.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApproveMigrationExecutionRequest

type ApproveMigrationExecutionRequest struct {
	// Optional free-text feedback or instructions the user provides along with
	// the approval, carried into the next stage of the migration.
	AdditionalFeedback string `json:"additional_feedback,omitempty"`
	// Optional resource version for optimistic concurrency control. If
	// supplied, it must match the current server value.
	Etag string `json:"etag,omitempty"`
	// The ID of the migration to approve for execution.
	MigrationId string `json:"-" url:"-"`

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

A request to approve migration execution at the MIGRATION_REVIEW gate.

func (ApproveMigrationExecutionRequest) MarshalJSON

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

func (*ApproveMigrationExecutionRequest) UnmarshalJSON

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

type ApproveMigrationTranslationRequest

type ApproveMigrationTranslationRequest struct {
	// Optional free-text feedback or instructions the user provides along with
	// the approval, carried into the next stage of the migration.
	AdditionalFeedback string `json:"additional_feedback,omitempty"`
	// Optional resource version for optimistic concurrency control. If
	// supplied, it must match the current server value.
	Etag string `json:"etag,omitempty"`
	// The ID of the migration to approve.
	MigrationId string `json:"-" url:"-"`

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

A request to approve the working copy at the TRANSLATION_READY gate.

func (ApproveMigrationTranslationRequest) MarshalJSON

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

func (*ApproveMigrationTranslationRequest) UnmarshalJSON

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

type BakingConfig

type BakingConfig struct {
	// Number of successful production runs required before the migration
	// reaches MIGRATION_COMPLETE. Default applied by the server (configurable).
	RunCount int `json:"run_count,omitempty"`
	// Maximum baking window duration in hours. If the required run_count has
	// not been reached within this window, the migration transitions to FAILED.
	// Default applied by the server (configurable).
	TimeWindowHours int `json:"time_window_hours,omitempty"`

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

Configuration for the baking window (post-execution production monitoring).

func (BakingConfig) MarshalJSON

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

func (*BakingConfig) UnmarshalJSON

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

type BakingReport

type BakingReport struct {
	// Number of successful runs.
	SuccessfulRuns int `json:"successful_runs,omitempty"`
	// Number of runs observed during the baking window.
	TotalRuns int `json:"total_runs,omitempty"`

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

Summary of baking metrics after the baking window completes.

func (BakingReport) MarshalJSON

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

func (*BakingReport) UnmarshalJSON

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

type CancelMigrationRequest

type CancelMigrationRequest struct {
	// Optional free-text reason for the cancellation.
	CancellationReason string `json:"cancellation_reason,omitempty"`
	// Optional resource version for optimistic concurrency control. If
	// supplied, it must match the current server value.
	Etag string `json:"etag,omitempty"`
	// The ID of the migration to cancel.
	MigrationId string `json:"-" url:"-"`

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

A request to cancel a migration from any non-terminal state.

func (CancelMigrationRequest) MarshalJSON

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

func (*CancelMigrationRequest) UnmarshalJSON

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

type ComputeMigrationsAPI

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

Manage migrations of Classic compute workloads to Serverless.

func NewComputeMigrations

func NewComputeMigrations(client *client.DatabricksClient) *ComputeMigrationsAPI

func (*ComputeMigrationsAPI) ApproveMigrationExecution

func (a *ComputeMigrationsAPI) ApproveMigrationExecution(ctx context.Context, request ApproveMigrationExecutionRequest) (*Migration, error)

func (*ComputeMigrationsAPI) ApproveMigrationTranslation

func (a *ComputeMigrationsAPI) ApproveMigrationTranslation(ctx context.Context, request ApproveMigrationTranslationRequest) (*Migration, error)

func (*ComputeMigrationsAPI) CancelMigration

func (a *ComputeMigrationsAPI) CancelMigration(ctx context.Context, request CancelMigrationRequest) (*Migration, error)

func (*ComputeMigrationsAPI) Create

func (a *ComputeMigrationsAPI) Create(ctx context.Context, request CreateMigrationRequest) (*Migration, error)

func (*ComputeMigrationsAPI) Delete

func (a *ComputeMigrationsAPI) Delete(ctx context.Context, request DeleteMigrationRequest) (*Migration, error)

func (*ComputeMigrationsAPI) Get

func (a *ComputeMigrationsAPI) Get(ctx context.Context, request GetMigrationRequest) (*Migration, error)

func (*ComputeMigrationsAPI) List

func (a *ComputeMigrationsAPI) List(ctx context.Context, request ListMigrationsRequest) listing.Iterator[Migration]

Lists migrations in the caller's workspace, ordered by migration ID, with cursor-based pagination and filtering by asset type and state.

Eventually consistent: results are read from a cache, and pagination is not a point-in-time snapshot, so a migration created during a List may not appear until a subsequent one.

func (*ComputeMigrationsAPI) ListAll

func (a *ComputeMigrationsAPI) ListAll(ctx context.Context, request ListMigrationsRequest) ([]Migration, error)

Lists migrations in the caller's workspace, ordered by migration ID, with cursor-based pagination and filtering by asset type and state.

Eventually consistent: results are read from a cache, and pagination is not a point-in-time snapshot, so a migration created during a List may not appear until a subsequent one.

func (*ComputeMigrationsAPI) RejectMigrationExecution

func (a *ComputeMigrationsAPI) RejectMigrationExecution(ctx context.Context, request RejectMigrationExecutionRequest) (*Migration, error)

func (*ComputeMigrationsAPI) RejectMigrationTranslation

func (a *ComputeMigrationsAPI) RejectMigrationTranslation(ctx context.Context, request RejectMigrationTranslationRequest) (*Migration, error)

type ComputeMigrationsInterface

type ComputeMigrationsInterface interface {

	// Approves migration execution at the MIGRATION_REVIEW gate, advancing to
	// execution.
	//
	// Valid only when the migration is in MIGRATION_REVIEW. If supplied, the `etag`
	// must match the current server value.
	//
	// Returns NOT_FOUND if the migration does not exist. Returns
	// FAILED_PRECONDITION if the migration is not in MIGRATION_REVIEW. Returns
	// ABORTED if the etag does not match the current resource version.
	ApproveMigrationExecution(ctx context.Context, request ApproveMigrationExecutionRequest) (*Migration, error)

	// Approves the working copy at the TRANSLATION_READY gate. If the migration was
	// created with `run_validation`, the working copy is then run to verify it
	// executes successfully before the migration is presented for execution review;
	// otherwise it advances straight to MIGRATION_REVIEW.
	//
	// Valid only when the migration is in TRANSLATION_READY. If supplied, the
	// `etag` must match the current server value.
	//
	// Returns NOT_FOUND if the migration does not exist. Returns
	// FAILED_PRECONDITION if the migration is not in TRANSLATION_READY. Returns
	// ABORTED if the etag does not match the current resource version.
	ApproveMigrationTranslation(ctx context.Context, request ApproveMigrationTranslationRequest) (*Migration, error)

	// Cancels the migration, transitioning it to CANCELLED.
	//
	// Valid from any non-terminal state, unlike the review-gate transitions, which
	// each require a specific state. Any in-flight agent work is abandoned and the
	// migration stops advancing. The resource is retained for auditability.
	//
	// Returns NOT_FOUND if the migration does not exist. Returns
	// FAILED_PRECONDITION if the migration is already in a terminal state. Returns
	// ABORTED if the etag does not match the current resource version.
	CancelMigration(ctx context.Context, request CancelMigrationRequest) (*Migration, error)

	// Creates a new migration for a Classic compute asset.
	//
	// The migration is created in PLANNING_PENDING and advances through the state
	// machine as planning work is scheduled. The caller must have appropriate
	// permissions: workspace admin for infrastructure-scoped migrations, job
	// owner/admin for individual workload migrations.
	//
	// At most one migration may hold an asset. Returns ALREADY_EXISTS if the asset
	// has a migration in flight, or one that already migrated it successfully; a
	// migration that ended without succeeding, or was deleted, releases the asset
	// so it can be migrated again. Returns INVALID_PARAMETER_VALUE if the asset is
	// not eligible for migration.
	Create(ctx context.Context, request CreateMigrationRequest) (*Migration, error)

	// Deletes a migration (soft-delete).
	//
	// Allowed from any state. Deleting a migration marks the record deleted only
	// — it does not roll back a migration that already ran, and resources created
	// during the migration are not cleaned up. The migration resource is retained
	// for auditability. To stop an in-flight migration (agent teardown, transition
	// to CANCELLED), use CancelMigration instead.
	//
	// Returns NOT_FOUND if the migration does not exist, or was already deleted: a
	// deleted migration is hidden from every method (Get, Update, List, and
	// Delete), so it cannot be deleted again. Returns ABORTED if a supplied
	// nonempty request etag does not match the resource version.
	Delete(ctx context.Context, request DeleteMigrationRequest) (*Migration, error)

	// Retrieves a migration by its ID.
	//
	// Returns the current state, configuration, and output artifacts of the
	// migration. Use this to poll migration progress or inspect artifacts after
	// state transitions. Returns NOT_FOUND if the migration does not exist in the
	// caller's workspace.
	Get(ctx context.Context, request GetMigrationRequest) (*Migration, error)

	// Lists migrations in the caller's workspace, ordered by migration ID, with
	// cursor-based pagination and filtering by asset type and state.
	//
	// Eventually consistent: results are read from a cache, and pagination is not a
	// point-in-time snapshot, so a migration created during a List may not appear
	// until a subsequent one.
	//
	// This method is generated by Databricks SDK Code Generator.
	List(ctx context.Context, request ListMigrationsRequest) listing.Iterator[Migration]

	// Lists migrations in the caller's workspace, ordered by migration ID, with
	// cursor-based pagination and filtering by asset type and state.
	//
	// Eventually consistent: results are read from a cache, and pagination is not a
	// point-in-time snapshot, so a migration created during a List may not appear
	// until a subsequent one.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListAll(ctx context.Context, request ListMigrationsRequest) ([]Migration, error)

	// Rejects migration execution at the MIGRATION_REVIEW gate, sending the
	// migration to REVISION_PENDING to loop back for re-planning.
	//
	// Valid only when the migration is in MIGRATION_REVIEW. If supplied, the `etag`
	// must match the current server value.
	//
	// Returns NOT_FOUND if the migration does not exist. Returns
	// FAILED_PRECONDITION if the migration is not in MIGRATION_REVIEW. Returns
	// ABORTED if the etag does not match the current resource version.
	RejectMigrationExecution(ctx context.Context, request RejectMigrationExecutionRequest) (*Migration, error)

	// Rejects the working copy at the TRANSLATION_READY gate, sending the migration
	// to REVISION_PENDING to loop back for re-planning.
	//
	// Valid only when the migration is in TRANSLATION_READY. If supplied, the
	// `etag` must match the current server value.
	//
	// Returns NOT_FOUND if the migration does not exist. Returns
	// FAILED_PRECONDITION if the migration is not in TRANSLATION_READY. Returns
	// ABORTED if the etag does not match the current resource version.
	RejectMigrationTranslation(ctx context.Context, request RejectMigrationTranslationRequest) (*Migration, error)
}

type ComputeMigrationsService deprecated

type ComputeMigrationsService interface {

	// Approves migration execution at the MIGRATION_REVIEW gate, advancing to
	// execution.
	//
	// Valid only when the migration is in MIGRATION_REVIEW. If supplied, the
	// `etag` must match the current server value.
	//
	// Returns NOT_FOUND if the migration does not exist. Returns
	// FAILED_PRECONDITION if the migration is not in MIGRATION_REVIEW. Returns
	// ABORTED if the etag does not match the current resource version.
	ApproveMigrationExecution(ctx context.Context, request ApproveMigrationExecutionRequest) (*Migration, error)

	// Approves the working copy at the TRANSLATION_READY gate. If the migration
	// was created with `run_validation`, the working copy is then run to verify
	// it executes successfully before the migration is presented for execution
	// review; otherwise it advances straight to MIGRATION_REVIEW.
	//
	// Valid only when the migration is in TRANSLATION_READY. If supplied, the
	// `etag` must match the current server value.
	//
	// Returns NOT_FOUND if the migration does not exist. Returns
	// FAILED_PRECONDITION if the migration is not in TRANSLATION_READY. Returns
	// ABORTED if the etag does not match the current resource version.
	ApproveMigrationTranslation(ctx context.Context, request ApproveMigrationTranslationRequest) (*Migration, error)

	// Cancels the migration, transitioning it to CANCELLED.
	//
	// Valid from any non-terminal state, unlike the review-gate transitions,
	// which each require a specific state. Any in-flight agent work is
	// abandoned and the migration stops advancing. The resource is retained for
	// auditability.
	//
	// Returns NOT_FOUND if the migration does not exist. Returns
	// FAILED_PRECONDITION if the migration is already in a terminal state.
	// Returns ABORTED if the etag does not match the current resource version.
	CancelMigration(ctx context.Context, request CancelMigrationRequest) (*Migration, error)

	// Creates a new migration for a Classic compute asset.
	//
	// The migration is created in PLANNING_PENDING and advances through the
	// state machine as planning work is scheduled. The caller must have
	// appropriate permissions: workspace admin for infrastructure-scoped
	// migrations, job owner/admin for individual workload migrations.
	//
	// At most one migration may hold an asset. Returns ALREADY_EXISTS if the
	// asset has a migration in flight, or one that already migrated it
	// successfully; a migration that ended without succeeding, or was deleted,
	// releases the asset so it can be migrated again. Returns
	// INVALID_PARAMETER_VALUE if the asset is not eligible for migration.
	Create(ctx context.Context, request CreateMigrationRequest) (*Migration, error)

	// Deletes a migration (soft-delete).
	//
	// Allowed from any state. Deleting a migration marks the record deleted
	// only — it does not roll back a migration that already ran, and
	// resources created during the migration are not cleaned up. The migration
	// resource is retained for auditability. To stop an in-flight migration
	// (agent teardown, transition to CANCELLED), use CancelMigration instead.
	//
	// Returns NOT_FOUND if the migration does not exist, or was already
	// deleted: a deleted migration is hidden from every method (Get, Update,
	// List, and Delete), so it cannot be deleted again. Returns ABORTED if a
	// supplied nonempty request etag does not match the resource version.
	Delete(ctx context.Context, request DeleteMigrationRequest) (*Migration, error)

	// Retrieves a migration by its ID.
	//
	// Returns the current state, configuration, and output artifacts of the
	// migration. Use this to poll migration progress or inspect artifacts after
	// state transitions. Returns NOT_FOUND if the migration does not exist in
	// the caller's workspace.
	Get(ctx context.Context, request GetMigrationRequest) (*Migration, error)

	// Lists migrations in the caller's workspace, ordered by migration ID, with
	// cursor-based pagination and filtering by asset type and state.
	//
	// Eventually consistent: results are read from a cache, and pagination is
	// not a point-in-time snapshot, so a migration created during a List may
	// not appear until a subsequent one.
	List(ctx context.Context, request ListMigrationsRequest) (*ListMigrationsResponse, error)

	// Rejects migration execution at the MIGRATION_REVIEW gate, sending the
	// migration to REVISION_PENDING to loop back for re-planning.
	//
	// Valid only when the migration is in MIGRATION_REVIEW. If supplied, the
	// `etag` must match the current server value.
	//
	// Returns NOT_FOUND if the migration does not exist. Returns
	// FAILED_PRECONDITION if the migration is not in MIGRATION_REVIEW. Returns
	// ABORTED if the etag does not match the current resource version.
	RejectMigrationExecution(ctx context.Context, request RejectMigrationExecutionRequest) (*Migration, error)

	// Rejects the working copy at the TRANSLATION_READY gate, sending the
	// migration to REVISION_PENDING to loop back for re-planning.
	//
	// Valid only when the migration is in TRANSLATION_READY. If supplied, the
	// `etag` must match the current server value.
	//
	// Returns NOT_FOUND if the migration does not exist. Returns
	// FAILED_PRECONDITION if the migration is not in TRANSLATION_READY. Returns
	// ABORTED if the etag does not match the current resource version.
	RejectMigrationTranslation(ctx context.Context, request RejectMigrationTranslationRequest) (*Migration, error)
}

Manage migrations of Classic compute workloads to Serverless.

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

type CreateMigrationRequest

type CreateMigrationRequest struct {
	// The migration to create. The server generates `migration_id` and sets
	// `state` to PLANNING_PENDING. Required fields: `asset_type`, `asset_uri`.
	Migration Migration `json:"migration"`
	// Client-generated request ID for idempotent request deduplication. The
	// server de-duplicates requests with the same request_id for at least 24
	// hours, returning the existing migration instead of creating a duplicate.
	RequestId string `json:"-" url:"request_id,omitempty"`

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

func (CreateMigrationRequest) MarshalJSON

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

func (*CreateMigrationRequest) UnmarshalJSON

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

type DeleteMigrationRequest

type DeleteMigrationRequest struct {
	// If nonempty, must match the current resource etag or the request fails
	// with ABORTED.
	Etag string `json:"-" url:"etag,omitempty"`
	// The ID of the migration to cancel.
	MigrationId string `json:"-" url:"-"`

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

func (DeleteMigrationRequest) MarshalJSON

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

func (*DeleteMigrationRequest) UnmarshalJSON

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

type GetMigrationRequest

type GetMigrationRequest struct {
	// The ID of the migration to retrieve.
	MigrationId string `json:"-" url:"-"`
}

func (*GetMigrationRequest) UnmarshalJSON

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

type ListMigrationsRequest

type ListMigrationsRequest struct {
	// Filter by asset type.
	AssetType MigrationAssetType `json:"-" url:"asset_type,omitempty"`
	// Maximum number of migrations to return. Default: 50, maximum: 1000.
	PageSize int `json:"-" url:"page_size,omitempty"`
	// Page token from a previous ListMigrations call. When paginating, all
	// other parameters must match the call that provided the page token.
	PageToken string `json:"-" url:"page_token,omitempty"`
	// Filter by migration state. Returns migrations in any of the specified
	// states.
	States []MigrationState `json:"-" url:"states,omitempty"`

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

func (ListMigrationsRequest) MarshalJSON

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

func (*ListMigrationsRequest) UnmarshalJSON

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

type ListMigrationsResponse

type ListMigrationsResponse struct {
	// The migrations matching the request filters.
	Migrations []Migration `json:"migrations,omitempty"`
	// Token for the next page. Omitted if there are no more results.
	NextPageToken string `json:"next_page_token,omitempty"`

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

Response containing a paginated list of migrations matching the request filters.

func (ListMigrationsResponse) MarshalJSON

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

func (*ListMigrationsResponse) UnmarshalJSON

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

type Migration

type Migration struct {
	// Type of Classic compute asset being migrated. Cannot be changed after
	// creation.
	AssetType MigrationAssetType `json:"asset_type"`
	// URI of the source asset (e.g., "jobs/12345"). Cannot be changed after
	// creation.
	AssetUri string `json:"asset_uri"`
	// When true, the server skips the translation review (TRANSLATION_READY)
	// instead of waiting for an explicit ApproveMigrationTranslation.
	// MIGRATION_REVIEW is never skipped. Unset/false means the translation
	// review requires explicit user action. Set at creation; cannot be changed
	// afterward. Does not suppress cancellation or terminal failures.
	AutoApprove bool `json:"auto_approve,omitempty"`
	// Baking window configuration. Mutable via UpdateMigration before baking
	// starts.
	BakingConfig *BakingConfig `json:"baking_config,omitempty"`
	// Summary of baking metrics after the baking window completes.
	BakingReport *BakingReport `json:"baking_report,omitempty"`
	// Timestamp when the migration was created.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// Resource version for optimistic concurrency control. Clients read this
	// from GetMigration or ListMigrations and pass it back as the request
	// `etag` on update, delete, approve, reject, and cancel methods.
	Etag string `json:"etag,omitempty"`
	// The user who initiated this migration and their role. Set at creation.
	Initiator *MigrationInitiator `json:"initiator,omitempty"`
	// Server-generated unique identifier for this migration.
	MigrationId string `json:"migration_id,omitempty"`
	// Agent-produced planning report, presented to the user at the review
	// gates.
	MigrationReport *MigrationReport `json:"migration_report,omitempty"`
	// When true, Databricks runs the working copy to validate it after the
	// translation review. Unset/false skips the run, so the migration goes from
	// the translation review straight to execution review. Whether the
	// translation review waits for the user is controlled by `auto_approve`,
	// not this field. Set at creation; cannot be changed afterward.
	RunValidation bool `json:"run_validation,omitempty"`
	// Current state of the migration in the state machine. Managed by the
	// server.
	State MigrationState `json:"state,omitempty"`
	// History of state transitions, ordered chronologically. Each entry records
	// the state entered and the timestamp of the transition.
	StateHistory []MigrationStateTransition `json:"state_history,omitempty"`
	// Agent-produced validation results from sandbox execution.
	ValidationReport *ValidationReport `json:"validation_report,omitempty"`

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

A persistent object tracking the full lifecycle of migrating one Classic compute asset to Serverless. Each Migration has a well-defined state machine and is the unit of orchestration, approval, and rollback.

func (Migration) MarshalJSON

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

func (*Migration) UnmarshalJSON

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

type MigrationAsset

type MigrationAsset struct {
	// Type of asset this working copy represents.
	AssetType MigrationAssetType `json:"asset_type,omitempty"`
	// Identifier of the asset.
	Id string `json:"id,omitempty"`
	// Link to the asset, e.g. "jobs/12345".
	Uri string `json:"uri,omitempty"`

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

A working copy (job or notebook) the migration agent created for the migration.

func (MigrationAsset) MarshalJSON

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

func (*MigrationAsset) UnmarshalJSON

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

type MigrationAssetType

type MigrationAssetType string

Type of a migration asset: the Classic asset being migrated, or an asset the migration agent created for it. Migrations can only be created for JOB assets.

const MigrationAssetTypeFile MigrationAssetType = `FILE`
const MigrationAssetTypeInteractive MigrationAssetType = `INTERACTIVE`
const MigrationAssetTypeJob MigrationAssetType = `JOB`

func (*MigrationAssetType) Set

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

Set raw string value and validate it against allowed values

func (*MigrationAssetType) String

func (f *MigrationAssetType) String() string

String representation for fmt.Print

func (*MigrationAssetType) Type

func (f *MigrationAssetType) Type() string

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

func (*MigrationAssetType) Values

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

Values returns all possible values for MigrationAssetType.

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

type MigrationInitiator

type MigrationInitiator struct {
	// The role of the initiator, determining approval authority. Set by the
	// server: the role is resolved from the caller's identity and permissions
	// on the asset, never taken from the request, since a caller must not be
	// able to assert its own approval authority.
	Role MigrationInitiatorRole `json:"role,omitempty"`
	// The user ID of the initiator. Set by the server from the request context.
	UserId int64 `json:"user_id,omitempty"`

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

The initiator of a migration, including their role and user identity.

func (MigrationInitiator) MarshalJSON

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

func (*MigrationInitiator) UnmarshalJSON

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

type MigrationInitiatorRole

type MigrationInitiatorRole string

Role of the migration initiator, determining approval authority.

const MigrationInitiatorRoleAccountAdmin MigrationInitiatorRole = `ACCOUNT_ADMIN`
const MigrationInitiatorRoleJobAdmin MigrationInitiatorRole = `JOB_ADMIN`
const MigrationInitiatorRoleSystem MigrationInitiatorRole = `SYSTEM`
const MigrationInitiatorRoleWorkspaceAdmin MigrationInitiatorRole = `WORKSPACE_ADMIN`

func (*MigrationInitiatorRole) Set

Set raw string value and validate it against allowed values

func (*MigrationInitiatorRole) String

func (f *MigrationInitiatorRole) String() string

String representation for fmt.Print

func (*MigrationInitiatorRole) Type

func (f *MigrationInitiatorRole) Type() string

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

func (*MigrationInitiatorRole) Values

Values returns all possible values for MigrationInitiatorRole.

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

type MigrationReport

type MigrationReport struct {
	// The primary asset the agent created — the entry point / validation
	// target.
	PrimaryAsset *MigrationAsset `json:"primary_asset,omitempty"`
	// Additional assets the agent created (e.g. notebooks or jobs the primary
	// asset invokes).
	SecondaryAssets []MigrationAsset `json:"secondary_assets,omitempty"`
}

Agent-produced planning report, presented to the user at the review gates.

func (*MigrationReport) UnmarshalJSON

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

type MigrationState

type MigrationState string

The state of a migration in its lifecycle.

const MigrationStateCancelled MigrationState = `CANCELLED`
const MigrationStateFailed MigrationState = `FAILED`
const MigrationStateMigrationComplete MigrationState = `MIGRATION_COMPLETE`
const MigrationStateMigrationObservation MigrationState = `MIGRATION_OBSERVATION`
const MigrationStateMigrationPending MigrationState = `MIGRATION_PENDING`
const MigrationStateMigrationReview MigrationState = `MIGRATION_REVIEW`
const MigrationStateMigrationRunning MigrationState = `MIGRATION_RUNNING`
const MigrationStateNotSupported MigrationState = `NOT_SUPPORTED`
const MigrationStatePlanningPending MigrationState = `PLANNING_PENDING`
const MigrationStatePlanningReview MigrationState = `PLANNING_REVIEW`
const MigrationStatePlanningRunning MigrationState = `PLANNING_RUNNING`
const MigrationStateRevisionPending MigrationState = `REVISION_PENDING`
const MigrationStateTranslationCreating MigrationState = `TRANSLATION_CREATING`
const MigrationStateTranslationPending MigrationState = `TRANSLATION_PENDING`
const MigrationStateTranslationReady MigrationState = `TRANSLATION_READY`
const MigrationStateValidationRunning MigrationState = `VALIDATION_RUNNING`
const MigrationStateValidationScheduling MigrationState = `VALIDATION_SCHEDULING`

func (*MigrationState) Set

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

Set raw string value and validate it against allowed values

func (*MigrationState) String

func (f *MigrationState) String() string

String representation for fmt.Print

func (*MigrationState) Type

func (f *MigrationState) Type() string

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

func (*MigrationState) Values

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

Values returns all possible values for MigrationState.

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

type MigrationStateTransition

type MigrationStateTransition struct {
	// Free-text the service recorded for this transition — e.g. an
	// internally-determined cancellation or failure reason. Empty for
	// user-driven transitions.
	InternalComment string `json:"internal_comment,omitempty"`
	// The state that was entered.
	State MigrationState `json:"state,omitempty"`
	// Timestamp when this state was entered.
	TransitionTime *time.Time `json:"transition_time,omitempty"`
	// Free-text the initiating user supplied at a user-driven transition —
	// reviewer feedback on an approval, or the reason for a rejection or
	// cancellation. Empty for transitions the service drives internally.
	UserComment string `json:"user_comment,omitempty"`

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

A record of a state transition in the migration lifecycle.

func (MigrationStateTransition) MarshalJSON

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

func (*MigrationStateTransition) UnmarshalJSON

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

type RejectMigrationExecutionRequest

type RejectMigrationExecutionRequest struct {
	// Optional resource version for optimistic concurrency control. If
	// supplied, it must match the current server value.
	Etag string `json:"etag,omitempty"`
	// The ID of the migration to reject.
	MigrationId string `json:"-" url:"-"`
	// Required free-text reason for the rejection, fed back into re-planning so
	// the next plan can address the user's concerns.
	RejectionReason string `json:"rejection_reason"`

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

A request to reject migration execution at the MIGRATION_REVIEW gate, looping back to REVISION_PENDING.

func (RejectMigrationExecutionRequest) MarshalJSON

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

func (*RejectMigrationExecutionRequest) UnmarshalJSON

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

type RejectMigrationTranslationRequest

type RejectMigrationTranslationRequest struct {
	// Optional resource version for optimistic concurrency control. If
	// supplied, it must match the current server value.
	Etag string `json:"etag,omitempty"`
	// The ID of the migration to reject.
	MigrationId string `json:"-" url:"-"`
	// Required free-text reason for the rejection, fed back into re-planning so
	// the next plan can address the user's concerns.
	RejectionReason string `json:"rejection_reason"`

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

A request to reject the working copy at the TRANSLATION_READY gate, looping back to REVISION_PENDING.

func (RejectMigrationTranslationRequest) MarshalJSON

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

func (*RejectMigrationTranslationRequest) UnmarshalJSON

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

type ValidationReport

type ValidationReport struct {
	// Duration of the sandbox validation run in milliseconds. Pair with
	// start_time to derive the end time.
	DurationMs int64 `json:"duration_ms,omitempty"`
	// Databricks-internal recommendation on whether to proceed with the
	// migration, based on the validation run. May differ from run_status: a run
	// can succeed while the recommendation is negative, or vice versa.
	Passed bool `json:"passed,omitempty"`
	// Status of the validation run itself (the objective run outcome), as
	// reported by the run system, e.g. "SUCCESS" / "FAILED" / "TIMED_OUT".
	RunStatus string `json:"run_status,omitempty"`
	// Link to the validation run (job or notebook).
	RunUrl string `json:"run_url,omitempty"`
	// Timestamp when validation started in the sandbox.
	StartTime *time.Time `json:"start_time,omitempty"`

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

Validation results from running the translated workload in the sandbox.

func (ValidationReport) MarshalJSON

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

func (*ValidationReport) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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