projectresource

package
v0.20241128.1084944 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MPL-2.0 Imports: 14 Imported by: 1

README

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

The projectresource SDK allows for interaction with Azure Resource Manager 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/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", "resourceGroupName", "serviceName", "projectName")

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", "resourceGroupName", "serviceName", "projectName")

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", "resourceGroupName", "serviceName", "projectName")

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

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

// alternatively `client.ProjectsList(ctx, id)` can be used to do batched pagination
items, err := client.ProjectsListComplete(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", "resourceGroupName", "serviceName", "projectName")

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

func PossibleValuesForAuthenticationType() []string

func PossibleValuesForProjectProvisioningState

func PossibleValuesForProjectProvisioningState() []string

func PossibleValuesForProjectSourcePlatform

func PossibleValuesForProjectSourcePlatform() []string

func PossibleValuesForProjectTargetPlatform

func PossibleValuesForProjectTargetPlatform() []string

func PossibleValuesForSqlSourcePlatform added in v0.20241009.1142232

func PossibleValuesForSqlSourcePlatform() []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 AuthenticationType added in v0.20241009.1142232

type AuthenticationType string
const (
	AuthenticationTypeActiveDirectoryIntegrated AuthenticationType = "ActiveDirectoryIntegrated"
	AuthenticationTypeActiveDirectoryPassword   AuthenticationType = "ActiveDirectoryPassword"
	AuthenticationTypeNone                      AuthenticationType = "None"
	AuthenticationTypeSqlAuthentication         AuthenticationType = "SqlAuthentication"
	AuthenticationTypeWindowsAuthentication     AuthenticationType = "WindowsAuthentication"
)

func (*AuthenticationType) UnmarshalJSON added in v0.20241009.1142232

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

type BaseConnectionInfoImpl added in v0.20241009.1142232

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

func (BaseConnectionInfoImpl) ConnectionInfo added in v0.20241009.1142232

type ConnectionInfo

type ConnectionInfo interface {
	ConnectionInfo() BaseConnectionInfoImpl
}

func UnmarshalConnectionInfoImplementation added in v0.20241009.1142232

func UnmarshalConnectionInfoImplementation(input []byte) (ConnectionInfo, error)

type DatabaseInfo

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

type MiSqlConnectionInfo added in v0.20241009.1142232

type MiSqlConnectionInfo struct {
	ManagedInstanceResourceId string `json:"managedInstanceResourceId"`

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

func (MiSqlConnectionInfo) ConnectionInfo added in v0.20241009.1142232

func (s MiSqlConnectionInfo) ConnectionInfo() BaseConnectionInfoImpl

func (MiSqlConnectionInfo) MarshalJSON added in v0.20241009.1142232

func (s MiSqlConnectionInfo) MarshalJSON() ([]byte, error)

type MongoDbConnectionInfo added in v0.20241009.1142232

type MongoDbConnectionInfo struct {
	ConnectionString string `json:"connectionString"`

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

func (MongoDbConnectionInfo) ConnectionInfo added in v0.20241009.1142232

func (s MongoDbConnectionInfo) ConnectionInfo() BaseConnectionInfoImpl

func (MongoDbConnectionInfo) MarshalJSON added in v0.20241009.1142232

func (s MongoDbConnectionInfo) MarshalJSON() ([]byte, error)

type MySqlConnectionInfo added in v0.20241009.1142232

type MySqlConnectionInfo struct {
	EncryptConnection *bool  `json:"encryptConnection,omitempty"`
	Port              int64  `json:"port"`
	ServerName        string `json:"serverName"`

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

func (MySqlConnectionInfo) ConnectionInfo added in v0.20241009.1142232

func (s MySqlConnectionInfo) ConnectionInfo() BaseConnectionInfoImpl

func (MySqlConnectionInfo) MarshalJSON added in v0.20241009.1142232

func (s MySqlConnectionInfo) MarshalJSON() ([]byte, error)

type OracleConnectionInfo added in v0.20241009.1142232

type OracleConnectionInfo struct {
	DataSource string `json:"dataSource"`

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

func (OracleConnectionInfo) ConnectionInfo added in v0.20241009.1142232

func (s OracleConnectionInfo) ConnectionInfo() BaseConnectionInfoImpl

func (OracleConnectionInfo) MarshalJSON added in v0.20241009.1142232

func (s OracleConnectionInfo) MarshalJSON() ([]byte, error)

type PostgreSqlConnectionInfo added in v0.20241009.1142232

type PostgreSqlConnectionInfo struct {
	DatabaseName           *string `json:"databaseName,omitempty"`
	EncryptConnection      *bool   `json:"encryptConnection,omitempty"`
	Port                   int64   `json:"port"`
	ServerName             string  `json:"serverName"`
	TrustServerCertificate *bool   `json:"trustServerCertificate,omitempty"`

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

func (PostgreSqlConnectionInfo) ConnectionInfo added in v0.20241009.1142232

func (PostgreSqlConnectionInfo) MarshalJSON added in v0.20241009.1142232

func (s PostgreSqlConnectionInfo) MarshalJSON() ([]byte, error)

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

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

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"`
	SourcePlatform       ProjectSourcePlatform     `json:"sourcePlatform"`
	TargetConnectionInfo ConnectionInfo            `json:"targetConnectionInfo"`
	TargetPlatform       ProjectTargetPlatform     `json:"targetPlatform"`
}

func (*ProjectProperties) GetCreationTimeAsTime

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

func (*ProjectProperties) SetCreationTimeAsTime

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

func (*ProjectProperties) UnmarshalJSON added in v0.20241009.1142232

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

type ProjectProvisioningState

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

func (*ProjectProvisioningState) UnmarshalJSON

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

type ProjectResourceClient

type ProjectResourceClient struct {
	Client *resourcemanager.Client
}

func NewProjectResourceClientWithBaseURI

func NewProjectResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*ProjectResourceClient, error)

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

func (c ProjectResourceClient) ProjectsList(ctx context.Context, id ServiceId) (result ProjectsListOperationResponse, err error)

ProjectsList ...

func (ProjectResourceClient) ProjectsListComplete

ProjectsListComplete retrieves all the results into a single object

func (ProjectResourceClient) ProjectsListCompleteMatchingPredicate

func (c ProjectResourceClient) ProjectsListCompleteMatchingPredicate(ctx context.Context, id ServiceId, predicate ProjectOperationPredicate) (result ProjectsListCompleteResult, err error)

ProjectsListCompleteMatchingPredicate retrieves all the results and then applies 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 (
	ProjectSourcePlatformMongoDb    ProjectSourcePlatform = "MongoDb"
	ProjectSourcePlatformMySQL      ProjectSourcePlatform = "MySQL"
	ProjectSourcePlatformPostgreSql ProjectSourcePlatform = "PostgreSql"
	ProjectSourcePlatformSQL        ProjectSourcePlatform = "SQL"
	ProjectSourcePlatformUnknown    ProjectSourcePlatform = "Unknown"
)

func (*ProjectSourcePlatform) UnmarshalJSON

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

type ProjectTargetPlatform

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

func (*ProjectTargetPlatform) UnmarshalJSON

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

type ProjectsCreateOrUpdateOperationResponse

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

type ProjectsDeleteOperationOptions

type ProjectsDeleteOperationOptions struct {
	DeleteRunningTasks *bool
}

func DefaultProjectsDeleteOperationOptions

func DefaultProjectsDeleteOperationOptions() ProjectsDeleteOperationOptions

func (ProjectsDeleteOperationOptions) ToHeaders

func (ProjectsDeleteOperationOptions) ToOData

func (ProjectsDeleteOperationOptions) ToQuery

type ProjectsDeleteOperationResponse

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

type ProjectsGetOperationResponse

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

type ProjectsListCompleteResult

type ProjectsListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Project
}

type ProjectsListCustomPager added in v0.20240628.1153531

type ProjectsListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ProjectsListCustomPager) NextPageLink() *odata.Link

type ProjectsListOperationResponse

type ProjectsListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Project
}

type ProjectsUpdateOperationResponse

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

type RawConnectionInfoImpl added in v0.20241009.1142232

type RawConnectionInfoImpl struct {
	Type   string
	Values map[string]interface{}
	// contains filtered or unexported fields
}

RawConnectionInfoImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g. this cannot be used as a Request Payload).

