CodeSource
- Implements: ICodeSource
This class encapsulates and extends the ROS resource type ALIYUN::PAI::CodeSource.
Initializers
import com.aliyun.ros.cdk.pai.CodeSource;
CodeSource.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.accessibility(java.lang.String)
.accessibility(IResolvable)
.codeRepo(java.lang.String)
.codeRepo(IResolvable)
.displayName(java.lang.String)
.displayName(IResolvable)
.mountPath(java.lang.String)
.mountPath(IResolvable)
.workspaceId(java.lang.String)
.workspaceId(IResolvable)
// .codeBranch(java.lang.String)
// .codeBranch(IResolvable)
// .codeCommit(java.lang.String)
// .codeCommit(IResolvable)
// .codeRepoAccessToken(java.lang.String)
// .codeRepoAccessToken(IResolvable)
// .codeRepoUserName(java.lang.String)
// .codeRepoUserName(IResolvable)
// .description(java.lang.String)
// .description(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. |
accessibility | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property accessibility: Visibility of the code configuration, possible values: - PRIVATE: In this workspace, it is only visible to you and the administrator. |
codeRepo | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property codeRepo: Code repository address. |
displayName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property displayName: Code source configuration name. |
mountPath | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property mountPath: The local Mount Directory of the code. |
workspaceId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property workspaceId: The ID of the workspace. |
codeBranch | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property codeBranch: Code repository branch. |
codeCommit | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property codeCommit: The code CommitId. |
codeRepoAccessToken | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property codeRepoAccessToken: The Token used to access the code repository. |
codeRepoUserName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property codeRepoUserName: The user name of the code repository. |
description | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property description: A detailed description of the code configuration. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
accessibilityRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property accessibility: Visibility of the code configuration, possible values: - PRIVATE: In this workspace, it is only visible to you and the administrator.
- PUBLIC: In this workspace, it is visible to everyone.
codeRepoRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property codeRepo: Code repository address.
displayNameRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property displayName: Code source configuration name.
mountPathRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property mountPath: The local Mount Directory of the code.
workspaceIdRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property workspaceId: The ID of the workspace.
codeBranchOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property codeBranch: Code repository branch.
codeCommitOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property codeCommit: The code CommitId.
codeRepoAccessTokenOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property codeRepoAccessToken: The Token used to access the code repository.
codeRepoUserNameOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property codeRepoUserName: The user name of the code repository.
descriptionOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property description: A detailed description of the code configuration.
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.pai.CodeSource;
CodeSource.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. |
attrAccessibility | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Accessibility: Visibility of the code configuration. |
attrCodeBranch | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute CodeBranch: Code repository branch. |
attrCodeCommit | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute CodeCommit: The code CommitId. |
attrCodeRepo | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute CodeRepo: Code repository address. |
attrCodeRepoAccessToken | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute CodeRepoAccessToken: The Token used to access the code repository. |
attrCodeRepoUserName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute CodeRepoUserName: The user name of the code repository. |
attrCodeSourcesId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute CodeSourcesId: The ID of the created code configuration. |
attrCreateTime | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute CreateTime: The creation time of the code. |
attrDescription | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Description: A detailed description of the code configuration. |
attrDisplayName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute DisplayName: Code source configuration name. |
attrGmtModifyTime | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute GmtModifyTime: Code configuration modification time. |
attrMountPath | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute MountPath: The local Mount Directory of the code. |
attrUserId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute UserId: The ID of the creator of the code configuration source. |
attrWorkspaceId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute WorkspaceId: The ID of the workspace. |
props | CodeSourceProps | 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
attrAccessibilityRequired
public java.lang.Object getAttrAccessibility();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Accessibility: Visibility of the code configuration.
attrCodeBranchRequired
public java.lang.Object getAttrCodeBranch();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute CodeBranch: Code repository branch.
attrCodeCommitRequired
public java.lang.Object getAttrCodeCommit();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute CodeCommit: The code CommitId.
attrCodeRepoRequired
public java.lang.Object getAttrCodeRepo();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute CodeRepo: Code repository address.
attrCodeRepoAccessTokenRequired
public java.lang.Object getAttrCodeRepoAccessToken();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute CodeRepoAccessToken: The Token used to access the code repository.
attrCodeRepoUserNameRequired
public java.lang.Object getAttrCodeRepoUserName();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute CodeRepoUserName: The user name of the code repository.
attrCodeSourcesIdRequired
public java.lang.Object getAttrCodeSourcesId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute CodeSourcesId: The ID of the created code configuration.
attrCreateTimeRequired
public java.lang.Object getAttrCreateTime();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute CreateTime: The creation time of the code.
attrDescriptionRequired
public java.lang.Object getAttrDescription();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Description: A detailed description of the code configuration.
attrDisplayNameRequired
public java.lang.Object getAttrDisplayName();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute DisplayName: Code source configuration name.
attrGmtModifyTimeRequired
public java.lang.Object getAttrGmtModifyTime();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute GmtModifyTime: Code configuration modification time.
The time format is iso8601.
attrMountPathRequired
public java.lang.Object getAttrMountPath();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute MountPath: The local Mount Directory of the code.
attrUserIdRequired
public java.lang.Object getAttrUserId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute UserId: The ID of the creator of the code configuration source.
attrWorkspaceIdRequired
public java.lang.Object getAttrWorkspaceId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute WorkspaceId: The ID of the workspace.
propsRequired
public CodeSourceProps getProps();
- Type: CodeSourceProps