querypacks

package
v0.20230915.1085818 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 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-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 := querypacks.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 := querypacks.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 := querypacks.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 added in v0.20230906.1160501

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

type CreateOrUpdateWithoutNameOperationResponse added in v0.20230906.1160501

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

type DeleteOperationResponse added in v0.20230906.1160501

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

type GetOperationResponse added in v0.20230906.1160501

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

type ListByResourceGroupCompleteResult added in v0.20230906.1160501

type ListByResourceGroupCompleteResult struct {
	Items []LogAnalyticsQueryPack
}

type ListByResourceGroupOperationResponse added in v0.20230906.1160501

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

type ListCompleteResult added in v0.20230906.1160501

type ListCompleteResult struct {
	Items []LogAnalyticsQueryPack
}

type ListOperationResponse added in v0.20230906.1160501

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) 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 added in v0.20230906.1160501

CreateOrUpdate ...

func (QueryPacksClient) CreateOrUpdateWithoutName added in v0.20230906.1160501

CreateOrUpdateWithoutName ...

func (QueryPacksClient) Delete added in v0.20230906.1160501

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

Delete ...

func (QueryPacksClient) Get added in v0.20230906.1160501

Get ...

func (QueryPacksClient) List added in v0.20230906.1160501

List ...

func (QueryPacksClient) ListByResourceGroup added in v0.20230906.1160501

ListByResourceGroup ...

func (QueryPacksClient) ListByResourceGroupComplete added in v0.20230906.1160501

ListByResourceGroupComplete retrieves all the results into a single object

func (QueryPacksClient) ListByResourceGroupCompleteMatchingPredicate added in v0.20230906.1160501

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 added in v0.20230906.1160501

ListComplete retrieves all the results into a single object

func (QueryPacksClient) ListCompleteMatchingPredicate added in v0.20230906.1160501

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 added in v0.20230906.1160501

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 added in v0.20230906.1160501

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