savedsearches

package
v0.20240715.1103416 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2020-08-01/savedsearches Documentation

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

Client Initialization

client := savedsearches.NewSavedSearchesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SavedSearchesClient.CreateOrUpdate

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

payload := savedsearches.SavedSearch{
	// ...
}


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

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

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

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

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: SavedSearchesClient.ListByWorkspace

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateSavedSearchID

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

ValidateSavedSearchID checks that 'input' can be parsed as a Saved Search 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        *SavedSearch
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListByWorkspaceOperationResponse

type ListByWorkspaceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SavedSearchesListResult
}

type SavedSearch

type SavedSearch struct {
	Etag       *string               `json:"etag,omitempty"`
	Id         *string               `json:"id,omitempty"`
	Name       *string               `json:"name,omitempty"`
	Properties SavedSearchProperties `json:"properties"`
	Type       *string               `json:"type,omitempty"`
}

type SavedSearchId

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

SavedSearchId is a struct representing the Resource ID for a Saved Search

func NewSavedSearchID

func NewSavedSearchID(subscriptionId string, resourceGroupName string, workspaceName string, savedSearchId string) SavedSearchId

NewSavedSearchID returns a new SavedSearchId struct

func ParseSavedSearchID

func ParseSavedSearchID(input string) (*SavedSearchId, error)

ParseSavedSearchID parses 'input' into a SavedSearchId

func ParseSavedSearchIDInsensitively

func ParseSavedSearchIDInsensitively(input string) (*SavedSearchId, error)

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

func (*SavedSearchId) FromParseResult

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

func (SavedSearchId) ID

func (id SavedSearchId) ID() string

ID returns the formatted Saved Search ID

func (SavedSearchId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Saved Search ID

func (SavedSearchId) String

func (id SavedSearchId) String() string

String returns a human-readable description of this Saved Search ID

type SavedSearchProperties

type SavedSearchProperties struct {
	Category           string  `json:"category"`
	DisplayName        string  `json:"displayName"`
	FunctionAlias      *string `json:"functionAlias,omitempty"`
	FunctionParameters *string `json:"functionParameters,omitempty"`
	Query              string  `json:"query"`
	Tags               *[]Tag  `json:"tags,omitempty"`
	Version            *int64  `json:"version,omitempty"`
}

type SavedSearchesClient

type SavedSearchesClient struct {
	Client *resourcemanager.Client
}

func NewSavedSearchesClientWithBaseURI

func NewSavedSearchesClientWithBaseURI(sdkApi sdkEnv.Api) (*SavedSearchesClient, error)

func (SavedSearchesClient) CreateOrUpdate

func (c SavedSearchesClient) CreateOrUpdate(ctx context.Context, id SavedSearchId, input SavedSearch) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (SavedSearchesClient) Delete

Delete ...

func (SavedSearchesClient) Get

Get ...

func (SavedSearchesClient) ListByWorkspace

func (c SavedSearchesClient) ListByWorkspace(ctx context.Context, id WorkspaceId) (result ListByWorkspaceOperationResponse, err error)

ListByWorkspace ...

type SavedSearchesListResult

type SavedSearchesListResult struct {
	Value *[]SavedSearch `json:"value,omitempty"`
}

type Tag

type Tag struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

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