How to use maximum_message_size method in localstack

Best Python code snippet using localstack_python

mns_topic.py

Source:mns_topic.py Github

copy

Full Screen

...174 self.message_count = -1175 self.create_time = -1176 self.last_modify_time = -1177 self.topic_name = ""178 def set_maximum_message_size(self, maximum_message_size):179 self.maximum_message_size = maximum_message_size180 def set_logging_enabled(self, logging_enabled):181 self.logging_enabled = logging_enabled182 def __str__(self):183 meta_info = {"MaximumMessageSize": self.maximum_message_size,184 "MessageRetentionPeriod": self.message_retention_period,185 "MessageCount": self.message_count,186 "CreateTime": time.strftime("%Y/%m/%d %H:%M:%S", time.localtime(self.create_time)),187 "LastModifyTime": time.strftime("%Y/%m/%d %H:%M:%S", time.localtime(self.last_modify_time)),188 "TopicName": self.topic_name,189 "LoggingEnabled": self.logging_enabled}190 return "\n".join(["%s: %s" % (k.ljust(30),v) for k,v in meta_info.items()])191class TopicMessage:192 def __init__(self, message_body = u"", message_tag = u"", direct_mail = None, direct_sms = None):...

Full Screen

Full Screen

topic.py

Source:topic.py Github

copy

Full Screen

