Skip to content

IResourceCleaner

Represents a ResourceCleaner.

Properties

Name Type Description
Node github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.ConstructNode The construct tree node for this construct.
Env github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.IResourceEnvironment The environment this resource belongs to.
Stack github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Stack The stack in which this resource is defined.
AttrCleanResult interface{} Attribute CleanResult: The cleanup result.
AttrNoCleanupResourceDetails interface{} Attribute NoCleanupResourceDetails: The details of the resources that are scanned but filtered.
AttrNoCleanupResourcePartialDetails interface{} Attribute NoCleanupResourcePartialDetails: The partial details of the resources that are scanned but filtered.
AttrResourceDetails interface{} Attribute ResourceDetails: The details of resources to be cleaned up.
AttrResourcePartialDetails interface{} Attribute ResourcePartialDetails: The partial details of resources to be cleaned up.
AttrResourceSummary interface{} Attribute ResourceSummary: The details of resources to be cleaned up.
AttrScanErrors interface{} Attribute ScanErrors: The scan errors.
Props ResourceCleanerProps No description.

NodeRequired

func Node() ConstructNode
  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.ConstructNode

The construct tree node for this construct.


EnvRequired

func Env() IResourceEnvironment
  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.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

func Stack() Stack
  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Stack

The stack in which this resource is defined.


AttrCleanResultRequired

func AttrCleanResult() interface{}
  • Type: interface{}

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

func AttrNoCleanupResourceDetails() interface{}
  • Type: interface{}

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

func AttrNoCleanupResourcePartialDetails() interface{}
  • Type: interface{}

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

func AttrResourceDetails() interface{}
  • Type: interface{}

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

func AttrResourcePartialDetails() interface{}
  • Type: interface{}

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

func AttrResourceSummary() interface{}
  • Type: interface{}

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

func AttrScanErrors() interface{}
  • Type: interface{}

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

func Props() ResourceCleanerProps