Skip to content

ControlPolicy

This class encapsulates and extends the ROS resource type ALIYUN::CLOUDFW::ControlPolicy, which is used to add an access control policy.

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)
    .applicationName(java.lang.String)
    .applicationName(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)
//  .destPort(java.lang.String)
//  .destPort(IResolvable)
//  .destPortGroup(java.lang.String)
//  .destPortGroup(IResolvable)
//  .destPortType(java.lang.String)
//  .destPortType(IResolvable)
//  .regionId(java.lang.String)
//  .regionId(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.
applicationName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property applicationName: Application types supported by the security policy.
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 type of security protocol for traffic access in the security 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.
destPort java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property destPort: Security access control policy access traffic destination port.
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.
regionId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property regionId: Region ID.

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


applicationNameRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property applicationName: Application types supported by the security policy.

The following types of applications are supported: ANY, HTTP, HTTPS, MySQL, SMTP, SMTPS, RDP, VNC, SSH, Redis, MQTT, MongoDB, Memcache, SSL NOTE ANY indicates that the policy is applied to all types of applications.


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 type of security protocol for traffic access in the security access control policy.

Can be set to ANY when you are not sure of the specific protocol type. Allowed values: ANY, TCP, UDP, ICMP


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


destPortOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property destPort: Security access control policy access traffic destination port.

Note When DestPortType to port, set the item.


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


regionIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property regionId: Region ID.

Default to cn-hangzhou.


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.

sessionRequired

  • Type: com.aliyun.ros.cdk.core.ISynthesisSession

The synthesis session.


addCondition

public void addCondition(RosCondition condition)

conditionRequired

  • Type: com.aliyun.ros.cdk.core.RosCondition

addCount

public void addCount(java.lang.Number OR IResolvable count)

countRequired

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

addDependency

public void addDependency(Resource resource)

resourceRequired

  • Type: com.aliyun.ros.cdk.core.Resource

addResourceDesc

public void addResourceDesc(java.lang.String desc)

descRequired

  • Type: java.lang.String

applyRemovalPolicy

public void applyRemovalPolicy(RemovalPolicy policy)

policyRequired

  • Type: com.aliyun.ros.cdk.core.RemovalPolicy

getAtt

public IResolvable getAtt(java.lang.String name)

nameRequired

  • Type: java.lang.String

setMetadata

public void setMetadata(java.lang.String key, java.lang.Object value)

keyRequired

  • Type: java.lang.String

valueRequired

  • 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.

xRequired

  • 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.
attrAclUuid com.aliyun.ros.cdk.core.IResolvable Attribute AclUuid: Security access control ID that uniquely identifies the policy.

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

attrAclUuidRequired

public IResolvable getAttrAclUuid();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute AclUuid: Security access control ID that uniquely identifies the policy.