Directly uploads a Go module. The returned Operation will complete once the Go module is uploaded. Package, Version, and File resources are created based on the uploaded Go module.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-13 UTC."],[[["\u003cp\u003eThis document describes the process of directly uploading a Go module, which, upon completion, results in the creation of Package, Version, and File resources.\u003c/p\u003e\n"],["\u003cp\u003eThe process involves an HTTP request with specific location options, adhering to gRPC Transcoding syntax for URLs.\u003c/p\u003e\n"],["\u003cp\u003eThe resource \u003ccode\u003eparent\u003c/code\u003e is a required path parameter that represents the repository's name, and its usage necessitates the \u003ccode\u003eartifactregistry.gomodules.create\u003c/code\u003e IAM permission.\u003c/p\u003e\n"],["\u003cp\u003eUploading a Go module requires an empty request body, with the response containing an Operation object representing the ongoing upload.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization for this action requires the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope, as further explained in the Authentication Overview.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.repositories.goModules.upload\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.UploadGoModuleMediaResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Examples](#examples)\n- [Try it!](#try-it)\n\nDirectly uploads a Go module. The returned Operation will complete once the Go module is uploaded. Package, Version, and File resources are created based on the uploaded Go module.\n\n### HTTP request\n\nChoose a location: \nglobal europe-west3 europe-west8 europe-west9 us-central1 us-east1 us-east4 us-east5 us-south1 us-west1 us-west2 us-west3 us-west4 me-central2 us eu \n\n\u003cbr /\u003e\n\nThe URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nThe response to upload a Go module.\n\nIf successful, the response body contains data with the following structure:\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]