def main()

in python/vpce/create_vpce_service_configuration_sample.py [0:0]


def main():
    """
    Creates VPC Endpoint Service (VPC-E Service)

    Accepts:
    --gwlb_arns: gwlb1_arn

    Usage:
    Acceptance not required:
    python create_vpce_service_configuration_sample.py \
    --gwlb_arn gwlb1-arn
    --no_acceptance

    Acceptance required:
    python create_vpce_service_configuration_sample.py \
    --gwlb_arn gwlb1-arn
    """
    parser = argparse.ArgumentParser()
    parser.add_argument('--gwlb_arns', nargs='+', required=True,
                        help='specify gwlb arns')
    parser.add_argument('--no_acceptance', action='store_false', help='Specify'
                        ' whether to accept or not. If you want to use False,'
                        ' specify --no_acceptance with no value. If you want to'
                        ' use True, do not specity the --no_acceptance at all')

    args = parser.parse_args()

    ############################
    # Define script variables:
    ############################
    gwlb_arns = args.gwlb_arns
    no_acceptance = args.no_acceptance
    #############################

    # VPC-E Service:
    service1 = create_vpce_service(gwlb_arns, no_acceptance)
    print(f"SERVICE1 ID: {service1[1]}")
    print(f"SERVICE1 NAME: {service1[2]}")