Horje
add my ip to aws security group cli Code Example
add ip to security group aws cli
FromPort=integer,IpProtocol=string,IpRanges=[{CidrIp=string,Description=string},{CidrIp=string,Description=string}],Ipv6Ranges=[{CidrIpv6=string,Description=string},{CidrIpv6=string,Description=string}],PrefixListIds=[{Description=string,PrefixListId=string},{Description=string,PrefixListId=string}],ToPort=integer,UserIdGroupPairs=[{Description=string,GroupId=string,GroupName=string,PeeringStatus=string,UserId=string,VpcId=string,VpcPeeringConnectionId=string},{Description=string,GroupId=string,GroupName=string,PeeringStatus=string,UserId=string,VpcId=string,VpcPeeringConnectionId=string}]
add my ip to aws security group cli
# Retrieve current IP address
$IP=Invoke-WebRequest -UseBasicParsing http://whatismyip.akamai.com/
$sg="sg-00001"
$old_file_path = 'old_ip.txt'

if(Test-Path -Path $old_file_path){
    $OldIp=Get-Content -Path $old_file_path
    aws ec2 revoke-security-group-ingress --group-id "$sg" --protocol tcp --port 8443 --cidr "$OldIp/32"
}

aws ec2 authorize-security-group-ingress --group-id "$sg" --protocol tcp --port 8443 --cidr "$IP/32"

Set-Content -Path $old_file_path -Value $IP




Shell

Related
haproxy user ulimit Code Example haproxy user ulimit Code Example
add fold to path in linux Code Example add fold to path in linux Code Example
Execution failed for task ':app:lintVitalDevelopmentRelease'. Code Example Execution failed for task ':app:lintVitalDevelopmentRelease'. Code Example
gchange default from dash to bash Code Example gchange default from dash to bash Code Example
fold all lines in vim Code Example fold all lines in vim Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9