Directly uploads a Generic artifact. The returned operation will complete once the resources are uploaded. Package, version, and file resources are created based on the uploaded artifact. Uploaded artifacts that conflict with existing resources will raise an ALREADY_EXISTS
error.
HTTP request
The URLs use gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
parent |
The resource name of the repository where the generic artifact will be uploaded. Authorization requires the following IAM permission on the specified resource
|
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "packageId": string, "versionId": string, "filename": string } |
Fields | |
---|---|
packageId |
The ID of the package of the generic artifact. If the package does not exist, a new package will be created. The |
versionId |
The ID of the version of the generic artifact. If the version does not exist, a new version will be created. The versionId must start and end with a letter or number, can only contain lowercase letters, numbers, hyphens and periods, i.e. [a-z0-9-.] and cannot exceed a total of 128 characters. Creating a version called |
filename |
The name of the file of the generic artifact to be uploaded. E.g. |
Response body
The response to upload a generic artifact.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"operation": {
object ( |
Fields | |
---|---|
operation |
Operation that will be returned to the user. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.