[ aws . ec2 ]

start-network-insights-analysis

Description

Starts analyzing the specified path. If the path is reachable, the operation returns the shortest feasible path.

See also: AWS API Documentation

See ‘aws help’ for descriptions of global parameters.

Synopsis

  start-network-insights-analysis
--network-insights-path-id <value>
[--filter-in-arns <value>]
[--dry-run | --no-dry-run]
[--tag-specifications <value>]
[--client-token <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]

Options

--network-insights-path-id (string)

The ID of the path.

--filter-in-arns (list)

The Amazon Resource Names (ARN) of the resources that the path must traverse.

(string)

Syntax:

"string" "string" ...

--dry-run | --no-dry-run (boolean)

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .

--tag-specifications (list)

The tags to apply.

(structure)

The tags to apply to a resource when the resource is being created.

ResourceType -> (string)

The type of resource to tag. Currently, the resource types that support tagging on creation are: capacity-reservation | carrier-gateway | client-vpn-endpoint | customer-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet | fpga-image | host-reservation | image | import-image-task | import-snapshot-task | instance | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | local-gateway-route-table-vpc-association | placement-group | prefix-list | natgateway | network-acl | network-interface | reserved-instances |route-table | security-group | snapshot | spot-fleet-request | spot-instances-request | snapshot | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-multicast-domain | transit-gateway-route-table | volume |vpc | vpc-peering-connection | vpc-endpoint (for interface and gateway endpoints) | vpc-endpoint-service (for AWS PrivateLink) | vpc-flow-log | vpn-connection | vpn-gateway .

To tag a resource after it has been created, see CreateTags .

Tags -> (list)

The tags to apply to the resource.

(structure)

Describes a tag.

Key -> (string)

The key of the tag.

Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

Value -> (string)

The value of the tag.

Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

Shorthand Syntax:

ResourceType=string,Tags=[{Key=string,Value=string},{Key=string,Value=string}] ...

JSON Syntax:

[
  {
    "ResourceType": "client-vpn-endpoint"|"customer-gateway"|"dedicated-host"|"dhcp-options"|"egress-only-internet-gateway"|"elastic-ip"|"elastic-gpu"|"export-image-task"|"export-instance-task"|"fleet"|"fpga-image"|"host-reservation"|"image"|"import-image-task"|"import-snapshot-task"|"instance"|"internet-gateway"|"key-pair"|"launch-template"|"local-gateway-route-table-vpc-association"|"natgateway"|"network-acl"|"network-interface"|"network-insights-analysis"|"network-insights-path"|"placement-group"|"reserved-instances"|"route-table"|"security-group"|"snapshot"|"spot-fleet-request"|"spot-instances-request"|"subnet"|"traffic-mirror-filter"|"traffic-mirror-session"|"traffic-mirror-target"|"transit-gateway"|"transit-gateway-attachment"|"transit-gateway-connect-peer"|"transit-gateway-multicast-domain"|"transit-gateway-route-table"|"volume"|"vpc"|"vpc-peering-connection"|"vpn-connection"|"vpn-gateway"|"vpc-flow-log",
    "Tags": [
      {
        "Key": "string",
        "Value": "string"
      }
      ...
    ]
  }
  ...
]

--client-token (string)

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency .

--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See ‘aws help’ for descriptions of global parameters.

Examples

To analyze a path

The following start-network-insights-analysis example analyzes the path between the source and destination. To view the results of the path analysis, use the describe-network-insights-analyses command.

aws ec2 start-network-insights-analysis \
    --network-insights-path-id nip-0b26f224f1d131fa8

Output:

{
    "NetworkInsightsAnalysis": {
        "NetworkInsightsAnalysisId": "nia-02207aa13eb480c7a",
        "NetworkInsightsAnalysisArn": "arn:aws:ec2:us-east-1:123456789012:network-insights-analysis/nia-02207aa13eb480c7a",
        "NetworkInsightsPathId": "nip-0b26f224f1d131fa8",
        "StartDate": "2021-01-20T22:58:37.495Z",
        "Status": "running"
    }
}

For more information, see Getting started using the AWS CLI in the Reachability Analyzer Guide.

Output

NetworkInsightsAnalysis -> (structure)

Information about the network insights analysis.

NetworkInsightsAnalysisId -> (string)

The ID of the network insights analysis.

NetworkInsightsAnalysisArn -> (string)

