dashboards

package
v0.20241203.1090052 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MPL-2.0 Imports: 13 Imported by: 1

README

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

The dashboards SDK allows for interaction with Azure Resource Manager 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/dashboards"

Client Initialization

client := dashboards.NewDashboardsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DashboardsClient.CreateOrUpdate

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

payload := dashboards.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: DashboardsClient.Delete

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

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

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

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: DashboardsClient.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: DashboardsClient.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: DashboardsClient.Update

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

payload := dashboards.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 PossibleValuesForDashboardPartMetadataType

func PossibleValuesForDashboardPartMetadataType() []string

func PossibleValuesForResourceProvisioningState

func PossibleValuesForResourceProvisioningState() []string

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

type BaseDashboardPartMetadataImpl struct {
	Type DashboardPartMetadataType `json:"type"`
}

func (BaseDashboardPartMetadataImpl) DashboardPartMetadata added in v0.20240920.1135249

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 *DashboardPropertiesWithProvisioningState `json:"properties,omitempty"`
	SystemData *systemdata.SystemData                    `json:"systemData,omitempty"`
	Tags       *map[string]string                        `json:"tags,omitempty"`
	Type       *string                                   `json:"type,omitempty"`
}

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 *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 {
	DashboardPartMetadata() BaseDashboardPartMetadataImpl
}

func UnmarshalDashboardPartMetadataImplementation added in v0.20240920.1135249

func UnmarshalDashboardPartMetadataImplementation(input []byte) (DashboardPartMetadata, error)

type DashboardPartMetadataType

type DashboardPartMetadataType string
const (
	DashboardPartMetadataTypeExtensionHubsExtensionPartTypeMarkdownPart DashboardPartMetadataType = "Extension/HubsExtension/PartType/MarkdownPart"
)

func (*DashboardPartMetadataType) UnmarshalJSON

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

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 *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 *interface{}     `json:"metadata,omitempty"`
}

type DashboardPropertiesWithProvisioningState

type DashboardPropertiesWithProvisioningState struct {
	Lenses            *[]DashboardLens           `json:"lenses,omitempty"`
	Metadata          *interface{}               `json:"metadata,omitempty"`
	ProvisioningState *ResourceProvisioningState `json:"provisioningState,omitempty"`
}

type DashboardsClient

type DashboardsClient struct {
	Client *resourcemanager.Client
}

func NewDashboardsClientWithBaseURI

func NewDashboardsClientWithBaseURI(sdkApi sdkEnv.Api) (*DashboardsClient, error)

func (DashboardsClient) CreateOrUpdate

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

CreateOrUpdate ...

func (DashboardsClient) Delete

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

Delete ...

func (DashboardsClient) Get

Get ...

func (DashboardsClient) ListByResourceGroup

ListByResourceGroup ...

func (DashboardsClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (DashboardsClient) ListByResourceGroupCompleteMatchingPredicate

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

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DashboardsClient) ListBySubscription

ListBySubscription ...

func (DashboardsClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (DashboardsClient) ListBySubscriptionCompleteMatchingPredicate

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

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DashboardsClient) Update

Update ...

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 ListByResourceGroupCustomPager

type ListByResourceGroupCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link

type ListByResourceGroupOperationResponse

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

type ListBySubscriptionCompleteResult

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

type ListBySubscriptionCustomPager

type ListBySubscriptionCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListBySubscriptionCustomPager) NextPageLink() *odata.Link

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"`

	Type DashboardPartMetadataType `json:"type"`
}

func (MarkdownPartMetadata) DashboardPartMetadata added in v0.20240920.1135249

func (s MarkdownPartMetadata) DashboardPartMetadata() BaseDashboardPartMetadataImpl

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{}
	// contains filtered or unexported fields
}

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).

func (RawDashboardPartMetadataImpl) DashboardPartMetadata added in v0.20240920.1135249

type ResourceProvisioningState

type ResourceProvisioningState string
const (
	ResourceProvisioningStateCanceled  ResourceProvisioningState = "Canceled"
	ResourceProvisioningStateFailed    ResourceProvisioningState = "Failed"
	ResourceProvisioningStateSucceeded ResourceProvisioningState = "Succeeded"
)

func (*ResourceProvisioningState) UnmarshalJSON

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

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