importjobs

package
v0.20240712.1173055 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/storagecache/2024-03-01/importjobs Documentation

The importjobs SDK allows for interaction with the Azure Resource Manager Service storagecache (API Version 2024-03-01).

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/storagecache/2024-03-01/importjobs"

Client Initialization

client := importjobs.NewImportJobsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ImportJobsClient.CreateOrUpdate

ctx := context.TODO()
id := importjobs.NewImportJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "amlFilesystemValue", "importJobValue")

payload := importjobs.ImportJob{
	// ...
}


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

Example Usage: ImportJobsClient.Delete

ctx := context.TODO()
id := importjobs.NewImportJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "amlFilesystemValue", "importJobValue")

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

Example Usage: ImportJobsClient.Get

ctx := context.TODO()
id := importjobs.NewImportJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "amlFilesystemValue", "importJobValue")

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

Example Usage: ImportJobsClient.ListByAmlFilesystem

ctx := context.TODO()
id := importjobs.NewAmlFilesystemID("12345678-1234-9876-4563-123456789012", "example-resource-group", "amlFilesystemValue")

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

Example Usage: ImportJobsClient.Update

ctx := context.TODO()
id := importjobs.NewImportJobID("12345678-1234-9876-4563-123456789012", "example-resource-group", "amlFilesystemValue", "importJobValue")

payload := importjobs.ImportJobUpdate{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForConflictResolutionMode

func PossibleValuesForConflictResolutionMode() []string

func PossibleValuesForImportJobProvisioningStateType

func PossibleValuesForImportJobProvisioningStateType() []string

func PossibleValuesForImportStatusType

func PossibleValuesForImportStatusType() []string

func ValidateAmlFilesystemID

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

ValidateAmlFilesystemID checks that 'input' can be parsed as a Aml Filesystem ID

func ValidateImportJobID

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

ValidateImportJobID checks that 'input' can be parsed as a Import Job ID

Types

type AmlFilesystemId

type AmlFilesystemId struct {
	SubscriptionId    string
	ResourceGroupName string
	AmlFilesystemName string
}

AmlFilesystemId is a struct representing the Resource ID for a Aml Filesystem

func NewAmlFilesystemID

func NewAmlFilesystemID(subscriptionId string, resourceGroupName string, amlFilesystemName string) AmlFilesystemId

NewAmlFilesystemID returns a new AmlFilesystemId struct

func ParseAmlFilesystemID

func ParseAmlFilesystemID(input string) (*AmlFilesystemId, error)

ParseAmlFilesystemID parses 'input' into a AmlFilesystemId

func ParseAmlFilesystemIDInsensitively

func ParseAmlFilesystemIDInsensitively(input string) (*AmlFilesystemId, error)

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

func (*AmlFilesystemId) FromParseResult

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

func (AmlFilesystemId) ID

func (id AmlFilesystemId) ID() string

ID returns the formatted Aml Filesystem ID

func (AmlFilesystemId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Aml Filesystem ID

func (AmlFilesystemId) String

func (id AmlFilesystemId) String() string

String returns a human-readable description of this Aml Filesystem ID

type ConflictResolutionMode

type ConflictResolutionMode string
const (
	ConflictResolutionModeFail             ConflictResolutionMode = "Fail"
	ConflictResolutionModeOverwriteAlways  ConflictResolutionMode = "OverwriteAlways"
	ConflictResolutionModeOverwriteIfDirty ConflictResolutionMode = "OverwriteIfDirty"
	ConflictResolutionModeSkip             ConflictResolutionMode = "Skip"
)

func (*ConflictResolutionMode) UnmarshalJSON

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

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ImportJob
}

type DeleteOperationResponse

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

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ImportJob
}

type ImportJob

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

type ImportJobId

type ImportJobId struct {
	SubscriptionId    string
	ResourceGroupName string
	AmlFilesystemName string
	ImportJobName     string
}

ImportJobId is a struct representing the Resource ID for a Import Job

func NewImportJobID

func NewImportJobID(subscriptionId string, resourceGroupName string, amlFilesystemName string, importJobName string) ImportJobId

NewImportJobID returns a new ImportJobId struct

func ParseImportJobID

func ParseImportJobID(input string) (*ImportJobId, error)

ParseImportJobID parses 'input' into a ImportJobId

func ParseImportJobIDInsensitively

func ParseImportJobIDInsensitively(input string) (*ImportJobId, error)

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

func (*ImportJobId) FromParseResult

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

func (ImportJobId) ID

func (id ImportJobId) ID() string

ID returns the formatted Import Job ID

