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 ros_cdk_cloudfw
ros_cdk_cloudfw.ControlPolicy(
  scope: Construct,
  id: str,
  acl_action: typing.Union[str, IResolvable],
  application_name: typing.Union[str, IResolvable],
  description: typing.Union[str, IResolvable],
  destination: typing.Union[str, IResolvable],
  destination_type: typing.Union[str, IResolvable],
  direction: typing.Union[str, IResolvable],
  new_order: typing.Union[typing.Union[int, float], IResolvable],
  proto: typing.Union[str, IResolvable],
  source: typing.Union[str, IResolvable],
  source_type: typing.Union[str, IResolvable],
  dest_port: typing.Union[str, IResolvable] = None,
  dest_port_group: typing.Union[str, IResolvable] = None,
  dest_port_type: typing.Union[str, IResolvable] = None,
  region_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.
acl_action typing.Union[str, ros_cdk_core.IResolvable] Property aclAction: Traffic access control policy set by the cloud of a firewall.
application_name typing.Union[str, ros_cdk_core.IResolvable] Property applicationName: Application types supported by the security policy.
description typing.Union[str, ros_cdk_core.IResolvable] Property description: Security access control policy description information.
destination typing.Union[str, ros_cdk_core.IResolvable] Property destination: Security Access Control destination address policy.
destination_type typing.Union[str, ros_cdk_core.IResolvable] Property destinationType: Security Access Control destination address type of policy.
direction typing.Union[str, ros_cdk_core.IResolvable] Property direction: Security access control traffic direction policies.
new_order typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property newOrder: Security access control priority policy in force.
proto typing.Union[str, ros_cdk_core.IResolvable] Property proto: The type of security protocol for traffic access in the security access control policy.
source typing.Union[str, ros_cdk_core.IResolvable] Property source: Security access control source address policy.
source_type typing.Union[str, ros_cdk_core.IResolvable] Property sourceType: Security access control source address type of policy.
dest_port typing.Union[str, ros_cdk_core.IResolvable] Property destPort: Security access control policy access traffic destination port.
dest_port_group typing.Union[str, ros_cdk_core.IResolvable] Property destPortGroup: Security access control policy access traffic destination port address book name.
dest_port_type typing.Union[str, ros_cdk_core.IResolvable] Property destPortType: Security access control policy access destination port traffic type.
region_id typing.Union[str, ros_cdk_core.IResolvable] Property regionId: Region ID.
enable_resource_property_constraint bool No description.

scopeRequired

  • Type: ros_cdk_core.Construct

idRequired

  • Type: str

acl_actionRequired

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property aclAction: Traffic access control policy set by the cloud of a firewall.

accept: Release drop: rejected log: Observation


application_nameRequired

  • Type: typing.Union[str, 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: typing.Union[str, ros_cdk_core.IResolvable]

Property description: Security access control policy description information.


destinationRequired

  • Type: typing.Union[str, 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"]


destination_typeRequired

  • Type: typing.Union[str, 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: typing.Union[str, 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


new_orderRequired

  • Type: typing.Union[typing.Union[int, float], 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: typing.Union[str, 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: typing.Union[str, 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"]


source_typeRequired

  • Type: typing.Union[str, 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


dest_portOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

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

Note When DestPortType to port, set the item.


dest_port_groupOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property destPortGroup: Security access control policy access traffic destination port address book name.

Description DestPortType is group, set the item.


dest_port_typeOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property destPortType: Security access control policy access destination port traffic type.

port: Port group: port address book


region_idOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property regionId: Region ID.

Default to cn-hangzhou.


enable_resource_property_constraintOptional

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

sessionRequired

  • Type: ros_cdk_core.ISynthesisSession

The synthesis session.


add_condition

def add_condition(
  condition: RosCondition
) -> None

conditionRequired

  • Type: ros_cdk_core.RosCondition

add_count

def add_count(
  count: typing.Union[typing.Union[int, float], IResolvable]
) -> None

countRequired

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

add_dependency

def add_dependency(
  resource: Resource
) -> None

resourceRequired

  • Type: ros_cdk_core.Resource

add_resource_desc

def add_resource_desc(
  desc: str
) -> None

descRequired

  • Type: str

apply_removal_policy

def apply_removal_policy(
  policy: RemovalPolicy
) -> None

policyRequired

  • Type: ros_cdk_core.RemovalPolicy

get_att

def get_att(
  name: str
) -> IResolvable

nameRequired

  • Type: str

set_metadata

def set_metadata(
  key: str,
  value: typing.Any
) -> None

keyRequired

  • Type: str

valueRequired

  • Type: typing.Any

Static Functions

Name Description
is_construct Return whether the given object is a Construct.

is_construct

import ros_cdk_cloudfw
ros_cdk_cloudfw.ControlPolicy.is_construct(
  x: typing.Any
)

Return whether the given object is a Construct.

xRequired

  • 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_acl_uuid ros_cdk_core.IResolvable Attribute AclUuid: Security access control ID that uniquely identifies the policy.

nodeRequired

node: ConstructNode
  • Type: ros_cdk_core.ConstructNode

The construct tree node associated with this construct.


refRequired

ref: str
  • Type: str

stackRequired

stack: Stack
  • Type: ros_cdk_core.Stack

The stack in which this resource is defined.


resourceOptional

resource: RosResource
  • Type: ros_cdk_core.RosResource

attr_acl_uuidRequired

attr_acl_uuid: IResolvable
  • Type: ros_cdk_core.IResolvable

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