README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/put
Documentation
The put
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/put"
Client Initialization
client := put.NewPUTClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: PUTClient.ProjectsCreateOrUpdate
ctx := context.TODO()
id := put.NewProjectID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "serviceValue", "projectValue")
payload := put.Project{
// ...
}
read, err := client.ProjectsCreateOrUpdate(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: PUTClient.ServicesCreateOrUpdate
ctx := context.TODO()
id := put.NewServiceID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "serviceValue")
payload := put.DataMigrationService{
// ...
}
if err := client.ServicesCreateOrUpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: PUTClient.TasksCreateOrUpdate
ctx := context.TODO()
id := put.NewTaskID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "serviceValue", "projectValue", "taskValue")
payload := put.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
}
Documentation ¶
Index ¶
- func PossibleValuesForCommandState() []string
- func PossibleValuesForProjectProvisioningState() []string
- func PossibleValuesForProjectSourcePlatform() []string
- func PossibleValuesForProjectTargetPlatform() []string
- func PossibleValuesForServiceProvisioningState() []string
- func PossibleValuesForTaskState() []string
- func ValidateProjectID(input interface{}, key string) (warnings []string, errors []error)
- func ValidateServiceID(input interface{}, key string) (warnings []string, errors []error)
- func ValidateTaskID(input interface{}, key string) (warnings []string, errors []error)
- type CommandProperties
- type CommandState
- type ConnectionInfo
- type DataMigrationService
- type DataMigrationServiceProperties
- type DatabaseInfo
- type ODataError
- type PUTClient
- func (c PUTClient) ProjectsCreateOrUpdate(ctx context.Context, id ProjectId, input Project) (result ProjectsCreateOrUpdateOperationResponse, err error)
- func (c PUTClient) ServicesCreateOrUpdate(ctx context.Context, id ServiceId, input DataMigrationService) (result ServicesCreateOrUpdateOperationResponse, err error)
- func (c PUTClient) ServicesCreateOrUpdateThenPoll(ctx context.Context, id ServiceId, input DataMigrationService) error
- func (c PUTClient) TasksCreateOrUpdate(ctx context.Context, id TaskId, input ProjectTask) (result TasksCreateOrUpdateOperationResponse, err error)
- type Project
- type ProjectId
- type ProjectProperties
- type ProjectProvisioningState
- type ProjectSourcePlatform
- type ProjectTargetPlatform
- type ProjectTask
- type ProjectTaskProperties
- type ProjectsCreateOrUpdateOperationResponse
- type ServiceId
- type ServiceProvisioningState
- type ServiceSku
- type ServicesCreateOrUpdateOperationResponse
- type TaskId
- type TaskState
- type TasksCreateOrUpdateOperationResponse
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 ValidateProjectID ¶
ValidateProjectID checks that 'input' can be parsed as a Project ID
func ValidateServiceID ¶
ValidateServiceID checks that 'input' can be parsed as a Service ID
func ValidateTaskID ¶
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 ¶ added in v0.20230712.1163130
func (s *CommandState) UnmarshalJSON(bytes []byte) error
type ConnectionInfo ¶
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"` 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"` VirtualSubnetId string `json:"virtualSubnetId"` }
type DatabaseInfo ¶
type DatabaseInfo struct {
SourceDatabaseName string `json:"sourceDatabaseName"`
}
type ODataError ¶
type ODataError struct { Code *string `json:"code,omitempty"` Details *[]ODataError `json:"details,omitempty"` Message *string `json:"message,omitempty"` }
type PUTClient ¶
type PUTClient struct {
Client *resourcemanager.Client
}
func (PUTClient) ProjectsCreateOrUpdate ¶
func (c PUTClient) ProjectsCreateOrUpdate(ctx context.Context, id ProjectId, input Project) (result ProjectsCreateOrUpdateOperationResponse, err error)
ProjectsCreateOrUpdate ...
func (PUTClient) ServicesCreateOrUpdate ¶
func (c PUTClient) ServicesCreateOrUpdate(ctx context.Context, id ServiceId, input DataMigrationService) (result ServicesCreateOrUpdateOperationResponse, err error)
ServicesCreateOrUpdate ...
func (PUTClient) ServicesCreateOrUpdateThenPoll ¶
func (c PUTClient) ServicesCreateOrUpdateThenPoll(ctx context.Context, id ServiceId, input DataMigrationService) error
ServicesCreateOrUpdateThenPoll performs ServicesCreateOrUpdate then polls until it's completed
func (PUTClient) TasksCreateOrUpdate ¶
func (c PUTClient) TasksCreateOrUpdate(ctx context.Context, id TaskId, input ProjectTask) (result TasksCreateOrUpdateOperationResponse, err error)
TasksCreateOrUpdate ...
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 ¶
ParseProjectID parses 'input' into a ProjectId
func ParseProjectIDInsensitively ¶
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) Segments ¶
func (id ProjectId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise 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" )
func (*ProjectProvisioningState) UnmarshalJSON ¶ added in v0.20230712.1163130
func (s *ProjectProvisioningState) UnmarshalJSON(bytes []byte) error
type ProjectSourcePlatform ¶
type ProjectSourcePlatform string
const ( ProjectSourcePlatformSQL ProjectSourcePlatform = "SQL" ProjectSourcePlatformUnknown ProjectSourcePlatform = "Unknown" )
func (*ProjectSourcePlatform) UnmarshalJSON ¶ added in v0.20230712.1163130
func (s *ProjectSourcePlatform) UnmarshalJSON(bytes []byte) error
type ProjectTargetPlatform ¶
type ProjectTargetPlatform string
const ( ProjectTargetPlatformSQLDB ProjectTargetPlatform = "SQLDB" ProjectTargetPlatformUnknown ProjectTargetPlatform = "Unknown" )
func (*ProjectTargetPlatform) UnmarshalJSON ¶ added in v0.20230712.1163130
func (s *ProjectTargetPlatform) UnmarshalJSON(bytes []byte) error
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 ServiceId ¶
ServiceId is a struct representing the Resource ID for a Service
func NewServiceID ¶
NewServiceID returns a new ServiceId struct
func ParseServiceID ¶
ParseServiceID parses 'input' into a ServiceId
func ParseServiceIDInsensitively ¶
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) Segments ¶
func (id ServiceId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise 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" )
func (*ServiceProvisioningState) UnmarshalJSON ¶ added in v0.20230712.1163130
func (s *ServiceProvisioningState) UnmarshalJSON(bytes []byte) error
type ServiceSku ¶
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 ¶
ParseTaskID parses 'input' into a TaskId
func ParseTaskIDInsensitively ¶
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) Segments ¶
func (id TaskId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise 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 ¶ added in v0.20230712.1163130
type TasksCreateOrUpdateOperationResponse ¶
type TasksCreateOrUpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *ProjectTask }
Source Files ¶
- client.go
- constants.go
- id_project.go
- id_service.go
- id_task.go
- method_projectscreateorupdate.go
- method_servicescreateorupdate.go
- method_taskscreateorupdate.go
- model_commandproperties.go
- model_connectioninfo.go
- model_databaseinfo.go
- model_datamigrationservice.go
- model_datamigrationserviceproperties.go
- model_odataerror.go
- model_project.go
- model_projectproperties.go
- model_projecttask.go
- model_projecttaskproperties.go
- model_servicesku.go
- version.go