Class Monitor
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.networkflowmonitor.Monitor
-
public class Monitor extends com.pulumi.resources.CustomResourceManages a Network Flow Monitor Monitor. ## Example Usage ### Basic Usage
## Import Using `pulumi import`, import Network Flow Monitor Monitor using the monitor name. For example: ```sh $ pulumi import aws:networkflowmonitor/monitor:Monitor example example-monitor ```package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.ec2.Vpc; import com.pulumi.aws.ec2.VpcArgs; import com.pulumi.aws.networkflowmonitor.Monitor; import com.pulumi.aws.networkflowmonitor.MonitorArgs; import com.pulumi.aws.networkflowmonitor.inputs.MonitorLocalResourceArgs; import com.pulumi.aws.networkflowmonitor.inputs.MonitorRemoteResourceArgs; import java.util.ArrayList; import java.util.Arrays; 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 Vpc("example", VpcArgs.builder() .cidrBlock("10.0.0.0/16") .tags(Map.of("Name", "example")) .build()); var exampleMonitor = new Monitor("exampleMonitor", MonitorArgs.builder() .localResources(MonitorLocalResourceArgs.builder() .type("AWS::EC2::VPC") .identifier(example.arn()) .build()) .remoteResources(MonitorRemoteResourceArgs.builder() .type("AWS::EC2::VPC") .identifier(example.arn()) .build()) .monitorName("example-monitor") .scopeArn(exampleAwsNetworkflowmonitorScope.scopeArn()) .tags(Map.of("Name", "example")) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description Monitor(java.lang.String name)Monitor(java.lang.String name, MonitorArgs args)Monitor(java.lang.String name, MonitorArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Monitorget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, MonitorState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.util.List<MonitorLocalResource>>localResources()com.pulumi.core.Output<java.lang.String>monitorArn()com.pulumi.core.Output<java.lang.String>monitorName()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.util.Optional<java.util.List<MonitorRemoteResource>>>remoteResources()com.pulumi.core.Output<java.lang.String>scopeArn()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>tags()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>tagsAll()com.pulumi.core.Output<java.util.Optional<MonitorTimeouts>>timeouts()
-
-
-
Constructor Detail
-
Monitor
public Monitor(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
Monitor
public Monitor(java.lang.String name, MonitorArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
Monitor
public Monitor(java.lang.String name, MonitorArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
localResources
public com.pulumi.core.Output<java.util.List<MonitorLocalResource>> localResources()
- Returns:
- The local resources to monitor. A local resource in a workload is the location of the hosts where the Network Flow Monitor agent is installed.
-
monitorArn
public com.pulumi.core.Output<java.lang.String> monitorArn()
- Returns:
- ARN of the monitor.
-
monitorName
public com.pulumi.core.Output<java.lang.String> monitorName()
- Returns:
- The name of the monitor. Cannot be changed after creation.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
remoteResources
public com.pulumi.core.Output<java.util.Optional<java.util.List<MonitorRemoteResource>>> remoteResources()
- Returns:
- The remote resources to monitor. A remote resource is the other endpoint specified for the network flow of a workload, with a local resource.
-
scopeArn
public com.pulumi.core.Output<java.lang.String> scopeArn()
- Returns:
- ARN of the scope for the monitor. Cannot be changed after creation. The following arguments are optional:
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- 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.
-
tagsAll
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> tagsAll()
- Returns:
- A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
-
timeouts
public com.pulumi.core.Output<java.util.Optional<MonitorTimeouts>> timeouts()
-
get
public static Monitor get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable MonitorState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-