servicetaskresource

package
v0.20230731.1154533 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: MPL-2.0 Imports: 11 Imported by: 1

README

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

The servicetaskresource 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/servicetaskresource"

Client Initialization

client := servicetaskresource.NewServiceTaskResourceClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ServiceTaskResourceClient.ServiceTasksCancel

ctx := context.TODO()
id := servicetaskresource.NewServiceTaskID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "serviceValue", "serviceTaskValue")

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

Example Usage: ServiceTaskResourceClient.ServiceTasksCreateOrUpdate

ctx := context.TODO()
id := servicetaskresource.NewServiceTaskID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "serviceValue", "serviceTaskValue")

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


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

Example Usage: ServiceTaskResourceClient.ServiceTasksDelete

ctx := context.TODO()
id := servicetaskresource.NewServiceTaskID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "serviceValue", "serviceTaskValue")

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

Example Usage: ServiceTaskResourceClient.ServiceTasksGet

ctx := context.TODO()
id := servicetaskresource.NewServiceTaskID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "serviceValue", "serviceTaskValue")

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

Example Usage: ServiceTaskResourceClient.ServiceTasksUpdate

ctx := context.TODO()
id := servicetaskresource.NewServiceTaskID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "serviceValue", "serviceTaskValue")

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


read, err := client.ServiceTasksUpdate(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 ValidateServiceTaskID

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

ValidateServiceTaskID checks that 'input' can be parsed as a Service 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 added in v0.20230712.1163130

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 ServiceTaskId

type ServiceTaskId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	ServiceTaskName   string
}

ServiceTaskId is a struct representing the Resource ID for a Service Task

func NewServiceTaskID

func NewServiceTaskID(subscriptionId string, resourceGroupName string, serviceName string, serviceTaskName string) ServiceTaskId

NewServiceTaskID returns a new ServiceTaskId struct

func ParseServiceTaskID

func ParseServiceTaskID(input string) (*ServiceTaskId, error)

ParseServiceTaskID parses 'input' into a ServiceTaskId

func ParseServiceTaskIDInsensitively

func ParseServiceTaskIDInsensitively(input string) (*ServiceTaskId, error)

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

func (ServiceTaskId) ID

func (id ServiceTaskId) ID() string

ID returns the formatted Service Task ID

func (ServiceTaskId) Segments

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

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

func (ServiceTaskId) String

func (id ServiceTaskId) String() string

String returns a human-readable description of this Service Task ID

type ServiceTaskResourceClient

type ServiceTaskResourceClient struct {
	Client *resourcemanager.Client
}

func NewServiceTaskResourceClientWithBaseURI

func NewServiceTaskResourceClientWithBaseURI(api environments.Api) (*ServiceTaskResourceClient, error)

func (ServiceTaskResourceClient) ServiceTasksCancel

ServiceTasksCancel ...

func (ServiceTaskResourceClient) ServiceTasksCreateOrUpdate

func (c ServiceTaskResourceClient) ServiceTasksCreateOrUpdate(ctx context.Context, id ServiceTaskId, input ProjectTask) (result ServiceTasksCreateOrUpdateOperationResponse, err error)

ServiceTasksCreateOrUpdate ...

func (ServiceTaskResourceClient) ServiceTasksDelete

ServiceTasksDelete ...

func (ServiceTaskResourceClient) ServiceTasksGet

ServiceTasksGet ...

func (ServiceTaskResourceClient) ServiceTasksUpdate

ServiceTasksUpdate ...

type ServiceTasksCancelOperationResponse

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

type ServiceTasksCreateOrUpdateOperationResponse

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

type ServiceTasksDeleteOperationOptions

type ServiceTasksDeleteOperationOptions struct {
	DeleteRunningTasks *bool
}

func DefaultServiceTasksDeleteOperationOptions

func DefaultServiceTasksDeleteOperationOptions() ServiceTasksDeleteOperationOptions

func (ServiceTasksDeleteOperationOptions) ToHeaders added in v0.20230712.1163130

func (ServiceTasksDeleteOperationOptions) ToOData added in v0.20230712.1163130

func (ServiceTasksDeleteOperationOptions) ToQuery added in v0.20230712.1163130

type ServiceTasksDeleteOperationResponse

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

type ServiceTasksGetOperationOptions

type ServiceTasksGetOperationOptions struct {
	Expand *string
}

func DefaultServiceTasksGetOperationOptions

func DefaultServiceTasksGetOperationOptions() ServiceTasksGetOperationOptions

func (ServiceTasksGetOperationOptions) ToHeaders added in v0.20230712.1163130

func (ServiceTasksGetOperationOptions) ToOData added in v0.20230712.1163130

func (ServiceTasksGetOperationOptions) ToQuery added in v0.20230712.1163130

type ServiceTasksGetOperationResponse

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

type ServiceTasksUpdateOperationResponse

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

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 added in v0.20230712.1163130

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

Jump to

Keyboard shortcuts

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