Rule
This class encapsulates and extends the ROS resource type DATASOURCE::SLB::Rule.
Initializers
import com.aliyun.ros.cdk.slb.datasource.Rule;
Rule.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.ruleId(java.lang.String)
.ruleId(IResolvable)
// .refreshOptions(java.lang.String)
// .refreshOptions(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. |
ruleId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property ruleId: The ID of the forwarding rule. |
refreshOptions |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property refreshOptions: The refresh strategy for the datasource resource when the stack is updated. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
ruleIdRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property ruleId: The ID of the forwarding rule.
refreshOptionsOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property refreshOptions: The refresh strategy for the datasource resource when the stack is updated.
Valid values:
- Never: Never refresh the datasource resource when the stack is updated.
- Always: Always refresh the datasource resource when the stack is updated. Default is Never.
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.slb.datasource.Rule;
Rule.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. |
attrCookie |
com.aliyun.ros.cdk.core.IResolvable |
Attribute Cookie: The cookie to be configured on the backend server. |
attrCookieTimeout |
com.aliyun.ros.cdk.core.IResolvable |
Attribute CookieTimeout: The timeout period of a cookie. |
attrDomain |
com.aliyun.ros.cdk.core.IResolvable |
Attribute Domain: The domain name that is configured in the forwarding rule. |
attrHealthCheck |
com.aliyun.ros.cdk.core.IResolvable |
Attribute HealthCheck: Specifies whether to enable health checks. |
attrHealthCheckConnectPort |
com.aliyun.ros.cdk.core.IResolvable |
Attribute HealthCheckConnectPort: The port of the backend server that is used for health checks. |
attrHealthCheckDomain |
com.aliyun.ros.cdk.core.IResolvable |
Attribute HealthCheckDomain: The domain name that is used for health checks. |
attrHealthCheckHttpCode |
com.aliyun.ros.cdk.core.IResolvable |
Attribute HealthCheckHttpCode: The HTTP status code that indicates a successful health check. |
attrHealthCheckInterval |
com.aliyun.ros.cdk.core.IResolvable |
Attribute HealthCheckInterval: The time interval between two consecutive health checks. |
attrHealthCheckTimeout |
com.aliyun.ros.cdk.core.IResolvable |
Attribute HealthCheckTimeout: The timeout period of a health check response. |
attrHealthCheckUri |
com.aliyun.ros.cdk.core.IResolvable |
Attribute HealthCheckUri: The URI that is used for health checks. |
attrHealthyThreshold |
com.aliyun.ros.cdk.core.IResolvable |
Attribute HealthyThreshold: The number of consecutive successful health checks that must occur before an unhealthy backend server is declared healthy. |
attrListenerPort |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ListenerPort: The listener port that is used by the SLB instance. |
attrListenerSync |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ListenerSync: Indicates whether the forwarding rule uses the scheduling algorithm, session persistence, and health check configurations of the listener. |
attrLoadBalancerId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute LoadBalancerId: The ID of the SLB instance. |
attrRuleId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute RuleId: The ID of the forwarding rule. |
attrRuleName |
com.aliyun.ros.cdk.core.IResolvable |
Attribute RuleName: The name of the forwarding rule. |
attrScheduler |
com.aliyun.ros.cdk.core.IResolvable |
Attribute Scheduler: The scheduling algorithm. |
attrStickySession |
com.aliyun.ros.cdk.core.IResolvable |
Attribute StickySession: Indicates whether session persistence is enabled. |
attrStickySessionType |
com.aliyun.ros.cdk.core.IResolvable |
Attribute StickySessionType: The method that is used to handle a cookie. |
attrUnhealthyThreshold |
com.aliyun.ros.cdk.core.IResolvable |
Attribute UnhealthyThreshold: The number of consecutive failed health checks that must occur before a healthy backend server is declared unhealthy. |
attrUrl |
com.aliyun.ros.cdk.core.IResolvable |
Attribute Url: The URL that is configured in the forwarding rule. |
attrVserverGroupId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute VserverGroupId: The ID of the vServer group that is associated with the forwarding rule. |
nodeRequired
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
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
attrCookieRequired
public IResolvable getAttrCookie();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute Cookie: The cookie to be configured on the backend server.
attrCookieTimeoutRequired
public IResolvable getAttrCookieTimeout();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute CookieTimeout: The timeout period of a cookie.
attrDomainRequired
public IResolvable getAttrDomain();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute Domain: The domain name that is configured in the forwarding rule.
attrHealthCheckRequired
public IResolvable getAttrHealthCheck();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute HealthCheck: Specifies whether to enable health checks.
attrHealthCheckConnectPortRequired
public IResolvable getAttrHealthCheckConnectPort();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute HealthCheckConnectPort: The port of the backend server that is used for health checks.
Valid values: 1 to 65535.
attrHealthCheckDomainRequired
public IResolvable getAttrHealthCheckDomain();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute HealthCheckDomain: The domain name that is used for health checks.
Valid values: $_ip: The private IP address of the backend server. If the $_ip parameter is set or the HealthCheckDomain parameter is not set, SLB uses the private IP addresses of backend servers as the domain names for health checks. domain: The domain name must be 1 to 80 characters in length. It can contain only letters, digits, periods (.),and hyphens (-).
attrHealthCheckHttpCodeRequired
public IResolvable getAttrHealthCheckHttpCode();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute HealthCheckHttpCode: The HTTP status code that indicates a successful health check.
Separate multiple HTTP status codes with commas (,). Default value: http_2xx.
attrHealthCheckIntervalRequired
public IResolvable getAttrHealthCheckInterval();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute HealthCheckInterval: The time interval between two consecutive health checks.
attrHealthCheckTimeoutRequired
public IResolvable getAttrHealthCheckTimeout();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute HealthCheckTimeout: The timeout period of a health check response.
If a backend ECS instance does not send an expected response within the specified period of time, the ECS instance is considered unhealthy.
attrHealthCheckUriRequired
public IResolvable getAttrHealthCheckUri();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute HealthCheckUri: The URI that is used for health checks.
attrHealthyThresholdRequired
public IResolvable getAttrHealthyThreshold();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute HealthyThreshold: The number of consecutive successful health checks that must occur before an unhealthy backend server is declared healthy.
In this case, the health check state is changed from fail to success.
attrListenerPortRequired
public IResolvable getAttrListenerPort();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute ListenerPort: The listener port that is used by the SLB instance.
attrListenerSyncRequired
public IResolvable getAttrListenerSync();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute ListenerSync: Indicates whether the forwarding rule uses the scheduling algorithm, session persistence, and health check configurations of the listener.
attrLoadBalancerIdRequired
public IResolvable getAttrLoadBalancerId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute LoadBalancerId: The ID of the SLB instance.
attrRuleIdRequired
public IResolvable getAttrRuleId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute RuleId: The ID of the forwarding rule.
attrRuleNameRequired
public IResolvable getAttrRuleName();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute RuleName: The name of the forwarding rule.
attrSchedulerRequired
public IResolvable getAttrScheduler();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute Scheduler: The scheduling algorithm.
attrStickySessionRequired
public IResolvable getAttrStickySession();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute StickySession: Indicates whether session persistence is enabled.
Valid values: on and off.
attrStickySessionTypeRequired
public IResolvable getAttrStickySessionType();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute StickySessionType: The method that is used to handle a cookie.
attrUnhealthyThresholdRequired
public IResolvable getAttrUnhealthyThreshold();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute UnhealthyThreshold: The number of consecutive failed health checks that must occur before a healthy backend server is declared unhealthy.
In this case, the health check state is changed from success to fail.
attrUrlRequired
public IResolvable getAttrUrl();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute Url: The URL that is configured in the forwarding rule.
attrVserverGroupIdRequired
public IResolvable getAttrVserverGroupId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute VserverGroupId: The ID of the vServer group that is associated with the forwarding rule.