ControlPolicy
- Implements: IControlPolicy
This class encapsulates and extends the ROS resource type ALIYUN::CLOUDFW::ControlPolicy.
Initializers
import com.aliyun.ros.cdk.cloudfw.ControlPolicy;
ControlPolicy.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.aclAction(java.lang.String)
.aclAction(IResolvable)
.description(java.lang.String)
.description(IResolvable)
.destination(java.lang.String)
.destination(IResolvable)
.destinationType(java.lang.String)
.destinationType(IResolvable)
.direction(java.lang.String)
.direction(IResolvable)
.newOrder(java.lang.Number)
.newOrder(IResolvable)
.proto(java.lang.String)
.proto(IResolvable)
.source(java.lang.String)
.source(IResolvable)
.sourceType(java.lang.String)
.sourceType(IResolvable)
// .applicationName(java.lang.String)
// .applicationName(IResolvable)
// .applicationNameList(IResolvable)
// .applicationNameList(java.util.List<java.lang.String)
// .applicationNameList(IResolvable>)
// .destPort(java.lang.String)
// .destPort(IResolvable)
// .destPortGroup(java.lang.String)
// .destPortGroup(IResolvable)
// .destPortType(java.lang.String)
// .destPortType(IResolvable)
// .domainResolveType(java.lang.String)
// .domainResolveType(IResolvable)
// .endTime(java.lang.Number)
// .endTime(IResolvable)
// .ipVersion(java.lang.String)
// .ipVersion(IResolvable)
// .regionId(java.lang.String)
// .regionId(IResolvable)
// .release(java.lang.Boolean)
// .release(IResolvable)
// .repeatDays(IResolvable)
// .repeatDays(java.util.List<java.lang.Number)
// .repeatDays(IResolvable>)
// .repeatEndTime(java.lang.String)
// .repeatEndTime(IResolvable)
// .repeatStartTime(java.lang.String)
// .repeatStartTime(IResolvable)
// .repeatType(java.lang.String)
// .repeatType(IResolvable)
// .startTime(java.lang.Number)
// .startTime(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. |
aclAction | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property aclAction: Traffic access control policy set by the cloud of a firewall. |
description | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property description: Security access control policy description information. |
destination | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property destination: Security Access Control destination address policy. |
destinationType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property destinationType: Security Access Control destination address type of policy. |
direction | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property direction: Security access control traffic direction policies. |
newOrder | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property newOrder: Security access control priority policy in force. |
proto | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property proto: The protocol type of the traffic in the access control policy. |
source | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property source: Security access control source address policy. |
sourceType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property sourceType: Security access control source address type of policy. |
applicationName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property applicationName: The application type that the access control policy supports. |
applicationNameList | com.aliyun.ros.cdk.core.IResolvable OR java.util.List | Property applicationNameList: List of application types supported by the access control policy. |
destPort | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property destPort: The destination port in the access control policy. |
destPortGroup | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property destPortGroup: Security access control policy access traffic destination port address book name. |
destPortType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property destPortType: Security access control policy access destination port traffic type. |
domainResolveType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property domainResolveType: The domain name resolution method of the access control policy. |
endTime | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property endTime: The end time of the policy validity period for an access control policy. |
ipVersion | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property ipVersion: IP version. |
regionId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property regionId: Region ID. |
release | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property release: The enabled state of the access control policy. |
repeatDays | com.aliyun.ros.cdk.core.IResolvable OR java.util.List | Property repeatDays: A collection of repeated dates of policy validity for an access control policy. |
repeatEndTime | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property repeatEndTime: The repeated end time of the policy validity period for an access control policy. |
repeatStartTime | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property repeatStartTime: The repeated start time of the policy validity period for an access control policy. |
repeatType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property repeatType: The repetition type of the policy validity period for an access control policy. |
startTime | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property startTime: The start time of the policy validity period for an access control policy. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
aclActionRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property aclAction: Traffic access control policy set by the cloud of a firewall.
accept: Release drop: rejected log: Observation
descriptionRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property description: Security access control policy description information.
destinationRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property destination: Security Access Control destination address policy.
When DestinationType is net, Destination purpose CIDR. For example: 1.2.3.4/24 When DestinationType as a group, Destination for the purpose of the address book name. For example: db_group When DestinationType for the domain, Destination for the purpose of a domain name. For example:. * Aliyuncs.com When DestinationType as location, Destination area for the purpose (see below position encoding specific regions). For example: [ "BJ11", "ZB"]
destinationTypeRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property destinationType: Security Access Control destination address type of policy.
net: Destination network segment (CIDR) group: destination address book domain: The purpose domain location: The purpose area
directionRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property direction: Security access control traffic direction policies.
in: internal and external traffic access control out: within the flow of external access control
newOrderRequired
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property newOrder: Security access control priority policy in force.
Priority number increments sequentially from 1, lower the priority number, the higher the priority. Description -1 indicates the lowest priority.
protoRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property proto: The protocol type of the traffic in the access control policy.
Valid values:
- ANY (any protocol)
- TCP
- UDP
- ICMP
If the traffic direction is
outand the destination is a domain-based threat intelligence or cloud service address book, you can set the protocol only toTCP. The supported applications are HTTP, HTTPS, SMTP, SMTPS, and SSL.
sourceRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property source: Security access control source address policy.
When SourceType for the net, Source is the source CIDR. For example: 1.2.3.0/24 When SourceType as a group, Source name for the source address book. For example: db_group When SourceType as location, Source source region (specific region position encoder see below). For example, [ "BJ11", "ZB"]
sourceTypeRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property sourceType: Security access control source address type of policy.
net: Source segment (CIDR) group: source address book location: the source area
applicationNameOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property applicationName: The application type that the access control policy supports.
Valid values:
- FTP
- HTTP
- HTTPS
- Memcache
- MongoDB
- MQTT
- MySQL
- RDP
- Redis
- SMTP
- SMTPS
- SSH
- SSL_No_Cert
- SSL
- VNC
- ANY (all application types)
The available application types depend on the protocol type (
Proto). If you setPrototoTCP, you can setApplicationNameto any of the listed application types. If you setPrototoUDP,ICMP, orANY, you can setApplicationNameonly toANY. Specify eitherApplicationNameListorApplicationName.
applicationNameListOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property applicationNameList: List of application types supported by the access control policy.
destPortOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property destPort: The destination port in the access control policy.
Valid values:
- If
ProtoisICMP, leave this parameter empty.
If the protocol type is ICMP, you cannot control access based on the destination port.
- If
ProtoisTCP,UDP, orANY, andDestPortTypeisgroup, leave this parameter empty.
If you set
DestPortTypetogroup(port address book), you do not need to specify a destination port number. The port address book contains all the destination ports that the policy manages.
- If
ProtoisTCP,UDP, orANY, andDestPortTypeisport, set this parameter to the destination port number.
destPortGroupOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property destPortGroup: Security access control policy access traffic destination port address book name.
Description DestPortType is group, set the item.
destPortTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property destPortType: Security access control policy access destination port traffic type.
port: Port group: port address book
domainResolveTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property domainResolveType: The domain name resolution method of the access control policy.
Value:
- FQDN: Based on FQDN
- DNS: Based on DNS dynamic resolution
- FQDN_AND_DNS: Based on FQDN and DNS dynamic resolution
endTimeOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property endTime: The end time of the policy validity period for an access control policy.
It is represented in a second-level timestamp format. It must be the whole hour or half hour, and at least half an hour greater than the start time. Notes: When RepeatType is Permanent, EndTime is empty. When RepeatType is None, Daily, Weekly, Monthly, EndTime must havea value, and you need to set the end time.
ipVersionOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property ipVersion: IP version.
Valid values:
- 4: IPv4
- 6: IPv6
regionIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property regionId: Region ID.
Default to cn-hangzhou.
releaseOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property release: The enabled state of the access control policy.
This policy is enabled by default when it is created. Valid values:
- true: Access control policy is enabled
- false: Access control policy is not enabled
repeatDaysOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property repeatDays: A collection of repeated dates of policy validity for an access control policy.
When RepeatType is Permanent, None, and Daily, RepeatDays is an empty set. For example: [] When RepeatType is Weekly, RepeatDays cannot be empty. Example: [0, 6] Notes: When RepeatType is set to Weekly, RepeatDays is not allowed. When RepeatType is Monthly, RepeatDays cannot be empty. Examples: [1, 31] Notes: When RepeatType is set to Monthly, RepeatDays is not allowed to repeat.
repeatEndTimeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property repeatEndTime: The repeated end time of the policy validity period for an access control policy.
For example: 08:00, must be the hour or half time, and less than the repeat start time at least half an hour. Notes: When RepeatType is Permanent and None, RepeatEndTime is empty. When RepeatType is Daily, Weekly, or Monthly, RepeatEndTime musthave a value, and you need to set the repeat end time.
repeatStartTimeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property repeatStartTime: The repeated start time of the policy validity period for an access control policy.
For example: 08:00, must be the hour or half time, and less than the repeat end time at least half an hour. Notes: When RepeatType is Permanent and None, RepeatStartTime is empty. When RepeatType is Daily, Weekly, or Monthly, RepeatStartTime must have a value, and you need to set the repeat start time.
repeatTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property repeatType: The repetition type of the policy validity period for an access control policy.
Valid values:
- Permanent (default)
- None
- Daily
- Weekly
- Monthly.
startTimeOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property startTime: The start time of the policy validity period for an access control policy.
It is represented in a second-level timestamp format. It must be the whole hour or half hour, and at least half an hour less than the end time. Notes: When RepeatType is Permanent, StartTime is empty. When RepeatType is None, Daily, Weekly, Monthly, StartTime must have a value, and you need to set the start time.
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.cloudfw.ControlPolicy;
ControlPolicy.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. |
attrAclUuid | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute AclUuid: Security access control ID that uniquely identifies the policy. |
props | ControlPolicyProps | 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
attrAclUuidRequired
public java.lang.Object getAttrAclUuid();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute AclUuid: Security access control ID that uniquely identifies the policy.
propsRequired
public ControlPolicyProps getProps();
- Type: ControlPolicyProps