Creates an artifact.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
computenestsupplier:CreateArtifact |
create |
*Artifact
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ArtifactId |
string |
No |
The artifact ID. This parameter is required to create a new version of an existing artifact. You can call the ListArtifacts operation to obtain the artifact ID. |
artifact-eea08d1e2d3a43ae**** |
| ArtifactType |
string |
Yes |
The artifact type. Valid values:
|
EcsImage |
| ArtifactBuildType |
string |
No |
The type of the artifact to be built. Valid values:
|
Dockerflie |
| Name |
string |
Yes |
The artifact name. |
Redhat8_5镜像 |
| VersionName |
string |
Yes |
The name of the artifact version. |
v1 |
| Description |
string |
No |
The description of the artifact. |
Redhat8_0镜像 |
| ArtifactProperty |
object |
No |
The content of the artifact. |
|
| Url |
string |
No |
The URL of the file artifact. Upload a file and obtain its URL in the Object Storage Service console. |
https://service-info-private.oss-cn-hangzhou.aliyuncs.com/130920852876****/template/2e1ce8fc-****-481c-9e8e-789ba9db487d.json |
| RegionId |
string |
No |
The region of the image. Note
This parameter can be set only when the artifact is an image artifact. |
cn-hangzhou |
| ImageId |
string |
No |
The image ID. After you specify a region ID, call the DescribeImages operation to view the available image IDs in the specified region. Note
This parameter can be set only when the artifact is an image artifact. |
m-uf645fnsef9dsxmw**** |
| CommodityCode |
string |
No |
The commodity code of the product in Alibaba Cloud Marketplace. Obtain the commodity code in the Alibaba Cloud Marketplace console. Note
This parameter can be set only when the artifact is an image artifact. |
cmjj00**** |
| CommodityVersion |
string |
No |
The version of the product in Alibaba Cloud Marketplace. View the product version on the Alibaba Cloud Marketplace page. Note
This parameter can be set only when the artifact is an image artifact. |
V1.0 |
| RepoName |
string |
No |
The name of the image repository. Note
This parameter can be set only when the artifact is a container image artifact or a Helm chart artifact. |
wordpress |
| RepoId |
string |
No |
The ID of the image repository. Call the ListAcrImageRepositories operation to obtain the image repository ID. Note
This parameter can be set only when the artifact is a container image artifact or a Helm chart artifact. |
crr-d8o1nponyc2t**** |
| Tag |
string |
No |
The version of the image in the image repository. Call the ListAcrImageTags operation to obtain the version of the image in the image repository. Note
This parameter can be set only when the artifact is a container image artifact or a Helm chart artifact. |
v1 |
| RepoType |
string |
No |
The type of the repository. Valid values: Public and Private. |
Public |
| SupportRegionIds |
array |
No |
The regions where the image can be distributed. |
|
|
string |
No |
The region where the image can be distributed. Note
This parameter can be set only when the artifact is an ECS image artifact. |
cn-hangzhou |
|
| ResourceGroupId |
string |
No |
The ID of the resource group. |
rg-acfm2jfvb7b**** |
| Tag |
array<object> |
No |
The custom tags. |
|
|
object |
No |
The custom tag. |
||
| Key |
string |
No |
The tag key. |
key1 |
| Value |
string |
No |
The tag value. |
value1 |
| ArtifactBuildProperty |
object |
No |
The content used to build the artifact. This parameter is used for managed artifact builds. |
|
| CommandType |
string |
No |
The command type. Valid values:
Note
This parameter can be set only when the artifact is an ECS image artifact. |
RunShellScript |
| CommandContent |
string |
No |
The content of the command. Note
This parameter can be set only when the artifact is an ECS image artifact. |
echo "start run command" |
| SourceImageId |
string |
No |
The source image ID. The following types are supported:
Note
This parameter can be set only when the artifact is an ECS image artifact. |
镜像ID:m-t4nhenrdc38pe4***** ubuntu_22_04_x64_20G_alibase_20240926.vhd oos公共参数名称:aliyun/services/computenest/images/aliyun_3_2104_python_3_11 |
| RegionId |
string |
No |
The ID of the region where the source image is located. Note
This parameter can be set only when the artifact is an ECS image artifact. |
cn-hangzhou |
| CodeRepo |
object |
No |
The code repository address. Note
This parameter can be set only when ArtifactBuildType is set to Dockerfile or Buildpacks. |
|
| Platform |
string |
No |
The platform where the code repository is located. Valid values:
|
github |
| RepoName |
string |
No |
The repository name. |
aliyun-computenest/quickstart-Lobexxx |
| Owner |
string |
No |
The owner of the code repository. Note
This parameter is required only when the code repository is a private repository. |
aliyun-computenest |
| Branch |
string |
No |
The name of the code repository branch. |
main |
| Endpoint |
string |
No |
The endpoint. This parameter is required for a private GitLab deployment. |
http://121.40.25.0 |
| OrgId |
string |
No |
The organization ID. |
455231 |
| RepoId |
integer |
No |
The repository ID. |
103 |
| DockerfilePath |
string |
No |
The relative address of the Dockerfile file in the code repository. Default value: Dockerfile. Note
This parameter can be set only when ArtifactBuildType is set to Dockerfile. |
./file/Dockerfile |
| BuildArgs |
array<object> |
No |
The build arguments. Note
This parameter can be set only when ArtifactBuildType is set to Dockerfile. |
|
|
object |
No |
Used for docker build --build-arg. |
||
| ArgumentName |
string |
No |
The name of the build argument. |
ENV |
| ArgumentValue |
string |
No |
The value of the build argument. |
nginx:latest |
| SourceContainerImage |
string |
No |
The pull address of the source container image. Used for docker pull ${SourceContainerImage}. Note
This parameter can be set only when ArtifactBuildType is set to ContainerImage. |
pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel |
| SystemDiskSize |
integer |
No |
The size of the system disk. Unit: GiB. |
40 |
| EnableGpu |
boolean |
No |
Specifies whether to use a GPU-accelerated instance. By default, a CPU-powered instance is used. |
false |
| ClientToken |
string |
No |
Ensures the idempotence of the request. |
10CM943JP0EN9D51H |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
E73F09DC-6C13-5CB1-A10F-7A4E125ABD2C |
| ArtifactId |
string |
The artifact ID. |
artifact-eea08d1e2d3a43ae**** |
| ArtifactType |
string |
The artifact type. |
EcsImage |
| Name |
string |
The artifact name. |
Redhat8_5镜像 |
| VersionName |
string |
The name of the artifact version. |
v1 |
| ArtifactVersion |
string |
The artifact version. |
2 |
| Description |
string |
The description of the artifact. |
Redhat8_0镜像 |
| GmtModified |
string |
The time when the artifact was modified. |
2022-11-11T12:00:00Z |
| Status |
string |
The status of the artifact. |
Created |
| MaxVersion |
integer |
The latest version of the artifact. |
1 |
| ArtifactProperty |
string |
The content of the artifact. |
{\"CommodityCode\":\"cmjj0005****\",\"CommodityVersion\":\"V2022****\"} |
| SupportRegionIds |
string |
The IDs of the regions to which the artifact is distributed. |
[ "cn-beijing", "cn-hangzhou", "cn-shanghai" ] |
| StatusDetail |
string |
The description of the artifact status. |
"/usr/local/share/aliyun-assist/work/script/t-hz04zm90y6og0sg.sh: line 1: pip: command not found" |
| ArtifactBuildProperty |
string |
The content used to build the artifact. This parameter is used for managed artifact builds. |
"{\"RegionId\":\"xxx\", \"SourceImageId\":\"xxx\", \"\":\"xxx\", \"CommandType\":\"xxx\", \"CommandContent\":\"xxx\"}" |
| ArtifactBuildType |
string |
The type of the built artifact. |
Dockerfile |
Examples
Success response
JSON format
{
"RequestId": "E73F09DC-6C13-5CB1-A10F-7A4E125ABD2C",
"ArtifactId": "artifact-eea08d1e2d3a43ae****",
"ArtifactType": "EcsImage",
"Name": "Redhat8_5镜像",
"VersionName": "v1",
"ArtifactVersion": "2",
"Description": "Redhat8_0镜像",
"GmtModified": "2022-11-11T12:00:00Z",
"Status": "Created",
"MaxVersion": 1,
"ArtifactProperty": "{\\\"CommodityCode\\\":\\\"cmjj0005****\\\",\\\"CommodityVersion\\\":\\\"V2022****\\\"}",
"SupportRegionIds": "[\n\t\t\t\"cn-beijing\",\n\t\t\t\"cn-hangzhou\",\n\t\t\t\"cn-shanghai\"\n\t\t]",
"StatusDetail": "\"/usr/local/share/aliyun-assist/work/script/t-hz04zm90y6og0sg.sh: line 1: pip: command not found\"",
"ArtifactBuildProperty": "\"{\\\"RegionId\\\":\\\"xxx\\\", \\\"SourceImageId\\\":\\\"xxx\\\", \\\"\\\":\\\"xxx\\\", \\\"CommandType\\\":\\\"xxx\\\", \\\"CommandContent\\\":\\\"xxx\\\"}\"",
"ArtifactBuildType": "Dockerfile"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.