CustomImage
This class encapsulates and extends the ROS resource type ALIYUN::ECS::CustomImage, which is used to create a custom image.
Initializers
import com.aliyun.ros.cdk.ecs.CustomImage;
CustomImage.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
// .architecture(java.lang.String)
// .architecture(IResolvable)
// .bootMode(java.lang.String)
// .bootMode(IResolvable)
// .description(java.lang.String)
// .description(IResolvable)
// .detectionStrategy(java.lang.String)
// .detectionStrategy(IResolvable)
// .diskDeviceMapping(IResolvable)
// .diskDeviceMapping(java.util.List<IResolvable)
// .diskDeviceMapping(DiskDeviceMappingProperty>)
// .imageFamily(java.lang.String)
// .imageFamily(IResolvable)
// .imageName(java.lang.String)
// .imageName(IResolvable)
// .imageVersion(java.lang.String)
// .imageVersion(IResolvable)
// .instanceId(java.lang.String)
// .instanceId(IResolvable)
// .platform(java.lang.String)
// .platform(IResolvable)
// .resourceGroupId(java.lang.String)
// .resourceGroupId(IResolvable)
// .snapshotId(java.lang.String)
// .snapshotId(IResolvable)
// .sourceRegionId(java.lang.String)
// .sourceRegionId(IResolvable)
// .tag(IResolvable)
// .tag(java.util.List<IResolvable)
// .tag(RosTag>)
.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. |
architecture |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property architecture: After specifying the data disk snapshot as the mirrored system disk, you need to determine the system architecture of the system disk through Architecture. |
bootMode |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property bootMode: Modify the startup mode of the image. |
description |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property description: The description of the image. |
detectionStrategy |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property detectionStrategy: Image detection policy. |
diskDeviceMapping |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
Property diskDeviceMapping:. |
imageFamily |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property imageFamily: The name of the image family of the image. |
imageName |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property imageName: Image name. |
imageVersion |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property imageVersion: Image version. |
instanceId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property instanceId: Instance ID. |
platform |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property platform: After specifying the data disk snapshot as the mirrored system disk, you need to determine the operating system release of the system disk through Platform. |
resourceGroupId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property resourceGroupId: The ID of the resource group to which to assign the custom image. |
snapshotId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property snapshotId: The snapshot ID. |
sourceRegionId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property sourceRegionId: ID of the region to where the instance\/snapshot belongs. |
tag |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
Property tag:. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
architectureOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property architecture: After specifying the data disk snapshot as the mirrored system disk, you need to determine the system architecture of the system disk through Architecture.
Ranges: I386 X86_64 (default)
bootModeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property bootMode: Modify the startup mode of the image.
Ranges: BIOS: BIOS boot mode. UEFI: UEFI boot mode. You need to know the startup mode supported by the specified image. After modifying the startup mode through this parameter, it must match the startup mode supported by the image itself so that the instance can start normally.
descriptionOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property description: The description of the image.
It can be [0, 256] letters in length. It cannot begin with http:// or https://. Default value: null.
detectionStrategyOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property detectionStrategy: Image detection policy.
If this parameter is not configured, detection will not be triggered. Only Standard detection mode is supported.Currently, most Linux/Windows versions are supported.
diskDeviceMappingOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
DiskDeviceMappingProperty>
Property diskDeviceMapping:.
imageFamilyOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property imageFamily: The name of the image family of the image.
The name must be 2 to 128 characters in length and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It cannot contain http:// or https://. It must start with a letter and cannot start with acs: or aliyun.This parameter is empty by default.
imageNameOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property imageName: Image name.
Can contain [2, 128] characters in length. Must begin with an English letter or Chinese character. Can contain digits, colons (:), underscores (_), or hyphens (-). Cannot begin with http:// or https://.
imageVersionOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property imageVersion: Image version.
When you specify an instance ID (InstanceId) and the image of the instance is a cloud market image or a custom image created from a cloud market image. This parameter must be the same as the ImageVersion of the current instance image or set to empty.
instanceIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property instanceId: Instance ID.
platformOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property platform: After specifying the data disk snapshot as the mirrored system disk, you need to determine the operating system release of the system disk through Platform.
resourceGroupIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: The ID of the resource group to which to assign the custom image.
snapshotIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property snapshotId: The snapshot ID.
A custom image is created from the specified snapshot.
sourceRegionIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property sourceRegionId: ID of the region to where the instance\/snapshot belongs.
Default is current region ID.
tagOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property tag:.
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.
- 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
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.ecs.CustomImage;
CustomImage.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. |
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. |
attrImageId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ImageId: Image ID. |
attrSourceRegionId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute SourceRegionId: ID of the region to where the instance/snapshot belongs. |
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
attrImageIdRequired
public IResolvable getAttrImageId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute ImageId: Image ID.
attrSourceRegionIdRequired
public IResolvable getAttrSourceRegionId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute SourceRegionId: ID of the region to where the instance/snapshot belongs.