Beispiel #1
0
def parse_args():
    parser = ArgumentParser()
    parser.add_argument('-f',
                        '--force',
                        action='store_true',
                        help='pass confirm')
    parser.add_argument('-b',
                        '--bucket',
                        type=str,
                        required=True,
                        help='s3 bucket name')
    parser.add_argument('-e',
                        '--endpoint',
                        type=str,
                        required=True,
                        help='s3 bucket end point')
    parser.add_argument('-a',
                        '--acm-arn',
                        dest='acm_arn',
                        type=str,
                        required=True,
                        help='acm arn')
    parser.add_argument('-c',
                        '--cname',
                        type=str,
                        required=True,
                        nargs='+',
                        help='cname')

    args = parser.parse_args()

    if not args.force:
        _confirm_phase()

    return args
def parse_args():
    parser = ArgumentParser()
    parser.add_argument('-f', '--force', action='store_true', help='pass confirm')
    parser.add_argument('-c', '--cname', type=str, required=True, help='cname')

    args = parser.parse_args()

    if not args.force:
        _confirm_phase()

    return args
def _parse_args():
    parser = ArgumentParser()
    parser.add_argument('-b',
                        '--bucket_name',
                        type=str,
                        required=True,
                        help='bucket name')

    args = parser.parse_args()

    _confirm_phase()

    return args
Beispiel #4
0
def _parse_args():
    parser = ArgumentParser()
    parser.add_argument('-oa',
                        '--origin_bucket_account_id',
                        type=str,
                        required=True,
                        help='origin bucket account id')
    parser.add_argument('-o',
                        '--origin_bucket_name',
                        type=str,
                        required=True,
                        help='origin bucket name')
    parser.add_argument('-ra',
                        '--replication_bucket_account_id',
                        type=str,
                        required=True,
                        help='replication bucket account id')
    parser.add_argument('-r',
                        '--replication_bucket_name',
                        type=str,
                        required=True,
                        help='replication bucket name')
    parser.add_argument('-a',
                        '--replication_aws_access_key',
                        type=str,
                        required=True,
                        help='Replication bucket AWS ACCESS KEY ID')
    parser.add_argument('-s',
                        '--replication_aws_secret_key',
                        type=str,
                        required=True,
                        help='Replication bucket AWS SECRET ACCESS KEY')
    parser.add_argument('-p',
                        '--srr_policy_name',
                        type=str,
                        required=True,
                        help='write down the policy name you want')
    parser.add_argument('-n',
                        '--srr_role_name',
                        type=str,
                        required=True,
                        help='write down the role name you want')

    args = parser.parse_args()

    _confirm_phase()

    return args
def parse_args():
    parser = ArgumentParser()
    parser.add_argument('-f',
                        '--force',
                        action='store_true',
                        help='pass confirm')
    parser.add_argument('-ah',
                        '--alias_hosted_zone_id',
                        type=str,
                        required=False,
                        help='hosted zone id of alias')
    parser.add_argument('-at',
                        '--alias_type',
                        type=str,
                        required=False,
                        choices=['cloudfront', 's3'],
                        help='type of alias')
    parser.add_argument(
        '-d',
        '--domain_name',
        type=str,
        required=True,
        help='domain name(s3 -> end point, cloudfront -> domain name)')
    parser.add_argument('-hn',
                        '--hosted_zone_name',
                        type=str,
                        required=True,
                        help='name of hosted zone')
    parser.add_argument('-n',
                        '--name',
                        type=str,
                        required=True,
                        help='acm arn')
    parser.add_argument('-r',
                        '--record_set_type',
                        type=str,
                        required=True,
                        help='type of record_set')

    args = parser.parse_args()

    if not args.force:
        _confirm_phase()

    return args
Beispiel #6
0
def _parse_args():
    parser = ArgumentParser()
    parser.add_argument('-b',
                        '--bucket_name',
                        type=str,
                        required=True,
                        help='bucket name')
    parser.add_argument('-f',
                        '--expire_days',
                        type=int,
                        required=True,
                        help='File expiration date in the _trash/')

    args = parser.parse_args()

    _confirm_phase()

    return args
def parse_args():
    parser = ArgumentParser()
    parser.add_argument('-f',
                        '--force',
                        action='store_true',
                        help='pass confirm')
    parser.add_argument('-hn',
                        '--hosted_zone_name',
                        type=str,
                        required=True,
                        help='name of hosted zone')
    parser.add_argument('-n',
                        '--name',
                        type=str,
                        required=True,
                        help='acm arn')

    args = parser.parse_args()

    if not args.force:
        _confirm_phase()

    return args