Selecione suas preferências de cookies

Usamos cookies essenciais e ferramentas semelhantes que são necessárias para fornecer nosso site e serviços. Usamos cookies de desempenho para coletar estatísticas anônimas, para que possamos entender como os clientes usam nosso site e fazer as devidas melhorias. Cookies essenciais não podem ser desativados, mas você pode clicar em “Personalizar” ou “Recusar” para recusar cookies de desempenho.

Se você concordar, a AWS e terceiros aprovados também usarão cookies para fornecer recursos úteis do site, lembrar suas preferências e exibir conteúdo relevante, incluindo publicidade relevante. Para aceitar ou recusar todos os cookies não essenciais, clique em “Aceitar” ou “Recusar”. Para fazer escolhas mais detalhadas, clique em “Personalizar”.

Add a tag when you create a CodeGuru Reviewer associated repository (AWS CLI)

Modo de foco
Add a tag when you create a CodeGuru Reviewer associated repository (AWS CLI) - Amazon CodeGuru Reviewer
Esta página não foi traduzida para seu idioma. Solicitar tradução

You can use the AWS CLI to add tags to an associated repository when you create it.

Note

Because you cannot use the AWS CLI to create a GitHub repository, you cannot use the AWS CLI to add tags to a GitHub repository when you create it. You can use the AWS CLI to add tags to an existing GitHub repository using tag-resource. You can also add tags when you create a GitHub repository association with the console.

To add a tag when you create a repository association
  1. Make sure that you have configured the AWS CLI with the AWS Region in which you want to create your code reviews. To verify the Region, run the following command at the command line or terminal and review the information for the default name.

    aws configure

    The default Region name must match the AWS Region for the repository in CodeCommit.

  2. Run the associate-repository command specifying the tags you want to add with the --tags parameter. Specify a tag's key and value using an equal symbol (for example, my-key=my-value). For more information about how to use associate-repository to create an association with your repository type, see one of the following:

    The following example adds 3 tags when you create an AWS CodeCommit repository association.

    aws codeguru-reviewer associate-repository --repository CodeCommit={Name=my-codecommit-repo} / --tags value-1=key-1,owner=admin,status=beta
  3. If successful, this command outputs a RepositoryAssociation object that includes an array with the 3 tags.

    { "RepositoryAssociation": { "AssociationId": "repository-association-uuid", "Name": "my-codecommit-repo", "LastUpdatedTimeStamp": 1595634764.029, "ProviderType": "CodeCommit", "CreatedTimeStamp": 1595634764.029, "Owner": "123456789012", "State": "Associating", "StateReason": "Pending Repository Association", "AssociationArn": "arn:aws:codeguru-reviewer:us-west-2:123456789012:association:repository-association-uuid", }, "Tags": { "owner": "admin", "status": "beta", "value-1": "key-1", } }
PrivacidadeTermos do sitePreferências de cookies
© 2025, Amazon Web Services, Inc. ou suas afiliadas. Todos os direitos reservados.