Skip to content

IResourceCleaner

Represents a ResourceCleaner.

Properties

Name Type Description
node ros_cdk_core.ConstructNode The construct tree node for this construct.
env ros_cdk_core.IResourceEnvironment The environment this resource belongs to.
stack ros_cdk_core.Stack The stack in which this resource is defined.
attr_clean_result typing.Union[str, ros_cdk_core.IResolvable] Attribute CleanResult: The cleanup result.
attr_no_cleanup_resource_details typing.Union[str, ros_cdk_core.IResolvable] Attribute NoCleanupResourceDetails: The details of the resources that are scanned but filtered.
attr_no_cleanup_resource_partial_details typing.Union[str, ros_cdk_core.IResolvable] Attribute NoCleanupResourcePartialDetails: The partial details of the resources that are scanned but filtered.
attr_resource_details typing.Union[str, ros_cdk_core.IResolvable] Attribute ResourceDetails: The details of resources to be cleaned up.
attr_resource_partial_details typing.Union[str, ros_cdk_core.IResolvable] Attribute ResourcePartialDetails: The partial details of resources to be cleaned up.
attr_resource_summary typing.Union[str, ros_cdk_core.IResolvable] Attribute ResourceSummary: The details of resources to be cleaned up.
attr_scan_errors typing.Union[str, ros_cdk_core.IResolvable] Attribute ScanErrors: The scan errors.
props ResourceCleanerProps No description.

nodeRequired

node: ConstructNode
  • Type: ros_cdk_core.ConstructNode

The construct tree node for 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.


stackRequired

stack: Stack
  • Type: ros_cdk_core.Stack

The stack in which this resource is defined.


attr_clean_resultRequired

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

attr_no_cleanup_resource_detailsRequired

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


attr_no_cleanup_resource_partial_detailsRequired

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


attr_resource_detailsRequired

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

attr_resource_partial_detailsRequired

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

attr_resource_summaryRequired

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

attr_scan_errorsRequired

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

props: ResourceCleanerProps