Instance
- Implements: IInstance
This class encapsulates and extends the ROS resource type ALIYUN::Memcache::Instance.
Initializers
import ros_cdk_memcache
ros_cdk_memcache.Instance(
scope: Construct,
id: str,
auto_renew: typing.Union[str, IResolvable] = None,
auto_renew_period: typing.Union[str, IResolvable] = None,
auto_use_coupon: typing.Union[str, IResolvable] = None,
backup_policy: typing.Union[IResolvable, BackupPolicyProperty] = None,
capacity: typing.Union[typing.Union[int, float], IResolvable] = None,
charge_type: typing.Union[str, IResolvable] = None,
config: typing.Union[str, IResolvable] = None,
coupon_no: typing.Union[str, IResolvable] = None,
instance_class: typing.Union[str, IResolvable] = None,
instance_name: typing.Union[str, IResolvable] = None,
network_type: typing.Union[str, IResolvable] = None,
password: typing.Union[str, IResolvable] = None,
period: typing.Union[str, IResolvable] = None,
private_ip_address: typing.Union[str, IResolvable] = None,
resource_group_id: typing.Union[str, IResolvable] = None,
vpc_id: typing.Union[str, IResolvable] = None,
vpc_password_free: typing.Union[bool, IResolvable] = None,
v_switch_id: typing.Union[str, IResolvable] = None,
zone_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. |
auto_renew | typing.Union[str, ros_cdk_core.IResolvable] | Property autoRenew: Specifies whether to enable auto renewal. |
auto_renew_period | typing.Union[str, ros_cdk_core.IResolvable] | Property autoRenewPeriod: The auto-renewal duration, in months. |
auto_use_coupon | typing.Union[str, ros_cdk_core.IResolvable] | Property autoUseCoupon: Specifies whether to use a coupon. |
backup_policy | typing.Union[ros_cdk_core.IResolvable, BackupPolicyProperty] | Property backupPolicy: Backup policy. |
capacity | typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] | Property capacity: The storage capacity of the instance. |
charge_type | typing.Union[str, ros_cdk_core.IResolvable] | Property chargeType: The billing method of the instance. |
config | typing.Union[str, ros_cdk_core.IResolvable] | Property config: The parameter configuration of the instance, in a JSON string. |
coupon_no | typing.Union[str, ros_cdk_core.IResolvable] | Property couponNo: The coupon code. |
instance_class | typing.Union[str, ros_cdk_core.IResolvable] | Property instanceClass: The instance type. |
instance_name | typing.Union[str, ros_cdk_core.IResolvable] | Property instanceName: The name of the instance. |
network_type | typing.Union[str, ros_cdk_core.IResolvable] | Property networkType: The network type of the instance. |
password | typing.Union[str, ros_cdk_core.IResolvable] | Property password: The password for the instance. |
period | typing.Union[str, ros_cdk_core.IResolvable] | Property period: The subscription duration, in months. |
private_ip_address | typing.Union[str, ros_cdk_core.IResolvable] | Property privateIpAddress: The internal IP address of the instance. |
resource_group_id | typing.Union[str, ros_cdk_core.IResolvable] | Property resourceGroupId: Resource group ID. |
vpc_id | typing.Union[str, ros_cdk_core.IResolvable] | Property vpcId: The ID of the VPC. |
vpc_password_free | typing.Union[bool, ros_cdk_core.IResolvable] | Property vpcPasswordFree: Specifies whether to enable password free for access within the VPC. |
v_switch_id | typing.Union[str, ros_cdk_core.IResolvable] | Property vSwitchId: The ID of the VSwitch. |
zone_id | typing.Union[str, ros_cdk_core.IResolvable] | Property zoneId: The ID of the primary zone for the instance. |
enable_resource_property_constraint | bool | No description. |
scopeRequired
- Type: ros_cdk_core.Construct
idRequired
- Type: str
auto_renewOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property autoRenew: Specifies whether to enable auto renewal.
Valid values: true false Note Default value: false.
auto_renew_periodOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property autoRenewPeriod: The auto-renewal duration, in months.
Valid values: 1, 2, 3, 6, and 12.
This parameter is required when AutoRenew is set to true.
auto_use_couponOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property autoUseCoupon: Specifies whether to use a coupon.
Valid values: true false Note Default value: false.
backup_policyOptional
- Type: typing.Union[ros_cdk_core.IResolvable, BackupPolicyProperty]
Property backupPolicy: Backup policy.
capacityOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property capacity: The storage capacity of the instance.
Unit: MB. Note You need to pass at least one of the Capacity and InstanceClass parameters when calling the CreateInstance operation.
charge_typeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property chargeType: The billing method of the instance.
Valid values: PrePaid: subscription. PostPaid: pay-as-you-go. Note Default value: PostPaid.
configOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property config: The parameter configuration of the instance, in a JSON string.
For more information, see Set parameters.
coupon_noOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property couponNo: The coupon code.
Default value: default.
instance_classOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property instanceClass: The instance type.
For more information, see Instance types. Note You need to pass at least one of the Capacity and InstanceClass parameters when calling the CreateInstance operation.
instance_nameOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property instanceName: The name of the instance.
The name must be 2 to 80 characters long, start with a letter (uppercase or lowercase) or a Chinese character, and not contain spaces or the characters @\/:=”<>{[]}.
network_typeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property networkType: The network type of the instance.
Valid values: CLASSIC VPC Note Default value: CLASSIC.
passwordOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property password: The password for the instance.
The password must be 8 to 32 characters long and contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. The allowed special characters are !@#$%^&*()_+-=.
periodOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property period: The subscription duration, in months.
Valid values: 1 to 9, 12, 24, 36, and 60.
This parameter is available and required only when ChargeType is set to PrePaid.
private_ip_addressOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property privateIpAddress: The internal IP address of the instance.
Note The internal IP address must be located in the Classless Inter-Domain Routing (CIDR) block of the VSwitch to which the instance belongs.
resource_group_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property resourceGroupId: Resource group ID.
vpc_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property vpcId: The ID of the VPC.
vpc_password_freeOptional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property vpcPasswordFree: Specifies whether to enable password free for access within the VPC.
If set to:
- true: enables password free.
- false: disables password free.
v_switch_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property vSwitchId: The ID of the VSwitch.
zone_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property zoneId: The ID of the primary zone for the instance.
You can call the DescribeZones operation to query available zones.
You can also specify a secondary zone by using the
SecondaryZoneIdparameter. The primary and replica nodes are then deployed in the specified primary and secondary zones to create a dual-zone architecture for in-city disaster recovery.
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. |
fetch_condition | No description. |
fetch_dependency | No description. |
fetch_resource_desc | 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
fetch_condition
def fetch_condition() -> RosCondition
fetch_dependency
def fetch_dependency() -> typing.List[str]
fetch_resource_desc
def fetch_resource_desc() -> str
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_memcache
ros_cdk_memcache.Instance.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. |
env | ros_cdk_core.IResourceEnvironment | The environment this resource belongs to. |
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_connection_domain | typing.Union[str, ros_cdk_core.IResolvable] | Attribute ConnectionDomain: The internal endpoint of the instance. |
attr_instance_id | typing.Union[str, ros_cdk_core.IResolvable] | Attribute InstanceId: The globally unique identifier (GUID) of the instance. |
attr_instance_name | typing.Union[str, ros_cdk_core.IResolvable] | Attribute InstanceName: The name of the instance. |
attr_port | typing.Union[str, ros_cdk_core.IResolvable] | Attribute Port: Port of created instance. |
attr_qps | typing.Union[str, ros_cdk_core.IResolvable] | Attribute QPS: QPS. |
props | InstanceProps | No description. |
nodeRequired
node: ConstructNode
- Type: ros_cdk_core.ConstructNode
The construct tree node associated with this construct.
envRequired
env: IResourceEnvironment
- Type: 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
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_connection_domainRequired
attr_connection_domain: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute ConnectionDomain: The internal endpoint of the instance.
attr_instance_idRequired
attr_instance_id: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute InstanceId: The globally unique identifier (GUID) of the instance.
attr_instance_nameRequired
attr_instance_name: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute InstanceName: The name of the instance.
attr_portRequired
attr_port: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute Port: Port of created instance.
attr_qpsRequired
attr_qps: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute QPS: QPS.
propsRequired
props: InstanceProps
- Type: InstanceProps