func (ImportJobId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Import Job ID

func (ImportJobId) String

func (id ImportJobId) String() string

String returns a human-readable description of this Import Job ID

type ImportJobOperationPredicate

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

func (ImportJobOperationPredicate) Matches

func (p ImportJobOperationPredicate) Matches(input ImportJob) bool

type ImportJobProperties

type ImportJobProperties struct {
	ConflictResolutionMode *ConflictResolutionMode         `json:"conflictResolutionMode,omitempty"`
	ImportPrefixes         *[]string                       `json:"importPrefixes,omitempty"`
	MaximumErrors          *int64                          `json:"maximumErrors,omitempty"`
	ProvisioningState      *ImportJobProvisioningStateType `json:"provisioningState,omitempty"`
	Status                 *ImportJobPropertiesStatus      `json:"status,omitempty"`
}

type ImportJobPropertiesStatus

type ImportJobPropertiesStatus struct {
	BlobsImportedPerSecond *int64            `json:"blobsImportedPerSecond,omitempty"`
	BlobsWalkedPerSecond   *int64            `json:"blobsWalkedPerSecond,omitempty"`
	LastCompletionTime     *string           `json:"lastCompletionTime,omitempty"`
	LastStartedTime        *string           `json:"lastStartedTime,omitempty"`
	State                  *ImportStatusType `json:"state,omitempty"`
	StatusMessage          *string           `json:"statusMessage,omitempty"`
	TotalBlobsImported     *int64            `json:"totalBlobsImported,omitempty"`
	TotalBlobsWalked       *int64            `json:"totalBlobsWalked,omitempty"`
	TotalConflicts         *int64            `json:"totalConflicts,omitempty"`
	TotalErrors            *int64            `json:"totalErrors,omitempty"`
}

func (*ImportJobPropertiesStatus) GetLastCompletionTimeAsTime

func (o *ImportJobPropertiesStatus) GetLastCompletionTimeAsTime() (*time.Time, error)

func (*ImportJobPropertiesStatus) GetLastStartedTimeAsTime

func (o *ImportJobPropertiesStatus) GetLastStartedTimeAsTime() (*time.Time, error)

func (*ImportJobPropertiesStatus) SetLastCompletionTimeAsTime

func (o *ImportJobPropertiesStatus) SetLastCompletionTimeAsTime(input time.Time)

func (*ImportJobPropertiesStatus) SetLastStartedTimeAsTime

func (o *ImportJobPropertiesStatus) SetLastStartedTimeAsTime(input time.Time)

type ImportJobProvisioningStateType

type ImportJobProvisioningStateType string
const (
	ImportJobProvisioningStateTypeCanceled  ImportJobProvisioningStateType = "Canceled"
	ImportJobProvisioningStateTypeCreating  ImportJobProvisioningStateType = "Creating"
	ImportJobProvisioningStateTypeDeleting  ImportJobProvisioningStateType = "Deleting"
	ImportJobProvisioningStateTypeFailed    ImportJobProvisioningStateType = "Failed"
	ImportJobProvisioningStateTypeSucceeded ImportJobProvisioningStateType = "Succeeded"
	ImportJobProvisioningStateTypeUpdating  ImportJobProvisioningStateType = "Updating"
)

func (*ImportJobProvisioningStateType) UnmarshalJSON

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

type ImportJobUpdate

type ImportJobUpdate struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type ImportJobsClient

type ImportJobsClient struct {
	Client *resourcemanager.Client
}

func NewImportJobsClientWithBaseURI

func NewImportJobsClientWithBaseURI(sdkApi sdkEnv.Api) (*ImportJobsClient, error)

func (ImportJobsClient) CreateOrUpdate

func (c ImportJobsClient) CreateOrUpdate(ctx context.Context, id ImportJobId, input ImportJob) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (ImportJobsClient) CreateOrUpdateThenPoll

func (c ImportJobsClient) CreateOrUpdateThenPoll(ctx context.Context, id ImportJobId, input ImportJob) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (ImportJobsClient) Delete

func (c ImportJobsClient) Delete(ctx context.Context, id ImportJobId) (result DeleteOperationResponse, err error)

Delete ...

func (ImportJobsClient) DeleteThenPoll

func (c ImportJobsClient) DeleteThenPoll(ctx context.Context, id ImportJobId) error

DeleteThenPoll performs Delete then polls until it's completed

func (ImportJobsClient) Get

Get ...

func (ImportJobsClient) ListByAmlFilesystem

func (c ImportJobsClient) ListByAmlFilesystem(ctx context.Context, id AmlFilesystemId) (result ListByAmlFilesystemOperationResponse, err error)

ListByAmlFilesystem ...

func (ImportJobsClient) ListByAmlFilesystemComplete

func (c ImportJobsClient) ListByAmlFilesystemComplete(ctx context.Context, id AmlFilesystemId) (ListByAmlFilesystemCompleteResult, error)

ListByAmlFilesystemComplete retrieves all the results into a single object

func (ImportJobsClient) ListByAmlFilesystemCompleteMatchingPredicate

func (c ImportJobsClient) ListByAmlFilesystemCompleteMatchingPredicate(ctx context.Context, id AmlFilesystemId, predicate ImportJobOperationPredicate) (result ListByAmlFilesystemCompleteResult, err error)

ListByAmlFilesystemCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ImportJobsClient) Update

Update ...

func (ImportJobsClient) UpdateThenPoll

func (c ImportJobsClient) UpdateThenPoll(ctx context.Context, id ImportJobId, input ImportJobUpdate) error

UpdateThenPoll performs Update then polls until it's completed

type ImportStatusType

type ImportStatusType string
const (
	ImportStatusTypeCanceled         ImportStatusType = "Canceled"
	ImportStatusTypeCancelling       ImportStatusType = "Cancelling"
	ImportStatusTypeCompleted        ImportStatusType = "Completed"
	ImportStatusTypeCompletedPartial ImportStatusType = "CompletedPartial"
	ImportStatusTypeFailed           ImportStatusType = "Failed"
	ImportStatusTypeInProgress       ImportStatusType = "InProgress"
)

func (*ImportStatusType) UnmarshalJSON

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

type ListByAmlFilesystemCompleteResult

type ListByAmlFilesystemCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ImportJob
}

type ListByAmlFilesystemCustomPager added in v0.20240628.1153531

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

type ListByAmlFilesystemOperationResponse

type ListByAmlFilesystemOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ImportJob
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ImportJob
}

Jump to

Keyboard shortcuts

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