dashboard

package
v0.20240627.1143641 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

README

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

The dashboard SDK allows for interaction with the Azure Resource Manager Service portal (API Version 2020-09-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/2020-09-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    []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 DashboardPartMetadata

type DashboardPartMetadata interface {
}

type DashboardParts

type DashboardParts struct {
	Metadata DashboardPartMetadata  `json:"metadata"`
	Position DashboardPartsPosition `json:"position"`
}

func (*DashboardParts) UnmarshalJSON

func (s *DashboardParts) UnmarshalJSON(bytes []byte) error

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   *[]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 MarkdownPartMetadata

type MarkdownPartMetadata struct {
	Inputs   *[]interface{}                `json:"inputs,omitempty"`
	Settings *MarkdownPartMetadataSettings `json:"settings,omitempty"`
}

func (MarkdownPartMetadata) MarshalJSON

func (s MarkdownPartMetadata) MarshalJSON() ([]byte, error)

type MarkdownPartMetadataSettings

type MarkdownPartMetadataSettings struct {
	Content *MarkdownPartMetadataSettingsContent `json:"content,omitempty"`
}

type MarkdownPartMetadataSettingsContent

type MarkdownPartMetadataSettingsContent struct {
	Settings *MarkdownPartMetadataSettingsContentSettings `json:"settings,omitempty"`
}

type MarkdownPartMetadataSettingsContentSettings

type MarkdownPartMetadataSettingsContentSettings struct {
	Content        *string `json:"content,omitempty"`
	MarkdownSource *int64  `json:"markdownSource,omitempty"`
	MarkdownUri    *string `json:"markdownUri,omitempty"`
	Subtitle       *string `json:"subtitle,omitempty"`
	Title          *string `json:"title,omitempty"`
}

type PatchableDashboard

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

type RawDashboardPartMetadataImpl

type RawDashboardPartMetadataImpl struct {
	Type   string
	Values map[string]interface{}
}

RawDashboardPartMetadataImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g. this cannot be used as a Request Payload).

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