在awsreshi中使用boto创建集群

2024-09-28 05:44:00 发布

您现在位置:Python中文网/ 问答频道 /正文

obj = boto.redshift.layer1.RedshiftConnection()
obj.create_cluster(
    cluster_identifier='bototest',
    node_type='dw.hsl.xlarge',
    master_username='suresh',
    master_user_password='Suresh123',
    db_name='dev',
    cluster_type='single-node',
    cluster_security_groups='None',
    vpc_security_group_ids='None',
    cluster_subnet_group_name='None',
    availability_zone='us-east-1',
    preferred_maintenance_window='None',
    cluster_parameter_group_name='None',
    automated_snapshot_retention_period='None',
    port=5439,
    cluster_version='None',
    allow_version_upgrade='None',
    number_of_nodes=1,
    publicly_accessible='None',
    encrypted='None')

为什么我得到这个错误?在

^{pr2}$

Tags: namemasternonenodeobjredshiftversiontype
1条回答
网友
1楼 · 发布于 2024-09-28 05:44:00

参数allow_version_upgradepublicly_accessibleencrypted期望bool值,True或{}。您正在传递一个包含值None的字符串。另外,对于cluster_version,还传递了一个包含值None而不是特殊常量None的字符串。在

create_cluster方法的在线文档非常完整。你可以在这里找到它们:http://docs.pythonboto.org/en/latest/ref/redshift.html#boto.redshift.layer1.RedshiftConnection.create_cluster。在

相关问题 更多 >

    热门问题