querypacks

package
v0.20240304.1112406 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/querypacks Documentation

The querypacks SDK allows for interaction with the Azure Resource Manager Service operationalinsights (API Version 2019-09-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/operationalinsights/2019-09-01/querypacks"

Client Initialization

client := querypacks.NewQueryPacksClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: QueryPacksClient.CreateOrUpdate

ctx := context.TODO()
id := querypacks.NewQueryPackID("12345678-1234-9876-4563-123456789012", "example-resource-group", "queryPackValue")

payload := querypacks.LogAnalyticsQueryPack{
	// ...
}


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: QueryPacksClient.CreateOrUpdateWithoutName

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

payload := querypacks.LogAnalyticsQueryPack{
	// ...
}


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

Example Usage: QueryPacksClient.Delete

ctx := context.TODO()
id := querypacks.NewQueryPackID("12345678-1234-9876-4563-123456789012", "example-resource-group", "queryPackValue")

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

ctx := context.TODO()
id := querypacks.NewQueryPackID("12345678-1234-9876-4563-123456789012", "example-resource-group", "queryPackValue")

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

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

// 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
}

Example Usage: QueryPacksClient.ListByResourceGroup

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

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

Example Usage: QueryPacksClient.UpdateTags

ctx := context.TODO()
id := querypacks.NewQueryPackID("12345678-1234-9876-4563-123456789012", "example-resource-group", "queryPackValue")

payload := querypacks.TagsResource{
	// ...
}


read, err := client.UpdateTags(ctx, id, payload)
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 ValidateQueryPackID

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

ValidateQueryPackID checks that 'input' can be parsed as a Query Pack ID

Types

type CreateOrUpdateOperationResponse

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

type CreateOrUpdateWithoutNameOperationResponse

type CreateOrUpdateWithoutNameOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *LogAnalyticsQueryPack
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []LogAnalyticsQueryPack
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]LogAnalyticsQueryPack
}

type ListCompleteResult

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

type ListOperationResponse

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

type LogAnalyticsQueryPack

type LogAnalyticsQueryPack struct {
	Id         *string                         `json:"id,omitempty"`
	Location   string                          `json:"location"`
	Name       *string                         `json:"name,omitempty"`
	Properties LogAnalyticsQueryPackProperties `json:"properties"`
	Tags       *map[string]string              `json:"tags,omitempty"`
	Type       *string                         `json:"type,omitempty"`
}

type LogAnalyticsQueryPackOperationPredicate

type LogAnalyticsQueryPackOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (LogAnalyticsQueryPackOperationPredicate) Matches

type LogAnalyticsQueryPackProperties

type LogAnalyticsQueryPackProperties struct {
	ProvisioningState *string `json:"provisioningState,omitempty"`
	QueryPackId       *string `json:"queryPackId,omitempty"`
	TimeCreated       *string `json:"timeCreated,omitempty"`
	TimeModified      *string `json:"timeModified,omitempty"`
}

func (*LogAnalyticsQueryPackProperties) GetTimeCreatedAsTime

func (o *LogAnalyticsQueryPackProperties) GetTimeCreatedAsTime() (*time.Time, error)

func (*LogAnalyticsQueryPackProperties) GetTimeModifiedAsTime

func (o *LogAnalyticsQueryPackProperties) GetTimeModifiedAsTime() (*time.Time, error)

func (*LogAnalyticsQueryPackProperties) SetTimeCreatedAsTime

func (o *LogAnalyticsQueryPackProperties) SetTimeCreatedAsTime(input time.Time)

func (*LogAnalyticsQueryPackProperties) SetTimeModifiedAsTime

func (o *LogAnalyticsQueryPackProperties) SetTimeModifiedAsTime(input time.Time)

type QueryPackId

type QueryPackId struct {
	SubscriptionId    string
	ResourceGroupName string
	QueryPackName     string
}

QueryPackId is a struct representing the Resource ID for a Query Pack

func NewQueryPackID

func NewQueryPackID(subscriptionId string, resourceGroupName string, queryPackName string) QueryPackId

NewQueryPackID returns a new QueryPackId struct

func ParseQueryPackID

func ParseQueryPackID(input string) (*QueryPackId, error)

ParseQueryPackID parses 'input' into a QueryPackId

func ParseQueryPackIDInsensitively

func ParseQueryPackIDInsensitively(input string) (*QueryPackId, error)

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

func (*QueryPackId) FromParseResult

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

func (QueryPackId) ID

func (id QueryPackId) ID() string

ID returns the formatted Query Pack ID

func (QueryPackId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Query Pack ID

func (QueryPackId) String

func (id QueryPackId) String() string

String returns a human-readable description of this Query Pack ID

type QueryPacksClient

type QueryPacksClient struct {
	Client *resourcemanager.Client
}

func NewQueryPacksClientWithBaseURI

func NewQueryPacksClientWithBaseURI(sdkApi sdkEnv.Api) (*QueryPacksClient, error)

func (QueryPacksClient) CreateOrUpdate

CreateOrUpdate ...

func (QueryPacksClient) CreateOrUpdateWithoutName

CreateOrUpdateWithoutName ...

func (QueryPacksClient) Delete

func (c QueryPacksClient) Delete(ctx context.Context, id QueryPackId) (result DeleteOperationResponse, err error)

Delete ...

func (QueryPacksClient) Get

Get ...

func (QueryPacksClient) List

List ...

func (QueryPacksClient) ListByResourceGroup

ListByResourceGroup ...

func (QueryPacksClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (QueryPacksClient) ListByResourceGroupCompleteMatchingPredicate

func (c QueryPacksClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate LogAnalyticsQueryPackOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (QueryPacksClient) ListComplete

ListComplete retrieves all the results into a single object

func (QueryPacksClient) ListCompleteMatchingPredicate

func (c QueryPacksClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate LogAnalyticsQueryPackOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (QueryPacksClient) UpdateTags

func (c QueryPacksClient) UpdateTags(ctx context.Context, id QueryPackId, input TagsResource) (result UpdateTagsOperationResponse, err error)

UpdateTags ...

type TagsResource

type TagsResource struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type UpdateTagsOperationResponse

type UpdateTagsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *LogAnalyticsQueryPack
}

Jump to

Keyboard shortcuts

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