create CloudFormation outputs and enable 'Fn::GetAtt' to work.
This commit is contained in:
parent
832769b8a7
commit
1d9ffafaa5
10 changed files with 269 additions and 8 deletions
|
|
@ -8,6 +8,7 @@ from moto.core import BaseBackend
|
|||
from moto.core.utils import iso_8601_datetime
|
||||
from moto.sqs.models import sqs_backend
|
||||
from .utils import make_arn_for_topic, make_arn_for_subscription
|
||||
from boto.exception import BotoServerError
|
||||
|
||||
DEFAULT_ACCOUNT_ID = 123456789012
|
||||
|
||||
|
|
@ -33,6 +34,13 @@ class Topic(object):
|
|||
subscription.publish(message, message_id)
|
||||
return message_id
|
||||
|
||||
def get_cfn_attribute(self, attribute_name):
|
||||
if attribute_name == 'TopicName':
|
||||
return self.name
|
||||
raise BotoServerError(400,
|
||||
'Bad Request',
|
||||
'Template error: resource {0} does not support attribute type {1} in Fn::GetAtt')
|
||||
|
||||
|
||||
class Subscription(object):
|
||||
def __init__(self, topic, endpoint, protocol):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue