dashboard

package
v0.20240522.1080424 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MPL-2.0 Imports: 11 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/portal/2019-01-01-preview/dashboard Documentation

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

Client Initialization

client := dashboard.NewDashboardClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DashboardClient.CreateOrUpdate

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

payload := dashboard.Dashboard{
	// ...
}


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

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

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

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

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: DashboardClient.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: DashboardClient.ListBySubscription

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

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

Example Usage: DashboardClient.Update

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

payload := dashboard.PatchableDashboard{
	// ...
}


read, err := client.Update(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 ValidateDashboardID

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

ValidateDashboardID checks that 'input' can be parsed as a Dashboard ID

Types

type CreateOrUpdateOperationResponse

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

type Dashboard

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

type DashboardClient

type DashboardClient struct {
	Client *resourcemanager.Client
}

func NewDashboardClientWithBaseURI

func NewDashboardClientWithBaseURI(sdkApi sdkEnv.Api) (*DashboardClient, error)

func (DashboardClient) CreateOrUpdate

func (c DashboardClient) CreateOrUpdate(ctx context.Context, id DashboardId, input Dashboard) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (DashboardClient) Delete

func (c DashboardClient) Delete(ctx context.Context, id DashboardId) (result DeleteOperationResponse, err error)

Delete ...

func (DashboardClient) Get

Get ...

func (DashboardClient) ListByResourceGroup

ListByResourceGroup ...

func (DashboardClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (DashboardClient) ListByResourceGroupCompleteMatchingPredicate

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

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DashboardClient) ListBySubscription

ListBySubscription ...

func (DashboardClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (DashboardClient) ListBySubscriptionCompleteMatchingPredicate

func (c DashboardClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate DashboardOperationPredicate) (result ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DashboardClient) Update

Update ...

type DashboardId

type DashboardId struct {
	SubscriptionId    string
	ResourceGroupName string
	DashboardName     string
}

DashboardId is a struct representing the Resource ID for a Dashboard

func NewDashboardID

func NewDashboardID(subscriptionId string, resourceGroupName string, dashboardName string) DashboardId

NewDashboardID returns a new DashboardId struct

func ParseDashboardID

func ParseDashboardID(input string) (*DashboardId, error)

ParseDashboardID parses 'input' into a DashboardId

func ParseDashboardIDInsensitively

func ParseDashboardIDInsensitively(input string) (*DashboardId, error)

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

func (*DashboardId) FromParseResult

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

func (DashboardId) ID

func (id DashboardId) ID() string

ID returns the formatted Dashboard ID

func (DashboardId) Segments

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

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

func (DashboardId) String

func (id DashboardId) String() string

String returns a human-readable description of this Dashboard ID

type DashboardLens

type DashboardLens struct {
	Metadata *map[string]interface{}   `json:"metadata,omitempty"`
	Order    int64                     `json:"order"`
	Parts    map[string]DashboardParts `json:"parts"`
}

type DashboardOperationPredicate

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

func (DashboardOperationPredicate) Matches

func (p DashboardOperationPredicate) Matches(input Dashboard) bool

type DashboardParts

type DashboardParts struct {
	Metadata *interface{}           `json:"metadata,omitempty"`
	Position DashboardPartsPosition `json:"position"`
}

type DashboardPartsPosition

type DashboardPartsPosition struct {
	ColSpan  int64                   `json:"colSpan"`
	Metadata *map[string]interface{} `json:"metadata,omitempty"`
	RowSpan  int64                   `json:"rowSpan"`
	X        int64                   `json:"x"`
	Y        int64                   `json:"y"`
}

type DashboardProperties

type DashboardProperties struct {
	Lenses   *map[string]DashboardLens `json:"lenses,omitempty"`
	Metadata *map[string]interface{}   `json:"metadata,omitempty"`
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListByResourceGroupCompleteResult

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

type ListByResourceGroupOperationResponse

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

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Dashboard
}

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Dashboard
}

type PatchableDashboard

type PatchableDashboard struct {
	Properties *DashboardProperties `json:"properties,omitempty"`
	Tags       *map[string]string   `json:"tags,omitempty"`
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Dashboard
}

Jump to

Keyboard shortcuts

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