post

package
v0.20240206.1080438 Latest Latest
Warning

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

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

README

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

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

Client Initialization

client := post.NewPOSTClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: POSTClient.FilesRead

ctx := context.TODO()
id := post.NewFileID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "serviceValue", "projectValue", "fileValue")

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

Example Usage: POSTClient.FilesReadWrite

ctx := context.TODO()
id := post.NewFileID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "serviceValue", "projectValue", "fileValue")

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

Example Usage: POSTClient.ServiceTasksCancel

ctx := context.TODO()
id := post.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: POSTClient.ServicesCheckChildrenNameAvailability

ctx := context.TODO()
id := post.NewServiceID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "serviceValue")

payload := post.NameAvailabilityRequest{
	// ...
}


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

Example Usage: POSTClient.ServicesCheckNameAvailability

ctx := context.TODO()
id := post.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue")

payload := post.NameAvailabilityRequest{
	// ...
}


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

Example Usage: POSTClient.ServicesCheckStatus

ctx := context.TODO()
id := post.NewServiceID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "serviceValue")

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

Example Usage: POSTClient.ServicesStart

ctx := context.TODO()
id := post.NewServiceID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "serviceValue")

if err := client.ServicesStartThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: POSTClient.ServicesStop

ctx := context.TODO()
id := post.NewServiceID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "serviceValue")

if err := client.ServicesStopThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: POSTClient.TasksCancel

ctx := context.TODO()
id := post.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: POSTClient.TasksCommand

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

payload := post.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
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForCommandState

func PossibleValuesForCommandState() []string

func PossibleValuesForNameCheckFailureReason

func PossibleValuesForNameCheckFailureReason() []string

func PossibleValuesForTaskState

func PossibleValuesForTaskState() []string

func ValidateFileID

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

ValidateFileID checks that 'input' can be parsed as a File ID

func ValidateLocationID

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

ValidateLocationID checks that 'input' can be parsed as a Location ID

func ValidateServiceID

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

ValidateServiceID checks that 'input' can be parsed as a Service ID

func ValidateServiceTaskID

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

ValidateServiceTaskID checks that 'input' can be parsed as a Service Task ID

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 DataMigrationServiceStatusResponse

type DataMigrationServiceStatusResponse struct {
	AgentVersion       *string   `json:"agentVersion,omitempty"`
	Status             *string   `json:"status,omitempty"`
	SupportedTaskTypes *[]string `json:"supportedTaskTypes,omitempty"`
	VMSize             *string   `json:"vmSize,omitempty"`
}

type FileId

type FileId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	ProjectName       string
	FileName          string
}

FileId is a struct representing the Resource ID for a File

func NewFileID

func NewFileID(subscriptionId string, resourceGroupName string, serviceName string, projectName string, fileName string) FileId

NewFileID returns a new FileId struct

func ParseFileID

func ParseFileID(input string) (*FileId, error)

ParseFileID parses 'input' into a FileId

func ParseFileIDInsensitively

func ParseFileIDInsensitively(input string) (*FileId, error)

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

func (*FileId) FromParseResult

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

func (FileId) ID

func (id FileId) ID() string

ID returns the formatted File ID

func (FileId) Segments

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

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

func (FileId) String

func (id FileId) String() string

String returns a human-readable description of this File ID

type FileStorageInfo

type FileStorageInfo struct {
	Headers *map[string]string `json:"headers,omitempty"`
	Uri     *string            `json:"uri,omitempty"`
}

type FilesReadOperationResponse

type FilesReadOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *FileStorageInfo
}

type FilesReadWriteOperationResponse

type FilesReadWriteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *FileStorageInfo
}

type LocationId

type LocationId struct {
	SubscriptionId string
	LocationName   string
}

LocationId is a struct representing the Resource ID for a Location

func NewLocationID

func NewLocationID(subscriptionId string, locationName string) LocationId

NewLocationID returns a new LocationId struct

func ParseLocationID

func ParseLocationID(input string) (*LocationId, error)

ParseLocationID parses 'input' into a LocationId

func ParseLocationIDInsensitively

func ParseLocationIDInsensitively(input string) (*LocationId, error)

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

func (*LocationId) FromParseResult

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

func (LocationId) ID

func (id LocationId) ID() string

ID returns the formatted Location ID

func (LocationId) Segments

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

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

func (LocationId) String

func (id LocationId) String() string

String returns a human-readable description of this Location ID

type NameAvailabilityRequest

