8000 Feature/20200316 cassandra by axelpavageau · Pull Request #1616 · cloudtools/troposphere · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Feature/20200316 cassandra #1616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ Currently supported AWS resource types
- `AWS::AutoScalingPlans`_
- `AWS::Batch`_
- `AWS::Budgets`_
- `AWS::Cassandra`_
- `AWS::CertificateManager`_
- `AWS::Cloud9`_
- `AWS::CloudFormation`_
Expand Down
79 changes: 79 additions & 0 deletions troposphere/cassandra.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Copyright (c) 2012-2020, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
#
# *** Do not modify - this file is autogenerated ***
# Resource specification version: 10.2.0


from . import AWSObject
from . import AWSProperty
from .validators import integer


VALID_CLUSTERINGKEYCOLUMN_ORDERBY = ('ASC', 'DESC')
VALID_BILLINGMODE_MODE = ('ON_DEMAND', 'PROVISIONED')


def validate_clusteringkeycolumn_orderby(clusteringkeycolumn_orderby):
if clusteringkeycolumn_orderby not in VALID_CLUSTERINGKEYCOLUMN_ORDERBY:
raise ValueError("ClusteringKeyColumn OrderBy must be one of: %s" %
', '.join(VALID_CLUSTERINGKEYCOLUMN_ORDERBY))
return clusteringkeycolumn_orderby


def validate_billingmode_mode(billingmode_mode):
if billingmode_mode not in VALID_BILLINGMODE_MODE:
raise ValueError("BillingMode Mode must be one of: %s" %
', '.join(VALID_BILLINGMODE_MODE))
return billingmode_mode


class Keyspace(AWSObject):
resource_type = "AWS::Cassandra::Keyspace"

props = {
'KeyspaceName': (basestring, False),
}


class Column(AWSProperty):
props = {
"ColumnName": (basestring, True),
"ColumnType": (basestring, True),
}


class ClusteringKeyColumn(AWSProperty):
props = {
"Column": (Column, True),
"OrderBy": (validate_clusteringkeycolumn_orderby, False),
}


class ProvisionedThroughput(AWSProperty):
props = {
"ReadCapacityUnits": (integer, True),
"WriteCapacityUnits": (integer, True),
}


class BillingMode(AWSProperty):
props = {
"Mode": (validate_billingmode_mode, True),
"ProvisionedThroughput": (ProvisionedThroughput, False),
}


class Table(AWSObject):
resource_type = "AWS::Cassandra::Table"

props = {
"BillingMode": (BillingMode, False),
"ClusteringKeyColumns": ([ClusteringKeyColumn], False),
"KeyspaceName": (basestring, True),
"PartitionKeyColumns": ([Column], True),
"RegularColumns": ([Column], False),
"TableName": (basestring, False),
}
0