projectresource

package
v0.20230310.1131431 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MPL-2.0 Imports: 10 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2018-04-19/projectresource Documentation

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

Client Initialization

client := projectresource.NewProjectResourceClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ProjectResourceClient.ProjectsCreateOrUpdate

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

payload := projectresource.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: ProjectResourceClient.ProjectsDelete

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

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

Example Usage: ProjectResourceClient.ProjectsGet

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

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

Example Usage: ProjectResourceClient.ProjectsListByResourceGroup

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

// alternatively `client.ProjectsListByResourceGroup(ctx, id)` can be used to do batched pagination
items, err := client.ProjectsListByResourceGroupComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: ProjectResourceClient.ProjectsUpdate

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForProjectProvisioningState

func PossibleValuesForProjectProvisioningState() []string

func PossibleValuesForProjectSourcePlatform

func PossibleValuesForProjectSourcePlatform() []string

func PossibleValuesForProjectTargetPlatform

func PossibleValuesForProjectTargetPlatform() []string

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

Types

type ConnectionInfo

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

type DatabaseInfo

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

type Project

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

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 ProjectOperationPredicate

type ProjectOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (ProjectOperationPredicate) Matches

func (p ProjectOperationPredicate) Matches(input Project) bool

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 ProjectResourceClient

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

func NewProjectResourceClientWithBaseURI

func NewProjectResourceClientWithBaseURI(endpoint string) ProjectResourceClient

func (ProjectResourceClient) ProjectsCreateOrUpdate

func (c ProjectResourceClient) ProjectsCreateOrUpdate(ctx context.Context, id ProjectId, input Project) (result ProjectsCreateOrUpdateOperationResponse, err error)

ProjectsCreateOrUpdate ...

func (ProjectResourceClient) ProjectsDelete

ProjectsDelete ...

func (ProjectResourceClient) ProjectsGet

ProjectsGet ...

func (ProjectResourceClient) ProjectsListByResourceGroup

func (c ProjectResourceClient) ProjectsListByResourceGroup(ctx context.Context, id ServiceId) (resp ProjectsListByResourceGroupOperationResponse, err error)

ProjectsListByResourceGroup ...

func (ProjectResourceClient) ProjectsListByResourceGroupComplete

func (c ProjectResourceClient) ProjectsListByResourceGroupComplete(ctx context.Context, id ServiceId) (ProjectsListByResourceGroupCompleteResult, error)

ProjectsListByResourceGroupComplete retrieves all of the results into a single object

func (ProjectResourceClient) ProjectsListByResourceGroupCompleteMatchingPredicate

func (c ProjectResourceClient) ProjectsListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id ServiceId, predicate ProjectOperationPredicate) (resp ProjectsListByResourceGroupCompleteResult, err error)

ProjectsListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (ProjectResourceClient) ProjectsUpdate

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

ProjectsUpdate ...

type ProjectSourcePlatform

type ProjectSourcePlatform string
const (
	ProjectSourcePlatformSQL     ProjectSourcePlatform = "SQL"
	ProjectSourcePlatformUnknown ProjectSourcePlatform = "Unknown"
)

type ProjectTargetPlatform

type ProjectTargetPlatform string
const (
	ProjectTargetPlatformSQLDB   ProjectTargetPlatform = "SQLDB"
	ProjectTargetPlatformUnknown ProjectTargetPlatform = "Unknown"
)

type ProjectsCreateOrUpdateOperationResponse

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

type ProjectsDeleteOperationOptions

type ProjectsDeleteOperationOptions struct {
	DeleteRunningTasks *bool
}

func DefaultProjectsDeleteOperationOptions

func DefaultProjectsDeleteOperationOptions() ProjectsDeleteOperationOptions

type ProjectsDeleteOperationResponse

type ProjectsDeleteOperationResponse struct {
	HttpResponse *http.Response
}

type ProjectsGetOperationResponse

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

type ProjectsListByResourceGroupCompleteResult

type ProjectsListByResourceGroupCompleteResult struct {
	Items []Project
}

type ProjectsListByResourceGroupOperationResponse

type ProjectsListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Project
	// contains filtered or unexported fields
}

func (ProjectsListByResourceGroupOperationResponse) HasMore

func (ProjectsListByResourceGroupOperationResponse) LoadMore

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

Jump to

Keyboard shortcuts

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