Rule
- Implements: com.aliyun.ros.cdk.slb.datasource.IRule
This class encapsulates and extends the ROS resource type DATASOURCE::SLB::Rule, which is used to query the configuration details of a forwarding 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. |
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.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. |
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. |
attrCookie | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Cookie: The cookie to be configured on the backend server. |
attrCookieTimeout | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute CookieTimeout: The timeout period of a cookie. |
attrDomain | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Domain: The domain name that is configured in the forwarding rule. |
attrHealthCheck | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute HealthCheck: Specifies whether to enable health checks. |
attrHealthCheckConnectPort | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute HealthCheckConnectPort: The port of the backend server that is used for health checks. |
attrHealthCheckDomain | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute HealthCheckDomain: The domain name that is used for health checks. |
attrHealthCheckHttpCode | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute HealthCheckHttpCode: The HTTP status code that indicates a successful health check. |
attrHealthCheckInterval | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute HealthCheckInterval: The time interval between two consecutive health checks. |
attrHealthCheckTimeout | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute HealthCheckTimeout: The timeout period of a health check response. |
attrHealthCheckUri | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute HealthCheckUri: The URI that is used for health checks. |
attrHealthyThreshold | java.lang.String OR 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 | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ListenerPort: The listener port that is used by the SLB instance. |
attrListenerSync | java.lang.String OR 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 | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute LoadBalancerId: The ID of the SLB instance. |
attrRuleId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute RuleId: The ID of the forwarding rule. |
attrRuleName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute RuleName: The name of the forwarding rule. |
attrScheduler | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Scheduler: The scheduling algorithm. |
attrStickySession | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute StickySession: Indicates whether session persistence is enabled. |
attrStickySessionType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute StickySessionType: The method that is used to handle a cookie. |
attrUnhealthyThreshold | java.lang.String OR 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 | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Url: The URL that is configured in the forwarding rule. |
attrVserverGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute VserverGroupId: The ID of the vServer group that is associated with the forwarding rule. |
props | RuleProps | 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
attrCookieRequired
public java.lang.Object getAttrCookie();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Cookie: The cookie to be configured on the backend server.
attrCookieTimeoutRequired
public java.lang.Object getAttrCookieTimeout();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute CookieTimeout: The timeout period of a cookie.
attrDomainRequired
public java.lang.Object getAttrDomain();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Domain: The domain name that is configured in the forwarding rule.
attrHealthCheckRequired
public java.lang.Object getAttrHealthCheck();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute HealthCheck: Specifies whether to enable health checks.
attrHealthCheckConnectPortRequired
public java.lang.Object getAttrHealthCheckConnectPort();
- Type: java.lang.String OR 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 java.lang.Object getAttrHealthCheckDomain();
- Type: java.lang.String OR 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 java.lang.Object getAttrHealthCheckHttpCode();
- Type: java.lang.String OR 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 java.lang.Object getAttrHealthCheckInterval();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute HealthCheckInterval: The time interval between two consecutive health checks.
attrHealthCheckTimeoutRequired
public java.lang.Object getAttrHealthCheckTimeout();
- Type: java.lang.String OR 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 java.lang.Object getAttrHealthCheckUri();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute HealthCheckUri: The URI that is used for health checks.
attrHealthyThresholdRequired
public java.lang.Object getAttrHealthyThreshold();
- Type: java.lang.String OR 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 java.lang.Object getAttrListenerPort();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ListenerPort: The listener port that is used by the SLB instance.
attrListenerSyncRequired
public java.lang.Object getAttrListenerSync();
- Type: java.lang.String OR 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 java.lang.Object getAttrLoadBalancerId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute LoadBalancerId: The ID of the SLB instance.
attrRuleIdRequired
public java.lang.Object getAttrRuleId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute RuleId: The ID of the forwarding rule.
attrRuleNameRequired
public java.lang.Object getAttrRuleName();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute RuleName: The name of the forwarding rule.
attrSchedulerRequired
public java.lang.Object getAttrScheduler();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Scheduler: The scheduling algorithm.
attrStickySessionRequired
public java.lang.Object getAttrStickySession();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute StickySession: Indicates whether session persistence is enabled.
Valid values: on and off.
attrStickySessionTypeRequired
public java.lang.Object getAttrStickySessionType();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute StickySessionType: The method that is used to handle a cookie.
attrUnhealthyThresholdRequired
public java.lang.Object getAttrUnhealthyThreshold();
- Type: java.lang.String OR 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 java.lang.Object getAttrUrl();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Url: The URL that is configured in the forwarding rule.
attrVserverGroupIdRequired
public java.lang.Object getAttrVserverGroupId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute VserverGroupId: The ID of the vServer group that is associated with the forwarding rule.
propsRequired
public RuleProps getProps();
- Type: RuleProps