The Amazon Resource Name (ARN) of the network insights analysis.

NetworkInsightsPathId -> (string)

The ID of the path.

FilterInArns -> (list)

The Amazon Resource Names (ARN) of the AWS resources that the path must traverse.

(string)

StartDate -> (timestamp)

The time the analysis started.

Status -> (string)

The status of the network insights analysis.

StatusMessage -> (string)

The status message, if the status is failed .

NetworkPathFound -> (boolean)

Indicates whether the destination is reachable from the source.

ForwardPathComponents -> (list)

The components in the path from source to destination.

(structure)

Describes a path component.

SequenceNumber -> (integer)

The sequence number.

AclRule -> (structure)

The network ACL rule.

Cidr -> (string)

The IPv4 address range, in CIDR notation.

Egress -> (boolean)

Indicates whether the rule is an outbound rule.

PortRange -> (structure)

The range of ports.

From -> (integer)

The first port in the range.

To -> (integer)

The last port in the range.

Protocol -> (string)

The protocol.

RuleAction -> (string)

Indicates whether to allow or deny traffic that matches the rule.

RuleNumber -> (integer)

The rule number.

Component -> (structure)

The component.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

DestinationVpc -> (structure)

The destination VPC.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

OutboundHeader -> (structure)

The outbound header.

DestinationAddresses -> (list)

The destination addresses.

(string)

DestinationPortRanges -> (list)

The destination port ranges.

(structure)

Describes a range of ports.

From -> (integer)

The first port in the range.

To -> (integer)

The last port in the range.

Protocol -> (string)

The protocol.

SourceAddresses -> (list)

The source addresses.

(string)

SourcePortRanges -> (list)

The source port ranges.

(structure)

Describes a range of ports.

From -> (integer)

The first port in the range.

To -> (integer)

The last port in the range.

InboundHeader -> (structure)

The inbound header.

DestinationAddresses -> (list)

The destination addresses.

(string)

DestinationPortRanges -> (list)

The destination port ranges.

(structure)

Describes a range of ports.

From -> (integer)

The first port in the range.

To -> (integer)

The last port in the range.

Protocol -> (string)

The protocol.

SourceAddresses -> (list)

The source addresses.

(string)

SourcePortRanges -> (list)

The source port ranges.

(structure)

Describes a range of ports.

From -> (integer)

The first port in the range.

To -> (integer)

The last port in the range.

RouteTableRoute -> (structure)

The route table route.

DestinationCidr -> (string)

The destination IPv4 address, in CIDR notation.

DestinationPrefixListId -> (string)

The prefix of the AWS service.

EgressOnlyInternetGatewayId -> (string)

The ID of an egress-only internet gateway.

GatewayId -> (string)

The ID of the gateway, such as an internet gateway or virtual private gateway.

InstanceId -> (string)

The ID of the instance, such as a NAT instance.

NatGatewayId -> (string)

The ID of a NAT gateway.

NetworkInterfaceId -> (string)

The ID of a network interface.

Origin -> (string)

Describes how the route was created. The following are possible values:

  • CreateRouteTable - The route was automatically created when the route table was created.

  • CreateRoute - The route was manually added to the route table.

  • EnableVgwRoutePropagation - The route was propagated by route propagation.

TransitGatewayId -> (string)

The ID of a transit gateway.

VpcPeeringConnectionId -> (string)

The ID of a VPC peering connection.

SecurityGroupRule -> (structure)

The security group rule.

Cidr -> (string)

The IPv4 address range, in CIDR notation.

Direction -> (string)

The direction. The following are possible values:

  • egress

  • ingress

SecurityGroupId -> (string)

The security group ID.

PortRange -> (structure)

The port range.

From -> (integer)

The first port in the range.

To -> (integer)

The last port in the range.

PrefixListId -> (string)

The prefix list ID.

Protocol -> (string)

The protocol name.

SourceVpc -> (structure)

The source VPC.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

Subnet -> (structure)

The subnet.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

Vpc -> (structure)

The component VPC.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

ReturnPathComponents -> (list)

The components in the path from destination to source.

(structure)

Describes a path component.

SequenceNumber -> (integer)

The sequence number.

AclRule -> (structure)

The network ACL rule.

Cidr -> (string)

The IPv4 address range, in CIDR notation.

Egress -> (boolean)

Indicates whether the rule is an outbound rule.

PortRange -> (structure)

The range of ports.

