taskresource

package
v0.20240620.1161515 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/taskresource Documentation

The taskresource SDK allows for interaction with the Azure Resource Manager Service datamigration (API Version 2021-06-30).

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/2021-06-30/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.TasksCommand

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

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


read, err := client.TasksCommand(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.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"
)

func (*CommandState) UnmarshalJSON

func (s *CommandState) UnmarshalJSON(bytes []byte) error

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"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type ProjectTaskProperties

type ProjectTaskProperties struct {
	ClientData *map[string]string   `json:"clientData,omitempty"`
	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) FromParseResult

func (id *TaskId) FromParseResult(input resourceids.ParseResult) error

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 *resourcemanager.Client
}

func NewTaskResourceClientWithBaseURI

func NewTaskResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*TaskResourceClient, error)

func (TaskResourceClient) TasksCancel

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

TasksCancel ...

func (TaskResourceClient) TasksCommand

func (c TaskResourceClient) TasksCommand(ctx context.Context, id TaskId, input CommandProperties) (result TasksCommandOperationResponse, err error)

TasksCommand ...

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"
)

func (*TaskState) UnmarshalJSON

func (s *TaskState) UnmarshalJSON(bytes []byte) error

type TasksCancelOperationResponse

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

type TasksCommandOperationResponse

type TasksCommandOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CommandProperties
}

type TasksCreateOrUpdateOperationResponse

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

type TasksDeleteOperationOptions

type TasksDeleteOperationOptions struct {
	DeleteRunningTasks *bool
}

func DefaultTasksDeleteOperationOptions

func DefaultTasksDeleteOperationOptions() TasksDeleteOperationOptions

func (TasksDeleteOperationOptions) ToHeaders

func (TasksDeleteOperationOptions) ToOData

func (TasksDeleteOperationOptions) ToQuery

type TasksDeleteOperationResponse

type TasksDeleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type TasksGetOperationOptions

type TasksGetOperationOptions struct {
	Expand *string
}

func DefaultTasksGetOperationOptions

func DefaultTasksGetOperationOptions() TasksGetOperationOptions

func (TasksGetOperationOptions) ToHeaders

func (o TasksGetOperationOptions) ToHeaders() *client.Headers

func (TasksGetOperationOptions) ToOData

func (o TasksGetOperationOptions) ToOData() *odata.Query

func (TasksGetOperationOptions) ToQuery

type TasksGetOperationResponse

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

type TasksUpdateOperationResponse

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

Jump to

Keyboard shortcuts

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