MessageCallback
- Implements: IMessageCallback
This class encapsulates and extends the ROS resource type ALIYUN::VOD::MessageCallback, which is used to configure the callback method, callback URL, and event types for event notifications.
Initializers
import com.aliyun.ros.cdk.vod.MessageCallback;
MessageCallback.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.callbackType(java.lang.String)
.callbackType(IResolvable)
// .appId(java.lang.String)
// .appId(IResolvable)
// .authKey(java.lang.String)
// .authKey(IResolvable)
// .authSwitch(java.lang.String)
// .authSwitch(IResolvable)
// .callbackUrl(java.lang.String)
// .callbackUrl(IResolvable)
// .eventTypeList(java.lang.String)
// .eventTypeList(IResolvable)
// .mnsEndpoint(java.lang.String)
// .mnsEndpoint(IResolvable)
// .mnsQueueName(java.lang.String)
// .mnsQueueName(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. |
callbackType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property callbackType: Callback method. |
appId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property appId: App ID. |
authKey | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property authKey: Authentication Key, up to 32 characters, must contain both uppercase and lowercase letters and numbers. |
authSwitch | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property authSwitch: The authentication switch of the HTTP callback, this parameter is valid when the callback method is set to HTTP. |
callbackUrl | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property callbackUrl: Callback address. |
eventTypeList | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property eventTypeList: Callback event type. |
mnsEndpoint | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property mnsEndpoint: This parameter needs to be set when the callback method is MNS for the message queue public network endpoint. |
mnsQueueName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property mnsQueueName: The name of the message queue, which can be viewed in the queue list by logging in to the message service console. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
callbackTypeRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property callbackType: Callback method.
appIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property appId: App ID.
If it is not passed, it is the ID of the default application of the system, with a fixed value: app-1000000.
authKeyOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property authKey: Authentication Key, up to 32 characters, must contain both uppercase and lowercase letters and numbers.
This parameter can be set when the callback method is HTTP.
authSwitchOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property authSwitch: The authentication switch of the HTTP callback, this parameter is valid when the callback method is set to HTTP.
callbackUrlOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property callbackUrl: Callback address.
When the callback method is HTTP, this parameter needs to be set. The length of the callback address URL cannot exceed 256 bytes, and setting multiple callback addresses is not supported.
eventTypeListOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property eventTypeList: Callback event type.
When the value is empty, all message notifications are turned off, and when the value is ALL, all message notifications are turned on. You can also specify to enable certain message notifications, and use a comma (,) to separate multiple event types.
mnsEndpointOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property mnsEndpoint: This parameter needs to be set when the callback method is MNS for the message queue public network endpoint.
You can log in to the message service console and click the Get Endpoint button in the upper right corner to get it.
mnsQueueNameOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property mnsQueueName: The name of the message queue, which can be viewed in the queue list by logging in to the message service console.
When the callback method is MNS, this parameter needs to be set.
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. |
fetchCondition | No description. |
fetchDependency | No description. |
fetchResourceDesc | 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
fetchCondition
public RosCondition fetchCondition()
fetchDependency
public java.util.List<java.lang.String> fetchDependency()
fetchResourceDesc
public java.lang.String fetchResourceDesc()
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.vod.MessageCallback;
MessageCallback.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. |
env | com.aliyun.ros.cdk.core.IResourceEnvironment | The environment this resource belongs to. |
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. |
attrAppId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute AppId: appid. |
attrAuthKey | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute AuthKey: auth key. |
attrAuthSwitch | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute AuthSwitch: auth swith. |
attrCallbackType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute CallbackType: callback type. |
attrCallbackUrl | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute CallbackUrl: url. |
attrEventTypeList | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute EventTypeList: event type. |
attrMnsEndpoint | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute MnsEndpoint: mns endpoint. |
attrMnsQueueName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute MnsQueueName: queue name. |
props | MessageCallbackProps | No description. |
nodeRequired
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
envRequired
public IResourceEnvironment getEnv();
- Type: com.aliyun.ros.cdk.core.IResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
refRequired
public java.lang.String getRef();
- Type: java.lang.String
stackRequired
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resourceOptional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrAppIdRequired
public java.lang.Object getAttrAppId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute AppId: appid.
attrAuthKeyRequired
public java.lang.Object getAttrAuthKey();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute AuthKey: auth key.
attrAuthSwitchRequired
public java.lang.Object getAttrAuthSwitch();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute AuthSwitch: auth swith.
attrCallbackTypeRequired
public java.lang.Object getAttrCallbackType();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute CallbackType: callback type.
attrCallbackUrlRequired
public java.lang.Object getAttrCallbackUrl();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute CallbackUrl: url.
attrEventTypeListRequired
public java.lang.Object getAttrEventTypeList();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute EventTypeList: event type.
attrMnsEndpointRequired
public java.lang.Object getAttrMnsEndpoint();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute MnsEndpoint: mns endpoint.
attrMnsQueueNameRequired
public java.lang.Object getAttrMnsQueueName();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute MnsQueueName: queue name.
propsRequired
public MessageCallbackProps getProps();
- Type: MessageCallbackProps