patch

package
v0.20230130.1140358 Latest Latest
Warning

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

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

README

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

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

Client Initialization

client := patch.NewPATCHClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: PATCHClient.FilesUpdate

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

payload := patch.ProjectFile{
	// ...
}


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

Example Usage: PATCHClient.ProjectsUpdate

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

payload := patch.Project{
	// ...
}


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

Example Usage: PATCHClient.ServiceTasksUpdate

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

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

Example Usage: PATCHClient.ServicesUpdate

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

payload := patch.DataMigrationService{
	// ...
}


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

Example Usage: PATCHClient.TasksUpdate

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

payload := patch.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 PossibleValuesForProjectProvisioningState

func PossibleValuesForProjectProvisioningState() []string

func PossibleValuesForProjectSourcePlatform

func PossibleValuesForProjectSourcePlatform() []string

func PossibleValuesForProjectTargetPlatform

func PossibleValuesForProjectTargetPlatform() []string

func PossibleValuesForServiceProvisioningState

func PossibleValuesForServiceProvisioningState() []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 ValidateProjectID

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

ValidateProjectID checks that 'input' can be parsed as a Project 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"
)

type ConnectionInfo

type ConnectionInfo struct {
	Password *string `json:"password,omitempty"`
	Type     string  `json:"type"`
	UserName *string `json:"userName,omitempty"`
}

type DataMigrationService

type DataMigrationService struct {
	Etag       *string                         `json:"etag,omitempty"`
	Id         *string                         `json:"id,omitempty"`
	Kind       *string                         `json:"kind,omitempty"`
	Location   string                          `json:"location"`
	Name       *string                         `json:"name,omitempty"`
	Properties *DataMigrationServiceProperties `json:"properties,omitempty"`
	Sku        *ServiceSku                     `json:"sku,omitempty"`
	SystemData *systemdata.SystemData          `json:"systemData,omitempty"`
	Tags       *map[string]string              `json:"tags,omitempty"`
	Type       *string                         `json:"type,omitempty"`
}

type DataMigrationServiceProperties

type DataMigrationServiceProperties struct {
	ProvisioningState *ServiceProvisioningState `json:"provisioningState,omitempty"`
	PublicKey         *string                   `json:"publicKey,omitempty"`
	VirtualNicId      *string                   `json:"virtualNicId,omitempty"`
	VirtualSubnetId   string                    `json:"virtualSubnetId"`
}

type DatabaseInfo

type DatabaseInfo struct {
	SourceDatabaseName string `json:"sourceDatabaseName"`
}

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

type FilesUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *ProjectFile
}

type ODataError

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

type PATCHClient

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

func NewPATCHClientWithBaseURI

func NewPATCHClientWithBaseURI(endpoint string) PATCHClient

func (PATCHClient) FilesUpdate

func (c PATCHClient) FilesUpdate(ctx context.Context, id FileId, input ProjectFile) (result FilesUpdateOperationResponse, err error)

FilesUpdate ...

func (PATCHClient) ProjectsUpdate

func (c PATCHClient) ProjectsUpdate(ctx context.Context, id ProjectId, input Project) (result ProjectsUpdateOperationResponse, err error)

ProjectsUpdate ...

func (PATCHClient) ServiceTasksUpdate

func (c PATCHClient) ServiceTasksUpdate(ctx context.Context, id ServiceTaskId, input ProjectTask) (result ServiceTasksUpdateOperationResponse, err error)

ServiceTasksUpdate ...

func (PATCHClient) ServicesUpdate

func (c PATCHClient) ServicesUpdate(ctx context.Context, id ServiceId, input DataMigrationService) (result ServicesUpdateOperationResponse, err error)

ServicesUpdate ...

func (PATCHClient) ServicesUpdateThenPoll

func (c PATCHClient) ServicesUpdateThenPoll(ctx context.Context, id ServiceId, input DataMigrationService) error

ServicesUpdateThenPoll performs ServicesUpdate then polls until it's completed

func (PATCHClient) TasksUpdate

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

TasksUpdate ...

type Project

