Class NetworkInsightsAnalysis


  • public class NetworkInsightsAnalysis
    extends com.pulumi.resources.CustomResource
    Provides a Network Insights Analysis resource. Part of the "Reachability Analyzer" service in the AWS VPC console. ## Example Usage <!--Start PulumiCodeChooser -->
     
     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.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 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());
     
         }
     }
     
     
    <!--End PulumiCodeChooser --> ## Import Using `pulumi import`, import Network Insights Analyses using the `id`. For example: ```sh $ pulumi import aws:ec2/networkInsightsAnalysis:NetworkInsightsAnalysis test nia-0462085c957f11a55 ```
    • Constructor Detail

      • NetworkInsightsAnalysis

        public NetworkInsightsAnalysis​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • NetworkInsightsAnalysis

        public NetworkInsightsAnalysis​(java.lang.String name,
                                       NetworkInsightsAnalysisArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • NetworkInsightsAnalysis

        public NetworkInsightsAnalysis​(java.lang.String name,
                                       NetworkInsightsAnalysisArgs 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

      • alternatePathHints

        public com.pulumi.core.Output<java.util.List<NetworkInsightsAnalysisAlternatePathHint>> alternatePathHints()
        Returns:
        Potential intermediate components of a feasible path. Described below.
      • arn

        public com.pulumi.core.Output<java.lang.String> arn()
        Returns:
        ARN of the Network Insights Analysis.
      • explanations

        public com.pulumi.core.Output<java.util.List<NetworkInsightsAnalysisExplanation>> explanations()
        Returns:
        Explanation codes for an unreachable path. See the [AWS documentation](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Explanation.html) for details.
      • filterInArns

        public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> filterInArns()
        Returns:
        A list of ARNs for resources the path must traverse.
      • forwardPathComponents

        public com.pulumi.core.Output<java.util.List<NetworkInsightsAnalysisForwardPathComponent>> forwardPathComponents()
        Returns:
        The components in the path from source to destination. See the [AWS documentation](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_PathComponent.html) for details.
      • networkInsightsPathId

        public com.pulumi.core.Output<java.lang.String> networkInsightsPathId()
        Returns:
        ID of the Network Insights Path to run an analysis on. The following arguments are optional:
      • pathFound

        public com.pulumi.core.Output<java.lang.Boolean> pathFound()
        Returns:
        Set to `true` if the destination was reachable.
      • returnPathComponents

        public com.pulumi.core.Output<java.util.List<NetworkInsightsAnalysisReturnPathComponent>> returnPathComponents()
        Returns:
        The components in the path from destination to source. See the [AWS documentation](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_PathComponent.html) for details.
      • startDate

        public com.pulumi.core.Output<java.lang.String> startDate()
        Returns:
        The date/time the analysis was started.
      • status

        public com.pulumi.core.Output<java.lang.String> status()
        Returns:
        The status of the analysis. `succeeded` means the analysis was completed, not that a path was found, for that see `path_found`.
      • statusMessage

        public com.pulumi.core.Output<java.lang.String> statusMessage()
        Returns:
        A message to provide more context when the `status` is `failed`.
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        Map of tags to assign to the resource. If configured with a provider `default_tags` 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:
        Map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
      • waitForCompletion

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> waitForCompletion()
        Returns:
        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`.
      • warningMessage

        public com.pulumi.core.Output<java.lang.String> warningMessage()
        Returns:
        The warning message.
      • get

        public static NetworkInsightsAnalysis get​(java.lang.String name,
                                                  com.pulumi.core.Output<java.lang.String> id,
                                                  @Nullable
                                                  NetworkInsightsAnalysisState 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.