1. Packages
  2. AWS
  3. API Docs
  4. networkmonitor
  5. Monitor
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

aws.networkmonitor.Monitor

Explore with Pulumi AI

aws logo
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

    Resource for managing an AWS Network Monitor Monitor.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.networkmonitor.Monitor("example", {
        aggregationPeriod: 30,
        monitorName: "example",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.networkmonitor.Monitor("example",
        aggregation_period=30,
        monitor_name="example")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkmonitor"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := networkmonitor.NewMonitor(ctx, "example", &networkmonitor.MonitorArgs{
    			AggregationPeriod: pulumi.Int(30),
    			MonitorName:       pulumi.String("example"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.NetworkMonitor.Monitor("example", new()
        {
            AggregationPeriod = 30,
            MonitorName = "example",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.networkmonitor.Monitor;
    import com.pulumi.aws.networkmonitor.MonitorArgs;
    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 example = new Monitor("example", MonitorArgs.builder()
                .aggregationPeriod(30)
                .monitorName("example")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:networkmonitor:Monitor
        properties:
          aggregationPeriod: 30
          monitorName: example
    

    Create Monitor Resource

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

    Constructor syntax

    new Monitor(name: string, args: MonitorArgs, opts?: CustomResourceOptions);
    @overload
    def Monitor(resource_name: str,
                args: MonitorArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Monitor(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                monitor_name: Optional[str] = None,
                aggregation_period: Optional[int] = None,
                tags: Optional[Mapping[str, str]] = None)
    func NewMonitor(ctx *Context, name string, args MonitorArgs, opts ...ResourceOption) (*Monitor, error)
    public Monitor(string name, MonitorArgs args, CustomResourceOptions? opts = null)
    public Monitor(String name, MonitorArgs args)
    public Monitor(String name, MonitorArgs args, CustomResourceOptions options)
    
    type: aws:networkmonitor:Monitor
    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 MonitorArgs
    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 MonitorArgs
    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 MonitorArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MonitorArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MonitorArgs
    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 monitorResource = new Aws.NetworkMonitor.Monitor("monitorResource", new()
    {
        MonitorName = "string",
        AggregationPeriod = 0,
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := networkmonitor.NewMonitor(ctx, "monitorResource", &networkmonitor.MonitorArgs{
    	MonitorName:       pulumi.String("string"),
    	AggregationPeriod: pulumi.Int(0),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var monitorResource = new Monitor("monitorResource", MonitorArgs.builder()
        .monitorName("string")
        .aggregationPeriod(0)
        .tags(Map.of("string", "string"))
        .build());
    
    monitor_resource = aws.networkmonitor.Monitor("monitorResource",
        monitor_name="string",
        aggregation_period=0,
        tags={
            "string": "string",
        })
    
    const monitorResource = new aws.networkmonitor.Monitor("monitorResource", {
        monitorName: "string",
        aggregationPeriod: 0,
        tags: {
            string: "string",
        },
    });
    
    type: aws:networkmonitor:Monitor
    properties:
        aggregationPeriod: 0
        monitorName: string
        tags:
            string: string
    

    Monitor 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 Monitor resource accepts the following input properties:

    MonitorName string

    The name of the monitor.

    The following arguments are optional:

    AggregationPeriod int
    The time, in seconds, that metrics are aggregated and sent to Amazon CloudWatch. Valid values are either 30 or 60.
    Tags Dictionary<string, string>
    Key-value tags for the monitor. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    MonitorName string

    The name of the monitor.

    The following arguments are optional:

    AggregationPeriod int
    The time, in seconds, that metrics are aggregated and sent to Amazon CloudWatch. Valid values are either 30 or 60.
    Tags map[string]string
    Key-value tags for the monitor. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    monitorName String

    The name of the monitor.

    The following arguments are optional:

    aggregationPeriod Integer
    The time, in seconds, that metrics are aggregated and sent to Amazon CloudWatch. Valid values are either 30 or 60.
    tags Map<String,String>
    Key-value tags for the monitor. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    monitorName string

    The name of the monitor.

    The following arguments are optional:

    aggregationPeriod number
    The time, in seconds, that metrics are aggregated and sent to Amazon CloudWatch. Valid values are either 30 or 60.
    tags {[key: string]: string}
    Key-value tags for the monitor. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    monitor_name str

    The name of the monitor.

    The following arguments are optional:

    aggregation_period int
    The time, in seconds, that metrics are aggregated and sent to Amazon CloudWatch. Valid values are either 30 or 60.
    tags Mapping[str, str]
    Key-value tags for the monitor. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    monitorName String

    The name of the monitor.

    The following arguments are optional:

    aggregationPeriod Number
    The time, in seconds, that metrics are aggregated and sent to Amazon CloudWatch. Valid values are either 30 or 60.
    tags Map<String>
    Key-value tags for the monitor. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

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

    Arn string
    The ARN of the monitor.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    The ARN of the monitor.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The ARN of the monitor.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    The ARN of the monitor.
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    The ARN of the monitor.
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The ARN of the monitor.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Look up Existing Monitor Resource

    Get an existing Monitor 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?: MonitorState, opts?: CustomResourceOptions): Monitor
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            aggregation_period: Optional[int] = None,
            arn: Optional[str] = None,
            monitor_name: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None) -> Monitor
    func GetMonitor(ctx *Context, name string, id IDInput, state *MonitorState, opts ...ResourceOption) (*Monitor, error)
    public static Monitor Get(string name, Input<string> id, MonitorState? state, CustomResourceOptions? opts = null)
    public static Monitor get(String name, Output<String> id, MonitorState 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:
    AggregationPeriod int
    The time, in seconds, that metrics are aggregated and sent to Amazon CloudWatch. Valid values are either 30 or 60.
    Arn string
    The ARN of the monitor.
    MonitorName string

    The name of the monitor.

    The following arguments are optional:

    Tags Dictionary<string, string>
    Key-value tags for the monitor. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    AggregationPeriod int
    The time, in seconds, that metrics are aggregated and sent to Amazon CloudWatch. Valid values are either 30 or 60.
    Arn string
    The ARN of the monitor.
    MonitorName string

    The name of the monitor.

    The following arguments are optional:

    Tags map[string]string
    Key-value tags for the monitor. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    aggregationPeriod Integer
    The time, in seconds, that metrics are aggregated and sent to Amazon CloudWatch. Valid values are either 30 or 60.
    arn String
    The ARN of the monitor.
    monitorName String

    The name of the monitor.

    The following arguments are optional:

    tags Map<String,String>
    Key-value tags for the monitor. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    aggregationPeriod number
    The time, in seconds, that metrics are aggregated and sent to Amazon CloudWatch. Valid values are either 30 or 60.
    arn string
    The ARN of the monitor.
    monitorName string

    The name of the monitor.

    The following arguments are optional:

    tags {[key: string]: string}
    Key-value tags for the monitor. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    aggregation_period int
    The time, in seconds, that metrics are aggregated and sent to Amazon CloudWatch. Valid values are either 30 or 60.
    arn str
    The ARN of the monitor.
    monitor_name str

    The name of the monitor.

    The following arguments are optional:

    tags Mapping[str, str]
    Key-value tags for the monitor. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    aggregationPeriod Number
    The time, in seconds, that metrics are aggregated and sent to Amazon CloudWatch. Valid values are either 30 or 60.
    arn String
    The ARN of the monitor.
    monitorName String

    The name of the monitor.

    The following arguments are optional:

    tags Map<String>
    Key-value tags for the monitor. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Import

    Using pulumi import, import aws_networkmonitor_monitor using the monitor name. For example:

    $ pulumi import aws:networkmonitor/monitor:Monitor example monitor-7786087912324693644
    

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

    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
    AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi