AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the Amazon CodeGuru Reviewer AssociateRepository API operation.

Syntax

Register-CGRRepository
-CodeCommit_Name <String>
-S3Bucket_BucketName <String>
-ClientRequestToken <String>
-Bitbucket_ConnectionArn <String>
-GitHubEnterpriseServer_ConnectionArn <String>
-KMSKeyDetails_EncryptionOption <EncryptionOption>
-KMSKeyDetails_KMSKeyId <String>
-Bitbucket_Name <String>
-GitHubEnterpriseServer_Name <String>
-S3Bucket_Name <String>
-Bitbucket_Owner <String>
-GitHubEnterpriseServer_Owner <String>
-Tag <Hashtable>
-Select <String>
-PassThru <SwitchParameter>
-Force <SwitchParameter>

Description

Use to associate an Amazon Web Services CodeCommit repository or a repostory managed by Amazon Web Services CodeStar Connections with Amazon CodeGuru Reviewer. When you associate a repository, CodeGuru Reviewer reviews source code changes in the repository's pull requests and provides automatic recommendations. You can view recommendations using the CodeGuru Reviewer console. For more information, see Recommendations in Amazon CodeGuru Reviewer in the Amazon CodeGuru Reviewer User Guide. If you associate a CodeCommit or S3 repository, it must be in the same Amazon Web Services Region and Amazon Web Services account where its CodeGuru Reviewer code reviews are configured. Bitbucket and GitHub Enterprise Server repositories are managed by Amazon Web Services CodeStar Connections to connect to CodeGuru Reviewer. For more information, see Associate a repository in the Amazon CodeGuru Reviewer User Guide. You cannot use the CodeGuru Reviewer SDK or the Amazon Web Services CLI to associate a GitHub repository with Amazon CodeGuru Reviewer. To associate a GitHub repository, use the console. For more information, see Getting started with CodeGuru Reviewer in the CodeGuru Reviewer User Guide.

Parameters

-Bitbucket_ConnectionArn <String>
The Amazon Resource Name (ARN) of an Amazon Web Services CodeStar Connections connection. Its format is arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id. For more information, see Connection in the Amazon Web Services CodeStar Connections API Reference.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRepository_Bitbucket_ConnectionArn
-Bitbucket_Name <String>
The name of the third party source repository.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRepository_Bitbucket_Name
-Bitbucket_Owner <String>
The owner of the repository. For a GitHub, GitHub Enterprise, or Bitbucket repository, this is the username for the account that owns the repository. For an S3 repository, this can be the username or Amazon Web Services account ID.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRepository_Bitbucket_Owner
-ClientRequestToken <String>
Amazon CodeGuru Reviewer uses this value to prevent the accidental creation of duplicate repository associations if there are failures and retries.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-CodeCommit_Name <String>
The name of the Amazon Web Services CodeCommit repository. For more information, see repositoryName in the Amazon Web Services CodeCommit API Reference.
Required?False
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
AliasesRepository_CodeCommit_Name
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-GitHubEnterpriseServer_ConnectionArn <String>
The Amazon Resource Name (ARN) of an Amazon Web Services CodeStar Connections connection. Its format is arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id. For more information, see Connection in the Amazon Web Services CodeStar Connections API Reference.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRepository_GitHubEnterpriseServer_ConnectionArn
-GitHubEnterpriseServer_Name <String>
The name of the third party source repository.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRepository_GitHubEnterpriseServer_Name
-GitHubEnterpriseServer_Owner <String>
The owner of the repository. For a GitHub, GitHub Enterprise, or Bitbucket repository, this is the username for the account that owns the repository. For an S3 repository, this can be the username or Amazon Web Services account ID.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRepository_GitHubEnterpriseServer_Owner
-KMSKeyDetails_EncryptionOption <EncryptionOption>
The encryption option for a repository association. It is either owned by Amazon Web Services Key Management Service (KMS) (AWS_OWNED_CMK) or customer managed (CUSTOMER_MANAGED_CMK).
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-KMSKeyDetails_KMSKeyId <String>
The ID of the Amazon Web Services KMS key that is associated with a respository association.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PassThru <SwitchParameter>
Changes the cmdlet behavior to return the value passed to the CodeCommit_Name parameter. The -PassThru parameter is deprecated, use -Select '^CodeCommit_Name' instead. This parameter will be removed in a future version.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-S3Bucket_BucketName <String>
The name of the S3 bucket used for associating a new S3 repository. It must begin with codeguru-reviewer-.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRepository_S3Bucket_BucketName
-S3Bucket_Name <String>
The name of the repository in the S3 bucket.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRepository_S3Bucket_Name
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is 'RepositoryAssociation'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.CodeGuruReviewer.Model.AssociateRepositoryResponse). Specifying the name of a property of type Amazon.CodeGuruReviewer.Model.AssociateRepositoryResponse will result in that property being returned. Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Tag <Hashtable>
An array of key-value pairs used to tag an associated repository. A tag is a custom attribute label with two parts:
  • A tag key (for example, CostCenter, Environment, Project, or Secret). Tag keys are case sensitive.
  • An optional field known as a tag value (for example, 111122223333, Production, or a team name). Omitting the tag value is the same as using an empty string. Like tag keys, tag values are case sensitive.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTags

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet returns an Amazon.CodeGuruReviewer.Model.RepositoryAssociation object. The service call response (type Amazon.CodeGuruReviewer.Model.AssociateRepositoryResponse) can also be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Supported Version

AWS Tools for PowerShell: 2.x.y.z