fileimports

package
v0.20241004.1180715 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: MPL-2.0 Imports: 15 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 Azure Resource Manager 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", "workspaceName", "fileImportId")

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", "workspaceName", "fileImportId")

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", "workspaceName", "fileImportId")

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", "workspaceName")

// 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
	OData        *odata.OData
	Model        *FileImport
}

type DeleteOperationResponse

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

type DeleteStatus

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

func (*DeleteStatus) UnmarshalJSON added in v0.20240221.1115631

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

type FileFormat

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

func (*FileFormat) UnmarshalJSON added in v0.20240221.1115631

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

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

func (*FileImportContentType) UnmarshalJSON added in v0.20240221.1115631

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

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

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

func (*FileImportState) UnmarshalJSON added in v0.20240221.1115631

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

type FileImportsClient

type FileImportsClient struct {
	Client *resourcemanager.Client
}

func NewFileImportsClientWithBaseURI

func NewFileImportsClientWithBaseURI(sdkApi sdkEnv.Api) (*FileImportsClient, error)

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 the results into a single object

func (FileImportsClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies 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
	OData        *odata.OData
	Model        *FileImport
}

type IngestionMode

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

func (*IngestionMode) UnmarshalJSON added in v0.20240221.1115631

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

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []FileImport
}

type ListCustomPager added in v0.20240628.1153531

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

type ListOperationOptions

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

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders added in v0.20240221.1115631

func (o ListOperationOptions) ToHeaders() *client.Headers

func (ListOperationOptions) ToOData added in v0.20240221.1115631

func (o ListOperationOptions) ToOData() *odata.Query

func (ListOperationOptions) ToQuery added in v0.20240221.1115631

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]FileImport
}

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

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