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 "github.com/alibabacloud-go/ros-cdk/alicloudroscdkros"
alicloudroscdkros.NewResourceCleaner(scope Construct, id *string, props ResourceCleanerProps, enableResourcePropertyConstraint *bool) ResourceCleaner
Name Type Description
scope github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Construct No description.
id *string No description.
props ResourceCleanerProps No description.
enableResourcePropertyConstraint *bool No description.

scopeRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Construct

idRequired

  • Type: *string

propsRequired


enableResourcePropertyConstraintOptional

  • Type: *bool

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

func ToString() *string

Returns a string representation of this construct.

Synthesize

func Synthesize(session ISynthesisSession)

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: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.ISynthesisSession

The synthesis session.


AddCondition

func AddCondition(condition RosCondition)

conditionRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.RosCondition

AddCount

func AddCount(count interface{})

countRequired

  • Type: interface{}

AddDependency

func AddDependency(resource Resource)

resourceRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Resource

AddResourceDesc

func AddResourceDesc(desc *string)

descRequired

  • Type: *string

ApplyRemovalPolicy

func ApplyRemovalPolicy(policy RemovalPolicy)

policyRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.RemovalPolicy

GetAtt

func GetAtt(name *string) IResolvable

nameRequired

  • Type: *string

SetMetadata

func SetMetadata(key *string, value interface{})

keyRequired

  • Type: *string

valueRequired

  • Type: interface{}

Static Functions

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

IsConstruct

import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkros"
alicloudroscdkros.ResourceCleaner_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct.

xRequired

  • Type: interface{}

Properties

Name Type Description
Node github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.ConstructNode The construct tree node associated with this construct.
Ref *string No description.
Stack github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Stack The stack in which this resource is defined.
Resource github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.RosResource No description.
AttrCleanResult github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.IResolvable Attribute CleanResult: The cleanup result.
AttrNoCleanupResourceDetails github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.IResolvable Attribute NoCleanupResourceDetails: The details of the resources that are scanned but filtered.
AttrNoCleanupResourcePartialDetails github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.IResolvable Attribute NoCleanupResourcePartialDetails: The partial details of the resources that are scanned but filtered.
AttrResourceDetails github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.IResolvable Attribute ResourceDetails: The details of resources to be cleaned up.
AttrResourcePartialDetails github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.IResolvable Attribute ResourcePartialDetails: The partial details of resources to be cleaned up.
AttrResourceSummary github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.IResolvable Attribute ResourceSummary: The details of resources to be cleaned up.
AttrScanErrors github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.IResolvable Attribute ScanErrors: The scan errors.

NodeRequired

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

The construct tree node associated with this construct.


RefRequired

func Ref() *string
  • Type: *string

StackRequired

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

The stack in which this resource is defined.


ResourceOptional

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

AttrCleanResultRequired

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

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

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

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

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

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

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