Class CfnRepositoryAssociation

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:55.909Z") @Stability(Stable) public class CfnRepositoryAssociation extends CfnResource implements IInspectable
A CloudFormation AWS::CodeGuruReviewer::RepositoryAssociation.

This resource configures how Amazon CodeGuru Reviewer retrieves the source code to be reviewed. You can use an AWS CloudFormation template to create an association with the following repository types:

You cannot use a CloudFormation template to create an association with a GitHub repository.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.codegurureviewer.*;
 CfnRepositoryAssociation cfnRepositoryAssociation = CfnRepositoryAssociation.Builder.create(this, "MyCfnRepositoryAssociation")
         .name("name")
         .type("type")
         // the properties below are optional
         .bucketName("bucketName")
         .connectionArn("connectionArn")
         .owner("owner")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnRepositoryAssociation

      protected CfnRepositoryAssociation(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnRepositoryAssociation

      protected CfnRepositoryAssociation(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnRepositoryAssociation

      @Stability(Stable) public CfnRepositoryAssociation(@NotNull Construct scope, @NotNull String id, @NotNull CfnRepositoryAssociationProps props)
      Create a new AWS::CodeGuruReviewer::RepositoryAssociation.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      props -
      • resource properties.
      This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector -
      • tree inspector to collect and process attributes.
      This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrAssociationArn

      @Stability(Stable) @NotNull public String getAttrAssociationArn()
      The Amazon Resource Name (ARN) of the RepositoryAssociation object. You can retrieve this ARN by calling ListRepositories .
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      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.
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name of the repository.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name of the repository.
    • getType

      @Stability(Stable) @NotNull public String getType()
      The type of repository that contains the source code to be reviewed. The valid values are:.

      • CodeCommit
      • Bitbucket
      • GitHubEnterpriseServer
      • S3Bucket
    • setType

      @Stability(Stable) public void setType(@NotNull String value)
      The type of repository that contains the source code to be reviewed. The valid values are:.

      • CodeCommit
      • Bitbucket
      • GitHubEnterpriseServer
      • S3Bucket
    • getBucketName

      @Stability(Stable) @Nullable public String getBucketName()
      The name of the bucket.

      This is required for your S3Bucket repository. The name must start with the prefix codeguru-reviewer-* .

    • setBucketName

      @Stability(Stable) public void setBucketName(@Nullable String value)
      The name of the bucket.

      This is required for your S3Bucket repository. The name must start with the prefix codeguru-reviewer-* .

    • getConnectionArn

      @Stability(Stable) @Nullable public String getConnectionArn()
      The Amazon Resource Name (ARN) of an AWS 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 AWS CodeStar Connections API Reference .

      ConnectionArn must be specified for Bitbucket and GitHub Enterprise Server repositories. It has no effect if it is specified for an AWS CodeCommit repository.

    • setConnectionArn

      @Stability(Stable) public void setConnectionArn(@Nullable String value)
      The Amazon Resource Name (ARN) of an AWS 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 AWS CodeStar Connections API Reference .

      ConnectionArn must be specified for Bitbucket and GitHub Enterprise Server repositories. It has no effect if it is specified for an AWS CodeCommit repository.

    • getOwner

      @Stability(Stable) @Nullable public String getOwner()
      The owner of the repository.

      For a GitHub Enterprise Server or Bitbucket repository, this is the username for the account that owns the repository.

      Owner must be specified for Bitbucket and GitHub Enterprise Server repositories. It has no effect if it is specified for an AWS CodeCommit repository.

    • setOwner

      @Stability(Stable) public void setOwner(@Nullable String value)
      The owner of the repository.

      For a GitHub Enterprise Server or Bitbucket repository, this is the username for the account that owns the repository.

      Owner must be specified for Bitbucket and GitHub Enterprise Server repositories. It has no effect if it is specified for an AWS CodeCommit repository.