From -> (integer)

The first port in the range.

To -> (integer)

The last port in the range.

Protocol -> (string)

The protocol.

RuleAction -> (string)

Indicates whether to allow or deny traffic that matches the rule.

RuleNumber -> (integer)

The rule number.

Component -> (structure)

The component.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

DestinationVpc -> (structure)

The destination VPC.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

OutboundHeader -> (structure)

The outbound header.

DestinationAddresses -> (list)

The destination addresses.

(string)

DestinationPortRanges -> (list)

The destination port ranges.

(structure)

Describes a range of ports.

From -> (integer)

The first port in the range.

To -> (integer)

The last port in the range.

Protocol -> (string)

The protocol.

SourceAddresses -> (list)

The source addresses.

(string)

SourcePortRanges -> (list)

The source port ranges.

(structure)

Describes a range of ports.

From -> (integer)

The first port in the range.

To -> (integer)

The last port in the range.

InboundHeader -> (structure)

The inbound header.

DestinationAddresses -> (list)

The destination addresses.

(string)

DestinationPortRanges -> (list)

The destination port ranges.

(structure)

Describes a range of ports.

From -> (integer)

The first port in the range.

To -> (integer)

The last port in the range.

Protocol -> (string)

The protocol.

SourceAddresses -> (list)

The source addresses.

(string)

SourcePortRanges -> (list)

The source port ranges.

(structure)

Describes a range of ports.

From -> (integer)

The first port in the range.

To -> (integer)

The last port in the range.

RouteTableRoute -> (structure)

The route table route.

DestinationCidr -> (string)

The destination IPv4 address, in CIDR notation.

DestinationPrefixListId -> (string)

The prefix of the AWS service.

EgressOnlyInternetGatewayId -> (string)

The ID of an egress-only internet gateway.

GatewayId -> (string)

The ID of the gateway, such as an internet gateway or virtual private gateway.

InstanceId -> (string)

The ID of the instance, such as a NAT instance.

NatGatewayId -> (string)

The ID of a NAT gateway.

NetworkInterfaceId -> (string)

The ID of a network interface.

Origin -> (string)

Describes how the route was created. The following are possible values:

  • CreateRouteTable - The route was automatically created when the route table was created.

  • CreateRoute - The route was manually added to the route table.

  • EnableVgwRoutePropagation - The route was propagated by route propagation.

TransitGatewayId -> (string)

The ID of a transit gateway.

VpcPeeringConnectionId -> (string)

The ID of a VPC peering connection.

SecurityGroupRule -> (structure)

The security group rule.

Cidr -> (string)

The IPv4 address range, in CIDR notation.

Direction -> (string)

The direction. The following are possible values:

  • egress

  • ingress

SecurityGroupId -> (string)

The security group ID.

PortRange -> (structure)

The port range.

From -> (integer)

The first port in the range.

To -> (integer)

The last port in the range.

PrefixListId -> (string)

The prefix list ID.

Protocol -> (string)

The protocol name.

SourceVpc -> (structure)

The source VPC.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

Subnet -> (structure)

The subnet.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

Vpc -> (structure)

The component VPC.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

Explanations -> (list)

The explanations. For more information, see Reachability Analyzer explanation codes .

(structure)

Describes an explanation code for an unreachable path. For more information, see Reachability Analyzer explanation codes .

Acl -> (structure)

The network ACL.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

AclRule -> (structure)

The network ACL rule.

Cidr -> (string)

The IPv4 address range, in CIDR notation.

Egress -> (boolean)

Indicates whether the rule is an outbound rule.

PortRange -> (structure)

The range of ports.

From -> (integer)

The first port in the range.

To -> (integer)

The last port in the range.

Protocol -> (string)

The protocol.

RuleAction -> (string)

Indicates whether to allow or deny traffic that matches the rule.

RuleNumber -> (integer)

The rule number.

Address -> (string)

The IPv4 address, in CIDR notation.

Addresses -> (list)

The IPv4 addresses, in CIDR notation.

(string)

AttachedTo -> (structure)

The resource to which the component is attached.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

AvailabilityZones -> (list)

The Availability Zones.

(string)

Cidrs -> (list)

The CIDR ranges.

(string)

Component -> (structure)

The component.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

CustomerGateway -> (structure)

The customer gateway.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

Destination -> (structure)

The destination.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

DestinationVpc -> (structure)

The destination VPC.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

