googleapis / python-artifact-registry

This library has moved to https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-artifact-registry
Apache License 2.0
11 stars 13 forks source link

Documentation ins unclear of "parent" argument when creating a repository #207

Closed g-emarco closed 1 year ago

g-emarco commented 1 year ago

Environment details

Go to the generated doc page: https://cloud.google.com/python/docs/reference/artifactregistry/latest/google.cloud.artifactregistry_v1.services.artifact_registry.ArtifactRegistryClient#google_cloud_artifactregistry_v1_services_artifact_registry_ArtifactRegistryClient_create_repository

Description:

In the CreateRepositoryRequest documentation it says in the function documetnation that:

` r"""The request to create a new repository.

Attributes:
    parent (str):
        Required. The name of the parent resource
        where the repository will be created.
    repository_id (str):
        The repository id to use for this repository.
    repository (google.cloud.artifactregistry_v1beta2.types.Repository):
        The repository to be created.
"""`

However it is unclear what is the "resource" for the argument parent, it is not clear what to put in this argument. Also, in the docs link, the example shown doesn't imply or hint what should sent in this argument.

Thanks!

parthea commented 1 year ago

Hi @g-emarco,

I'm sorry for the delay in responding.

The parent should be populated as follows.

parent="projects/<PROJECT_ID>/locations/<LOCATION>"

For reference, see https://cloud.google.com/artifact-registry/docs/reference/rest/v1/projects.locations.repositories/create for the REST API which shows the format as parent=projects/*/locations/*

I'm going to close this issue but please feel free to open a new issue if you're still having trouble.