1. Packages
  2. AWS Classic
  3. API Docs
  4. amp
  5. AlertManagerDefinition

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.3.0 published on Thursday, Sep 28, 2023 by Pulumi

aws.amp.AlertManagerDefinition

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.3.0 published on Thursday, Sep 28, 2023 by Pulumi

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

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var demoWorkspace = new Aws.Amp.Workspace("demoWorkspace");
    
        var demoAlertManagerDefinition = new Aws.Amp.AlertManagerDefinition("demoAlertManagerDefinition", new()
        {
            WorkspaceId = demoWorkspace.Id,
            Definition = @"alertmanager_config: |
      route:
        receiver: 'default'
      receivers:
        - name: 'default'
    ",
        });
    
    });
    
    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
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.amp.Workspace;
    import com.pulumi.aws.amp.AlertManagerDefinition;
    import com.pulumi.aws.amp.AlertManagerDefinitionArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var demoWorkspace = new Workspace("demoWorkspace");
    
            var demoAlertManagerDefinition = new AlertManagerDefinition("demoAlertManagerDefinition", AlertManagerDefinitionArgs.builder()        
                .workspaceId(demoWorkspace.id())
                .definition("""
    alertmanager_config: |
      route:
        receiver: 'default'
      receivers:
        - name: 'default'
                """)
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    
    demo_workspace = aws.amp.Workspace("demoWorkspace")
    demo_alert_manager_definition = aws.amp.AlertManagerDefinition("demoAlertManagerDefinition",
        workspace_id=demo_workspace.id,
        definition="""alertmanager_config: |
      route:
        receiver: 'default'
      receivers:
        - name: 'default'
    """)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const demoWorkspace = new aws.amp.Workspace("demoWorkspace", {});
    const demoAlertManagerDefinition = new aws.amp.AlertManagerDefinition("demoAlertManagerDefinition", {
        workspaceId: demoWorkspace.id,
        definition: `alertmanager_config: |
      route:
        receiver: 'default'
      receivers:
        - name: 'default'
    `,
    });
    
    resources:
      demoWorkspace:
        type: aws:amp:Workspace
      demoAlertManagerDefinition:
        type: aws:amp:AlertManagerDefinition
        properties:
          workspaceId: ${demoWorkspace.id}
          definition: |
            alertmanager_config: |
              route:
                receiver: 'default'
              receivers:
                - name: 'default'        
    

    Create AlertManagerDefinition Resource

    new AlertManagerDefinition(name: string, args: AlertManagerDefinitionArgs, opts?: CustomResourceOptions);
    @overload
    def AlertManagerDefinition(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               definition: Optional[str] = None,
                               workspace_id: Optional[str] = None)
    @overload
    def AlertManagerDefinition(resource_name: str,
                               args: AlertManagerDefinitionArgs,
                               opts: Optional[ResourceOptions] = None)
    func NewAlertManagerDefinition(ctx *Context, name string, args AlertManagerDefinitionArgs, opts ...ResourceOption) (*AlertManagerDefinition, error)
    public AlertManagerDefinition(string name, AlertManagerDefinitionArgs args, CustomResourceOptions? opts = null)
    public AlertManagerDefinition(String name, AlertManagerDefinitionArgs args)
    public AlertManagerDefinition(String name, AlertManagerDefinitionArgs args, CustomResourceOptions options)
    
    type: aws:amp:AlertManagerDefinition
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args AlertManagerDefinitionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args AlertManagerDefinitionArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args AlertManagerDefinitionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AlertManagerDefinitionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AlertManagerDefinitionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    AlertManagerDefinition Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The AlertManagerDefinition resource accepts the following input properties:

    Definition string

    the alert manager definition that you want to be applied. See more in AWS Docs.

    WorkspaceId string

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

    Definition string

    the alert manager definition that you want to be applied. See more in AWS Docs.

    WorkspaceId string

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

    definition String

    the alert manager definition that you want to be applied. See more in AWS Docs.

    workspaceId String

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

    definition string

    the alert manager definition that you want to be applied. See more in AWS Docs.

    workspaceId string

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

    definition str

    the alert manager definition that you want to be applied. See more in AWS Docs.

    workspace_id str

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

    definition String

    the alert manager definition that you want to be applied. See more in AWS Docs.

    workspaceId String

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

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AlertManagerDefinition resource produces the following output properties:

    Id string

    The provider-assigned unique ID for this managed resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    id string

    The provider-assigned unique ID for this managed resource.

    id str

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing AlertManagerDefinition Resource

    Get an existing AlertManagerDefinition resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: AlertManagerDefinitionState, opts?: CustomResourceOptions): AlertManagerDefinition
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            definition: Optional[str] = None,
            workspace_id: Optional[str] = None) -> AlertManagerDefinition
    func GetAlertManagerDefinition(ctx *Context, name string, id IDInput, state *AlertManagerDefinitionState, opts ...ResourceOption) (*AlertManagerDefinition, error)
    public static AlertManagerDefinition Get(string name, Input<string> id, AlertManagerDefinitionState? state, CustomResourceOptions? opts = null)
    public static AlertManagerDefinition get(String name, Output<String> id, AlertManagerDefinitionState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Definition string

    the alert manager definition that you want to be applied. See more in AWS Docs.

    WorkspaceId string

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

    Definition string

    the alert manager definition that you want to be applied. See more in AWS Docs.

    WorkspaceId string

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

    definition String

    the alert manager definition that you want to be applied. See more in AWS Docs.

    workspaceId String

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

    definition string

    the alert manager definition that you want to be applied. See more in AWS Docs.

    workspaceId string

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

    definition str

    the alert manager definition that you want to be applied. See more in AWS Docs.

    workspace_id str

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

    definition String

    the alert manager definition that you want to be applied. See more in AWS Docs.

    workspaceId String

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

    Import

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

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

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the aws Terraform Provider.

    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.3.0 published on Thursday, Sep 28, 2023 by Pulumi