bookmarks

package
v0.20230203.1144443 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2023 License: MPL-2.0 Imports: 11 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/securityinsights/2022-08-01/bookmarks Documentation

The bookmarks SDK allows for interaction with the Azure Resource Manager Service securityinsights (API Version 2022-08-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/securityinsights/2022-08-01/bookmarks"

Client Initialization

client := bookmarks.NewBookmarksClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: BookmarksClient.CreateOrUpdate

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

payload := bookmarks.Bookmark{
	// ...
}


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: BookmarksClient.Delete

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

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: BookmarksClient.Get

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

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

ctx := context.TODO()
id := bookmarks.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 PossibleValuesForIncidentSeverity

func PossibleValuesForIncidentSeverity() []string

func ValidateBookmarkID

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

ValidateBookmarkID checks that 'input' can be parsed as a Bookmark 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 Bookmark

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

type BookmarkId

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

BookmarkId is a struct representing the Resource ID for a Bookmark

func NewBookmarkID

func NewBookmarkID(subscriptionId string, resourceGroupName string, workspaceName string, bookmarkId string) BookmarkId

NewBookmarkID returns a new BookmarkId struct

func ParseBookmarkID

func ParseBookmarkID(input string) (*BookmarkId, error)

ParseBookmarkID parses 'input' into a BookmarkId

func ParseBookmarkIDInsensitively

func ParseBookmarkIDInsensitively(input string) (*BookmarkId, error)

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

func (BookmarkId) ID

func (id BookmarkId) ID() string

ID returns the formatted Bookmark ID

func (BookmarkId) Segments

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

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

func (BookmarkId) String

func (id BookmarkId) String() string

String returns a human-readable description of this Bookmark ID

type BookmarkOperationPredicate

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

func (BookmarkOperationPredicate) Matches

func (p BookmarkOperationPredicate) Matches(input Bookmark) bool

type BookmarkProperties

type BookmarkProperties struct {
	Created        *string       `json:"created,omitempty"`
	CreatedBy      *UserInfo     `json:"createdBy,omitempty"`
	DisplayName    string        `json:"displayName"`
	EventTime      *string       `json:"eventTime,omitempty"`
	IncidentInfo   *IncidentInfo `json:"incidentInfo,omitempty"`
	Labels         *[]string     `json:"labels,omitempty"`
	Notes          *string       `json:"notes,omitempty"`
	Query          string        `json:"query"`
	QueryEndTime   *string       `json:"queryEndTime,omitempty"`
	QueryResult    *string       `json:"queryResult,omitempty"`
	QueryStartTime *string       `json:"queryStartTime,omitempty"`
	Updated        *string       `json:"updated,omitempty"`
	UpdatedBy      *UserInfo     `json:"updatedBy,omitempty"`
}

func (*BookmarkProperties) GetCreatedAsTime

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

func (*BookmarkProperties) GetEventTimeAsTime

func (o *BookmarkProperties) GetEventTimeAsTime() (*time.Time, error)

func (*BookmarkProperties) GetQueryEndTimeAsTime

func (o *BookmarkProperties) GetQueryEndTimeAsTime() (*time.Time, error)

func (*BookmarkProperties) GetQueryStartTimeAsTime

func (o *BookmarkProperties) GetQueryStartTimeAsTime() (*time.Time, error)

func (*BookmarkProperties) GetUpdatedAsTime

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

func (*BookmarkProperties) SetCreatedAsTime

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

func (*BookmarkProperties) SetEventTimeAsTime

func (o *BookmarkProperties) SetEventTimeAsTime(input time.Time)

func (*BookmarkProperties) SetQueryEndTimeAsTime

func (o *BookmarkProperties) SetQueryEndTimeAsTime(input time.Time)

func (*BookmarkProperties) SetQueryStartTimeAsTime

func (o *BookmarkProperties) SetQueryStartTimeAsTime(input time.Time)

func (*BookmarkProperties) SetUpdatedAsTime

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

type BookmarksClient

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

func NewBookmarksClientWithBaseURI

func NewBookmarksClientWithBaseURI(endpoint string) BookmarksClient

func (BookmarksClient) CreateOrUpdate

func (c BookmarksClient) CreateOrUpdate(ctx context.Context, id BookmarkId, input Bookmark) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (BookmarksClient) Delete

func (c BookmarksClient) Delete(ctx context.Context, id BookmarkId) (result DeleteOperationResponse, err error)

Delete ...

func (BookmarksClient) Get

func (c BookmarksClient) Get(ctx context.Context, id BookmarkId) (result GetOperationResponse, err error)

Get ...

func (BookmarksClient) List

List ...

func (BookmarksClient) ListComplete

ListComplete retrieves all of the results into a single object

func (BookmarksClient) ListCompleteMatchingPredicate

func (c BookmarksClient) ListCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, predicate BookmarkOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *Bookmark
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type GetOperationResponse

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

type IncidentInfo

type IncidentInfo struct {
	IncidentId   *string           `json:"incidentId,omitempty"`
	RelationName *string           `json:"relationName,omitempty"`
	Severity     *IncidentSeverity `json:"severity,omitempty"`
	Title        *string           `json:"title,omitempty"`
}

type IncidentSeverity

type IncidentSeverity string
const (
	IncidentSeverityHigh          IncidentSeverity = "High"
	IncidentSeverityInformational IncidentSeverity = "Informational"
	IncidentSeverityLow           IncidentSeverity = "Low"
	IncidentSeverityMedium        IncidentSeverity = "Medium"
)

type ListCompleteResult

type ListCompleteResult struct {
	Items []Bookmark
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Bookmark
	// 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 UserInfo

type UserInfo struct {
	Email    *string `json:"email,omitempty"`
	Name     *string `json:"name,omitempty"`
	ObjectId *string `json:"objectId,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) 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