aws-sg-ip-updater.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:AWS-SG-IP-Updater 作者: prasket 项目源码 文件源码
def remove_ip(current_ip, sg_id, port, protocol):
    """remove current IP from the security group"""

    # setup client for ec2
    client = boto3.client("ec2")

    # execute security group revoke ingress Boto3 commands
    response = client.revoke_security_group_ingress(
        GroupId=sg_id,
        IpProtocol=protocol,
        FromPort=port,
        ToPort=port,
        CidrIp=current_ip
    )
    print response

# Define the usage of the app
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号