...37 def logging_enabled(self, value: Optional[pulumi.Input[bool]]):38 pulumi.set(self, "logging_enabled", value)39 @property40 @pulumi.getter(name="maximumMessageSize")41 def maximum_message_size(self) -> Optional[pulumi.Input[int]]:42 """43 This indicates the maximum length, in bytes, of any message body sent to the topic. Valid value range: 1024-65536, i.e., 1K to 64K. Default value to 65536.44 """45 return pulumi.get(self, "maximum_message_size")46 @maximum_message_size.setter47 def maximum_message_size(self, value: Optional[pulumi.Input[int]]):48 pulumi.set(self, "maximum_message_size", value)49 @property50 @pulumi.getter51 def name(self) -> Optional[pulumi.Input[str]]:52 """53 Two topics on a single account in the same region cannot have the same name. A topic name must start with an English letter or a digit, and can contain English letters, digits, and hyphens, with the length not exceeding 256 characters.54 """55 return pulumi.get(self, "name")56 @name.setter57 def name(self, value: Optional[pulumi.Input[str]]):58 pulumi.set(self, "name", value)59@pulumi.input_type60class _TopicState:61 def __init__(__self__, *,62 logging_enabled: Optional[pulumi.Input[bool]] = None,63 maximum_message_size: Optional[pulumi.Input[int]] = None,64 name: Optional[pulumi.Input[str]] = None):65 """66 Input properties used for looking up and filtering Topic resources.67 :param pulumi.Input[bool] logging_enabled: Is logging enabled? true or false. Default value to false.68 :param pulumi.Input[int] maximum_message_size: This indicates the maximum length, in bytes, of any message body sent to the topic. Valid value range: 1024-65536, i.e., 1K to 64K. Default value to 65536.69 :param pulumi.Input[str] name: Two topics on a single account in the same region cannot have the same name. A topic name must start with an English letter or a digit, and can contain English letters, digits, and hyphens, with the length not exceeding 256 characters.70 """71 if logging_enabled is not None:72 pulumi.set(__self__, "logging_enabled", logging_enabled)73 if maximum_message_size is not None:74 pulumi.set(__self__, "maximum_message_size", maximum_message_size)75 if name is not None:76 pulumi.set(__self__, "name", name)77 @property78 @pulumi.getter(name="loggingEnabled")79 def logging_enabled(self) -> Optional[pulumi.Input[bool]]:80 """81 Is logging enabled? true or false. Default value to false.82 """83 return pulumi.get(self, "logging_enabled")84 @logging_enabled.setter85 def logging_enabled(self, value: Optional[pulumi.Input[bool]]):86 pulumi.set(self, "logging_enabled", value)87 @property88 @pulumi.getter(name="maximumMessageSize")89 def maximum_message_size(self) -> Optional[pulumi.Input[int]]:90 """91 This indicates the maximum length, in bytes, of any message body sent to the topic. Valid value range: 1024-65536, i.e., 1K to 64K. Default value to 65536.92 """93 return pulumi.get(self, "maximum_message_size")94 @maximum_message_size.setter95 def maximum_message_size(self, value: Optional[pulumi.Input[int]]):96 pulumi.set(self, "maximum_message_size", value)97 @property98 @pulumi.getter99 def name(self) -> Optional[pulumi.Input[str]]:100 """101 Two topics on a single account in the same region cannot have the same name. A topic name must start with an English letter or a digit, and can contain English letters, digits, and hyphens, with the length not exceeding 256 characters.102 """103 return pulumi.get(self, "name")104 @name.setter105 def name(self, value: Optional[pulumi.Input[str]]):106 pulumi.set(self, "name", value)107class Topic(pulumi.CustomResource):108 @overload109 def __init__(__self__,110 resource_name: str,111 opts: Optional[pulumi.ResourceOptions] = None,112 logging_enabled: Optional[pulumi.Input[bool]] = None,113 maximum_message_size: Optional[pulumi.Input[int]] = None,114 name: Optional[pulumi.Input[str]] = None,115 __props__=None):116 """117 ## Example Usage118 Basic Usage119 ```python120 import pulumi121 import pulumi_alicloud as alicloud122 topic = alicloud.mns.Topic("topic",123 logging_enabled=False,124 maximum_message_size=65536)125 ```126 ## Import127 MNS Topic can be imported using the id or name, e.g.128 ```sh129 $ pulumi import alicloud:mns/topic:Topic topic topicName130 ```131 :param str resource_name: The name of the resource.132 :param pulumi.ResourceOptions opts: Options for the resource.133 :param pulumi.Input[bool] logging_enabled: Is logging enabled? true or false. Default value to false.134 :param pulumi.Input[int] maximum_message_size: This indicates the maximum length, in bytes, of any message body sent to the topic. Valid value range: 1024-65536, i.e., 1K to 64K. Default value to 65536.135 :param pulumi.Input[str] name: Two topics on a single account in the same region cannot have the same name. A topic name must start with an English letter or a digit, and can contain English letters, digits, and hyphens, with the length not exceeding 256 characters.136 """137 ...138 @overload139 def __init__(__self__,140 resource_name: str,141 args: Optional[TopicArgs] = None,142 opts: Optional[pulumi.ResourceOptions] = None):143 """144 ## Example Usage145 Basic Usage146 ```python147 import pulumi148 import pulumi_alicloud as alicloud149 topic = alicloud.mns.Topic("topic",150 logging_enabled=False,151 maximum_message_size=65536)152 ```153 ## Import154 MNS Topic can be imported using the id or name, e.g.155 ```sh156 $ pulumi import alicloud:mns/topic:Topic topic topicName157 ```158 :param str resource_name: The name of the resource.159 :param TopicArgs args: The arguments to use to populate this resource's properties.160 :param pulumi.ResourceOptions opts: Options for the resource.161 """162 ...163 def __init__(__self__, resource_name: str, *args, **kwargs):164 resource_args, opts = _utilities.get_resource_args_opts(TopicArgs, pulumi.ResourceOptions, *args, **kwargs)165 if resource_args is not None:166 __self__._internal_init(resource_name, opts, **resource_args.__dict__)167 else:168 __self__._internal_init(resource_name, *args, **kwargs)169 def _internal_init(__self__,170 resource_name: str,171 opts: Optional[pulumi.ResourceOptions] = None,172 logging_enabled: Optional[pulumi.Input[bool]] = None,173 maximum_message_size: Optional[pulumi.Input[int]] = None,174 name: Optional[pulumi.Input[str]] = None,175 __props__=None):176 opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)177 if not isinstance(opts, pulumi.ResourceOptions):178 raise TypeError('Expected resource options to be a ResourceOptions instance')179 if opts.id is None:180 if __props__ is not None:181 raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')182 __props__ = TopicArgs.__new__(TopicArgs)183 __props__.__dict__["logging_enabled"] = logging_enabled184 __props__.__dict__["maximum_message_size"] = maximum_message_size185 __props__.__dict__["name"] = name186 super(Topic, __self__).__init__(187 'alicloud:mns/topic:Topic',188 resource_name,189 __props__,190 opts)191 @staticmethod192 def get(resource_name: str,193 id: pulumi.Input[str],194 opts: Optional[pulumi.ResourceOptions] = None,195 logging_enabled: Optional[pulumi.Input[bool]] = None,196 maximum_message_size: Optional[pulumi.Input[int]] = None,197 name: Optional[pulumi.Input[str]] = None) -> 'Topic':198 """199 Get an existing Topic resource's state with the given name, id, and optional extra200 properties used to qualify the lookup.201 :param str resource_name: The unique name of the resulting resource.202 :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.203 :param pulumi.ResourceOptions opts: Options for the resource.204 :param pulumi.Input[bool] logging_enabled: Is logging enabled? true or false. Default value to false.205 :param pulumi.Input[int] maximum_message_size: This indicates the maximum length, in bytes, of any message body sent to the topic. Valid value range: 1024-65536, i.e., 1K to 64K. Default value to 65536.206 :param pulumi.Input[str] name: Two topics on a single account in the same region cannot have the same name. A topic name must start with an English letter or a digit, and can contain English letters, digits, and hyphens, with the length not exceeding 256 characters.207 """208 opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))209 __props__ = _TopicState.__new__(_TopicState)210 __props__.__dict__["logging_enabled"] = logging_enabled211 __props__.__dict__["maximum_message_size"] = maximum_message_size212 __props__.__dict__["name"] = name213 return Topic(resource_name, opts=opts, __props__=__props__)214 @property215 @pulumi.getter(name="loggingEnabled")216 def logging_enabled(self) -> pulumi.Output[Optional[bool]]:217 """218 Is logging enabled? true or false. Default value to false.219 """220 return pulumi.get(self, "logging_enabled")221 @property222 @pulumi.getter(name="maximumMessageSize")223 def maximum_message_size(self) -> pulumi.Output[Optional[int]]:224 """225 This indicates the maximum length, in bytes, of any message body sent to the topic. Valid value range: 1024-65536, i.e., 1K to 64K. Default value to 65536.226 """227 return pulumi.get(self, "maximum_message_size")228 @property229 @pulumi.getter230 def name(self) -> pulumi.Output[str]:231 """232 Two topics on a single account in the same region cannot have the same name. A topic name must start with an English letter or a digit, and can contain English letters, digits, and hyphens, with the length not exceeding 256 characters.233 """...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run localstack automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful