watchlists

package
v0.20240903.1131440 Latest Latest
Warning

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

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

README

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

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

Client Initialization

client := watchlists.NewWatchlistsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: WatchlistsClient.CreateOrUpdate

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

payload := watchlists.Watchlist{
	// ...
}


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

Example Usage: WatchlistsClient.Delete

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

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

Example Usage: WatchlistsClient.Get

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

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

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

// alternatively `client.List(ctx, id)` can be used to do batched pagination
items, err := client.ListComplete(ctx, id)
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 PossibleValuesForSourceType

func PossibleValuesForSourceType() []string

func ValidateWatchlistID

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

ValidateWatchlistID checks that 'input' can be parsed as a Watchlist 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 CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Watchlist
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListCompleteResult

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

type ListCustomPager added in v0.20240628.1153531

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

type ListOperationResponse

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

type SourceType

type SourceType string
const (
	SourceTypeLocalFile     SourceType = "Local file"
	SourceTypeRemoteStorage SourceType = "Remote storage"
)

func (*SourceType) UnmarshalJSON added in v0.20240221.1115631

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

type UserInfo

type UserInfo struct {
	Email    *string `json:"email,omitempty"`
	Name     *string `json:"name,omitempty"`
	ObjectId *string `json:"objectId,omitempty"`
}

type Watchlist

type Watchlist struct {
	Etag       *string                `json:"etag,omitempty"`
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *WatchlistProperties   `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type WatchlistId

type WatchlistId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
	WatchlistAlias    string
}

WatchlistId is a struct representing the Resource ID for a Watchlist

func NewWatchlistID

func NewWatchlistID(subscriptionId string, resourceGroupName string, workspaceName string, watchlistAlias string) WatchlistId

NewWatchlistID returns a new WatchlistId struct

func ParseWatchlistID

func ParseWatchlistID(input string) (*WatchlistId, error)

ParseWatchlistID parses 'input' into a WatchlistId

func ParseWatchlistIDInsensitively

func ParseWatchlistIDInsensitively(input string) (*WatchlistId, error)

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

func (*WatchlistId) FromParseResult

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

func (WatchlistId) ID

func (id WatchlistId) ID() string

ID returns the formatted Watchlist ID

func (WatchlistId) Segments

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

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

func (WatchlistId) String

func (id WatchlistId) String() string

String returns a human-readable description of this Watchlist ID

type WatchlistOperationPredicate

type WatchlistOperationPredicate struct {
	Etag *string
	Id   *string
	Name *string
	Type *string
}

func (WatchlistOperationPredicate) Matches

func (p WatchlistOperationPredicate) Matches(input Watchlist) bool

type WatchlistProperties

type WatchlistProperties struct {
	ContentType         *string     `json:"contentType,omitempty"`
	Created             *string     `json:"created,omitempty"`
	CreatedBy           *UserInfo   `json:"createdBy,omitempty"`
	DefaultDuration     *string     `json:"defaultDuration,omitempty"`
	Description         *string     `json:"description,omitempty"`
	DisplayName         string      `json:"displayName"`
	IsDeleted           *bool       `json:"isDeleted,omitempty"`
	ItemsSearchKey      string      `json:"itemsSearchKey"`
	Labels              *[]string   `json:"labels,omitempty"`
	NumberOfLinesToSkip *int64      `json:"numberOfLinesToSkip,omitempty"`
	Provider            string      `json:"provider"`
	RawContent          *string     `json:"rawContent,omitempty"`
	Source              *string     `json:"source,omitempty"`
	SourceType          *SourceType `json:"sourceType,omitempty"`
	TenantId            *string     `json:"tenantId,omitempty"`
	Updated             *string     `json:"updated,omitempty"`
	UpdatedBy           *UserInfo   `json:"updatedBy,omitempty"`
	UploadStatus        *string     `json:"uploadStatus,omitempty"`
	WatchlistAlias      *string     `json:"watchlistAlias,omitempty"`
	WatchlistId         *string     `json:"watchlistId,omitempty"`
	WatchlistType       *string     `json:"watchlistType,omitempty"`
}

func (*WatchlistProperties) GetCreatedAsTime

func (o *WatchlistProperties) GetCreatedAsTime() (*time.Time, error)

func (*WatchlistProperties) GetUpdatedAsTime

func (o *WatchlistProperties) GetUpdatedAsTime() (*time.Time, error)

func (*WatchlistProperties) SetCreatedAsTime

func (o *WatchlistProperties) SetCreatedAsTime(input time.Time)

func (*WatchlistProperties) SetUpdatedAsTime

func (o *WatchlistProperties) SetUpdatedAsTime(input time.Time)

type WatchlistsClient

type WatchlistsClient struct {
	Client *resourcemanager.Client
}

func NewWatchlistsClientWithBaseURI

func NewWatchlistsClientWithBaseURI(sdkApi sdkEnv.Api) (*WatchlistsClient, error)

func (WatchlistsClient) CreateOrUpdate

func (c WatchlistsClient) CreateOrUpdate(ctx context.Context, id WatchlistId, input Watchlist) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (WatchlistsClient) Delete

func (c WatchlistsClient) Delete(ctx context.Context, id WatchlistId) (result DeleteOperationResponse, err error)

Delete ...

func (WatchlistsClient) Get

Get ...

func (WatchlistsClient) List

List ...

func (WatchlistsClient) ListComplete

ListComplete retrieves all the results into a single object

func (WatchlistsClient) ListCompleteMatchingPredicate

func (c WatchlistsClient) ListCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, predicate WatchlistOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

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