taskresource

package
v0.20230523.1113455 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: MPL-2.0 Imports: 7 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/taskresource Documentation

The taskresource SDK allows for interaction with the Azure Resource Manager Service datamigration (API Version 2018-04-19).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/taskresource"

Client Initialization

client := taskresource.NewTaskResourceClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: TaskResourceClient.TasksCancel

ctx := context.TODO()
id := taskresource.NewTaskID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "serviceValue", "projectValue", "taskValue")

read, err := client.TasksCancel(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: TaskResourceClient.TasksCreateOrUpdate

ctx := context.TODO()
id := taskresource.NewTaskID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "serviceValue", "projectValue", "taskValue")

payload := taskresource.ProjectTask{
	// ...
}


read, err := client.TasksCreateOrUpdate(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: TaskResourceClient.TasksDelete

ctx := context.TODO()
id := taskresource.NewTaskID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "serviceValue", "projectValue", "taskValue")

read, err := client.TasksDelete(ctx, id, taskresource.DefaultTasksDeleteOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: TaskResourceClient.TasksGet

ctx := context.TODO()
id := taskresource.NewTaskID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "serviceValue", "projectValue", "taskValue")

read, err := client.TasksGet(ctx, id, taskresource.DefaultTasksGetOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: TaskResourceClient.TasksUpdate

ctx := context.TODO()
id := taskresource.NewTaskID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "serviceValue", "projectValue", "taskValue")

payload := taskresource.ProjectTask{
	// ...
}


read, err := client.TasksUpdate(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForCommandState

func PossibleValuesForCommandState() []string

func PossibleValuesForTaskState

func PossibleValuesForTaskState() []string

func ValidateTaskID

func ValidateTaskID(input interface{}, key string) (warnings []string, errors []error)

ValidateTaskID checks that 'input' can be parsed as a Task ID

Types

type CommandProperties

type CommandProperties struct {
	CommandType string        `json:"commandType"`
	Errors      *[]ODataError `json:"errors,omitempty"`
	State       *CommandState `json:"state,omitempty"`
}

type CommandState

type CommandState string
const (
	CommandStateAccepted  CommandState = "Accepted"
	CommandStateFailed    CommandState = "Failed"
	CommandStateRunning   CommandState = "Running"
	CommandStateSucceeded CommandState = "Succeeded"
	CommandStateUnknown   CommandState = "Unknown"
)

type ODataError

type ODataError struct {
	Code    *string       `json:"code,omitempty"`
	Details *[]ODataError `json:"details,omitempty"`
	Message *string       `json:"message,omitempty"`
}

type ProjectTask

type ProjectTask struct {
	Etag       *string                `json:"etag,omitempty"`
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *ProjectTaskProperties `json:"properties,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type ProjectTaskProperties

type ProjectTaskProperties struct {
	Commands *[]CommandProperties `json:"commands,omitempty"`
	Errors   *[]ODataError        `json:"errors,omitempty"`
	State    *TaskState           `json:"state,omitempty"`
	TaskType string               `json:"taskType"`
}

type TaskId

type TaskId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	ProjectName       string
	TaskName          string
}

TaskId is a struct representing the Resource ID for a Task

func NewTaskID

func NewTaskID(subscriptionId string, resourceGroupName string, serviceName string, projectName string, taskName string) TaskId

NewTaskID returns a new TaskId struct

func ParseTaskID

func ParseTaskID(input string) (*TaskId, error)

ParseTaskID parses 'input' into a TaskId

func ParseTaskIDInsensitively

func ParseTaskIDInsensitively(input string) (*TaskId, error)

ParseTaskIDInsensitively parses 'input' case-insensitively into a TaskId note: this method should only be used for API response data and not user input

func (TaskId) ID

func (id TaskId) ID() string

ID returns the formatted Task ID

func (TaskId) Segments

func (id TaskId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Task ID

func (TaskId) String

func (id TaskId) String() string

String returns a human-readable description of this Task ID

type TaskResourceClient

type TaskResourceClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewTaskResourceClientWithBaseURI

func NewTaskResourceClientWithBaseURI(endpoint string) TaskResourceClient

func (TaskResourceClient) TasksCancel

func (c TaskResourceClient) TasksCancel(ctx context.Context, id TaskId) (result TasksCancelOperationResponse, err error)

TasksCancel ...

func (TaskResourceClient) TasksCreateOrUpdate

func (c TaskResourceClient) TasksCreateOrUpdate(ctx context.Context, id TaskId, input ProjectTask) (result TasksCreateOrUpdateOperationResponse, err error)

TasksCreateOrUpdate ...

func (TaskResourceClient) TasksDelete

TasksDelete ...

func (TaskResourceClient) TasksGet

TasksGet ...

func (TaskResourceClient) TasksUpdate

func (c TaskResourceClient) TasksUpdate(ctx context.Context, id TaskId, input ProjectTask) (result TasksUpdateOperationResponse, err error)

TasksUpdate ...

type TaskState

type TaskState string
const (
	TaskStateCanceled              TaskState = "Canceled"
	TaskStateFailed                TaskState = "Failed"
	TaskStateFailedInputValidation TaskState = "FailedInputValidation"
	TaskStateFaulted               TaskState = "Faulted"
	TaskStateQueued                TaskState = "Queued"
	TaskStateRunning               TaskState = "Running"
	TaskStateSucceeded             TaskState = "Succeeded"
	TaskStateUnknown               TaskState = "Unknown"
)

type TasksCancelOperationResponse

type TasksCancelOperationResponse struct {
	HttpResponse *http.Response
	Model        *ProjectTask
}

type TasksCreateOrUpdateOperationResponse

type TasksCreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *ProjectTask
}

type TasksDeleteOperationOptions

type TasksDeleteOperationOptions struct {
	DeleteRunningTasks *bool
}

func DefaultTasksDeleteOperationOptions

func DefaultTasksDeleteOperationOptions() TasksDeleteOperationOptions

type TasksDeleteOperationResponse

type TasksDeleteOperationResponse struct {
	HttpResponse *http.Response
}

type TasksGetOperationOptions

type TasksGetOperationOptions struct {
	Expand *string
}

func DefaultTasksGetOperationOptions

func DefaultTasksGetOperationOptions() TasksGetOperationOptions

type TasksGetOperationResponse

type TasksGetOperationResponse struct {
	HttpResponse *http.Response
	Model        *ProjectTask
}

type TasksUpdateOperationResponse

type TasksUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *ProjectTask
}

Jump to

Keyboard shortcuts

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