IResourceCleaner
-
Extends: com.aliyun.ros.cdk.core.IResource
-
Implemented By: ResourceCleaner, IResourceCleaner
Represents a ResourceCleaner.
Properties
| Name | Type | Description |
|---|---|---|
node | com.aliyun.ros.cdk.core.ConstructNode | The construct tree node for this construct. |
env | com.aliyun.ros.cdk.core.IResourceEnvironment | The environment this resource belongs to. |
stack | com.aliyun.ros.cdk.core.Stack | The stack in which this resource is defined. |
attrCleanResult | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute CleanResult: The cleanup result. |
attrNoCleanupResourceDetails | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute NoCleanupResourceDetails: The details of the resources that are scanned but filtered. |
attrNoCleanupResourcePartialDetails | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute NoCleanupResourcePartialDetails: The partial details of the resources that are scanned but filtered. |
attrResourceDetails | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ResourceDetails: The details of resources to be cleaned up. |
attrResourcePartialDetails | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ResourcePartialDetails: The partial details of resources to be cleaned up. |
attrResourceSummary | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ResourceSummary: The details of resources to be cleaned up. |
attrScanErrors | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ScanErrors: The scan errors. |
props | ResourceCleanerProps | No description. |
nodeRequired
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node for 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.
stackRequired
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
attrCleanResultRequired
public java.lang.Object getAttrCleanResult();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute CleanResult: The cleanup result.
Valid values:
- Success: All resources are cleaned up successfully.
- ResourceFailure: Partial resources fail to clean up.
- Timeout: Timeout to clean up.
- CheckFailure: Pre check of cleanup fails.
- UnknownFailure: Unexpected failure.
- UserCancelled: Cleanup is cancelled by user.
- None: Cleanup is not triggered.
attrNoCleanupResourceDetailsRequired
public java.lang.Object getAttrNoCleanupResourceDetails();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute NoCleanupResourceDetails: The details of the resources that are scanned but filtered.
Only resources with the resource types ResourceCleaner supports and the regions not filtered are scanned. The format is the same as ResourceDetails.
attrNoCleanupResourcePartialDetailsRequired
public java.lang.Object getAttrNoCleanupResourcePartialDetails();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute NoCleanupResourcePartialDetails: The partial details of the resources that are scanned but filtered.
Only resources with the resource types ResourceCleaner supports and the regions not filtered are scanned. The format is the same as ResourcePartialDetails.
attrResourceDetailsRequired
public java.lang.Object getAttrResourceDetails();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ResourceDetails: The details of resources to be cleaned up.
The value is a list of dict. The dict contains the fields below:
- ResourceType: Resource type of the resource.
- RegionId: Region ID of the resource.
- ResourceId: ID of the resource.
- ResourceName: Name of the resource.
- CleanupType: Cleanup type of the resource. Valid values:
- Normal: The resource can be deleted normally.
- DeleteWithInstance: The resource will be deleted with the resource it belongs to. If the resource it belongs to is filtered or excluded, the deletion probably fails. CleanupTypeReasons give more information.
- UnableToDelete: Unable to delete the resource. CleanupTypeReasons give more information.
- CleanupTypeReasons: The information of the related CleanupType.
- ResourceStatus: Status of the resource. Valid values:
- Deleting: The resource is deleting.
- Failure: The deletion of the resource failed.
- Success: The resource is deleted.
- Skipped: The deletion of the resource is skipped.
- Pending: The deletion of the resource is not started.
- ResourceStatusReason: The information of the related ResourceStatus.
- Dependencies: The resources that need to be deleted before the deletion of the resource. The value is a list of dict. The dict contains the fields below:
- ResourceType: Resource type of the dependency resource.
- RegionId: Region ID of the dependency resource.
- ResourceId: ID of the dependency resource.
attrResourcePartialDetailsRequired
public java.lang.Object getAttrResourcePartialDetails();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ResourcePartialDetails: The partial details of resources to be cleaned up.
The value is a list of dict. The dict contains the fields below:
- ResourceType: Resource type of the resource.
- RegionId: Region ID of the resource.
- ResourceId: ID of the resource.
- ResourceName: Name of the resource.
- ResourceStatus: Status of the resource. Valid values:
- Deleting: The resource is deleting.
- Failure: The deletion of the resource failed.
- Success: The resource is deleted.
- Skipped: The deletion of the resource is skipped.
- Pending: The deletion of the resource is not started.
- ResourceStatusReason: The information of the related ResourceStatus.
attrResourceSummaryRequired
public java.lang.Object getAttrResourceSummary();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ResourceSummary: The details of resources to be cleaned up.
The value is a list of dict. The dict contains the fields below:
- ResourceType: Resource type of the resources.
- DeletingCount: Number of deleting resources of the resource type.
- SuccessCount: Number of deleted resources of the resource type.
- FailureCount: Number of resources that failed to delete of the resource type.
- SkippedCount: Number of skipped resources of the resource type.
- PendingCount: Number of resources that have not been deleted of the resource type.
- OtherCount: Number of other resources of the resource type.
- TotalCount: Number of total resources of the resource type.
attrScanErrorsRequired
public java.lang.Object getAttrScanErrors();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ScanErrors: The scan errors.
It takes effect only when property Mode is Loose. The value is a list of dict. The dict contains the fields below:
- ResourceType: Resource type for scanning.
- RegionId: Region ID for scanning.
- ErrorMessage: Error message of scanning with specified resource type and region ID.
propsRequired
public ResourceCleanerProps getProps();
- Type: ResourceCleanerProps