func (RawConnectionInfoImpl) ConnectionInfo added in v0.20241009.1142232

func (s RawConnectionInfoImpl) ConnectionInfo() BaseConnectionInfoImpl

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

type SqlConnectionInfo struct {
	AdditionalSettings     *string             `json:"additionalSettings,omitempty"`
	Authentication         *AuthenticationType `json:"authentication,omitempty"`
	DataSource             string              `json:"dataSource"`
	EncryptConnection      *bool               `json:"encryptConnection,omitempty"`
	Platform               *SqlSourcePlatform  `json:"platform,omitempty"`
	TrustServerCertificate *bool               `json:"trustServerCertificate,omitempty"`

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

func (SqlConnectionInfo) ConnectionInfo added in v0.20241009.1142232

func (s SqlConnectionInfo) ConnectionInfo() BaseConnectionInfoImpl

func (SqlConnectionInfo) MarshalJSON added in v0.20241009.1142232

func (s SqlConnectionInfo) MarshalJSON() ([]byte, error)

type SqlSourcePlatform added in v0.20241009.1142232

type SqlSourcePlatform string
const (
	SqlSourcePlatformSqlOnPrem SqlSourcePlatform = "SqlOnPrem"
)

func (*SqlSourcePlatform) UnmarshalJSON added in v0.20241009.1142232

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

Jump to

Keyboard shortcuts

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