type NameAvailabilityRequest struct {
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

type NameAvailabilityResponse

type NameAvailabilityResponse struct {
	Message       *string                 `json:"message,omitempty"`
	NameAvailable *bool                   `json:"nameAvailable,omitempty"`
	Reason        *NameCheckFailureReason `json:"reason,omitempty"`
}

type NameCheckFailureReason

type NameCheckFailureReason string
const (
	NameCheckFailureReasonAlreadyExists NameCheckFailureReason = "AlreadyExists"
	NameCheckFailureReasonInvalid       NameCheckFailureReason = "Invalid"
)

func (*NameCheckFailureReason) UnmarshalJSON

func (s *NameCheckFailureReason) 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 POSTClient

type POSTClient struct {
	Client *resourcemanager.Client
}

func NewPOSTClientWithBaseURI

func NewPOSTClientWithBaseURI(sdkApi sdkEnv.Api) (*POSTClient, error)

func (POSTClient) FilesRead

func (c POSTClient) FilesRead(ctx context.Context, id FileId) (result FilesReadOperationResponse, err error)

FilesRead ...

func (POSTClient) FilesReadWrite

func (c POSTClient) FilesReadWrite(ctx context.Context, id FileId) (result FilesReadWriteOperationResponse, err error)

FilesReadWrite ...

func (POSTClient) ServiceTasksCancel

func (c POSTClient) ServiceTasksCancel(ctx context.Context, id ServiceTaskId) (result ServiceTasksCancelOperationResponse, err error)

ServiceTasksCancel ...

func (POSTClient) ServicesCheckChildrenNameAvailability

func (c POSTClient) ServicesCheckChildrenNameAvailability(ctx context.Context, id ServiceId, input NameAvailabilityRequest) (result ServicesCheckChildrenNameAvailabilityOperationResponse, err error)

ServicesCheckChildrenNameAvailability ...

func (POSTClient) ServicesCheckNameAvailability

func (c POSTClient) ServicesCheckNameAvailability(ctx context.Context, id LocationId, input NameAvailabilityRequest) (result ServicesCheckNameAvailabilityOperationResponse, err error)

ServicesCheckNameAvailability ...

func (POSTClient) ServicesCheckStatus

func (c POSTClient) ServicesCheckStatus(ctx context.Context, id ServiceId) (result ServicesCheckStatusOperationResponse, err error)

ServicesCheckStatus ...

func (POSTClient) ServicesStart

func (c POSTClient) ServicesStart(ctx context.Context, id ServiceId) (result ServicesStartOperationResponse, err error)

ServicesStart ...

func (POSTClient) ServicesStartThenPoll

func (c POSTClient) ServicesStartThenPoll(ctx context.Context, id ServiceId) error

ServicesStartThenPoll performs ServicesStart then polls until it's completed

func (POSTClient) ServicesStop

func (c POSTClient) ServicesStop(ctx context.Context, id ServiceId) (result ServicesStopOperationResponse, err error)

ServicesStop ...

func (POSTClient) ServicesStopThenPoll

func (c POSTClient) ServicesStopThenPoll(ctx context.Context, id ServiceId) error

ServicesStopThenPoll performs ServicesStop then polls until it's completed

func (POSTClient) TasksCancel

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

TasksCancel ...

func (POSTClient) TasksCommand

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

TasksCommand ...

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 ServiceId

type ServiceId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
}

ServiceId is a struct representing the Resource ID for a Service

func NewServiceID

func NewServiceID(subscriptionId string, resourceGroupName string, serviceName string) ServiceId

NewServiceID returns a new ServiceId struct

func ParseServiceID

func ParseServiceID(input string) (*ServiceId, error)

ParseServiceID parses 'input' into a ServiceId

func ParseServiceIDInsensitively

func ParseServiceIDInsensitively(input string) (*ServiceId, error)

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

func (*ServiceId) FromParseResult

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

func (ServiceId) ID

func (id ServiceId) ID() string

ID returns the formatted Service ID

func (ServiceId) Segments

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

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

func (ServiceId) String

func (id ServiceId) String() string

String returns a human-readable description of this Service ID

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

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

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 ServiceTasksCancelOperationResponse

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

type ServicesCheckChildrenNameAvailabilityOperationResponse

type ServicesCheckChildrenNameAvailabilityOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *NameAvailabilityResponse
}

type ServicesCheckNameAvailabilityOperationResponse

type ServicesCheckNameAvailabilityOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *NameAvailabilityResponse
}

type ServicesCheckStatusOperationResponse

type ServicesCheckStatusOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DataMigrationServiceStatusResponse
}

type ServicesStartOperationResponse

type ServicesStartOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type ServicesStopOperationResponse

type ServicesStopOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

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 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
}

Jump to

Keyboard shortcuts

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