CreateArtifact
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 when you create a new version for 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 build artifact type. Valid values:
|
Dockerflie |
| Name |
string |
Yes |
The artifact name. |
Redhat8_5 image |
| VersionName |
string |
Yes |
The artifact version name. |
v1 |
| Description |
string |
No |
The artifact description. |
Redhat8_0 image |
| ArtifactProperty |
object |
No |
The artifact properties. |
|
| Url |
string |
No |
The URL of the file artifact. You can upload the file and obtain the file URL in the OSS 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 is valid only when the artifact is an image artifact. |
cn-hangzhou |
| ImageId |
string |
No |
The image ID. After you specify RegionId, you can call the DescribeImages operation to query the available image IDs in the specified region. Note
This parameter is valid only when the artifact is an image artifact. |
m-uf645fnsef9dsxmw**** |
| CommodityCode |
string |
No |
The commodity code in Alibaba Cloud Marketplace. You can obtain the commodity code in the Alibaba Cloud Marketplace console. Note
This parameter is valid only when the artifact is an image artifact. |
cmjj00**** |
| CommodityVersion |
string |
No |
The commodity version in Alibaba Cloud Marketplace. You can view the commodity version on the Alibaba Cloud Marketplace page. Note
This parameter is valid only when the artifact is an image artifact. |
V1.0 |
| RepoName |
string |
No |
The name of the image repository. Note
This parameter is valid only when the artifact is a container image artifact or a Helm chart artifact. |
wordpress |
| RepoId |
string |
No |
The image repository ID. You can call the ListAcrImageRepositories operation to obtain the image repository ID. Note
This parameter is valid only when the artifact is a container image artifact or a Helm chart artifact. |
crr-d8o1nponyc2t**** |
| Tag |
string |
No |
Image version of the image repository. You can call the ListAcrImageTags operation to obtain image version of the image repository. Note
This parameter is valid only when the artifact is a container image artifact or a Helm chart artifact. |
v1 |
| RepoType |
string |
No |
The repository type. Valid values: Public and Private. |
Public |
| SupportRegionIds |
array |
No |
The regions where image distribution is supported. |
|
|
string |
No |
The regions where image distribution is supported. Note
This parameter is valid only when the artifact is an ECS image artifact. |
cn-hangzhou |
|
| ResourceGroupId |
string |
No |
The resource group ID. |
rg-acfm2jfvb7b**** |
| Tag |
array<object> |
No |
The custom tags. |
|
|
object |
No |
The custom tags. |
||
| Key |
string |
No |
The tag key. |
key1 |
| Value |
string |
No |
The tag value. |
value1 |
| ArtifactBuildProperty |
object |
No |
The artifact build properties, which are used to build managed artifacts. |
|
| CommandType |
string |
No |
The command type. Valid values:
Note
This parameter is valid only when the artifact is an ECS image artifact. |
RunShellScript |
| CommandContent |
string |
No |
The command content. Note
This parameter is valid only when the artifact is an ECS image artifact. |
echo "start run command" |
| SourceImageId |
string |
No |
The source image ID. Two types are supported:
Note
This parameter is valid only when the artifact is an ECS image artifact. |
Image ID: m-t4nhenrdc38pe4***** ubuntu_22_04_x64_20G_alibase_20240926.vhd OOS public parameter name: aliyun/services/computenest/images/aliyun_3_2104_python_3_11 |
| RegionId |
string |
No |
The region ID of the source image. Note
This parameter is valid only when the artifact is an ECS image artifact. |
cn-hangzhou |
| CodeRepo |
object |
No |
The code repository address. Note
This parameter is valid only when ArtifactBuildType is set to Dockerfile or Buildpacks. |
|
| Platform |
string |
No |
The platform where the code repository is hosted. 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 private. |
aliyun-computenest |
| Branch |
string |
No |
The branch name of the code repository. |
main |
| Endpoint |
string |
No |
The endpoint. This parameter is required for private deployments of GitLab. |
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 in the code repository. Default value: Dockerfile. Note
This parameter is valid only when the ArtifactBuildType Settings is Dockerfile. |
./file/Dockerfile |
| BuildArgs |
array<object> |
No |
The build arguments. Note
This parameter is valid only when ArtifactBuildType is set to Dockerfile. |
|
|
object |
No |
This parameter is used for the docker build --build-arg command. |
||
| 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. This parameter is used for docker pull ${SourceContainerImage}. Note
This parameter is valid only when ArtifactBuildType is set to ContainerImage. |
pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel |
| SystemDiskSize |
integer |
No |
The system cloud disk size. Unit: GiB. |
40 |
| EnableGpu |
boolean |
No |
Specifies whether a GPU is required. By default, a CPU instance is used. |
false |
| ClientToken |
string |
No |
The client token that is used to ensure idempotence. |
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 image |
| VersionName |
string |
The artifact name. |
v1 |
| ArtifactVersion |
string |
The artifact version. |
2 |
| Description |
string |
The artifact description. |
Redhat8_0 image |
| GmtModified |
string |
The update time. |
2022-11-11T12:00:00Z |
| Status |
string |
The artifact status. |
Created |
| MaxVersion |
integer |
The latest version of the artifact. |
1 |
| ArtifactProperty |
string |
The artifact properties. |
{\"CommodityCode\":\"cmjj0005****\",\"CommodityVersion\":\"V2022****\"} |
| SupportRegionIds |
string |
The region IDs where the artifact is distributed. |
[ "cn-beijing", "cn-hangzhou", "cn-shanghai" ] |
| StatusDetail |
string |
The status description of the artifact. |
"/usr/local/share/aliyun-assist/work/script/t-hz04zm90y6og0sg.sh: line 1: pip: command not found" |
| ArtifactBuildProperty |
string |
The artifact build properties, which are used to build managed artifacts. |
"{\"RegionId\":\"xxx\", \"SourceImageId\":\"xxx\", \"\":\"xxx\", \"CommandType\":\"xxx\", \"CommandContent\":\"xxx\"}" |
| ArtifactBuildType |
string |
The build artifact type. |
Dockerfile |
Examples
Success response
JSON format
{
"RequestId": "E73F09DC-6C13-5CB1-A10F-7A4E125ABD2C",
"ArtifactId": "artifact-eea08d1e2d3a43ae****",
"ArtifactType": "EcsImage",
"Name": "Redhat8_5 image",
"VersionName": "v1",
"ArtifactVersion": "2",
"Description": "Redhat8_0 image",
"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.