ResourceCleanerProps
Properties for defining a ResourceCleaner
.
See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-ros-resourcecleaner
Initializer
using AlibabaCloud.SDK.ROS.CDK.Ros;
new ResourceCleanerProps {
object Action,
object CleanUpAlgorithm = null,
object CleanUpRetryCount = null,
object CleanUpTimeout = null,
object DisabledSideEffects = null,
object ExcludedResources = null,
object FailureOption = null,
object Mode = null,
object ResourceFilters = null,
object Resources = null,
object ResourceTypeOrder = null
};
Properties
Name | Type | Description |
---|---|---|
Action |
object |
Property action: Resource cleaner actions: - Scan: Scanning phase. |
CleanUpAlgorithm |
object |
Property cleanUpAlgorithm: The cleanup algorithm of cleanup phase: - ResourceDependency: Clean up by resource dependency tree. |
CleanUpRetryCount |
object |
Property cleanUpRetryCount: The maximum number of executions of cleanup phase. |
CleanUpTimeout |
object |
Property cleanUpTimeout: The timeout seconds of executions of cleanup phase. |
DisabledSideEffects |
object |
Property disabledSideEffects: Side effects to be disabled. |
ExcludedResources |
object |
Property excludedResources: Exclude parts from resources to be cleaned up. |
FailureOption |
object |
Property failureOption: The failure option of cleanup phase: - Normal: Resource failure does not affect the resources that depend on it. |
Mode |
object |
Property mode: The result mode of resource cleaner: - Strict: Any scanning or cleanup failure leads to the failure of the cleaner. |
ResourceFilters |
object |
Property resourceFilters: Resource filters that ResourceCleaner uses to filter out the resources to be cleaned up during scanning. |
Resources |
object |
Property resources: Resources to be cleaned up. |
ResourceTypeOrder |
object |
Property resourceTypeOrder: This property takes effect only when property CleanUpAlgorithm is ResourceTypeOrder. |
Action
Required
public object Action { get; set; }
- Type: object
Property action: Resource cleaner actions: - Scan: Scanning phase.
Scan out the resources to be cleaned up.
- CleanUp: Cleanup phase. Clean up the scanned resources. It it not allowed for resource creation.
- Scan+CleanUp: Scan first, then CleanUp.
- ScanWhenCreatingAndUpdating+CleanUpWhenDeleting: Scan when creating or updating resource, and CleanUp when deleting stack.
CleanUpAlgorithm
Optional
public object CleanUpAlgorithm { get; set; }
- Type: object
Property cleanUpAlgorithm: The cleanup algorithm of cleanup phase: - ResourceDependency: Clean up by resource dependency tree.
- ResourceTypeOrder: Clean up by resource type order. Property ResourceTypeOrder can be used to specify resource type order. If it is not specified, a default order will be used. Default to ResourceDependency.
CleanUpRetryCount
Optional
public object CleanUpRetryCount { get; set; }
- Type: object
Property cleanUpRetryCount: The maximum number of executions of cleanup phase.
Default to 1, which means no retry. Conditions that trigger a retry: (the relationship is or) 1.There are resources which fail to be cleaned up. 2.The cleanup is timeout.
CleanUpTimeout
Optional
public object CleanUpTimeout { get; set; }
- Type: object
Property cleanUpTimeout: The timeout seconds of executions of cleanup phase.
Default to 1 hour.
DisabledSideEffects
Optional
public object DisabledSideEffects { get; set; }
- Type: object
Property disabledSideEffects: Side effects to be disabled.
Cleaning up some resources will cause some side effects. If is not expected, use the property to disable them. The side effects can be found in response(ResourceCleaner) of API GetFeatureDetails.
ExcludedResources
Optional
public object ExcludedResources { get; set; }
- Type: object
Property excludedResources: Exclude parts from resources to be cleaned up.
FailureOption
Optional
public object FailureOption { get; set; }
- Type: object
Property failureOption: The failure option of cleanup phase: - Normal: Resource failure does not affect the resources that depend on it.
- Fast: Resource failure causes all resources that depend on it to fail. Default to Normal.
Mode
Optional
public object Mode { get; set; }
- Type: object
Property mode: The result mode of resource cleaner: - Strict: Any scanning or cleanup failure leads to the failure of the cleaner.
- Loose: Only a little scanning and cleanup failures lead to the failure of the cleaner. Most scanning failures will be ignored, failure messages can be found in ScanErrors or ResourceDetails. Most cleanup failures will be ignored, failure messages can be found in ResourceDetails. Default to Loose.
ResourceFilters
Optional
public object ResourceFilters { get; set; }
- Type: object
Property resourceFilters: Resource filters that ResourceCleaner uses to filter out the resources to be cleaned up during scanning.
Only one of ResourceFilters and Resources can be specified. There are two filtering behaviors(Effect): Allow and Deny. The filters work as below: 1.Any resource denied by any Deny filter will not be cleaned up. 2.Only resources allowed by some Allow filter and not denied by any Deny filter will be cleaned up. If filters are changed during resource update, ResourceCleaner requires to rescan. And if Action equals CleanUp, an error occurs.
Resources
Optional
public object Resources { get; set; }
- Type: object
Property resources: Resources to be cleaned up.
Only one of Resources and ResourceFilters can be specified.
ResourceTypeOrder
Optional
public object ResourceTypeOrder { get; set; }
- Type: object
Property resourceTypeOrder: This property takes effect only when property CleanUpAlgorithm is ResourceTypeOrder.
If it takes effect:
- Resources will be cleaned up in order from front to back.
- Resource with resource type not specified in this property will not be cleaned up.