Documentation
¶
Index ¶
- Variables
- type Client
- type ClientImpl
- func (client *ClientImpl) CreateElasticPool(ctx context.Context, args CreateElasticPoolArgs) (*ElasticPoolCreationResult, error)
- func (client *ClientImpl) GetElasticNodes(ctx context.Context, args GetElasticNodesArgs) (*[]ElasticNode, error)
- func (client *ClientImpl) GetElasticPool(ctx context.Context, args GetElasticPoolArgs) (*ElasticPool, error)
- func (client *ClientImpl) GetElasticPoolLogs(ctx context.Context, args GetElasticPoolLogsArgs) (*[]ElasticPoolLog, error)
- func (client *ClientImpl) GetElasticPools(ctx context.Context, args GetElasticPoolsArgs) (*[]ElasticPool, error)
- func (client *ClientImpl) UpdateElasticNode(ctx context.Context, args UpdateElasticNodeArgs) (*ElasticNode, error)
- func (client *ClientImpl) UpdateElasticPool(ctx context.Context, args UpdateElasticPoolArgs) (*ElasticPool, error)
- type CreateElasticPoolArgs
- type ElasticAgentState
- type ElasticComputeState
- type ElasticNode
- type ElasticNodeSettings
- type ElasticNodeState
- type ElasticPool
- type ElasticPoolCreationResult
- type ElasticPoolLog
- type ElasticPoolSettings
- type ElasticPoolState
- type GetElasticNodesArgs
- type GetElasticPoolArgs
- type GetElasticPoolLogsArgs
- type GetElasticPoolsArgs
- type LogLevel
- type OperatingSystemType
- type OperationType
- type OrchestrationType
- type TaskAgentPool
- type TaskAgentPoolOptions
- type TaskAgentPoolReference
- type TaskAgentPoolType
- type TaskAgentQueue
- type TaskResult
- type UpdateElasticNodeArgs
- type UpdateElasticPoolArgs
Constants ¶
This section is empty.
Variables ¶
var ElasticAgentStateValues = elasticAgentStateValuesType{
None: "none",
Enabled: "enabled",
Online: "online",
Assigned: "assigned",
}
var ElasticComputeStateValues = elasticComputeStateValuesType{
None: "none",
Healthy: "healthy",
Creating: "creating",
Deleting: "deleting",
Failed: "failed",
Stopped: "stopped",
Reimaging: "reimaging",
}
var ElasticNodeStateValues = elasticNodeStateValuesType{
None: "none",
New: "new",
CreatingCompute: "creatingCompute",
StartingAgent: "startingAgent",
Idle: "idle",
Assigned: "assigned",
Offline: "offline",
PendingReimage: "pendingReimage",
PendingDelete: "pendingDelete",
Saved: "saved",
DeletingCompute: "deletingCompute",
Deleted: "deleted",
Lost: "lost",
ReimagingCompute: "reimagingCompute",
RestartingAgent: "restartingAgent",
FailedToStartPendingDelete: "failedToStartPendingDelete",
FailedToRestartPendingDelete: "failedToRestartPendingDelete",
FailedVMPendingDelete: "failedVMPendingDelete",
AssignedPendingDelete: "assignedPendingDelete",
RetryDelete: "retryDelete",
}
var ElasticPoolStateValues = elasticPoolStateValuesType{
Online: "online",
Offline: "offline",
Unhealthy: "unhealthy",
New: "new",
}
var LogLevelValues = logLevelValuesType{
Error: "error",
Warning: "warning",
Info: "info",
}
var OperatingSystemTypeValues = operatingSystemTypeValuesType{
Windows: "windows",
Linux: "linux",
}
var OperationTypeValues = operationTypeValuesType{
ConfigurationJob: "configurationJob",
SizingJob: "sizingJob",
IncreaseCapacity: "increaseCapacity",
Reimage: "reimage",
DeleteVMs: "deleteVMs",
}
var OrchestrationTypeValues = orchestrationTypeValuesType{
Uniform: "uniform",
Flexible: "flexible",
}
var TaskAgentPoolOptionsValues = taskAgentPoolOptionsValuesType{ None: "none", ElasticPool: "elasticPool", SingleUseAgents: "singleUseAgents", PreserveAgentOnJobFailure: "preserveAgentOnJobFailure", }
var TaskAgentPoolTypeValues = taskAgentPoolTypeValuesType{
Automation: "automation",
Deployment: "deployment",
}
var TaskResultValues = taskResultValuesType{
Succeeded: "succeeded",
SucceededWithIssues: "succeededWithIssues",
Failed: "failed",
Canceled: "canceled",
Skipped: "skipped",
Abandoned: "abandoned",
}
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
// [Preview API] Create a new elastic pool. This will create a new TaskAgentPool at the organization level. If a project id is provided, this will create a new TaskAgentQueue in the specified project.
CreateElasticPool(context.Context, CreateElasticPoolArgs) (*ElasticPoolCreationResult, error)
// [Preview API] Get a list of ElasticNodes currently in the ElasticPool
GetElasticNodes(context.Context, GetElasticNodesArgs) (*[]ElasticNode, error)
// [Preview API] Returns the Elastic Pool with the specified Pool Id.
GetElasticPool(context.Context, GetElasticPoolArgs) (*ElasticPool, error)
// [Preview API] Get elastic pool diagnostics logs for a specified Elastic Pool.
GetElasticPoolLogs(context.Context, GetElasticPoolLogsArgs) (*[]ElasticPoolLog, error)
// [Preview API] Get a list of all Elastic Pools.
GetElasticPools(context.Context, GetElasticPoolsArgs) (*[]ElasticPool, error)
// [Preview API] Update properties on a specified ElasticNode
UpdateElasticNode(context.Context, UpdateElasticNodeArgs) (*ElasticNode, error)
// [Preview API] Update settings on a specified Elastic Pool.
UpdateElasticPool(context.Context, UpdateElasticPoolArgs) (*ElasticPool, error)
}
type ClientImpl ¶
type ClientImpl struct {
Client azuredevops.Client
}
func (*ClientImpl) CreateElasticPool ¶
func (client *ClientImpl) CreateElasticPool(ctx context.Context, args CreateElasticPoolArgs) (*ElasticPoolCreationResult, error)
[Preview API] Create a new elastic pool. This will create a new TaskAgentPool at the organization level. If a project id is provided, this will create a new TaskAgentQueue in the specified project.
func (*ClientImpl) GetElasticNodes ¶
func (client *ClientImpl) GetElasticNodes(ctx context.Context, args GetElasticNodesArgs) (*[]ElasticNode, error)
[Preview API] Get a list of ElasticNodes currently in the ElasticPool
func (*ClientImpl) GetElasticPool ¶
func (client *ClientImpl) GetElasticPool(ctx context.Context, args GetElasticPoolArgs) (*ElasticPool, error)
[Preview API] Returns the Elastic Pool with the specified Pool Id.
func (*ClientImpl) GetElasticPoolLogs ¶
func (client *ClientImpl) GetElasticPoolLogs(ctx context.Context, args GetElasticPoolLogsArgs) (*[]ElasticPoolLog, error)
[Preview API] Get elastic pool diagnostics logs for a specified Elastic Pool.
func (*ClientImpl) GetElasticPools ¶
func (client *ClientImpl) GetElasticPools(ctx context.Context, args GetElasticPoolsArgs) (*[]ElasticPool, error)
[Preview API] Get a list of all Elastic Pools.
func (*ClientImpl) UpdateElasticNode ¶
func (client *ClientImpl) UpdateElasticNode(ctx context.Context, args UpdateElasticNodeArgs) (*ElasticNode, error)
[Preview API] Update properties on a specified ElasticNode
func (*ClientImpl) UpdateElasticPool ¶
func (client *ClientImpl) UpdateElasticPool(ctx context.Context, args UpdateElasticPoolArgs) (*ElasticPool, error)
[Preview API] Update settings on a specified Elastic Pool.
type CreateElasticPoolArgs ¶
type CreateElasticPoolArgs struct {
// (required) Elastic pool to create. Contains the properties necessary for configuring a new ElasticPool.
ElasticPool *ElasticPool
// (required) Name to use for the new TaskAgentPool
PoolName *string
// (optional) Setting to determine if all pipelines are authorized to use this TaskAgentPool by default.
AuthorizeAllPipelines *bool
// (optional) Setting to automatically provision TaskAgentQueues in every project for the new pool.
AutoProvisionProjectPools *bool
// (optional) Optional: If provided, a new TaskAgentQueue will be created in the specified project.
ProjectId *uuid.UUID
}
Arguments for the CreateElasticPool function
type ElasticComputeState ¶
type ElasticComputeState string
type ElasticNode ¶
type ElasticNode struct {
// Distributed Task's Agent Id
AgentId *int `json:"agentId,omitempty"`
// Summary of the state of the agent
AgentState *ElasticAgentState `json:"agentState,omitempty"`
// Compute Id. VMSS's InstanceId
ComputeId *string `json:"computeId,omitempty"`
// State of the compute host
ComputeState *ElasticComputeState `json:"computeState,omitempty"`
// Users can force state changes to specific states (ToReimage, ToDelete, Save)
DesiredState *ElasticNodeState `json:"desiredState,omitempty"`
// Unique identifier since the agent and/or VM may be null
Id *int `json:"id,omitempty"`
// Computer name. Used to match a scaleset VM with an agent
Name *string `json:"name,omitempty"`
// Pool Id that this node belongs to
PoolId *int `json:"poolId,omitempty"`
// Last job RequestId assigned to this agent
RequestId *uint64 `json:"requestId,omitempty"`
// State of the ElasticNode
State *ElasticNodeState `json:"state,omitempty"`
// Last state change. Only updated by SQL.
StateChangedOn *azuredevops.Time `json:"stateChangedOn,omitempty"`
}
Data and settings for an elastic node
type ElasticNodeSettings ¶
type ElasticNodeSettings struct {
// State of the ElasticNode
State *ElasticNodeState `json:"state,omitempty"`
}
Class used for updating an elastic node where only certain members are populated
type ElasticNodeState ¶
type ElasticNodeState string
type ElasticPool ¶
type ElasticPool struct {
// Set whether agents should be configured to run with interactive UI
AgentInteractiveUI *bool `json:"agentInteractiveUI,omitempty"`
// Azure string representing to location of the resource
AzureId *string `json:"azureId,omitempty"`
// Number of agents to have ready waiting for jobs
DesiredIdle *int `json:"desiredIdle,omitempty"`
// The desired size of the pool
DesiredSize *int `json:"desiredSize,omitempty"`
// Maximum number of nodes that will exist in the elastic pool
MaxCapacity *int `json:"maxCapacity,omitempty"`
// Keep nodes in the pool on failure for investigation
MaxSavedNodeCount *int `json:"maxSavedNodeCount,omitempty"`
// Timestamp the pool was first detected to be offline
OfflineSince *azuredevops.Time `json:"offlineSince,omitempty"`
// Operating system type of the nodes in the pool
OrchestrationType *OrchestrationType `json:"orchestrationType,omitempty"`
// Operating system type of the nodes in the pool
OsType *OperatingSystemType `json:"osType,omitempty"`
// Id of the associated TaskAgentPool
PoolId *int `json:"poolId,omitempty"`
// Discard node after each job completes
RecycleAfterEachUse *bool `json:"recycleAfterEachUse,omitempty"`
// Id of the Service Endpoint used to connect to Azure
ServiceEndpointId *uuid.UUID `json:"serviceEndpointId,omitempty"`
// Scope the Service Endpoint belongs to
ServiceEndpointScope *uuid.UUID `json:"serviceEndpointScope,omitempty"`
// The number of sizing attempts executed while trying to achieve a desired size
SizingAttempts *int `json:"sizingAttempts,omitempty"`
// State of the pool
State *ElasticPoolState `json:"state,omitempty"`
// The minimum time in minutes to keep idle agents alive
TimeToLiveMinutes *int `json:"timeToLiveMinutes,omitempty"`
}
Data and settings for an elastic pool
type ElasticPoolCreationResult ¶
type ElasticPoolCreationResult struct {
// Created agent pool
AgentPool *TaskAgentPool `json:"agentPool,omitempty"`
// Created agent queue
AgentQueue *TaskAgentQueue `json:"agentQueue,omitempty"`
// Created elastic pool
ElasticPool *ElasticPool `json:"elasticPool,omitempty"`
}
Returned result from creating a new elastic pool
type ElasticPoolLog ¶
type ElasticPoolLog struct {
// Log Id
Id *uint64 `json:"id,omitempty"`
// E.g. error, warning, info
Level *LogLevel `json:"level,omitempty"`
// Log contents
Message *string `json:"message,omitempty"`
// Operation that triggered the message being logged
Operation *OperationType `json:"operation,omitempty"`
// Id of the associated TaskAgentPool
PoolId *int `json:"poolId,omitempty"`
// Datetime that the log occurred
Timestamp *azuredevops.Time `json:"timestamp,omitempty"`
}
Log data for an Elastic Pool
type ElasticPoolSettings ¶
type ElasticPoolSettings struct {
// Set whether agents should be configured to run with interactive UI
AgentInteractiveUI *bool `json:"agentInteractiveUI,omitempty"`
// Azure string representing to location of the resource
AzureId *string `json:"azureId,omitempty"`
// Number of machines to have ready waiting for jobs
DesiredIdle *int `json:"desiredIdle,omitempty"`
// Maximum number of machines that will exist in the elastic pool
MaxCapacity *int `json:"maxCapacity,omitempty"`
// Keep machines in the pool on failure for investigation
MaxSavedNodeCount *int `json:"maxSavedNodeCount,omitempty"`
// Operating system type of the machines in the pool
OrchestrationType *OrchestrationType `json:"orchestrationType,omitempty"`
// Operating system type of the machines in the pool
OsType *OperatingSystemType `json:"osType,omitempty"`
// Discard machines after each job completes
RecycleAfterEachUse *bool `json:"recycleAfterEachUse,omitempty"`
// Id of the Service Endpoint used to connect to Azure
ServiceEndpointId *uuid.UUID `json:"serviceEndpointId,omitempty"`
// Scope the Service Endpoint belongs to
ServiceEndpointScope *uuid.UUID `json:"serviceEndpointScope,omitempty"`
// The minimum time in minutes to keep idle agents alive
TimeToLiveMinutes *int `json:"timeToLiveMinutes,omitempty"`
}
Class used for updating an elastic pool where only certain members are populated
type ElasticPoolState ¶
type ElasticPoolState string
type GetElasticNodesArgs ¶
type GetElasticNodesArgs struct {
// (required) Pool id of the ElasticPool
PoolId *int
// (optional) Optional: Filter to only retrieve ElasticNodes in the given ElasticNodeState
State *ElasticNodeState
}
Arguments for the GetElasticNodes function
type GetElasticPoolArgs ¶
type GetElasticPoolArgs struct {
// (required) Pool Id of the associated TaskAgentPool
PoolId *int
}
Arguments for the GetElasticPool function
type GetElasticPoolLogsArgs ¶
type GetElasticPoolLogsArgs struct {
// (required) Pool Id of the Elastic Pool
PoolId *int
// (optional) Number of elastic pool logs to retrieve
Top *int
}
Arguments for the GetElasticPoolLogs function
type GetElasticPoolsArgs ¶
type GetElasticPoolsArgs struct {
}
Arguments for the GetElasticPools function
type OperatingSystemType ¶
type OperatingSystemType string
type OperationType ¶
type OperationType string
type OrchestrationType ¶
type OrchestrationType string
type TaskAgentPool ¶
type TaskAgentPool struct {
Id *int `json:"id,omitempty"`
// Gets or sets a value indicating whether or not this pool is managed by the service.
IsHosted *bool `json:"isHosted,omitempty"`
// Determines whether the pool is legacy.
IsLegacy *bool `json:"isLegacy,omitempty"`
Name *string `json:"name,omitempty"`
// Additional pool settings and details
Options *TaskAgentPoolOptions `json:"options,omitempty"`
// Gets or sets the type of the pool
PoolType *TaskAgentPoolType `json:"poolType,omitempty"`
Scope *uuid.UUID `json:"scope,omitempty"`
// Gets the current size of the pool.
Size *int `json:"size,omitempty"`
// The ID of the associated agent cloud.
AgentCloudId *int `json:"agentCloudId,omitempty"`
// Whether or not a queue should be automatically provisioned for each project collection.
AutoProvision *bool `json:"autoProvision,omitempty"`
// Whether or not the pool should autosize itself based on the Agent Cloud Provider settings.
AutoSize *bool `json:"autoSize,omitempty"`
// Whether or not agents in this pool are allowed to automatically update
AutoUpdate *bool `json:"autoUpdate,omitempty"`
// Creator of the pool. The creator of the pool is automatically added into the administrators group for the pool on creation.
CreatedBy *webapi.IdentityRef `json:"createdBy,omitempty"`
// The date/time of the pool creation.
CreatedOn *azuredevops.Time `json:"createdOn,omitempty"`
// Owner or administrator of the pool.
Owner *webapi.IdentityRef `json:"owner,omitempty"`
Properties interface{} `json:"properties,omitempty"`
// Target parallelism - Only applies to agent pools that are backed by pool providers. It will be null for regular pools.
TargetSize *int `json:"targetSize,omitempty"`
}
An organization-level grouping of agents.
type TaskAgentPoolOptions ¶
type TaskAgentPoolOptions string
[Flags] Additional settings and descriptors for a TaskAgentPool
type TaskAgentPoolReference ¶
type TaskAgentPoolReference struct {
Id *int `json:"id,omitempty"`
// Gets or sets a value indicating whether or not this pool is managed by the service.
IsHosted *bool `json:"isHosted,omitempty"`
// Determines whether the pool is legacy.
IsLegacy *bool `json:"isLegacy,omitempty"`
Name *string `json:"name,omitempty"`
// Additional pool settings and details
Options *TaskAgentPoolOptions `json:"options,omitempty"`
// Gets or sets the type of the pool
PoolType *TaskAgentPoolType `json:"poolType,omitempty"`
Scope *uuid.UUID `json:"scope,omitempty"`
// Gets the current size of the pool.
Size *int `json:"size,omitempty"`
}
type TaskAgentQueue ¶
type TaskAgentQueue struct {
// ID of the queue
Id *int `json:"id,omitempty"`
// Name of the queue
Name *string `json:"name,omitempty"`
// Pool reference for this queue
Pool *TaskAgentPoolReference `json:"pool,omitempty"`
// Project ID
ProjectId *uuid.UUID `json:"projectId,omitempty"`
}
An agent queue.
type UpdateElasticNodeArgs ¶
type UpdateElasticNodeArgs struct {
// (required)
ElasticNodeSettings *ElasticNodeSettings
// (required)
PoolId *int
// (required)
ElasticNodeId *int
}
Arguments for the UpdateElasticNode function
type UpdateElasticPoolArgs ¶
type UpdateElasticPoolArgs struct {
// (required) New Elastic Pool settings data
ElasticPoolSettings *ElasticPoolSettings
// (required)
PoolId *int
}
Arguments for the UpdateElasticPool function