# Working with repositories

{% hint style="info" %}
This page was generated from content adapted from the [AWS Developer Guide](https://github.com/awsdocs/aws-codeartifact-user-guide.git)
{% endhint %}

## Create a repository

* **Note**\
  After you create a repository, you cannot change its name, associated AWS account, or domain.
* **Note**\
  To create a repository with an upstream, you must have permission for the `AssociateWithDownstreamRepository` action on the upstream repository.

## View or modify a repository configuration

* **Note**\
  After you create a repository, you cannot change its name, associated AWS account, or domain.
* **Note**\
  To add an upstream repository, you must have permission for the `AssociateWithDownstreamRepository` action on the upstream repository.

## Repository policies

* **Note**\
  The `codeartifact:ReadFromRepository` action can only be used on a repository resource. You cannot put a package's Amazon Resource Name (ARN) as a resource with `codeartifact:ReadFromRepository` as the action to allow read access to a subset of packages in a repository. A given principal can either read all the packages in a repository or none of them.
* **Note**\
  You cannot grant permissions to another AWS account to update the resource policy on a repository using a resource policy, since the resource policy is ignored when calling put-repository-permissions-policy.
* **Important**\
  To grant permission to publish Maven and NuGet package versions, add the following permissions in addition to `codeartifact:PublishPackageVersion`.\
  NuGet: `codeartifact:ReadFromRepository` and specify the repository resource Maven: `codeartifact:PutPackageMetadata`

## Tag a repository

* **Note**\
  To get the ARN of the repository, run the `describe-repository` command:
* **Note**\
  To get the ARN of the repository, run the `describe-repository` command:
* **Note**\
  To get the ARN of the repository, run the `describe-repository` command:
* **Note**\
  If you delete a repository, all tag associations are removed from the deleted repository. You do not have to remove tags before you delete a repository.
* **Note**\
  To get the ARN of the repository, run the `describe-repository` command:


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://awsnotes.dendron.so/developer-tools/aws-codeartifact/topics/working-with-repositories.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
