ResourceCleaner
- Implements: IResourceCleaner
This class encapsulates and extends the ROS resource type ALIYUN::ROS::ResourceCleaner.
Initializers
using AlibabaCloud.SDK.ROS.CDK.Ros;
new ResourceCleaner(Construct Scope, string Id, ResourceCleanerProps Props, bool EnableResourcePropertyConstraint = null);
| Name | Type | Description |
|---|---|---|
Scope | AlibabaCloud.SDK.ROS.CDK.Core.Construct | No description. |
Id | string | No description. |
Props | ResourceCleanerProps | No description. |
EnableResourcePropertyConstraint | bool | No description. |
ScopeRequired
- Type: AlibabaCloud.SDK.ROS.CDK.Core.Construct
IdRequired
- Type: string
PropsRequired
- Type: ResourceCleanerProps
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. |
FetchCondition | No description. |
FetchDependency | No description. |
FetchResourceDesc | No description. |
GetAtt | No description. |
SetMetadata | No description. |
ToString
private string ToString()
Returns a string representation of this construct.
Synthesize
private void Synthesize(ISynthesisSession Session)
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.
- Type: AlibabaCloud.SDK.ROS.CDK.Core.ISynthesisSession
The synthesis session.
AddCondition
private void AddCondition(RosCondition Condition)
- Type: AlibabaCloud.SDK.ROS.CDK.Core.RosCondition
AddCount
private void AddCount(object Count)
- Type: object
AddDependency
private void AddDependency(Resource Resource)
- Type: AlibabaCloud.SDK.ROS.CDK.Core.Resource
AddResourceDesc
private void AddResourceDesc(string Desc)
- Type: string
ApplyRemovalPolicy
private void ApplyRemovalPolicy(RemovalPolicy Policy)
- Type: AlibabaCloud.SDK.ROS.CDK.Core.RemovalPolicy
FetchCondition
private RosCondition FetchCondition()
FetchDependency
private string[] FetchDependency()
FetchResourceDesc
private string FetchResourceDesc()
GetAtt
private IResolvable GetAtt(string Name)
- Type: string
SetMetadata
private void SetMetadata(string Key, object Value)
- Type: string
- Type: object
Static Functions
| Name | Description |
|---|---|
IsConstruct | Return whether the given object is a Construct. |
IsConstruct
using AlibabaCloud.SDK.ROS.CDK.Ros;
ResourceCleaner.IsConstruct(object X);
Return whether the given object is a Construct.
- Type: object
Properties
| Name | Type | Description |
|---|---|---|
Node | AlibabaCloud.SDK.ROS.CDK.Core.ConstructNode | The construct tree node associated with this construct. |
Env | AlibabaCloud.SDK.ROS.CDK.Core.IResourceEnvironment | The environment this resource belongs to. |
Ref | string | No description. |
Stack | AlibabaCloud.SDK.ROS.CDK.Core.Stack | The stack in which this resource is defined. |
Resource | AlibabaCloud.SDK.ROS.CDK.Core.RosResource | No description. |
AttrCleanResult | object | Attribute CleanResult: The cleanup result. |
AttrNoCleanupResourceDetails | object | Attribute NoCleanupResourceDetails: The details of the resources that are scanned but filtered. |
AttrNoCleanupResourcePartialDetails | object | Attribute NoCleanupResourcePartialDetails: The partial details of the resources that are scanned but filtered. |
AttrResourceDetails | object | Attribute ResourceDetails: The details of resources to be cleaned up. |
AttrResourcePartialDetails | object | Attribute ResourcePartialDetails: The partial details of resources to be cleaned up. |
AttrResourceSummary | object | Attribute ResourceSummary: The details of resources to be cleaned up. |
AttrScanErrors | object | Attribute ScanErrors: The scan errors. |
Props | ResourceCleanerProps | No description. |
NodeRequired
public ConstructNode Node { get; }
- Type: AlibabaCloud.SDK.ROS.CDK.Core.ConstructNode
The construct tree node associated with this construct.
EnvRequired
public IResourceEnvironment Env { get; }
- Type: AlibabaCloud.SDK.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.
RefRequired
public string Ref { get; }
- Type: string
StackRequired
public Stack Stack { get; }
- Type: AlibabaCloud.SDK.ROS.CDK.Core.Stack
The stack in which this resource is defined.
ResourceOptional
public RosResource Resource { get; }
- Type: AlibabaCloud.SDK.ROS.CDK.Core.RosResource
AttrCleanResultRequired
public object AttrCleanResult { get; }
- Type: object
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 object AttrNoCleanupResourceDetails { get; }
- Type: object
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 object AttrNoCleanupResourcePartialDetails { get; }
- Type: object
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 object AttrResourceDetails { get; }
- Type: object
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 object AttrResourcePartialDetails { get; }
- Type: object
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 object AttrResourceSummary { get; }
- Type: object
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 object AttrScanErrors { get; }
- Type: object
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 Props { get; }
- Type: ResourceCleanerProps