Direction -> (string)

The direction. The following are possible values:

  • egress

  • ingress

ExplanationCode -> (string)

The explanation code.

IngressRouteTable -> (structure)

The route table.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

InternetGateway -> (structure)

The internet gateway.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

LoadBalancerArn -> (string)

The Amazon Resource Name (ARN) of the load balancer.

ClassicLoadBalancerListener -> (structure)

The listener for a Classic Load Balancer.

LoadBalancerPort -> (integer)

The port on which the load balancer is listening.

InstancePort -> (integer)

[Classic Load Balancers] The back-end port for the listener.

LoadBalancerListenerPort -> (integer)

The listener port of the load balancer.

LoadBalancerTarget -> (structure)

The target.

Address -> (string)

The IP address.

AvailabilityZone -> (string)

The Availability Zone.

Instance -> (structure)

Information about the instance.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

Port -> (integer)

The port on which the target is listening.

LoadBalancerTargetGroup -> (structure)

The target group.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

LoadBalancerTargetGroups -> (list)

The target groups.

(structure)

Describes a path component.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

LoadBalancerTargetPort -> (integer)

The target port.

ElasticLoadBalancerListener -> (structure)

The load balancer listener.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

MissingComponent -> (string)

The missing component.

NatGateway -> (structure)

The NAT gateway.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

NetworkInterface -> (structure)

The network interface.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

PacketField -> (string)

The packet field.

VpcPeeringConnection -> (structure)

The VPC peering connection.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

Port -> (integer)

The port.

PortRanges -> (list)

The port ranges.

(structure)

Describes a range of ports.

From -> (integer)

The first port in the range.

To -> (integer)

The last port in the range.

PrefixList -> (structure)

The prefix list.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

Protocols -> (list)

The protocols.

(string)

RouteTableRoute -> (structure)

The route table route.

DestinationCidr -> (string)

The destination IPv4 address, in CIDR notation.

DestinationPrefixListId -> (string)

The prefix of the AWS service.

EgressOnlyInternetGatewayId -> (string)

The ID of an egress-only internet gateway.

GatewayId -> (string)

The ID of the gateway, such as an internet gateway or virtual private gateway.

InstanceId -> (string)

The ID of the instance, such as a NAT instance.

NatGatewayId -> (string)

The ID of a NAT gateway.

NetworkInterfaceId -> (string)

The ID of a network interface.

Origin -> (string)

Describes how the route was created. The following are possible values:

  • CreateRouteTable - The route was automatically created when the route table was created.

  • CreateRoute - The route was manually added to the route table.

  • EnableVgwRoutePropagation - The route was propagated by route propagation.

TransitGatewayId -> (string)

The ID of a transit gateway.

VpcPeeringConnectionId -> (string)

The ID of a VPC peering connection.

RouteTable -> (structure)

The route table.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

SecurityGroup -> (structure)

The security group.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

SecurityGroupRule -> (structure)

The security group rule.

Cidr -> (string)

The IPv4 address range, in CIDR notation.

Direction -> (string)

The direction. The following are possible values:

  • egress

  • ingress

SecurityGroupId -> (string)

The security group ID.

PortRange -> (structure)

The port range.

From -> (integer)

The first port in the range.

To -> (integer)

The last port in the range.

PrefixListId -> (string)

The prefix list ID.

Protocol -> (string)

The protocol name.

SecurityGroups -> (list)

The security groups.

(structure)

Describes a path component.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

SourceVpc -> (structure)

The source VPC.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

State -> (string)

The state.

Subnet -> (structure)

The subnet.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

SubnetRouteTable -> (structure)

The route table for the subnet.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

Vpc -> (structure)

The component VPC.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

VpcEndpoint -> (structure)

The VPC endpoint.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

VpnConnection -> (structure)

The VPN connection.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

VpnGateway -> (structure)

The VPN gateway.

Id -> (string)

The ID of the component.

Arn -> (string)

The Amazon Resource Name (ARN) of the component.

AlternatePathHints -> (list)

Potential intermediate components.

(structure)

Describes an potential intermediate component of a feasible path.

ComponentId -> (string)

The ID of the component.

ComponentArn -> (string)

The Amazon Resource Name (ARN) of the component.

Tags -> (list)

The tags.

(structure)

Describes a tag.

Key -> (string)

The key of the tag.

Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

Value -> (string)

The value of the tag.

Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.