fileimports

package
v0.20231211.1135715 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-10-01-preview/fileimports Documentation

The fileimports SDK allows for interaction with the Azure Resource Manager Service securityinsights (API Version 2022-10-01-preview).

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/securityinsights/2022-10-01-preview/fileimports"

Client Initialization

client := fileimports.NewFileImportsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: FileImportsClient.Create

ctx := context.TODO()
id := fileimports.NewFileImportID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "fileImportIdValue")

payload := fileimports.FileImport{
	// ...
}


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

Example Usage: FileImportsClient.Delete

ctx := context.TODO()
id := fileimports.NewFileImportID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "fileImportIdValue")

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

Example Usage: FileImportsClient.Get

ctx := context.TODO()
id := fileimports.NewFileImportID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "fileImportIdValue")

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: FileImportsClient.List

ctx := context.TODO()
id := fileimports.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForDeleteStatus

func PossibleValuesForDeleteStatus() []string

func PossibleValuesForFileFormat

func PossibleValuesForFileFormat() []string

func PossibleValuesForFileImportContentType

func PossibleValuesForFileImportContentType() []string

func PossibleValuesForFileImportState

func PossibleValuesForFileImportState() []string

func PossibleValuesForIngestionMode

func PossibleValuesForIngestionMode() []string

func ValidateFileImportID

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

ValidateFileImportID checks that 'input' can be parsed as a File Import ID

func ValidateWorkspaceID

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

ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID

Types

type CreateOperationResponse

type CreateOperationResponse struct {
	HttpResponse *http.Response
	Model        *FileImport
}

type DeleteOperationResponse

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

type DeleteStatus

type DeleteStatus string
const (
	DeleteStatusDeleted     DeleteStatus = "Deleted"
	DeleteStatusNotDeleted  DeleteStatus = "NotDeleted"
	DeleteStatusUnspecified DeleteStatus = "Unspecified"
)

type FileFormat

type FileFormat string
const (
	FileFormatCSV         FileFormat = "CSV"
	FileFormatJSON        FileFormat = "JSON"
	FileFormatUnspecified FileFormat = "Unspecified"
)

type FileImport

type FileImport struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *FileImportProperties  `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type FileImportContentType

type FileImportContentType string
const (
	FileImportContentTypeBasicIndicator FileImportContentType = "BasicIndicator"
	FileImportContentTypeStixIndicator  FileImportContentType = "StixIndicator"
	FileImportContentTypeUnspecified    FileImportContentType = "Unspecified"
)

type FileImportId

type FileImportId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
	FileImportId      string
}

FileImportId is a struct representing the Resource ID for a File Import

func NewFileImportID

func NewFileImportID(subscriptionId string, resourceGroupName string, workspaceName string, fileImportId string) FileImportId

NewFileImportID returns a new FileImportId struct

func ParseFileImportID

func ParseFileImportID(input string) (*FileImportId, error)

ParseFileImportID parses 'input' into a FileImportId

func ParseFileImportIDInsensitively

func ParseFileImportIDInsensitively(input string) (*FileImportId, error)

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

func (*FileImportId) FromParseResult added in v0.20231127.1171502

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

func (FileImportId) ID

func (id FileImportId) ID() string

ID returns the formatted File Import ID

func (FileImportId) Segments

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

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

func (FileImportId) String

func (id FileImportId) String() string

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

type FileImportOperationPredicate

type FileImportOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (FileImportOperationPredicate) Matches

func (p FileImportOperationPredicate) Matches(input FileImport) bool

type FileImportProperties

type FileImportProperties struct {
	ContentType             FileImportContentType `json:"contentType"`
	CreatedTimeUTC          *string               `json:"createdTimeUTC,omitempty"`
	ErrorFile               *FileMetadata         `json:"errorFile,omitempty"`
	ErrorsPreview           *[]ValidationError    `json:"errorsPreview,omitempty"`
	FilesValidUntilTimeUTC  *string               `json:"filesValidUntilTimeUTC,omitempty"`
	ImportFile              FileMetadata          `json:"importFile"`
	ImportValidUntilTimeUTC *string               `json:"importValidUntilTimeUTC,omitempty"`
	IngestedRecordCount     *int64                `json:"ingestedRecordCount,omitempty"`
	IngestionMode           IngestionMode         `json:"ingestionMode"`
	Source                  string                `json:"source"`
	State                   *FileImportState      `json:"state,omitempty"`
	TotalRecordCount        *int64                `json:"totalRecordCount,omitempty"`
	ValidRecordCount        *int64                `json:"validRecordCount,omitempty"`
}

func (*FileImportProperties) GetCreatedTimeUTCAsTime

func (o *FileImportProperties) GetCreatedTimeUTCAsTime() (*time.Time, error)

func (*FileImportProperties) GetFilesValidUntilTimeUTCAsTime

func (o *FileImportProperties) GetFilesValidUntilTimeUTCAsTime() (*time.Time, error)

func (*FileImportProperties) GetImportValidUntilTimeUTCAsTime

func (o *FileImportProperties) GetImportValidUntilTimeUTCAsTime() (*time.Time, error)

func (*FileImportProperties) SetCreatedTimeUTCAsTime

func (o *FileImportProperties) SetCreatedTimeUTCAsTime(input time.Time)

func (*FileImportProperties) SetFilesValidUntilTimeUTCAsTime

func (o *FileImportProperties) SetFilesValidUntilTimeUTCAsTime(input time.Time)

func (*FileImportProperties) SetImportValidUntilTimeUTCAsTime

func (o *FileImportProperties) SetImportValidUntilTimeUTCAsTime(input time.Time)

type FileImportState

type FileImportState string
const (
	FileImportStateFatalError         FileImportState = "FatalError"
	FileImportStateInProgress         FileImportState = "InProgress"
	FileImportStateIngested           FileImportState = "Ingested"
	FileImportStateIngestedWithErrors FileImportState = "IngestedWithErrors"
	FileImportStateInvalid            FileImportState = "Invalid"
	FileImportStateUnspecified        FileImportState = "Unspecified"
	FileImportStateWaitingForUpload   FileImportState = "WaitingForUpload"
)

type FileImportsClient

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

func NewFileImportsClientWithBaseURI

func NewFileImportsClientWithBaseURI(endpoint string) FileImportsClient

func (FileImportsClient) Create

func (c FileImportsClient) Create(ctx context.Context, id FileImportId, input FileImport) (result CreateOperationResponse, err error)

Create ...

func (FileImportsClient) Delete

Delete ...

func (FileImportsClient) DeleteThenPoll

func (c FileImportsClient) DeleteThenPoll(ctx context.Context, id FileImportId) error

DeleteThenPoll performs Delete then polls until it's completed

func (FileImportsClient) Get

Get ...

func (FileImportsClient) List

List ...

func (FileImportsClient) ListComplete

ListComplete retrieves all of the results into a single object

func (FileImportsClient) ListCompleteMatchingPredicate

func (c FileImportsClient) ListCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, options ListOperationOptions, predicate FileImportOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type FileMetadata

type FileMetadata struct {
	DeleteStatus   *DeleteStatus `json:"deleteStatus,omitempty"`
	FileContentUri *string       `json:"fileContentUri,omitempty"`
	FileFormat     *FileFormat   `json:"fileFormat,omitempty"`
	FileName       *string       `json:"fileName,omitempty"`
	FileSize       *int64        `json:"fileSize,omitempty"`
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *FileImport
}

type IngestionMode

type IngestionMode string
const (
	IngestionModeIngestAnyValidRecords   IngestionMode = "IngestAnyValidRecords"
	IngestionModeIngestOnlyIfAllAreValid IngestionMode = "IngestOnlyIfAllAreValid"
	IngestionModeUnspecified             IngestionMode = "Unspecified"
)

type ListCompleteResult

type ListCompleteResult struct {
	Items []FileImport
}

type ListOperationOptions

type ListOperationOptions struct {
	Filter  *string
	Orderby *string
	Top     *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

type ListOperationResponse

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

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

type ValidationError

type ValidationError struct {
	ErrorMessages *[]string `json:"errorMessages,omitempty"`
	RecordIndex   *int64    `json:"recordIndex,omitempty"`
}

type WorkspaceId

type WorkspaceId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
}

WorkspaceId is a struct representing the Resource ID for a Workspace

func NewWorkspaceID

func NewWorkspaceID(subscriptionId string, resourceGroupName string, workspaceName string) WorkspaceId

NewWorkspaceID returns a new WorkspaceId struct

func ParseWorkspaceID

func ParseWorkspaceID(input string) (*WorkspaceId, error)

ParseWorkspaceID parses 'input' into a WorkspaceId

func ParseWorkspaceIDInsensitively

func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error)

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

func (*WorkspaceId) FromParseResult added in v0.20231127.1171502

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

func (WorkspaceId) ID

func (id WorkspaceId) ID() string

ID returns the formatted Workspace ID

func (WorkspaceId) Segments

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

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

func (WorkspaceId) String

func (id WorkspaceId) String() string

String returns a human-readable description of this Workspace ID

Jump to

Keyboard shortcuts

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