1. Packages
  2. Scaleway
  3. API Docs
  4. CockpitAlertManager
Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse

scaleway.CockpitAlertManager

Explore with Pulumi AI

scaleway logo
Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse

    The scaleway.CockpitAlertManager resource allows you to enable and manage the Scaleway Cockpit alert manager.

    Refer to Cockpit’s product documentation and API documentation for more information.

    Example Usage

    Enable the alert manager and configure managed alerts

    The following commands allow you to:

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const project = new scaleway.AccountProject("project", {name: "tf_test_project"});
    const alertManager = new scaleway.CockpitAlertManager("alert_manager", {
        projectId: project.id,
        enableManagedAlerts: true,
        contactPoints: [
            {
                email: "alert1@example.com",
            },
            {
                email: "alert2@example.com",
            },
        ],
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    project = scaleway.AccountProject("project", name="tf_test_project")
    alert_manager = scaleway.CockpitAlertManager("alert_manager",
        project_id=project.id,
        enable_managed_alerts=True,
        contact_points=[
            {
                "email": "alert1@example.com",
            },
            {
                "email": "alert2@example.com",
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		project, err := scaleway.NewAccountProject(ctx, "project", &scaleway.AccountProjectArgs{
    			Name: pulumi.String("tf_test_project"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.NewCockpitAlertManager(ctx, "alert_manager", &scaleway.CockpitAlertManagerArgs{
    			ProjectId:           project.ID(),
    			EnableManagedAlerts: pulumi.Bool(true),
    			ContactPoints: scaleway.CockpitAlertManagerContactPointArray{
    				&scaleway.CockpitAlertManagerContactPointArgs{
    					Email: pulumi.String("alert1@example.com"),
    				},
    				&scaleway.CockpitAlertManagerContactPointArgs{
    					Email: pulumi.String("alert2@example.com"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var project = new Scaleway.AccountProject("project", new()
        {
            Name = "tf_test_project",
        });
    
        var alertManager = new Scaleway.CockpitAlertManager("alert_manager", new()
        {
            ProjectId = project.Id,
            EnableManagedAlerts = true,
            ContactPoints = new[]
            {
                new Scaleway.Inputs.CockpitAlertManagerContactPointArgs
                {
                    Email = "alert1@example.com",
                },
                new Scaleway.Inputs.CockpitAlertManagerContactPointArgs
                {
                    Email = "alert2@example.com",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.AccountProject;
    import com.pulumi.scaleway.AccountProjectArgs;
    import com.pulumi.scaleway.CockpitAlertManager;
    import com.pulumi.scaleway.CockpitAlertManagerArgs;
    import com.pulumi.scaleway.inputs.CockpitAlertManagerContactPointArgs;
    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 project = new AccountProject("project", AccountProjectArgs.builder()
                .name("tf_test_project")
                .build());
    
            var alertManager = new CockpitAlertManager("alertManager", CockpitAlertManagerArgs.builder()
                .projectId(project.id())
                .enableManagedAlerts(true)
                .contactPoints(            
                    CockpitAlertManagerContactPointArgs.builder()
                        .email("alert1@example.com")
                        .build(),
                    CockpitAlertManagerContactPointArgs.builder()
                        .email("alert2@example.com")
                        .build())
                .build());
    
        }
    }
    
    resources:
      project:
        type: scaleway:AccountProject
        properties:
          name: tf_test_project
      alertManager:
        type: scaleway:CockpitAlertManager
        name: alert_manager
        properties:
          projectId: ${project.id}
          enableManagedAlerts: true
          contactPoints:
            - email: alert1@example.com
            - email: alert2@example.com
    

    Create CockpitAlertManager Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new CockpitAlertManager(name: string, args?: CockpitAlertManagerArgs, opts?: CustomResourceOptions);
    @overload
    def CockpitAlertManager(resource_name: str,
                            args: Optional[CockpitAlertManagerArgs] = None,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def CockpitAlertManager(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            contact_points: Optional[Sequence[CockpitAlertManagerContactPointArgs]] = None,
                            enable_managed_alerts: Optional[bool] = None,
                            project_id: Optional[str] = None,
                            region: Optional[str] = None)
    func NewCockpitAlertManager(ctx *Context, name string, args *CockpitAlertManagerArgs, opts ...ResourceOption) (*CockpitAlertManager, error)
    public CockpitAlertManager(string name, CockpitAlertManagerArgs? args = null, CustomResourceOptions? opts = null)
    public CockpitAlertManager(String name, CockpitAlertManagerArgs args)
    public CockpitAlertManager(String name, CockpitAlertManagerArgs args, CustomResourceOptions options)
    
    type: scaleway:CockpitAlertManager
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args CockpitAlertManagerArgs
    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 CockpitAlertManagerArgs
    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 CockpitAlertManagerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CockpitAlertManagerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CockpitAlertManagerArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var cockpitAlertManagerResource = new Scaleway.CockpitAlertManager("cockpitAlertManagerResource", new()
    {
        ContactPoints = new[]
        {
            new Scaleway.Inputs.CockpitAlertManagerContactPointArgs
            {
                Email = "string",
            },
        },
        EnableManagedAlerts = false,
        ProjectId = "string",
        Region = "string",
    });
    
    example, err := scaleway.NewCockpitAlertManager(ctx, "cockpitAlertManagerResource", &scaleway.CockpitAlertManagerArgs{
    	ContactPoints: scaleway.CockpitAlertManagerContactPointArray{
    		&scaleway.CockpitAlertManagerContactPointArgs{
    			Email: pulumi.String("string"),
    		},
    	},
    	EnableManagedAlerts: pulumi.Bool(false),
    	ProjectId:           pulumi.String("string"),
    	Region:              pulumi.String("string"),
    })
    
    var cockpitAlertManagerResource = new CockpitAlertManager("cockpitAlertManagerResource", CockpitAlertManagerArgs.builder()
        .contactPoints(CockpitAlertManagerContactPointArgs.builder()
            .email("string")
            .build())
        .enableManagedAlerts(false)
        .projectId("string")
        .region("string")
        .build());
    
    cockpit_alert_manager_resource = scaleway.CockpitAlertManager("cockpitAlertManagerResource",
        contact_points=[{
            "email": "string",
        }],
        enable_managed_alerts=False,
        project_id="string",
        region="string")
    
    const cockpitAlertManagerResource = new scaleway.CockpitAlertManager("cockpitAlertManagerResource", {
        contactPoints: [{
            email: "string",
        }],
        enableManagedAlerts: false,
        projectId: "string",
        region: "string",
    });
    
    type: scaleway:CockpitAlertManager
    properties:
        contactPoints:
            - email: string
        enableManagedAlerts: false
        projectId: string
        region: string
    

    CockpitAlertManager Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The CockpitAlertManager resource accepts the following input properties:

    ContactPoints List<Pulumiverse.Scaleway.Inputs.CockpitAlertManagerContactPoint>
    A list of contact points with email addresses that will receive alerts. Each map should contain a single key email.
    EnableManagedAlerts bool
    Specifies whether the alert manager should be enabled. Defaults to true.
    ProjectId string
    ) The ID of the Project the Cockpit is associated with.
    Region string
    ) The region where the alert manager should be enabled.
    ContactPoints []CockpitAlertManagerContactPointArgs
    A list of contact points with email addresses that will receive alerts. Each map should contain a single key email.
    EnableManagedAlerts bool
    Specifies whether the alert manager should be enabled. Defaults to true.
    ProjectId string
    ) The ID of the Project the Cockpit is associated with.
    Region string
    ) The region where the alert manager should be enabled.
    contactPoints List<CockpitAlertManagerContactPoint>
    A list of contact points with email addresses that will receive alerts. Each map should contain a single key email.
    enableManagedAlerts Boolean
    Specifies whether the alert manager should be enabled. Defaults to true.
    projectId String
    ) The ID of the Project the Cockpit is associated with.
    region String
    ) The region where the alert manager should be enabled.
    contactPoints CockpitAlertManagerContactPoint[]
    A list of contact points with email addresses that will receive alerts. Each map should contain a single key email.
    enableManagedAlerts boolean
    Specifies whether the alert manager should be enabled. Defaults to true.
    projectId string
    ) The ID of the Project the Cockpit is associated with.
    region string
    ) The region where the alert manager should be enabled.
    contact_points Sequence[CockpitAlertManagerContactPointArgs]
    A list of contact points with email addresses that will receive alerts. Each map should contain a single key email.
    enable_managed_alerts bool
    Specifies whether the alert manager should be enabled. Defaults to true.
    project_id str
    ) The ID of the Project the Cockpit is associated with.
    region str
    ) The region where the alert manager should be enabled.
    contactPoints List<Property Map>
    A list of contact points with email addresses that will receive alerts. Each map should contain a single key email.
    enableManagedAlerts Boolean
    Specifies whether the alert manager should be enabled. Defaults to true.
    projectId String
    ) The ID of the Project the Cockpit is associated with.
    region String
    ) The region where the alert manager should be enabled.

    Outputs

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

    AlertManagerUrl string
    The URL of the alert manager.
    Id string
    The provider-assigned unique ID for this managed resource.
    AlertManagerUrl string
    The URL of the alert manager.
    Id string
    The provider-assigned unique ID for this managed resource.
    alertManagerUrl String
    The URL of the alert manager.
    id String
    The provider-assigned unique ID for this managed resource.
    alertManagerUrl string
    The URL of the alert manager.
    id string
    The provider-assigned unique ID for this managed resource.
    alert_manager_url str
    The URL of the alert manager.
    id str
    The provider-assigned unique ID for this managed resource.
    alertManagerUrl String
    The URL of the alert manager.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing CockpitAlertManager Resource

    Get an existing CockpitAlertManager 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?: CockpitAlertManagerState, opts?: CustomResourceOptions): CockpitAlertManager
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            alert_manager_url: Optional[str] = None,
            contact_points: Optional[Sequence[CockpitAlertManagerContactPointArgs]] = None,
            enable_managed_alerts: Optional[bool] = None,
            project_id: Optional[str] = None,
            region: Optional[str] = None) -> CockpitAlertManager
    func GetCockpitAlertManager(ctx *Context, name string, id IDInput, state *CockpitAlertManagerState, opts ...ResourceOption) (*CockpitAlertManager, error)
    public static CockpitAlertManager Get(string name, Input<string> id, CockpitAlertManagerState? state, CustomResourceOptions? opts = null)
    public static CockpitAlertManager get(String name, Output<String> id, CockpitAlertManagerState 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:
    AlertManagerUrl string
    The URL of the alert manager.
    ContactPoints List<Pulumiverse.Scaleway.Inputs.CockpitAlertManagerContactPoint>
    A list of contact points with email addresses that will receive alerts. Each map should contain a single key email.
    EnableManagedAlerts bool
    Specifies whether the alert manager should be enabled. Defaults to true.
    ProjectId string
    ) The ID of the Project the Cockpit is associated with.
    Region string
    ) The region where the alert manager should be enabled.
    AlertManagerUrl string
    The URL of the alert manager.
    ContactPoints []CockpitAlertManagerContactPointArgs
    A list of contact points with email addresses that will receive alerts. Each map should contain a single key email.
    EnableManagedAlerts bool
    Specifies whether the alert manager should be enabled. Defaults to true.
    ProjectId string
    ) The ID of the Project the Cockpit is associated with.
    Region string
    ) The region where the alert manager should be enabled.
    alertManagerUrl String
    The URL of the alert manager.
    contactPoints List<CockpitAlertManagerContactPoint>
    A list of contact points with email addresses that will receive alerts. Each map should contain a single key email.
    enableManagedAlerts Boolean
    Specifies whether the alert manager should be enabled. Defaults to true.
    projectId String
    ) The ID of the Project the Cockpit is associated with.
    region String
    ) The region where the alert manager should be enabled.
    alertManagerUrl string
    The URL of the alert manager.
    contactPoints CockpitAlertManagerContactPoint[]
    A list of contact points with email addresses that will receive alerts. Each map should contain a single key email.
    enableManagedAlerts boolean
    Specifies whether the alert manager should be enabled. Defaults to true.
    projectId string
    ) The ID of the Project the Cockpit is associated with.
    region string
    ) The region where the alert manager should be enabled.
    alert_manager_url str
    The URL of the alert manager.
    contact_points Sequence[CockpitAlertManagerContactPointArgs]
    A list of contact points with email addresses that will receive alerts. Each map should contain a single key email.
    enable_managed_alerts bool
    Specifies whether the alert manager should be enabled. Defaults to true.
    project_id str
    ) The ID of the Project the Cockpit is associated with.
    region str
    ) The region where the alert manager should be enabled.
    alertManagerUrl String
    The URL of the alert manager.
    contactPoints List<Property Map>
    A list of contact points with email addresses that will receive alerts. Each map should contain a single key email.
    enableManagedAlerts Boolean
    Specifies whether the alert manager should be enabled. Defaults to true.
    projectId String
    ) The ID of the Project the Cockpit is associated with.
    region String
    ) The region where the alert manager should be enabled.

    Supporting Types

    CockpitAlertManagerContactPoint, CockpitAlertManagerContactPointArgs

    Email string
    Email addresses for the alert receivers
    Email string
    Email addresses for the alert receivers
    email String
    Email addresses for the alert receivers
    email string
    Email addresses for the alert receivers
    email str
    Email addresses for the alert receivers
    email String
    Email addresses for the alert receivers

    Import

    This section explains how to import alert managers using the ID of the Project associated with Cockpit.

    bash

    $ pulumi import scaleway:index/cockpitAlertManager:CockpitAlertManager main fr-par/11111111-1111-1111-1111-111111111111
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse