NetworkInsightsAnalysis class

Provides a Network Insights Analysis resource. Part of the "Reachability Analyzer" service in the AWS VPC console.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const path = new aws.ec2.NetworkInsightsPath("path", {
    source: source.id,
    destination: destination.id,
    protocol: "tcp",
});
const analysis = new aws.ec2.NetworkInsightsAnalysis("analysis", {networkInsightsPathId: path.id});
import pulumi
import pulumi_aws as aws

path = aws.ec2.NetworkInsightsPath("path",
    source=source["id"],
    destination=destination["id"],
    protocol="tcp")
analysis = aws.ec2.NetworkInsightsAnalysis("analysis", network_insights_path_id=path.id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var path = new Aws.Ec2.NetworkInsightsPath("path", new()
    {
        Source = source.Id,
        Destination = destination.Id,
        Protocol = "tcp",
    });

    var analysis = new Aws.Ec2.NetworkInsightsAnalysis("analysis", new()
    {
        NetworkInsightsPathId = path.Id,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		path, err := ec2.NewNetworkInsightsPath(ctx, "path", &ec2.NetworkInsightsPathArgs{
			Source:      pulumi.Any(source.Id),
			Destination: pulumi.Any(destination.Id),
			Protocol:    pulumi.String("tcp"),
		})
		if err != nil {
			return err
		}
		_, err = ec2.NewNetworkInsightsAnalysis(ctx, "analysis", &ec2.NetworkInsightsAnalysisArgs{
			NetworkInsightsPathId: path.ID().ToIDOutput().ToStringOutput(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_ec2_networkinsightspath" "path" {
  source      = source.id
  destination = destination.id
  protocol    = "tcp"
}
resource "aws_ec2_networkinsightsanalysis" "analysis" {
  network_insights_path_id = aws_ec2_networkinsightspath.path.id
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.NetworkInsightsPath;
import com.pulumi.aws.ec2.NetworkInsightsPathArgs;
import com.pulumi.aws.ec2.NetworkInsightsAnalysis;
import com.pulumi.aws.ec2.NetworkInsightsAnalysisArgs;
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 path = new NetworkInsightsPath("path", NetworkInsightsPathArgs.builder()
            .source(source.id())
            .destination(destination.id())
            .protocol("tcp")
            .build());

        var analysis = new NetworkInsightsAnalysis("analysis", NetworkInsightsAnalysisArgs.builder()
            .networkInsightsPathId(path.id())
            .build());

    }
}
resources:
  path:
    type: aws:ec2:NetworkInsightsPath
    properties:
      source: ${source.id}
      destination: ${destination.id}
      protocol: tcp
  analysis:
    type: aws:ec2:NetworkInsightsAnalysis
    properties:
      networkInsightsPathId: ${path.id}

Import

Using pulumi import, import Network Insights Analyzes using the id. For example:

$ pulumi import aws:ec2/networkInsightsAnalysis:NetworkInsightsAnalysis test nia-0462085c957f11a55

Constructors

NetworkInsightsAnalysis(String name, {NetworkInsightsAnalysisArgs? args, CustomResourceOptions? options})
Creates a new NetworkInsightsAnalysis. name The Pulumi resource name. args Arguments used to configure this NetworkInsightsAnalysis. The set of arguments for NetworkInsightsAnalysis. options Resource options controlling this resource's behavior.
NetworkInsightsAnalysis.reference(String urn)
Creates a typed reference to an existing NetworkInsightsAnalysis resource.

Properties

alternatePathHints ↔ Output<List<NetworkInsightsAnalysisAlternatePathHint>>
Potential intermediate components of a feasible path. Described below.
latefinal
arn ↔ Output<String>
ARN of the Network Insights Analysis.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
explanations ↔ Output<List<NetworkInsightsAnalysisExplanation>>
Explanation codes for an unreachable path. See the AWS documentation for details.
latefinal
filterInArns ↔ Output<List<String>?>
A list of ARNs for resources the path must traverse.
latefinal
forwardPathComponents ↔ Output<List<NetworkInsightsAnalysisForwardPathComponent>>
The components in the path from source to destination. See the AWS documentation for details.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
networkInsightsPathId ↔ Output<String>
ID of the Network Insights Path to run an analysis on.
latefinal
pathFound ↔ Output<bool>
Set to true if the destination was reachable.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
returnPathComponents ↔ Output<List<NetworkInsightsAnalysisReturnPathComponent>>
The components in the path from destination to source. See the AWS documentation for details.
latefinal
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
startDate ↔ Output<String>
The date/time the analysis was started.
latefinal
status ↔ Output<String>
The status of the analysis. succeeded means the analysis was completed, not that a path was found, for that see pathFound.
latefinal
statusMessage ↔ Output<String>
A message to provide more context when the status is failed.
latefinal
tags ↔ Output<Map<String, String>?>
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.
latefinal
tagsAll ↔ Output<Map<String, String>>
Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited
waitForCompletion ↔ Output<bool?>
If enabled, the resource will wait for the Network Insights Analysis status to change to succeeded or failed. Setting this to false will skip the process. Default: true.
latefinal
warningMessage ↔ Output<String>
The warning message.
latefinal

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {NetworkInsightsAnalysisState? state, CustomResourceOptions? options}) → NetworkInsightsAnalysis
Gets an existing NetworkInsightsAnalysis resource's state with the given name and id.