WebRule
This class encapsulates and extends the ROS resource type ALIYUN::DDoSPro::WebRule
.
Initializers
import ros_cdk_ddospro
ros_cdk_ddospro.WebRule(
scope: Construct,
id: str,
domain: typing.Union[str, IResolvable],
rs_type: typing.Union[typing.Union[int, float], IResolvable],
rules: typing.Union[str, IResolvable],
defense_id: typing.Union[str, IResolvable] = None,
https_ext: typing.Union[str, IResolvable] = None,
instance_ids: typing.Union[IResolvable, typing.List[typing.Union[str, IResolvable]]] = None,
resource_group_id: typing.Union[str, IResolvable] = None,
enable_resource_property_constraint: bool = None
)
Name | Type | Description |
---|---|---|
scope |
ros_cdk_core.Construct |
No description. |
id |
str |
No description. |
domain |
typing.Union[str, ros_cdk_core.IResolvable] |
Property domain: The domain name of the website that you want to add to the instance. |
rs_type |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property rsType: The address type of the origin server. |
rules |
typing.Union[str, ros_cdk_core.IResolvable] |
Property rules: The details of the forwarding rule. |
defense_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property defenseId: The ID of the associated defense. |
https_ext |
typing.Union[str, ros_cdk_core.IResolvable] |
Property httpsExt: The advanced HTTPS settings. |
instance_ids |
typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[str, ros_cdk_core.IResolvable]]] |
Property instanceIds: An array consisting of the IDs of instances that you want to associate. |
resource_group_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property resourceGroupId: The ID of the resource group to which the instance belongs in Resource Management. |
enable_resource_property_constraint |
bool |
No description. |
scope
Required
- Type: ros_cdk_core.Construct
id
Required
- Type: str
domain
Required
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property domain: The domain name of the website that you want to add to the instance.
rs_type
Required
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property rsType: The address type of the origin server.
Valid values: 0: IP address 1: domain name The domain name of the origin server is returned if you deploy proxies, such as Web Application Firewall (WAF), between the origin server and the instance. In this case, the address of the proxy, such as the CNAME provided by WAF, is returned.
rules
Required
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property rules: The details of the forwarding rule.
The value is a string that consists of JSON arrays. Each element in a JSON array is a JSON struct that contains the following fields: ProxyRules: the information about the origin server. The information includes the port number and IP address. This field is required and must be a JSON array. Each element in a JSON array is a JSON struct that contains the following fields: ProxyPort: the port number. This field is required and must be an integer; RealServers: the IP address. This field is required and must be a string array. ProxyType: the protocol type. This field is required and must be a string. Valid values: http, https, websocket, and websockets.
defense_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property defenseId: The ID of the associated defense.
This parameter applies to scenarios in which other cloud services, such as Object Storage Service (OSS), are integrated with Anti-DDoS Pro or Anti-DDoS Premium.
https_ext
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property httpsExt: The advanced HTTPS settings.
This parameter takes effect only when the value of the ProxyType parameter includes https. The value is a string that consists of a JSON struct. The JSON struct contains the following fields: Http2https: specifies whether to turn on Enforce HTTPS Routing. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enforce HTTPS Routing is turned off. The value 1 indicates that Enforce HTTPS Routing is turned on. The default value is 0. If your website supports both HTTP and HTTPS, this feature meets your business requirements. If you enable this feature, all HTTP requests to access the website are redirected to HTTPS requests on the standard port 443. Https2http: specifies whether to turn on Enable HTTP. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enable HTTP is turned off. The value 1 indicates that Enable HTTP is turned on. The default value is 0. If your website does not support HTTPS, this feature meets your business requirements If this feature is enabled, all HTTPS requests are redirected to HTTP requests and forwarded to origin servers. This feature can redirect WebSockets requests to WebSocket requests. Requests are redirected over the standard port 80. Http2: specifies whether to turn on Enable HTTP/2. This field is optional and must be an integer. Valid values: 0 and 1. The value 0 indicates that Enable HTTP/2 is turned off. The value 1 indicates that Enable HTTP/2 is turned on. The default value is 0. After you turn on Enable HTTP/2, the protocol type is HTTP/2.
instance_ids
Optional
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[str, ros_cdk_core.IResolvable]]]
Property instanceIds: An array consisting of the IDs of instances that you want to associate.
resource_group_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property resourceGroupId: The ID of the resource group to which the instance belongs in Resource Management.
This parameter is empty by default, which indicates that the instance belongs to the default resource group.
enable_resource_property_constraint
Optional
- Type: bool
Methods
Name | Description |
---|---|
to_string |
Returns a string representation of this construct. |
synthesize |
Allows this construct to emit artifacts into the cloud assembly during synthesis. |
add_condition |
No description. |
add_count |
No description. |
add_dependency |
No description. |
add_resource_desc |
No description. |
apply_removal_policy |
No description. |
get_att |
No description. |
set_metadata |
No description. |
to_string
def to_string() -> str
Returns a string representation of this construct.
synthesize
def synthesize(
session: ISynthesisSession
) -> None
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: ros_cdk_core.ISynthesisSession
The synthesis session.
add_condition
def add_condition(
condition: RosCondition
) -> None
- Type: ros_cdk_core.RosCondition
add_count
def add_count(
count: typing.Union[typing.Union[int, float], IResolvable]
) -> None
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
add_dependency
def add_dependency(
resource: Resource
) -> None
- Type: ros_cdk_core.Resource
add_resource_desc
def add_resource_desc(
desc: str
) -> None
- Type: str
apply_removal_policy
def apply_removal_policy(
policy: RemovalPolicy
) -> None
- Type: ros_cdk_core.RemovalPolicy
get_att
def get_att(
name: str
) -> IResolvable
- Type: str
set_metadata
def set_metadata(
key: str,
value: typing.Any
) -> None
- Type: str
- Type: typing.Any
Static Functions
Name | Description |
---|---|
is_construct |
Return whether the given object is a Construct. |
is_construct
import ros_cdk_ddospro
ros_cdk_ddospro.WebRule.is_construct(
x: typing.Any
)
Return whether the given object is a Construct.
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node |
ros_cdk_core.ConstructNode |
The construct tree node associated with this construct. |
ref |
str |
No description. |
stack |
ros_cdk_core.Stack |
The stack in which this resource is defined. |
resource |
ros_cdk_core.RosResource |
No description. |
attr_domain |
ros_cdk_core.IResolvable |
Attribute Domain: The domain name of the website that you want to add to the instance. |
node
Required
node: ConstructNode
- Type: ros_cdk_core.ConstructNode
The construct tree node associated with this construct.
ref
Required
ref: str
- Type: str
stack
Required
stack: Stack
- Type: ros_cdk_core.Stack
The stack in which this resource is defined.
resource
Optional
resource: RosResource
- Type: ros_cdk_core.RosResource
attr_domain
Required
attr_domain: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute Domain: The domain name of the website that you want to add to the instance.