dashboard

package
v4.38.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Azurerm_portal_dashboardArgs added in v4.38.0

type Azurerm_portal_dashboardArgs struct {
	// JSON data representing dashboard body.
	DashboardProperties *string `pulumi:"dashboardProperties"`
	// Specifies the name of the shared Azure Portal Dashboard.
	Name string `pulumi:"name"`
	// Specifies the name of the resource group the shared Azure Portal Dashboard is located in.
	ResourceGroupName string `pulumi:"resourceGroupName"`
}

A collection of arguments for invoking azurerm_portal_dashboard.

type Azurerm_portal_dashboardOutputArgs added in v4.38.0

type Azurerm_portal_dashboardOutputArgs struct {
	// JSON data representing dashboard body.
	DashboardProperties pulumi.StringPtrInput `pulumi:"dashboardProperties"`
	// Specifies the name of the shared Azure Portal Dashboard.
	Name pulumi.StringInput `pulumi:"name"`
	// Specifies the name of the resource group the shared Azure Portal Dashboard is located in.
	ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}

A collection of arguments for invoking azurerm_portal_dashboard.

func (Azurerm_portal_dashboardOutputArgs) ElementType added in v4.38.0

type Azurerm_portal_dashboardResult added in v4.38.0

type Azurerm_portal_dashboardResult struct {
	// JSON data representing dashboard body.
	DashboardProperties string `pulumi:"dashboardProperties"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// The Azure Region where the shared Azure Portal dashboard exists.
	Location          string `pulumi:"location"`
	Name              string `pulumi:"name"`
	ResourceGroupName string `pulumi:"resourceGroupName"`
	// A mapping of tags assigned to the shared Azure Portal dashboard.
	Tags map[string]string `pulumi:"tags"`
}

A collection of values returned by azurerm_portal_dashboard.

func Azurerm_portal_dashboard added in v4.38.0

func Azurerm_portal_dashboard(ctx *pulumi.Context, args *Azurerm_portal_dashboardArgs, opts ...pulumi.InvokeOption) (*Azurerm_portal_dashboardResult, error)

Use this data source to access information about an existing shared dashboard in the Azure Portal. This is the data source of the `dashboard.Dashboard` resource.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/dashboard"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := dashboard.Azurerm_portal_dashboard(ctx, &dashboard.Azurerm_portal_dashboardArgs{
			Name:              "existing-dashboard",
			ResourceGroupName: "dashboard-rg",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("id", data.Azurerm_dashboard.Example.Id)
		return nil
	})
}

```

type Azurerm_portal_dashboardResultOutput added in v4.38.0

type Azurerm_portal_dashboardResultOutput struct{ *pulumi.OutputState }

A collection of values returned by azurerm_portal_dashboard.

func (Azurerm_portal_dashboardResultOutput) DashboardProperties added in v4.38.0

JSON data representing dashboard body.

func (Azurerm_portal_dashboardResultOutput) ElementType added in v4.38.0

func (Azurerm_portal_dashboardResultOutput) Id added in v4.38.0

The provider-assigned unique ID for this managed resource.

func (Azurerm_portal_dashboardResultOutput) Location added in v4.38.0

The Azure Region where the shared Azure Portal dashboard exists.

func (Azurerm_portal_dashboardResultOutput) Name added in v4.38.0

func (Azurerm_portal_dashboardResultOutput) ResourceGroupName added in v4.38.0

func (Azurerm_portal_dashboardResultOutput) Tags added in v4.38.0

A mapping of tags assigned to the shared Azure Portal dashboard.

func (Azurerm_portal_dashboardResultOutput) ToAzurerm_portal_dashboardResultOutput added in v4.38.0

func (o Azurerm_portal_dashboardResultOutput) ToAzurerm_portal_dashboardResultOutput() Azurerm_portal_dashboardResultOutput

func (Azurerm_portal_dashboardResultOutput) ToAzurerm_portal_dashboardResultOutputWithContext added in v4.38.0

func (o Azurerm_portal_dashboardResultOutput) ToAzurerm_portal_dashboardResultOutputWithContext(ctx context.Context) Azurerm_portal_dashboardResultOutput

type Dashboard

type Dashboard struct {
	pulumi.CustomResourceState

	// JSON data representing dashboard body. See above for details on how to obtain this from the Portal.
	DashboardProperties pulumi.StringOutput `pulumi:"dashboardProperties"`
	// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
	Location pulumi.StringOutput `pulumi:"location"`
	// Specifies the name of the Shared Dashboard. This should be be 64 chars max, only alphanumeric and hyphens (no spaces). For a more friendly display name, add the `hidden-title` tag.
	Name pulumi.StringOutput `pulumi:"name"`
	// The name of the resource group in which to
	// create the dashboard.
	ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
	// A mapping of tags to assign to the resource.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
}

Manages a shared dashboard in the Azure Portal.

## Example Usage

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/dashboard"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		mdContent := "# Hello all :)"
		if param := cfg.Get("mdContent"); param != "" {
			mdContent = param
		}
		videoLink := "https://www.youtube.com/watch?v=......"
		if param := cfg.Get("videoLink"); param != "" {
			videoLink = param
		}
		current, err := core.LookupSubscription(ctx, nil, nil)
		if err != nil {
			return err
		}
		_, err = core.NewResourceGroup(ctx, "my-group", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		_, err = dashboard.NewDashboard(ctx, "my-board", &dashboard.DashboardArgs{
			ResourceGroupName: my_group.Name,
			Location:          my_group.Location,
			Tags: pulumi.StringMap{
				"source": pulumi.String("managed"),
			},
			DashboardProperties: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v", "{\n", "   \"lenses\": {\n", "        \"0\": {\n", "            \"order\": 0,\n", "            \"parts\": {\n", "                \"0\": {\n", "                    \"position\": {\n", "                        \"x\": 0,\n", "                        \"y\": 0,\n", "                        \"rowSpan\": 2,\n", "                        \"colSpan\": 3\n", "                    },\n", "                    \"metadata\": {\n", "                        \"inputs\": [],\n", "                        \"type\": \"Extension/HubsExtension/PartType/MarkdownPart\",\n", "                        \"settings\": {\n", "                            \"content\": {\n", "                                \"settings\": {\n", "                                    \"content\": \"", mdContent, "\",\n", "                                    \"subtitle\": \"\",\n", "                                    \"title\": \"\"\n", "                                }\n", "                            }\n", "                        }\n", "                    }\n", "                },               \n", "                \"1\": {\n", "                    \"position\": {\n", "                        \"x\": 5,\n", "                        \"y\": 0,\n", "                        \"rowSpan\": 4,\n", "                        \"colSpan\": 6\n", "                    },\n", "                    \"metadata\": {\n", "                        \"inputs\": [],\n", "                        \"type\": \"Extension/HubsExtension/PartType/VideoPart\",\n", "                        \"settings\": {\n", "                            \"content\": {\n", "                                \"settings\": {\n", "                                    \"title\": \"Important Information\",\n", "                                    \"subtitle\": \"\",\n", "                                    \"src\": \"", videoLink, "\",\n", "                                    \"autoplay\": true\n", "                                }\n", "                            }\n", "                        }\n", "                    }\n", "                },\n", "                \"2\": {\n", "                    \"position\": {\n", "                        \"x\": 0,\n", "                        \"y\": 4,\n", "                        \"rowSpan\": 4,\n", "                        \"colSpan\": 6\n", "                    },\n", "                    \"metadata\": {\n", "                        \"inputs\": [\n", "                            {\n", "                                \"name\": \"ComponentId\",\n", "                                \"value\": \"/subscriptions/", current.SubscriptionId, "/resourceGroups/myRG/providers/microsoft.insights/components/myWebApp\"\n", "                            }\n", "                        ],\n", "                        \"type\": \"Extension/AppInsightsExtension/PartType/AppMapGalPt\",\n", "                        \"settings\": {},\n", "                        \"asset\": {\n", "                            \"idInputName\": \"ComponentId\",\n", "                            \"type\": \"ApplicationInsights\"\n", "                        }\n", "                    }\n", "                }              \n", "            }\n", "        }\n", "    },\n", "    \"metadata\": {\n", "        \"model\": {\n", "            \"timeRange\": {\n", "                \"value\": {\n", "                    \"relative\": {\n", "                        \"duration\": 24,\n", "                        \"timeUnit\": 1\n", "                    }\n", "                },\n", "                \"type\": \"MsPortalFx.Composition.Configuration.ValueTypes.TimeRange\"\n", "            },\n", "            \"filterLocale\": {\n", "                \"value\": \"en-us\"\n", "            },\n", "            \"filters\": {\n", "                \"value\": {\n", "                    \"MsPortalFx_TimeRange\": {\n", "                        \"model\": {\n", "                            \"format\": \"utc\",\n", "                            \"granularity\": \"auto\",\n", "                            \"relative\": \"24h\"\n", "                        },\n", "                        \"displayCache\": {\n", "                            \"name\": \"UTC Time\",\n", "                            \"value\": \"Past 24 hours\"\n", "                        },\n", "                        \"filteredPartIds\": [\n", "                            \"StartboardPart-UnboundPart-ae44fef5-76b8-46b0-86f0-2b3f47bad1c7\"\n", "                        ]\n", "                    }\n", "                }\n", "            }\n", "        }\n", "    }\n", "}\n")),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

It is recommended to follow the steps outlined [here](https://docs.microsoft.com/en-us/azure/azure-portal/azure-portal-dashboards-create-programmatically#fetch-the-json-representation-of-the-dashboard) to create a Dashboard in the Portal and extract the relevant JSON to use in this resource. From the extracted JSON, the contents of the `properties: {}` object can used. Variables can be injected as needed - see above example.

## Import

Dashboards can be imported using the `resource id`, e.g.

```sh

$ pulumi import azure:dashboard/dashboard:Dashboard my-board /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Portal/dashboards/00000000-0000-0000-0000-000000000000

```

Note the URI in the above sample can be found using the Resource Explorer tool in the Azure Portal.

func GetDashboard

func GetDashboard(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *DashboardState, opts ...pulumi.ResourceOption) (*Dashboard, error)

GetDashboard gets an existing Dashboard resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewDashboard

func NewDashboard(ctx *pulumi.Context,
	name string, args *DashboardArgs, opts ...pulumi.ResourceOption) (*Dashboard, error)

NewDashboard registers a new resource with the given unique name, arguments, and options.

func (*Dashboard) ElementType

func (*Dashboard) ElementType() reflect.Type

func (*Dashboard) ToDashboardOutput

func (i *Dashboard) ToDashboardOutput() DashboardOutput

func (*Dashboard) ToDashboardOutputWithContext

func (i *Dashboard) ToDashboardOutputWithContext(ctx context.Context) DashboardOutput

type DashboardArgs

type DashboardArgs struct {
	// JSON data representing dashboard body. See above for details on how to obtain this from the Portal.
	DashboardProperties pulumi.StringPtrInput
	// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
	Location pulumi.StringPtrInput
	// Specifies the name of the Shared Dashboard. This should be be 64 chars max, only alphanumeric and hyphens (no spaces). For a more friendly display name, add the `hidden-title` tag.
	Name pulumi.StringPtrInput
	// The name of the resource group in which to
	// create the dashboard.
	ResourceGroupName pulumi.StringInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.StringMapInput
}

The set of arguments for constructing a Dashboard resource.

func (DashboardArgs) ElementType

func (DashboardArgs) ElementType() reflect.Type

type DashboardArray

type DashboardArray []DashboardInput

func (DashboardArray) ElementType

func (DashboardArray) ElementType() reflect.Type

func (DashboardArray) ToDashboardArrayOutput

func (i DashboardArray) ToDashboardArrayOutput() DashboardArrayOutput

func (DashboardArray) ToDashboardArrayOutputWithContext

func (i DashboardArray) ToDashboardArrayOutputWithContext(ctx context.Context) DashboardArrayOutput

type DashboardArrayInput

type DashboardArrayInput interface {
	pulumi.Input

	ToDashboardArrayOutput() DashboardArrayOutput
	ToDashboardArrayOutputWithContext(context.Context) DashboardArrayOutput
}

DashboardArrayInput is an input type that accepts DashboardArray and DashboardArrayOutput values. You can construct a concrete instance of `DashboardArrayInput` via:

DashboardArray{ DashboardArgs{...} }

type DashboardArrayOutput

type DashboardArrayOutput struct{ *pulumi.OutputState }

func (DashboardArrayOutput) ElementType

func (DashboardArrayOutput) ElementType() reflect.Type

func (DashboardArrayOutput) Index

func (DashboardArrayOutput) ToDashboardArrayOutput

func (o DashboardArrayOutput) ToDashboardArrayOutput() DashboardArrayOutput

func (DashboardArrayOutput) ToDashboardArrayOutputWithContext

func (o DashboardArrayOutput) ToDashboardArrayOutputWithContext(ctx context.Context) DashboardArrayOutput

type DashboardInput

type DashboardInput interface {
	pulumi.Input

	ToDashboardOutput() DashboardOutput
	ToDashboardOutputWithContext(ctx context.Context) DashboardOutput
}

type DashboardMap

type DashboardMap map[string]DashboardInput

func (DashboardMap) ElementType

func (DashboardMap) ElementType() reflect.Type

func (DashboardMap) ToDashboardMapOutput

func (i DashboardMap) ToDashboardMapOutput() DashboardMapOutput

func (DashboardMap) ToDashboardMapOutputWithContext

func (i DashboardMap) ToDashboardMapOutputWithContext(ctx context.Context) DashboardMapOutput

type DashboardMapInput

type DashboardMapInput interface {
	pulumi.Input

	ToDashboardMapOutput() DashboardMapOutput
	ToDashboardMapOutputWithContext(context.Context) DashboardMapOutput
}

DashboardMapInput is an input type that accepts DashboardMap and DashboardMapOutput values. You can construct a concrete instance of `DashboardMapInput` via:

DashboardMap{ "key": DashboardArgs{...} }

type DashboardMapOutput

type DashboardMapOutput struct{ *pulumi.OutputState }

func (DashboardMapOutput) ElementType

func (DashboardMapOutput) ElementType() reflect.Type

func (DashboardMapOutput) MapIndex

func (DashboardMapOutput) ToDashboardMapOutput

func (o DashboardMapOutput) ToDashboardMapOutput() DashboardMapOutput

func (DashboardMapOutput) ToDashboardMapOutputWithContext

func (o DashboardMapOutput) ToDashboardMapOutputWithContext(ctx context.Context) DashboardMapOutput

type DashboardOutput

type DashboardOutput struct{ *pulumi.OutputState }

func (DashboardOutput) ElementType

func (DashboardOutput) ElementType() reflect.Type

func (DashboardOutput) ToDashboardOutput

func (o DashboardOutput) ToDashboardOutput() DashboardOutput

func (DashboardOutput) ToDashboardOutputWithContext

func (o DashboardOutput) ToDashboardOutputWithContext(ctx context.Context) DashboardOutput

type DashboardState

type DashboardState struct {
	// JSON data representing dashboard body. See above for details on how to obtain this from the Portal.
	DashboardProperties pulumi.StringPtrInput
	// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
	Location pulumi.StringPtrInput
	// Specifies the name of the Shared Dashboard. This should be be 64 chars max, only alphanumeric and hyphens (no spaces). For a more friendly display name, add the `hidden-title` tag.
	Name pulumi.StringPtrInput
	// The name of the resource group in which to
	// create the dashboard.
	ResourceGroupName pulumi.StringPtrInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.StringMapInput
}

func (DashboardState) ElementType

func (DashboardState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

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