ScanRule
- Implements: IScanRule
This class encapsulates and extends the ROS resource type ALIYUN::CR::ScanRule.
Initializers
import com.aliyun.ros.cdk.cr.ScanRule;
ScanRule.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.instanceId(java.lang.String)
.instanceId(IResolvable)
.repoTagFilterPattern(java.lang.String)
.repoTagFilterPattern(IResolvable)
.ruleName(java.lang.String)
.ruleName(IResolvable)
.scanScope(java.lang.String)
.scanScope(IResolvable)
.scanType(java.lang.String)
.scanType(IResolvable)
.triggerType(java.lang.String)
.triggerType(IResolvable)
// .namespaces(IResolvable)
// .namespaces(java.util.List<java.lang.String)
// .namespaces(IResolvable>)
// .repoNames(IResolvable)
// .repoNames(java.util.List<java.lang.String)
// .repoNames(IResolvable>)
.build();
| Name | Type | Description |
|---|---|---|
scope | com.aliyun.ros.cdk.core.Construct | No description. |
id | java.lang.String | No description. |
enableResourcePropertyConstraint | java.lang.Boolean | No description. |
instanceId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property instanceId: ACR Instance ID. |
repoTagFilterPattern | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property repoTagFilterPattern: The tag that triggers the scan matches the regular expression. |
ruleName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property ruleName: The scan rule name. |
scanScope | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property scanScope: The scan scope. |
scanType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property scanType: The scan type. |
triggerType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property triggerType: Trigger type. |
namespaces | com.aliyun.ros.cdk.core.IResolvable OR java.util.List | Property namespaces: The list of namespaces. |
repoNames | com.aliyun.ros.cdk.core.IResolvable OR java.util.List | Property repoNames: The list of repositories.* When the scan scope is NAMESPACE, this parameter must be empty. * When the scan scope is REPO, this parameter cannot be empty. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
instanceIdRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property instanceId: ACR Instance ID.
repoTagFilterPatternRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property repoTagFilterPattern: The tag that triggers the scan matches the regular expression.
ruleNameRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property ruleName: The scan rule name.
scanScopeRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property scanScope: The scan scope.
Valid values: NAMESPACE: namespace. REPO: repository. INSTANCE: CR instance.
scanTypeRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property scanType: The scan type.
Valid values:
- VUL: Products Cloud Security Scanner.
- SBOM: Product Content Analysis.
triggerTypeRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property triggerType: Trigger type.
Valid values:
- AUTO: automatically trigger.
- MANUAL: manually trigger.
namespacesOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property namespaces: The list of namespaces.
- When the scan scope is NAMESPACE, this parameter cannot be empty.
- If the scan scope is REPO, you must specify a unique Namespace for this parameter.
repoNamesOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property repoNames: The list of repositories.* When the scan scope is NAMESPACE, this parameter must be empty. * When the scan scope is REPO, this parameter cannot be empty.
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
public java.lang.String toString()
Returns a string representation of this construct.
synthesize
public 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: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
fetchCondition
public RosCondition fetchCondition()
fetchDependency
public java.util.List<java.lang.String> fetchDependency()
fetchResourceDesc
public java.lang.String fetchResourceDesc()
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- Type: java.lang.Object
Static Functions
| Name | Description |
|---|---|
isConstruct | Return whether the given object is a Construct. |
isConstruct
import com.aliyun.ros.cdk.cr.ScanRule;
ScanRule.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- Type: java.lang.Object
Properties
| Name | Type | Description |
|---|---|---|
node | com.aliyun.ros.cdk.core.ConstructNode | The construct tree node associated with this construct. |
env | com.aliyun.ros.cdk.core.IResourceEnvironment | The environment this resource belongs to. |
ref | java.lang.String | No description. |
stack | com.aliyun.ros.cdk.core.Stack | The stack in which this resource is defined. |
resource | com.aliyun.ros.cdk.core.RosResource | No description. |
attrCreateTime | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute CreateTime: Creation time of the scan rule. |
attrInstanceId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute InstanceId: ACR Instance ID. |
attrNamespaces | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Namespaces: The list of namespaces. |
attrRepoNames | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute RepoNames: The list of repositories. |
attrRepoTagFilterPattern | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute RepoTagFilterPattern: The tag that triggers the scan matches the regular expression. |
attrRuleName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute RuleName: The scan rule name. |
attrScanRuleId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ScanRuleId: The ID of the scan rule. |
attrScanScope | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ScanScope: The scan scope. |
attrScanType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ScanType: The scan type. |
attrTriggerType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute TriggerType: Trigger type. |
attrUpdateTime | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute UpdateTime: Change time of the scan rule. |
props | ScanRuleProps | No description. |
nodeRequired
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
envRequired
public IResourceEnvironment getEnv();
- Type: com.aliyun.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 java.lang.String getRef();
- Type: java.lang.String
stackRequired
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resourceOptional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrCreateTimeRequired
public java.lang.Object getAttrCreateTime();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute CreateTime: Creation time of the scan rule.
attrInstanceIdRequired
public java.lang.Object getAttrInstanceId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute InstanceId: ACR Instance ID.
attrNamespacesRequired
public java.lang.Object getAttrNamespaces();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Namespaces: The list of namespaces.
attrRepoNamesRequired
public java.lang.Object getAttrRepoNames();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute RepoNames: The list of repositories.
attrRepoTagFilterPatternRequired
public java.lang.Object getAttrRepoTagFilterPattern();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute RepoTagFilterPattern: The tag that triggers the scan matches the regular expression.
attrRuleNameRequired
public java.lang.Object getAttrRuleName();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute RuleName: The scan rule name.
attrScanRuleIdRequired
public java.lang.Object getAttrScanRuleId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ScanRuleId: The ID of the scan rule.
attrScanScopeRequired
public java.lang.Object getAttrScanScope();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ScanScope: The scan scope.
attrScanTypeRequired
public java.lang.Object getAttrScanType();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ScanType: The scan type.
attrTriggerTypeRequired
public java.lang.Object getAttrTriggerType();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute TriggerType: Trigger type.
attrUpdateTimeRequired
public java.lang.Object getAttrUpdateTime();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute UpdateTime: Change time of the scan rule.
propsRequired
public ScanRuleProps getProps();
- Type: ScanRuleProps