Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . ec2 ]

apply-security-groups-to-client-vpn-target-network

Description

Applies a security group to the association between the target network and the Client VPN endpoint. This action replaces the existing security groups with the specified security groups.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  apply-security-groups-to-client-vpn-target-network
--client-vpn-endpoint-id <value>
--vpc-id <value>
--security-group-ids <value>
[--dry-run | --no-dry-run]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--client-vpn-endpoint-id (string)

The ID of the Client VPN endpoint.

--vpc-id (string)

The ID of the VPC in which the associated target network is located.

--security-group-ids (list)

The IDs of the security groups to apply to the associated target network. Up to 5 security groups can be applied to an associated target network.

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 .

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI 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.

--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. 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 apply security groups to a target network for a Client VPN endpoint

The following apply-security-groups-to-client-vpn-target-network example applies security group sg-01f6e627a89f4db32 to the association between the specified target network and Client VPN endpoint.

aws ec2 apply-security-groups-to-client-vpn-target-network \
    --security-group-ids sg-01f6e627a89f4db32 \
    --vpc-id vpc-0e2110c2f324332e0 \
    --client-vpn-endpoint-id cvpn-endpoint-123456789123abcde

Output:

{
    "SecurityGroupIds": [
        "sg-01f6e627a89f4db32"
    ]
}

For more information, see Target Networks in the AWS Client VPN Administrator Guide.

Output

SecurityGroupIds -> (list)

The IDs of the applied security groups.

(string)