aws ec2 create-network-insights-access-scope
Creates a Network Access Scope. AWS CLI reference
1 example 5 options Its page in the AWS CLI reference
Examples
To create a Network Access Scope
The following create-network-insights-access-scope example creates a Network Access Scope.
aws ec2 create-network-insights-access-scope --cli-input-json file://access-scope-file.jsonIdentifyContents of access-scope-file.json:
{
"MatchPaths": [
{
"Source": {
"ResourceStatement": {
"Resources": [
"vpc-abcd12e3"
]
}
}
}
],
"ExcludePaths": [
{
"Source": {
"ResourceStatement": {
"ResourceTypes": [
"AWS::EC2::InternetGateway"
]
}
}
}
]
}
Its output, shortened
{
"NetworkInsightsAccessScope": {
"NetworkInsightsAccessScopeId": "nis-123456789abc01234",
"NetworkInsightsAccessScopeArn": "arn:aws:ec2:us-west-2:123456789012:network-insights-access-scope/nis-123456789abc01234",
"CreatedDate": "2022-01-25T19:20:28.796000+00:00",
"UpdatedDate": "2022-01-25T19:20:28.797000+00:00"
},
"NetworkInsightsAccessScopeContent": {
"NetworkInsightsAccessScopeId": "nis-123456789abc01234",
"MatchPaths": [
{
"Source": {
"ResourceStatement": {
"Resources": [
"vpc-abcd12e3"
]
}
}
}
],
"ExcludePaths": [
{
"Source": {
"ResourceStatement": {
"ResourceTypes": [
"AWS::EC2::InternetGateway"
]
}
}
}
… 3 more linesFor more information, see Getting started with Network Access Analyzer using the AWS CLI in the Network Access Analyzer Guide.
Options
--client-tokenUnique, case-sensitive identifier that you provide to ensure the idempotency of the request.--dry-runChecks whether you have the required permissions for the action, without actually making the request, and provides an error response.--exclude-pathsThe paths to exclude.--match-pathsThe paths to match.--tag-specificationsThe tags to apply.