Subscription
This class encapsulates and extends the ROS resource type ALIYUN::MNS::Subscription
, which is used to subscribe an endpoint to an Alibaba Cloud Message Service (MNS) topic.
For a subscription to be created, the owner of the endpoint must confirm the subscription.
Initializers
import com.aliyun.ros.cdk.mns.Subscription;
Subscription.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.endpoint(java.lang.String)
.endpoint(IResolvable)
.subscriptionName(java.lang.String)
.subscriptionName(IResolvable)
.topicName(java.lang.String)
.topicName(IResolvable)
// .filterTag(java.lang.String)
// .filterTag(IResolvable)
// .notifyContentFormat(java.lang.String)
// .notifyContentFormat(IResolvable)
// .notifyStrategy(java.lang.String)
// .notifyStrategy(IResolvable)
.build();
Name | Type | Description |
---|---|---|
scope |
com.aliyun.ros.cdk.core.Construct |
No description. |
id |
java.lang.String |
No description. |
enableResourcePropertyConstraint |
java.lang.Boolean |
No description. |
endpoint |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property endpoint: Terminal address of the message recipient for the created subscription. |
subscriptionName |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property subscriptionName: Subscription name. |
topicName |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property topicName: Topic name. |
filterTag |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property filterTag: Message filter tag in the created subscription (Only messages with consistent tags are pushed.) The value is a string of no more than 16 characters. The default value is no message filter. |
notifyContentFormat |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property notifyContentFormat: Format of the message content pushed to the endpoint. |
notifyStrategy |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property notifyStrategy: Retry policy that will be applied when an error occurs during message push to the endpoint. |
scope
Required
- Type: com.aliyun.ros.cdk.core.Construct
id
Required
- Type: java.lang.String
enableResourcePropertyConstraint
Optional
- Type: java.lang.Boolean
endpoint
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property endpoint: Terminal address of the message recipient for the created subscription.
Currently, four types of endpoints are supported:
- HttpEndpoint, which must be prefixed with "http://";
- QueueEndpoint, in the format of acs:mns:{REGION}:{AccountID}:queues/{QueueName};
- MailEndpoint, in the format of mail:directmail:{MailAddress};
- SmsEndpoint, in the format of sms:directsms:anonymous or sms:directsms:{Phone}.
subscriptionName
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property subscriptionName: Subscription name.
topicName
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property topicName: Topic name.
filterTag
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property filterTag: Message filter tag in the created subscription (Only messages with consistent tags are pushed.) The value is a string of no more than 16 characters. The default value is no message filter.
notifyContentFormat
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property notifyContentFormat: Format of the message content pushed to the endpoint.
XML, JSON, or SIMPLIFIED; default value: XML. For details about message formats, refer to Basic Concepts/NotifyContentFormat.
notifyStrategy
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property notifyStrategy: Retry policy that will be applied when an error occurs during message push to the endpoint.
BACKOFF_RETRY or EXPONENTIAL_DECAY_RETRY; default value: BACKOFF_RETRY. For details about retry policies, refer to Basic Concepts/NotifyStrategy.
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
synthesize |
Allows this construct to emit artifacts into the cloud assembly during synthesis. |
addCondition |
No description. |
addCount |
No description. |
addDependency |
No description. |
addResourceDesc |
No description. |
applyRemovalPolicy |
No description. |
getAtt |
No description. |
setMetadata |
No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
synthesize
public void synthesize(ISynthesisSession session)
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack
and Asset
as they participate in synthesizing the cloud assembly.
- Type: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- Type: java.lang.Object
Static Functions
Name | Description |
---|---|
isConstruct |
Return whether the given object is a Construct. |
isConstruct
import com.aliyun.ros.cdk.mns.Subscription;
Subscription.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- Type: java.lang.Object
Properties
Name | Type | Description |
---|---|---|
node |
com.aliyun.ros.cdk.core.ConstructNode |
The construct tree node associated with this construct. |
ref |
java.lang.String |
No description. |
stack |
com.aliyun.ros.cdk.core.Stack |
The stack in which this resource is defined. |
resource |
com.aliyun.ros.cdk.core.RosResource |
No description. |
attrSubscriptionName |
com.aliyun.ros.cdk.core.IResolvable |
Attribute SubscriptionName: Subscription name. |
attrSubscriptionUrl |
com.aliyun.ros.cdk.core.IResolvable |
Attribute SubscriptionUrl: URL of created subscription. |
attrTopicName |
com.aliyun.ros.cdk.core.IResolvable |
Attribute TopicName: Topic name. |
node
Required
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
ref
Required
public java.lang.String getRef();
- Type: java.lang.String
stack
Required
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resource
Optional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrSubscriptionName
Required
public IResolvable getAttrSubscriptionName();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute SubscriptionName: Subscription name.
attrSubscriptionUrl
Required
public IResolvable getAttrSubscriptionUrl();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute SubscriptionUrl: URL of created subscription.
attrTopicName
Required
public IResolvable getAttrTopicName();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute TopicName: Topic name.