import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { AssociateRepositoryRequest, AssociateRepositoryResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; /** * @public * * The input for {@link AssociateRepositoryCommand}. */ export interface AssociateRepositoryCommandInput extends AssociateRepositoryRequest { } /** * @public * * The output of {@link AssociateRepositoryCommand}. */ export interface AssociateRepositoryCommandOutput extends AssociateRepositoryResponse, __MetadataBearer { } declare const AssociateRepositoryCommand_base: { new (input: AssociateRepositoryCommandInput): import("@smithy/core/client").CommandImpl; new (input: AssociateRepositoryCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions; }; /** *

Use to associate an Amazon Web Services CodeCommit repository or a repository 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. *

*
* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CodeGuruReviewerClient, AssociateRepositoryCommand } from "@aws-sdk/client-codeguru-reviewer"; // ES Modules import * // const { CodeGuruReviewerClient, AssociateRepositoryCommand } = require("@aws-sdk/client-codeguru-reviewer"); // CommonJS import * // import type { CodeGuruReviewerClientConfig } from "@aws-sdk/client-codeguru-reviewer"; * const config = {}; // type is CodeGuruReviewerClientConfig * const client = new CodeGuruReviewerClient(config); * const input = { // AssociateRepositoryRequest * Repository: { // Repository * CodeCommit: { // CodeCommitRepository * Name: "STRING_VALUE", // required * }, * Bitbucket: { // ThirdPartySourceRepository * Name: "STRING_VALUE", // required * ConnectionArn: "STRING_VALUE", // required * Owner: "STRING_VALUE", // required * }, * GitHubEnterpriseServer: { * Name: "STRING_VALUE", // required * ConnectionArn: "STRING_VALUE", // required * Owner: "STRING_VALUE", // required * }, * S3Bucket: { // S3Repository * Name: "STRING_VALUE", // required * BucketName: "STRING_VALUE", // required * }, * }, * ClientRequestToken: "STRING_VALUE", * Tags: { // TagMap * "": "STRING_VALUE", * }, * KMSKeyDetails: { // KMSKeyDetails * KMSKeyId: "STRING_VALUE", * EncryptionOption: "AWS_OWNED_CMK" || "CUSTOMER_MANAGED_CMK", * }, * }; * const command = new AssociateRepositoryCommand(input); * const response = await client.send(command); * // { // AssociateRepositoryResponse * // RepositoryAssociation: { // RepositoryAssociation * // AssociationId: "STRING_VALUE", * // AssociationArn: "STRING_VALUE", * // ConnectionArn: "STRING_VALUE", * // Name: "STRING_VALUE", * // Owner: "STRING_VALUE", * // ProviderType: "CodeCommit" || "GitHub" || "Bitbucket" || "GitHubEnterpriseServer" || "S3Bucket", * // State: "Associated" || "Associating" || "Failed" || "Disassociating" || "Disassociated", * // StateReason: "STRING_VALUE", * // LastUpdatedTimeStamp: new Date("TIMESTAMP"), * // CreatedTimeStamp: new Date("TIMESTAMP"), * // KMSKeyDetails: { // KMSKeyDetails * // KMSKeyId: "STRING_VALUE", * // EncryptionOption: "AWS_OWNED_CMK" || "CUSTOMER_MANAGED_CMK", * // }, * // S3RepositoryDetails: { // S3RepositoryDetails * // BucketName: "STRING_VALUE", * // CodeArtifacts: { // CodeArtifacts * // SourceCodeArtifactsObjectKey: "STRING_VALUE", // required * // BuildArtifactsObjectKey: "STRING_VALUE", * // }, * // }, * // }, * // Tags: { // TagMap * // "": "STRING_VALUE", * // }, * // }; * * ``` * * @param AssociateRepositoryCommandInput - {@link AssociateRepositoryCommandInput} * @returns {@link AssociateRepositoryCommandOutput} * @see {@link AssociateRepositoryCommandInput} for command's `input` shape. * @see {@link AssociateRepositoryCommandOutput} for command's `response` shape. * @see {@link CodeGuruReviewerClientResolvedConfig | config} for CodeGuruReviewerClient's `config` shape. * * @throws {@link AccessDeniedException} (client fault) *

You do not have sufficient access to perform this action.

* * @throws {@link ConflictException} (client fault) *

The requested operation would cause a conflict with the current state of a service * resource associated with the request. Resolve the conflict before retrying this request. *

* * @throws {@link InternalServerException} (server fault) *

The server encountered an internal error and is unable to complete the request.

* * @throws {@link ThrottlingException} (client fault) *

The request was denied due to request throttling.

* * @throws {@link ValidationException} (client fault) *

The input fails to satisfy the specified constraints.

* * @throws {@link CodeGuruReviewerServiceException} *

Base exception class for all service exceptions from CodeGuruReviewer service.

* * * @public */ export declare class AssociateRepositoryCommand extends AssociateRepositoryCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: AssociateRepositoryRequest; output: AssociateRepositoryResponse; }; sdk: { input: AssociateRepositoryCommandInput; output: AssociateRepositoryCommandOutput; }; }; }