amp

package
v6.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 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 AlertManagerDefinition

type AlertManagerDefinition struct {
	pulumi.CustomResourceState

	// the alert manager definition that you want to be applied. See more [in AWS Docs](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-alert-manager.html).
	Definition pulumi.StringOutput `pulumi:"definition"`
	// ID of the prometheus workspace the alert manager definition should be linked to
	WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"`
}

Manages an Amazon Managed Service for Prometheus (AMP) Alert Manager Definition

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		demoWorkspace, err := amp.NewWorkspace(ctx, "demoWorkspace", nil)
		if err != nil {
			return err
		}
		_, err = amp.NewAlertManagerDefinition(ctx, "demoAlertManagerDefinition", &amp.AlertManagerDefinitionArgs{
			WorkspaceId: demoWorkspace.ID(),
			Definition: pulumi.String(`alertmanager_config: |
  route:
    receiver: 'default'
  receivers:
    - name: 'default'

`),

		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Using `pulumi import`, import the prometheus alert manager definition using the workspace identifier. For example:

```sh

$ pulumi import aws:amp/alertManagerDefinition:AlertManagerDefinition demo ws-C6DCB907-F2D7-4D96-957B-66691F865D8B

```

func GetAlertManagerDefinition

func GetAlertManagerDefinition(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *AlertManagerDefinitionState, opts ...pulumi.ResourceOption) (*AlertManagerDefinition, error)

GetAlertManagerDefinition gets an existing AlertManagerDefinition 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 NewAlertManagerDefinition

func NewAlertManagerDefinition(ctx *pulumi.Context,
	name string, args *AlertManagerDefinitionArgs, opts ...pulumi.ResourceOption) (*AlertManagerDefinition, error)

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

func (*AlertManagerDefinition) ElementType

func (*AlertManagerDefinition) ElementType() reflect.Type

func (*AlertManagerDefinition) ToAlertManagerDefinitionOutput

func (i *AlertManagerDefinition) ToAlertManagerDefinitionOutput() AlertManagerDefinitionOutput

func (*AlertManagerDefinition) ToAlertManagerDefinitionOutputWithContext

func (i *AlertManagerDefinition) ToAlertManagerDefinitionOutputWithContext(ctx context.Context) AlertManagerDefinitionOutput

type AlertManagerDefinitionArgs

type AlertManagerDefinitionArgs struct {
	// the alert manager definition that you want to be applied. See more [in AWS Docs](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-alert-manager.html).
	Definition pulumi.StringInput
	// ID of the prometheus workspace the alert manager definition should be linked to
	WorkspaceId pulumi.StringInput
}

The set of arguments for constructing a AlertManagerDefinition resource.

func (AlertManagerDefinitionArgs) ElementType

func (AlertManagerDefinitionArgs) ElementType() reflect.Type

type AlertManagerDefinitionArray

type AlertManagerDefinitionArray []AlertManagerDefinitionInput

func (AlertManagerDefinitionArray) ElementType

func (AlertManagerDefinitionArray) ToAlertManagerDefinitionArrayOutput

func (i AlertManagerDefinitionArray) ToAlertManagerDefinitionArrayOutput() AlertManagerDefinitionArrayOutput

func (AlertManagerDefinitionArray) ToAlertManagerDefinitionArrayOutputWithContext

func (i AlertManagerDefinitionArray) ToAlertManagerDefinitionArrayOutputWithContext(ctx context.Context) AlertManagerDefinitionArrayOutput

type AlertManagerDefinitionArrayInput

type AlertManagerDefinitionArrayInput interface {
	pulumi.Input

	ToAlertManagerDefinitionArrayOutput() AlertManagerDefinitionArrayOutput
	ToAlertManagerDefinitionArrayOutputWithContext(context.Context) AlertManagerDefinitionArrayOutput
}

AlertManagerDefinitionArrayInput is an input type that accepts AlertManagerDefinitionArray and AlertManagerDefinitionArrayOutput values. You can construct a concrete instance of `AlertManagerDefinitionArrayInput` via:

AlertManagerDefinitionArray{ AlertManagerDefinitionArgs{...} }

type AlertManagerDefinitionArrayOutput

type AlertManagerDefinitionArrayOutput struct{ *pulumi.OutputState }

func (AlertManagerDefinitionArrayOutput) ElementType

func (AlertManagerDefinitionArrayOutput) Index

func (AlertManagerDefinitionArrayOutput) ToAlertManagerDefinitionArrayOutput

func (o AlertManagerDefinitionArrayOutput) ToAlertManagerDefinitionArrayOutput() AlertManagerDefinitionArrayOutput

func (AlertManagerDefinitionArrayOutput) ToAlertManagerDefinitionArrayOutputWithContext

func (o AlertManagerDefinitionArrayOutput) ToAlertManagerDefinitionArrayOutputWithContext(ctx context.Context) AlertManagerDefinitionArrayOutput

type AlertManagerDefinitionInput

type AlertManagerDefinitionInput interface {
	pulumi.Input

	ToAlertManagerDefinitionOutput() AlertManagerDefinitionOutput
	ToAlertManagerDefinitionOutputWithContext(ctx context.Context) AlertManagerDefinitionOutput
}

type AlertManagerDefinitionMap

type AlertManagerDefinitionMap map[string]AlertManagerDefinitionInput

func (AlertManagerDefinitionMap) ElementType

func (AlertManagerDefinitionMap) ElementType() reflect.Type

func (AlertManagerDefinitionMap) ToAlertManagerDefinitionMapOutput

func (i AlertManagerDefinitionMap) ToAlertManagerDefinitionMapOutput() AlertManagerDefinitionMapOutput

func (AlertManagerDefinitionMap) ToAlertManagerDefinitionMapOutputWithContext

func (i AlertManagerDefinitionMap) ToAlertManagerDefinitionMapOutputWithContext(ctx context.Context) AlertManagerDefinitionMapOutput

type AlertManagerDefinitionMapInput

type AlertManagerDefinitionMapInput interface {
	pulumi.Input

	ToAlertManagerDefinitionMapOutput() AlertManagerDefinitionMapOutput
	ToAlertManagerDefinitionMapOutputWithContext(context.Context) AlertManagerDefinitionMapOutput
}

AlertManagerDefinitionMapInput is an input type that accepts AlertManagerDefinitionMap and AlertManagerDefinitionMapOutput values. You can construct a concrete instance of `AlertManagerDefinitionMapInput` via:

AlertManagerDefinitionMap{ "key": AlertManagerDefinitionArgs{...} }

type AlertManagerDefinitionMapOutput

type AlertManagerDefinitionMapOutput struct{ *pulumi.OutputState }

func (AlertManagerDefinitionMapOutput) ElementType

func (AlertManagerDefinitionMapOutput) MapIndex

func (AlertManagerDefinitionMapOutput) ToAlertManagerDefinitionMapOutput

func (o AlertManagerDefinitionMapOutput) ToAlertManagerDefinitionMapOutput() AlertManagerDefinitionMapOutput

func (AlertManagerDefinitionMapOutput) ToAlertManagerDefinitionMapOutputWithContext

func (o AlertManagerDefinitionMapOutput) ToAlertManagerDefinitionMapOutputWithContext(ctx context.Context) AlertManagerDefinitionMapOutput

type AlertManagerDefinitionOutput

type AlertManagerDefinitionOutput struct{ *pulumi.OutputState }

func (AlertManagerDefinitionOutput) Definition

the alert manager definition that you want to be applied. See more [in AWS Docs](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-alert-manager.html).

func (AlertManagerDefinitionOutput) ElementType

func (AlertManagerDefinitionOutput) ToAlertManagerDefinitionOutput

func (o AlertManagerDefinitionOutput) ToAlertManagerDefinitionOutput() AlertManagerDefinitionOutput

func (AlertManagerDefinitionOutput) ToAlertManagerDefinitionOutputWithContext

func (o AlertManagerDefinitionOutput) ToAlertManagerDefinitionOutputWithContext(ctx context.Context) AlertManagerDefinitionOutput

func (AlertManagerDefinitionOutput) WorkspaceId

ID of the prometheus workspace the alert manager definition should be linked to

type AlertManagerDefinitionState

type AlertManagerDefinitionState struct {
	// the alert manager definition that you want to be applied. See more [in AWS Docs](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-alert-manager.html).
	Definition pulumi.StringPtrInput
	// ID of the prometheus workspace the alert manager definition should be linked to
	WorkspaceId pulumi.StringPtrInput
}

func (AlertManagerDefinitionState) ElementType

type GetWorkspacesArgs

type GetWorkspacesArgs struct {
	// Limits results to workspaces with aliases that begin with this value.
	AliasPrefix *string `pulumi:"aliasPrefix"`
}

A collection of arguments for invoking getWorkspaces.

type GetWorkspacesOutputArgs

type GetWorkspacesOutputArgs struct {
	// Limits results to workspaces with aliases that begin with this value.
	AliasPrefix pulumi.StringPtrInput `pulumi:"aliasPrefix"`
}

A collection of arguments for invoking getWorkspaces.

func (GetWorkspacesOutputArgs) ElementType

func (GetWorkspacesOutputArgs) ElementType() reflect.Type

type GetWorkspacesResult

type GetWorkspacesResult struct {
	AliasPrefix *string `pulumi:"aliasPrefix"`
	// List of aliases of the matched Prometheus workspaces.
	Aliases []string `pulumi:"aliases"`
	// List of ARNs of the matched Prometheus workspaces.
	Arns []string `pulumi:"arns"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// List of workspace IDs of the matched Prometheus workspaces.
	WorkspaceIds []string `pulumi:"workspaceIds"`
}

A collection of values returned by getWorkspaces.

func GetWorkspaces

func GetWorkspaces(ctx *pulumi.Context, args *GetWorkspacesArgs, opts ...pulumi.InvokeOption) (*GetWorkspacesResult, error)

Provides the aliases, ARNs, and workspace IDs of Amazon Prometheus workspaces.

## Example Usage

The following example returns all of the workspaces in a region:

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := amp.GetWorkspaces(ctx, nil, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

The following example filters the workspaces by alias. Only the workspaces with aliases that begin with the value of `aliasPrefix` will be returned:

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := amp.GetWorkspaces(ctx, &amp.GetWorkspacesArgs{
			AliasPrefix: pulumi.StringRef("example"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type GetWorkspacesResultOutput

type GetWorkspacesResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getWorkspaces.

func (GetWorkspacesResultOutput) AliasPrefix

func (GetWorkspacesResultOutput) Aliases

List of aliases of the matched Prometheus workspaces.

func (GetWorkspacesResultOutput) Arns

List of ARNs of the matched Prometheus workspaces.

func (GetWorkspacesResultOutput) ElementType

func (GetWorkspacesResultOutput) ElementType() reflect.Type

func (GetWorkspacesResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (GetWorkspacesResultOutput) ToGetWorkspacesResultOutput

func (o GetWorkspacesResultOutput) ToGetWorkspacesResultOutput() GetWorkspacesResultOutput

func (GetWorkspacesResultOutput) ToGetWorkspacesResultOutputWithContext

func (o GetWorkspacesResultOutput) ToGetWorkspacesResultOutputWithContext(ctx context.Context) GetWorkspacesResultOutput

func (GetWorkspacesResultOutput) WorkspaceIds

List of workspace IDs of the matched Prometheus workspaces.

type LookupWorkspaceArgs

type LookupWorkspaceArgs struct {
	// Tags assigned to the resource.
	Tags map[string]string `pulumi:"tags"`
	// Prometheus workspace ID.
	WorkspaceId string `pulumi:"workspaceId"`
}

A collection of arguments for invoking getWorkspace.

type LookupWorkspaceOutputArgs

type LookupWorkspaceOutputArgs struct {
	// Tags assigned to the resource.
	Tags pulumi.StringMapInput `pulumi:"tags"`
	// Prometheus workspace ID.
	WorkspaceId pulumi.StringInput `pulumi:"workspaceId"`
}

A collection of arguments for invoking getWorkspace.

func (LookupWorkspaceOutputArgs) ElementType

func (LookupWorkspaceOutputArgs) ElementType() reflect.Type

type LookupWorkspaceResult

type LookupWorkspaceResult struct {
	// Prometheus workspace alias.
	Alias string `pulumi:"alias"`
	// ARN of the Prometheus workspace.
	Arn string `pulumi:"arn"`
	// Creation date of the Prometheus workspace.
	CreatedDate string `pulumi:"createdDate"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// Endpoint of the Prometheus workspace.
	PrometheusEndpoint string `pulumi:"prometheusEndpoint"`
	// Status of the Prometheus workspace.
	Status string `pulumi:"status"`
	// Tags assigned to the resource.
	Tags        map[string]string `pulumi:"tags"`
	WorkspaceId string            `pulumi:"workspaceId"`
}

A collection of values returned by getWorkspace.

func LookupWorkspace

func LookupWorkspace(ctx *pulumi.Context, args *LookupWorkspaceArgs, opts ...pulumi.InvokeOption) (*LookupWorkspaceResult, error)

Provides an Amazon Managed Prometheus workspace data source.

## Example Usage ### Basic configuration

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := amp.LookupWorkspace(ctx, &amp.LookupWorkspaceArgs{
			WorkspaceId: "ws-41det8a1-2c67-6a1a-9381-9b83d3d78ef7",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type LookupWorkspaceResultOutput

type LookupWorkspaceResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getWorkspace.

func (LookupWorkspaceResultOutput) Alias

Prometheus workspace alias.

func (LookupWorkspaceResultOutput) Arn

ARN of the Prometheus workspace.

func (LookupWorkspaceResultOutput) CreatedDate

Creation date of the Prometheus workspace.

func (LookupWorkspaceResultOutput) ElementType

func (LookupWorkspaceResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (LookupWorkspaceResultOutput) PrometheusEndpoint

func (o LookupWorkspaceResultOutput) PrometheusEndpoint() pulumi.StringOutput

Endpoint of the Prometheus workspace.

func (LookupWorkspaceResultOutput) Status

Status of the Prometheus workspace.

func (LookupWorkspaceResultOutput) Tags

Tags assigned to the resource.

func (LookupWorkspaceResultOutput) ToLookupWorkspaceResultOutput

func (o LookupWorkspaceResultOutput) ToLookupWorkspaceResultOutput() LookupWorkspaceResultOutput

func (LookupWorkspaceResultOutput) ToLookupWorkspaceResultOutputWithContext

func (o LookupWorkspaceResultOutput) ToLookupWorkspaceResultOutputWithContext(ctx context.Context) LookupWorkspaceResultOutput

func (LookupWorkspaceResultOutput) WorkspaceId

type RuleGroupNamespace

type RuleGroupNamespace struct {
	pulumi.CustomResourceState

	// the rule group namespace data that you want to be applied. See more [in AWS Docs](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-Ruler.html).
	Data pulumi.StringOutput `pulumi:"data"`
	// The name of the rule group namespace
	Name pulumi.StringOutput `pulumi:"name"`
	// ID of the prometheus workspace the rule group namespace should be linked to
	WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"`
}

Manages an Amazon Managed Service for Prometheus (AMP) Rule Group Namespace

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		demoWorkspace, err := amp.NewWorkspace(ctx, "demoWorkspace", nil)
		if err != nil {
			return err
		}
		_, err = amp.NewRuleGroupNamespace(ctx, "demoRuleGroupNamespace", &amp.RuleGroupNamespaceArgs{
			WorkspaceId: demoWorkspace.ID(),
			Data: pulumi.String(`groups:
  - name: test
    rules:
    - record: metric:recording_rule
      expr: avg(rate(container_cpu_usage_seconds_total[5m]))

`),

		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Using `pulumi import`, import the prometheus rule group namespace using the arn. For example:

```sh

$ pulumi import aws:amp/ruleGroupNamespace:RuleGroupNamespace demo arn:aws:aps:us-west-2:123456789012:rulegroupsnamespace/IDstring/namespace_name

```

func GetRuleGroupNamespace

func GetRuleGroupNamespace(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *RuleGroupNamespaceState, opts ...pulumi.ResourceOption) (*RuleGroupNamespace, error)

GetRuleGroupNamespace gets an existing RuleGroupNamespace 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 NewRuleGroupNamespace

func NewRuleGroupNamespace(ctx *pulumi.Context,
	name string, args *RuleGroupNamespaceArgs, opts ...pulumi.ResourceOption) (*RuleGroupNamespace, error)

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

func (*RuleGroupNamespace) ElementType

func (*RuleGroupNamespace) ElementType() reflect.Type

func (*RuleGroupNamespace) ToRuleGroupNamespaceOutput

func (i *RuleGroupNamespace) ToRuleGroupNamespaceOutput() RuleGroupNamespaceOutput

func (*RuleGroupNamespace) ToRuleGroupNamespaceOutputWithContext

func (i *RuleGroupNamespace) ToRuleGroupNamespaceOutputWithContext(ctx context.Context) RuleGroupNamespaceOutput

type RuleGroupNamespaceArgs

type RuleGroupNamespaceArgs struct {
	// the rule group namespace data that you want to be applied. See more [in AWS Docs](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-Ruler.html).
	Data pulumi.StringInput
	// The name of the rule group namespace
	Name pulumi.StringPtrInput
	// ID of the prometheus workspace the rule group namespace should be linked to
	WorkspaceId pulumi.StringInput
}

The set of arguments for constructing a RuleGroupNamespace resource.

func (RuleGroupNamespaceArgs) ElementType

func (RuleGroupNamespaceArgs) ElementType() reflect.Type

type RuleGroupNamespaceArray

type RuleGroupNamespaceArray []RuleGroupNamespaceInput

func (RuleGroupNamespaceArray) ElementType

func (RuleGroupNamespaceArray) ElementType() reflect.Type

func (RuleGroupNamespaceArray) ToRuleGroupNamespaceArrayOutput

func (i RuleGroupNamespaceArray) ToRuleGroupNamespaceArrayOutput() RuleGroupNamespaceArrayOutput

func (RuleGroupNamespaceArray) ToRuleGroupNamespaceArrayOutputWithContext

func (i RuleGroupNamespaceArray) ToRuleGroupNamespaceArrayOutputWithContext(ctx context.Context) RuleGroupNamespaceArrayOutput

type RuleGroupNamespaceArrayInput

type RuleGroupNamespaceArrayInput interface {
	pulumi.Input

	ToRuleGroupNamespaceArrayOutput() RuleGroupNamespaceArrayOutput
	ToRuleGroupNamespaceArrayOutputWithContext(context.Context) RuleGroupNamespaceArrayOutput
}

RuleGroupNamespaceArrayInput is an input type that accepts RuleGroupNamespaceArray and RuleGroupNamespaceArrayOutput values. You can construct a concrete instance of `RuleGroupNamespaceArrayInput` via:

RuleGroupNamespaceArray{ RuleGroupNamespaceArgs{...} }

type RuleGroupNamespaceArrayOutput

type RuleGroupNamespaceArrayOutput struct{ *pulumi.OutputState }

func (RuleGroupNamespaceArrayOutput) ElementType

func (RuleGroupNamespaceArrayOutput) Index

func (RuleGroupNamespaceArrayOutput) ToRuleGroupNamespaceArrayOutput

func (o RuleGroupNamespaceArrayOutput) ToRuleGroupNamespaceArrayOutput() RuleGroupNamespaceArrayOutput

func (RuleGroupNamespaceArrayOutput) ToRuleGroupNamespaceArrayOutputWithContext

func (o RuleGroupNamespaceArrayOutput) ToRuleGroupNamespaceArrayOutputWithContext(ctx context.Context) RuleGroupNamespaceArrayOutput

type RuleGroupNamespaceInput

type RuleGroupNamespaceInput interface {
	pulumi.Input

	ToRuleGroupNamespaceOutput() RuleGroupNamespaceOutput
	ToRuleGroupNamespaceOutputWithContext(ctx context.Context) RuleGroupNamespaceOutput
}

type RuleGroupNamespaceMap

type RuleGroupNamespaceMap map[string]RuleGroupNamespaceInput

func (RuleGroupNamespaceMap) ElementType

func (RuleGroupNamespaceMap) ElementType() reflect.Type

func (RuleGroupNamespaceMap) ToRuleGroupNamespaceMapOutput

func (i RuleGroupNamespaceMap) ToRuleGroupNamespaceMapOutput() RuleGroupNamespaceMapOutput

func (RuleGroupNamespaceMap) ToRuleGroupNamespaceMapOutputWithContext

func (i RuleGroupNamespaceMap) ToRuleGroupNamespaceMapOutputWithContext(ctx context.Context) RuleGroupNamespaceMapOutput

type RuleGroupNamespaceMapInput

type RuleGroupNamespaceMapInput interface {
	pulumi.Input

	ToRuleGroupNamespaceMapOutput() RuleGroupNamespaceMapOutput
	ToRuleGroupNamespaceMapOutputWithContext(context.Context) RuleGroupNamespaceMapOutput
}

RuleGroupNamespaceMapInput is an input type that accepts RuleGroupNamespaceMap and RuleGroupNamespaceMapOutput values. You can construct a concrete instance of `RuleGroupNamespaceMapInput` via:

RuleGroupNamespaceMap{ "key": RuleGroupNamespaceArgs{...} }

type RuleGroupNamespaceMapOutput

type RuleGroupNamespaceMapOutput struct{ *pulumi.OutputState }

func (RuleGroupNamespaceMapOutput) ElementType

func (RuleGroupNamespaceMapOutput) MapIndex

func (RuleGroupNamespaceMapOutput) ToRuleGroupNamespaceMapOutput

func (o RuleGroupNamespaceMapOutput) ToRuleGroupNamespaceMapOutput() RuleGroupNamespaceMapOutput

func (RuleGroupNamespaceMapOutput) ToRuleGroupNamespaceMapOutputWithContext

func (o RuleGroupNamespaceMapOutput) ToRuleGroupNamespaceMapOutputWithContext(ctx context.Context) RuleGroupNamespaceMapOutput

type RuleGroupNamespaceOutput

type RuleGroupNamespaceOutput struct{ *pulumi.OutputState }

func (RuleGroupNamespaceOutput) Data

the rule group namespace data that you want to be applied. See more [in AWS Docs](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-Ruler.html).

func (RuleGroupNamespaceOutput) ElementType

func (RuleGroupNamespaceOutput) ElementType() reflect.Type

func (RuleGroupNamespaceOutput) Name

The name of the rule group namespace

func (RuleGroupNamespaceOutput) ToRuleGroupNamespaceOutput

func (o RuleGroupNamespaceOutput) ToRuleGroupNamespaceOutput() RuleGroupNamespaceOutput

func (RuleGroupNamespaceOutput) ToRuleGroupNamespaceOutputWithContext

func (o RuleGroupNamespaceOutput) ToRuleGroupNamespaceOutputWithContext(ctx context.Context) RuleGroupNamespaceOutput

func (RuleGroupNamespaceOutput) WorkspaceId

ID of the prometheus workspace the rule group namespace should be linked to

type RuleGroupNamespaceState

type RuleGroupNamespaceState struct {
	// the rule group namespace data that you want to be applied. See more [in AWS Docs](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-Ruler.html).
	Data pulumi.StringPtrInput
	// The name of the rule group namespace
	Name pulumi.StringPtrInput
	// ID of the prometheus workspace the rule group namespace should be linked to
	WorkspaceId pulumi.StringPtrInput
}

func (RuleGroupNamespaceState) ElementType

func (RuleGroupNamespaceState) ElementType() reflect.Type

type Workspace

type Workspace struct {
	pulumi.CustomResourceState

	// The alias of the prometheus workspace. See more [in AWS Docs](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-onboard-create-workspace.html).
	Alias pulumi.StringPtrOutput `pulumi:"alias"`
	// Amazon Resource Name (ARN) of the workspace.
	Arn pulumi.StringOutput `pulumi:"arn"`
	// Logging configuration for the workspace. See Logging Configuration below for details.
	LoggingConfiguration WorkspaceLoggingConfigurationPtrOutput `pulumi:"loggingConfiguration"`
	// Prometheus endpoint available for this workspace.
	PrometheusEndpoint pulumi.StringOutput `pulumi:"prometheusEndpoint"`
	// A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
}

Manages an Amazon Managed Service for Prometheus (AMP) Workspace.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := amp.NewWorkspace(ctx, "example", &amp.WorkspaceArgs{
			Alias: pulumi.String("example"),
			Tags: pulumi.StringMap{
				"Environment": pulumi.String("production"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ### CloudWatch Logging

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amp"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleLogGroup, err := cloudwatch.NewLogGroup(ctx, "exampleLogGroup", nil)
		if err != nil {
			return err
		}
		_, err = amp.NewWorkspace(ctx, "exampleWorkspace", &amp.WorkspaceArgs{
			LoggingConfiguration: &amp.WorkspaceLoggingConfigurationArgs{
				LogGroupArn: exampleLogGroup.Arn.ApplyT(func(arn string) (string, error) {
					return fmt.Sprintf("%v:*", arn), nil
				}).(pulumi.StringOutput),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Using `pulumi import`, import AMP Workspaces using the identifier. For example:

```sh

$ pulumi import aws:amp/workspace:Workspace demo ws-C6DCB907-F2D7-4D96-957B-66691F865D8B

```

func GetWorkspace

func GetWorkspace(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *WorkspaceState, opts ...pulumi.ResourceOption) (*Workspace, error)

GetWorkspace gets an existing Workspace 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 NewWorkspace

func NewWorkspace(ctx *pulumi.Context,
	name string, args *WorkspaceArgs, opts ...pulumi.ResourceOption) (*Workspace, error)

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

func (*Workspace) ElementType

func (*Workspace) ElementType() reflect.Type

func (*Workspace) ToWorkspaceOutput

func (i *Workspace) ToWorkspaceOutput() WorkspaceOutput

func (*Workspace) ToWorkspaceOutputWithContext

func (i *Workspace) ToWorkspaceOutputWithContext(ctx context.Context) WorkspaceOutput

type WorkspaceArgs

type WorkspaceArgs struct {
	// The alias of the prometheus workspace. See more [in AWS Docs](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-onboard-create-workspace.html).
	Alias pulumi.StringPtrInput
	// Logging configuration for the workspace. See Logging Configuration below for details.
	LoggingConfiguration WorkspaceLoggingConfigurationPtrInput
	// A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
	Tags pulumi.StringMapInput
}

The set of arguments for constructing a Workspace resource.

func (WorkspaceArgs) ElementType

func (WorkspaceArgs) ElementType() reflect.Type

type WorkspaceArray

type WorkspaceArray []WorkspaceInput

func (WorkspaceArray) ElementType

func (WorkspaceArray) ElementType() reflect.Type

func (WorkspaceArray) ToWorkspaceArrayOutput

func (i WorkspaceArray) ToWorkspaceArrayOutput() WorkspaceArrayOutput

func (WorkspaceArray) ToWorkspaceArrayOutputWithContext

func (i WorkspaceArray) ToWorkspaceArrayOutputWithContext(ctx context.Context) WorkspaceArrayOutput

type WorkspaceArrayInput

type WorkspaceArrayInput interface {
	pulumi.Input

	ToWorkspaceArrayOutput() WorkspaceArrayOutput
	ToWorkspaceArrayOutputWithContext(context.Context) WorkspaceArrayOutput
}

WorkspaceArrayInput is an input type that accepts WorkspaceArray and WorkspaceArrayOutput values. You can construct a concrete instance of `WorkspaceArrayInput` via:

WorkspaceArray{ WorkspaceArgs{...} }

type WorkspaceArrayOutput

type WorkspaceArrayOutput struct{ *pulumi.OutputState }

func (WorkspaceArrayOutput) ElementType

func (WorkspaceArrayOutput) ElementType() reflect.Type

func (WorkspaceArrayOutput) Index

func (WorkspaceArrayOutput) ToWorkspaceArrayOutput

func (o WorkspaceArrayOutput) ToWorkspaceArrayOutput() WorkspaceArrayOutput

func (WorkspaceArrayOutput) ToWorkspaceArrayOutputWithContext

func (o WorkspaceArrayOutput) ToWorkspaceArrayOutputWithContext(ctx context.Context) WorkspaceArrayOutput

type WorkspaceInput

type WorkspaceInput interface {
	pulumi.Input

	ToWorkspaceOutput() WorkspaceOutput
	ToWorkspaceOutputWithContext(ctx context.Context) WorkspaceOutput
}

type WorkspaceLoggingConfiguration

type WorkspaceLoggingConfiguration struct {
	// The ARN of the CloudWatch log group to which the vended log data will be published. This log group must exist.
	LogGroupArn string `pulumi:"logGroupArn"`
}

type WorkspaceLoggingConfigurationArgs

type WorkspaceLoggingConfigurationArgs struct {
	// The ARN of the CloudWatch log group to which the vended log data will be published. This log group must exist.
	LogGroupArn pulumi.StringInput `pulumi:"logGroupArn"`
}

func (WorkspaceLoggingConfigurationArgs) ElementType

func (WorkspaceLoggingConfigurationArgs) ToWorkspaceLoggingConfigurationOutput

func (i WorkspaceLoggingConfigurationArgs) ToWorkspaceLoggingConfigurationOutput() WorkspaceLoggingConfigurationOutput

func (WorkspaceLoggingConfigurationArgs) ToWorkspaceLoggingConfigurationOutputWithContext

func (i WorkspaceLoggingConfigurationArgs) ToWorkspaceLoggingConfigurationOutputWithContext(ctx context.Context) WorkspaceLoggingConfigurationOutput

func (WorkspaceLoggingConfigurationArgs) ToWorkspaceLoggingConfigurationPtrOutput

func (i WorkspaceLoggingConfigurationArgs) ToWorkspaceLoggingConfigurationPtrOutput() WorkspaceLoggingConfigurationPtrOutput

func (WorkspaceLoggingConfigurationArgs) ToWorkspaceLoggingConfigurationPtrOutputWithContext

func (i WorkspaceLoggingConfigurationArgs) ToWorkspaceLoggingConfigurationPtrOutputWithContext(ctx context.Context) WorkspaceLoggingConfigurationPtrOutput

type WorkspaceLoggingConfigurationInput

type WorkspaceLoggingConfigurationInput interface {
	pulumi.Input

	ToWorkspaceLoggingConfigurationOutput() WorkspaceLoggingConfigurationOutput
	ToWorkspaceLoggingConfigurationOutputWithContext(context.Context) WorkspaceLoggingConfigurationOutput
}

WorkspaceLoggingConfigurationInput is an input type that accepts WorkspaceLoggingConfigurationArgs and WorkspaceLoggingConfigurationOutput values. You can construct a concrete instance of `WorkspaceLoggingConfigurationInput` via:

WorkspaceLoggingConfigurationArgs{...}

type WorkspaceLoggingConfigurationOutput

type WorkspaceLoggingConfigurationOutput struct{ *pulumi.OutputState }

func (WorkspaceLoggingConfigurationOutput) ElementType

func (WorkspaceLoggingConfigurationOutput) LogGroupArn

The ARN of the CloudWatch log group to which the vended log data will be published. This log group must exist.

func (WorkspaceLoggingConfigurationOutput) ToWorkspaceLoggingConfigurationOutput

func (o WorkspaceLoggingConfigurationOutput) ToWorkspaceLoggingConfigurationOutput() WorkspaceLoggingConfigurationOutput

func (WorkspaceLoggingConfigurationOutput) ToWorkspaceLoggingConfigurationOutputWithContext

func (o WorkspaceLoggingConfigurationOutput) ToWorkspaceLoggingConfigurationOutputWithContext(ctx context.Context) WorkspaceLoggingConfigurationOutput

func (WorkspaceLoggingConfigurationOutput) ToWorkspaceLoggingConfigurationPtrOutput

func (o WorkspaceLoggingConfigurationOutput) ToWorkspaceLoggingConfigurationPtrOutput() WorkspaceLoggingConfigurationPtrOutput

func (WorkspaceLoggingConfigurationOutput) ToWorkspaceLoggingConfigurationPtrOutputWithContext

func (o WorkspaceLoggingConfigurationOutput) ToWorkspaceLoggingConfigurationPtrOutputWithContext(ctx context.Context) WorkspaceLoggingConfigurationPtrOutput

type WorkspaceLoggingConfigurationPtrInput

type WorkspaceLoggingConfigurationPtrInput interface {
	pulumi.Input

	ToWorkspaceLoggingConfigurationPtrOutput() WorkspaceLoggingConfigurationPtrOutput
	ToWorkspaceLoggingConfigurationPtrOutputWithContext(context.Context) WorkspaceLoggingConfigurationPtrOutput
}

WorkspaceLoggingConfigurationPtrInput is an input type that accepts WorkspaceLoggingConfigurationArgs, WorkspaceLoggingConfigurationPtr and WorkspaceLoggingConfigurationPtrOutput values. You can construct a concrete instance of `WorkspaceLoggingConfigurationPtrInput` via:

        WorkspaceLoggingConfigurationArgs{...}

or:

        nil

type WorkspaceLoggingConfigurationPtrOutput

type WorkspaceLoggingConfigurationPtrOutput struct{ *pulumi.OutputState }

func (WorkspaceLoggingConfigurationPtrOutput) Elem

func (WorkspaceLoggingConfigurationPtrOutput) ElementType

func (WorkspaceLoggingConfigurationPtrOutput) LogGroupArn

The ARN of the CloudWatch log group to which the vended log data will be published. This log group must exist.

func (WorkspaceLoggingConfigurationPtrOutput) ToWorkspaceLoggingConfigurationPtrOutput

func (o WorkspaceLoggingConfigurationPtrOutput) ToWorkspaceLoggingConfigurationPtrOutput() WorkspaceLoggingConfigurationPtrOutput

func (WorkspaceLoggingConfigurationPtrOutput) ToWorkspaceLoggingConfigurationPtrOutputWithContext

func (o WorkspaceLoggingConfigurationPtrOutput) ToWorkspaceLoggingConfigurationPtrOutputWithContext(ctx context.Context) WorkspaceLoggingConfigurationPtrOutput

type WorkspaceMap

type WorkspaceMap map[string]WorkspaceInput

func (WorkspaceMap) ElementType

func (WorkspaceMap) ElementType() reflect.Type

func (WorkspaceMap) ToWorkspaceMapOutput

func (i WorkspaceMap) ToWorkspaceMapOutput() WorkspaceMapOutput

func (WorkspaceMap) ToWorkspaceMapOutputWithContext

func (i WorkspaceMap) ToWorkspaceMapOutputWithContext(ctx context.Context) WorkspaceMapOutput

type WorkspaceMapInput

type WorkspaceMapInput interface {
	pulumi.Input

	ToWorkspaceMapOutput() WorkspaceMapOutput
	ToWorkspaceMapOutputWithContext(context.Context) WorkspaceMapOutput
}

WorkspaceMapInput is an input type that accepts WorkspaceMap and WorkspaceMapOutput values. You can construct a concrete instance of `WorkspaceMapInput` via:

WorkspaceMap{ "key": WorkspaceArgs{...} }

type WorkspaceMapOutput

type WorkspaceMapOutput struct{ *pulumi.OutputState }

func (WorkspaceMapOutput) ElementType

func (WorkspaceMapOutput) ElementType() reflect.Type

func (WorkspaceMapOutput) MapIndex

func (WorkspaceMapOutput) ToWorkspaceMapOutput

func (o WorkspaceMapOutput) ToWorkspaceMapOutput() WorkspaceMapOutput

func (WorkspaceMapOutput) ToWorkspaceMapOutputWithContext

func (o WorkspaceMapOutput) ToWorkspaceMapOutputWithContext(ctx context.Context) WorkspaceMapOutput

type WorkspaceOutput

type WorkspaceOutput struct{ *pulumi.OutputState }

func (WorkspaceOutput) Alias

The alias of the prometheus workspace. See more [in AWS Docs](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-onboard-create-workspace.html).

func (WorkspaceOutput) Arn

Amazon Resource Name (ARN) of the workspace.

func (WorkspaceOutput) ElementType

func (WorkspaceOutput) ElementType() reflect.Type

func (WorkspaceOutput) LoggingConfiguration

Logging configuration for the workspace. See Logging Configuration below for details.

func (WorkspaceOutput) PrometheusEndpoint

func (o WorkspaceOutput) PrometheusEndpoint() pulumi.StringOutput

Prometheus endpoint available for this workspace.

func (WorkspaceOutput) Tags

A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.

func (WorkspaceOutput) TagsAll

A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.

func (WorkspaceOutput) ToWorkspaceOutput

func (o WorkspaceOutput) ToWorkspaceOutput() WorkspaceOutput

func (WorkspaceOutput) ToWorkspaceOutputWithContext

func (o WorkspaceOutput) ToWorkspaceOutputWithContext(ctx context.Context) WorkspaceOutput

type WorkspaceState

type WorkspaceState struct {
	// The alias of the prometheus workspace. See more [in AWS Docs](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-onboard-create-workspace.html).
	Alias pulumi.StringPtrInput
	// Amazon Resource Name (ARN) of the workspace.
	Arn pulumi.StringPtrInput
	// Logging configuration for the workspace. See Logging Configuration below for details.
	LoggingConfiguration WorkspaceLoggingConfigurationPtrInput
	// Prometheus endpoint available for this workspace.
	PrometheusEndpoint pulumi.StringPtrInput
	// A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
	Tags pulumi.StringMapInput
	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
	TagsAll pulumi.StringMapInput
}

func (WorkspaceState) ElementType

func (WorkspaceState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

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