type Project struct {
	Id         *string                `json:"id,omitempty"`
	Location   string                 `json:"location"`
	Name       *string                `json:"name,omitempty"`
	Properties *ProjectProperties     `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type ProjectFile

type ProjectFile struct {
	Etag       *string                `json:"etag,omitempty"`
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *ProjectFileProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type ProjectFileProperties

type ProjectFileProperties struct {
	Extension    *string `json:"extension,omitempty"`
	FilePath     *string `json:"filePath,omitempty"`
	LastModified *string `json:"lastModified,omitempty"`
	MediaType    *string `json:"mediaType,omitempty"`
	Size         *int64  `json:"size,omitempty"`
}

func (*ProjectFileProperties) GetLastModifiedAsTime

func (o *ProjectFileProperties) GetLastModifiedAsTime() (*time.Time, error)

func (*ProjectFileProperties) SetLastModifiedAsTime

func (o *ProjectFileProperties) SetLastModifiedAsTime(input time.Time)

type ProjectId

type ProjectId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	ProjectName       string
}

ProjectId is a struct representing the Resource ID for a Project

func NewProjectID

func NewProjectID(subscriptionId string, resourceGroupName string, serviceName string, projectName string) ProjectId

NewProjectID returns a new ProjectId struct

func ParseProjectID

func ParseProjectID(input string) (*ProjectId, error)

ParseProjectID parses 'input' into a ProjectId

func ParseProjectIDInsensitively

func ParseProjectIDInsensitively(input string) (*ProjectId, error)

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

func (ProjectId) ID

func (id ProjectId) ID() string

ID returns the formatted Project ID

func (ProjectId) Segments

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

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

func (ProjectId) String

func (id ProjectId) String() string

String returns a human-readable description of this Project ID

type ProjectProperties

type ProjectProperties struct {
	CreationTime         *string                   `json:"creationTime,omitempty"`
	DatabasesInfo        *[]DatabaseInfo           `json:"databasesInfo,omitempty"`
	ProvisioningState    *ProjectProvisioningState `json:"provisioningState,omitempty"`
	SourceConnectionInfo *ConnectionInfo           `json:"sourceConnectionInfo,omitempty"`
	SourcePlatform       ProjectSourcePlatform     `json:"sourcePlatform"`
	TargetConnectionInfo *ConnectionInfo           `json:"targetConnectionInfo,omitempty"`
	TargetPlatform       ProjectTargetPlatform     `json:"targetPlatform"`
}

func (*ProjectProperties) GetCreationTimeAsTime

func (o *ProjectProperties) GetCreationTimeAsTime() (*time.Time, error)

func (*ProjectProperties) SetCreationTimeAsTime

func (o *ProjectProperties) SetCreationTimeAsTime(input time.Time)

type ProjectProvisioningState

type ProjectProvisioningState string
const (
	ProjectProvisioningStateDeleting  ProjectProvisioningState = "Deleting"
	ProjectProvisioningStateSucceeded ProjectProvisioningState = "Succeeded"
)

type ProjectSourcePlatform

type ProjectSourcePlatform string
const (
	ProjectSourcePlatformMongoDb    ProjectSourcePlatform = "MongoDb"
	ProjectSourcePlatformMySQL      ProjectSourcePlatform = "MySQL"
	ProjectSourcePlatformPostgreSql ProjectSourcePlatform = "PostgreSql"
	ProjectSourcePlatformSQL        ProjectSourcePlatform = "SQL"
	ProjectSourcePlatformUnknown    ProjectSourcePlatform = "Unknown"
)

type ProjectTargetPlatform

type ProjectTargetPlatform string
const (
	ProjectTargetPlatformAzureDbForMySql      ProjectTargetPlatform = "AzureDbForMySql"
	ProjectTargetPlatformAzureDbForPostgreSql ProjectTargetPlatform = "AzureDbForPostgreSql"
	ProjectTargetPlatformMongoDb              ProjectTargetPlatform = "MongoDb"
	ProjectTargetPlatformSQLDB                ProjectTargetPlatform = "SQLDB"
	ProjectTargetPlatformSQLMI                ProjectTargetPlatform = "SQLMI"
	ProjectTargetPlatformUnknown              ProjectTargetPlatform = "Unknown"
)

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 ProjectsUpdateOperationResponse

type ProjectsUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *Project
}

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

type ServiceProvisioningState string
const (
	ServiceProvisioningStateAccepted      ServiceProvisioningState = "Accepted"
	ServiceProvisioningStateDeleting      ServiceProvisioningState = "Deleting"
	ServiceProvisioningStateDeploying     ServiceProvisioningState = "Deploying"
	ServiceProvisioningStateFailed        ServiceProvisioningState = "Failed"
	ServiceProvisioningStateFailedToStart ServiceProvisioningState = "FailedToStart"
	ServiceProvisioningStateFailedToStop  ServiceProvisioningState = "FailedToStop"
	ServiceProvisioningStateStarting      ServiceProvisioningState = "Starting"
	ServiceProvisioningStateStopped       ServiceProvisioningState = "Stopped"
	ServiceProvisioningStateStopping      ServiceProvisioningState = "Stopping"
	ServiceProvisioningStateSucceeded     ServiceProvisioningState = "Succeeded"
)

type ServiceSku

type ServiceSku struct {
	Capacity *int64  `json:"capacity,omitempty"`
	Family   *string `json:"family,omitempty"`
	Name     *string `json:"name,omitempty"`
	Size     *string `json:"size,omitempty"`
	Tier     *string `json:"tier,omitempty"`
}

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 ServiceTasksUpdateOperationResponse

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

type ServicesUpdateOperationResponse

type ServicesUpdateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

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