Skip to content

ResourceCleaner

This class encapsulates and extends the ROS resource type ALIYUN::ROS::ResourceCleaner, which is used to create a resource cleaner.

Initializers

import { ResourceCleaner } from '@alicloud/ros-cdk-ros'
new ResourceCleaner(scope: Construct, id: string, props: ResourceCleanerProps, enableResourcePropertyConstraint?: boolean)
Name Type Description
scope @alicloud/ros-cdk-core.Construct No description.
id string No description.
props ResourceCleanerProps No description.
enableResourcePropertyConstraint boolean No description.

scopeRequired

  • Type: @alicloud/ros-cdk-core.Construct

idRequired

  • Type: string

propsRequired


enableResourcePropertyConstraintOptional

  • Type: boolean

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 toString(): string

Returns a string representation of this construct.

synthesize

public synthesize(session: ISynthesisSession): void

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.

sessionRequired

  • Type: @alicloud/ros-cdk-core.ISynthesisSession

The synthesis session.


addCondition

public addCondition(condition: RosCondition): void

conditionRequired

  • Type: @alicloud/ros-cdk-core.RosCondition

addCount

public addCount(count: number | IResolvable): void

countRequired

  • Type: number | @alicloud/ros-cdk-core.IResolvable

addDependency

public addDependency(resource: Resource): void

resourceRequired

  • Type: @alicloud/ros-cdk-core.Resource

addResourceDesc

public addResourceDesc(desc: string): void

descRequired

  • Type: string

applyRemovalPolicy

public applyRemovalPolicy(policy: RemovalPolicy): void

policyRequired

  • Type: @alicloud/ros-cdk-core.RemovalPolicy

getAtt

public getAtt(name: string): IResolvable

nameRequired

  • Type: string

setMetadata

public setMetadata(key: string, value: any): void

keyRequired

  • Type: string

valueRequired

  • Type: any

Static Functions

Name Description
isConstruct Return whether the given object is a Construct.

isConstruct

import { ResourceCleaner } from '@alicloud/ros-cdk-ros'
ResourceCleaner.isConstruct(x: any)

Return whether the given object is a Construct.

xRequired

  • Type: any

Properties

Name Type Description
node @alicloud/ros-cdk-core.ConstructNode The construct tree node associated with this construct.
ref string No description.
stack @alicloud/ros-cdk-core.Stack The stack in which this resource is defined.
resource @alicloud/ros-cdk-core.RosResource No description.
attrCleanResult @alicloud/ros-cdk-core.IResolvable Attribute CleanResult: The cleanup result.
attrNoCleanupResourceDetails @alicloud/ros-cdk-core.IResolvable Attribute NoCleanupResourceDetails: The details of the resources that are scanned but filtered.
attrNoCleanupResourcePartialDetails @alicloud/ros-cdk-core.IResolvable Attribute NoCleanupResourcePartialDetails: The partial details of the resources that are scanned but filtered.
attrResourceDetails @alicloud/ros-cdk-core.IResolvable Attribute ResourceDetails: The details of resources to be cleaned up.
attrResourcePartialDetails @alicloud/ros-cdk-core.IResolvable Attribute ResourcePartialDetails: The partial details of resources to be cleaned up.
attrResourceSummary @alicloud/ros-cdk-core.IResolvable Attribute ResourceSummary: The details of resources to be cleaned up.
attrScanErrors @alicloud/ros-cdk-core.IResolvable Attribute ScanErrors: The scan errors.

nodeRequired

public readonly node: ConstructNode;
  • Type: @alicloud/ros-cdk-core.ConstructNode

The construct tree node associated with this construct.


refRequired

public readonly ref: string;
  • Type: string

stackRequired

public readonly stack: Stack;
  • Type: @alicloud/ros-cdk-core.Stack

The stack in which this resource is defined.


resourceOptional

public readonly resource: RosResource;
  • Type: @alicloud/ros-cdk-core.RosResource

attrCleanResultRequired

public readonly attrCleanResult: IResolvable;
  • Type: @alicloud/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 readonly attrNoCleanupResourceDetails: IResolvable;
  • Type: @alicloud/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 readonly attrNoCleanupResourcePartialDetails: IResolvable;
  • Type: @alicloud/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 readonly attrResourceDetails: IResolvable;
  • Type: @alicloud/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 readonly attrResourcePartialDetails: IResolvable;
  • Type: @alicloud/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 readonly attrResourceSummary: IResolvable;
  • Type: @alicloud/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 readonly attrScanErrors: IResolvable;
  • Type: @alicloud/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.