aws.networkmonitor.Monitor
Explore with Pulumi AI
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Monitor resource accepts the following input properties:
- Monitor
Name string 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.
- 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.
- Monitor
Name string 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.
- 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.
- monitor
Name String The name of the monitor.
The following arguments are optional:
- aggregation
Period Integer - The time, in seconds, that metrics are aggregated and sent to Amazon CloudWatch. Valid values are either 30 or 60.
- 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.
- monitor
Name string The name of the monitor.
The following arguments are optional:
- aggregation
Period number - The time, in seconds, that metrics are aggregated and sent to Amazon CloudWatch. Valid values are either 30 or 60.
- {[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.
- 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.
- monitor
Name String The name of the monitor.
The following arguments are optional:
- aggregation
Period Number - The time, in seconds, that metrics are aggregated and sent to Amazon CloudWatch. Valid values are either 30 or 60.
- 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:
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.
- Aggregation
Period 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.
- Monitor
Name string The name of the monitor.
The following arguments are optional:
- 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. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Aggregation
Period 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.
- Monitor
Name string The name of the monitor.
The following arguments are optional:
- 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. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- aggregation
Period 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.
- monitor
Name String The name of the monitor.
The following arguments are optional:
- 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. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- aggregation
Period 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.
- monitor
Name string The name of the monitor.
The following arguments are optional:
- {[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. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- 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:
- 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. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- aggregation
Period 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.
- monitor
Name String The name of the monitor.
The following arguments are optional:
- 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. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
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.