Class CfnRepositoryAssociation
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
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:
- AWS CodeCommit - For more information, see Create an AWS CodeCommit repository association in the Amazon CodeGuru Reviewer User Guide .
- Bitbucket - For more information, see Create a Bitbucket repository association in the Amazon CodeGuru Reviewer User Guide .
- GitHub Enterprise Server - For more information, see Create a GitHub Enterprise Server repository association in the Amazon CodeGuru Reviewer User Guide .
- S3Bucket - For more information, see Create code reviews with GitHub Actions in the Amazon CodeGuru Reviewer User Guide .
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();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnRepositoryAssociation.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnRepositoryAssociation(Construct scope, String id, CfnRepositoryAssociationProps props) Create a newAWS::CodeGuruReviewer::RepositoryAssociation.protectedCfnRepositoryAssociation(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnRepositoryAssociation(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionThe Amazon Resource Name (ARN) of theRepositoryAssociationobject.The name of the bucket.The Amazon Resource Name (ARN) of an AWS CodeStar Connections connection.getName()The name of the repository.getOwner()The owner of the repository.getTags()An array of key-value pairs used to tag an associated repository.getType()The type of repository that contains the source code to be reviewed.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetBucketName(String value) The name of the bucket.voidsetConnectionArn(String value) The Amazon Resource Name (ARN) of an AWS CodeStar Connections connection.voidThe name of the repository.voidThe owner of the repository.voidThe type of repository that contains the source code to be reviewed.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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 newAWS::CodeGuruReviewer::RepositoryAssociation.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrAssociationArn
The Amazon Resource Name (ARN) of theRepositoryAssociationobject. You can retrieve this ARN by callingListRepositories. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
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, orSecret). 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.
- A tag key (for example,
-
getName
The name of the repository. -
setName
The name of the repository. -
getType
The type of repository that contains the source code to be reviewed. The valid values are:.CodeCommitBitbucketGitHubEnterpriseServerS3Bucket
-
setType
The type of repository that contains the source code to be reviewed. The valid values are:.CodeCommitBitbucketGitHubEnterpriseServerS3Bucket
-
getBucketName
The name of the bucket.This is required for your S3Bucket repository. The name must start with the prefix
codeguru-reviewer-*. -
setBucketName
The name of the bucket.This is required for your S3Bucket repository. The name must start with the prefix
codeguru-reviewer-*. -
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 .ConnectionArnmust be specified for Bitbucket and GitHub Enterprise Server repositories. It has no effect if it is specified for an AWS CodeCommit repository. -
setConnectionArn
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 .ConnectionArnmust be specified for Bitbucket and GitHub Enterprise Server repositories. It has no effect if it is specified for an AWS CodeCommit repository. -
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.
Ownermust be specified for Bitbucket and GitHub Enterprise Server repositories. It has no effect if it is specified for an AWS CodeCommit repository. -
setOwner
The owner of the repository.For a GitHub Enterprise Server or Bitbucket repository, this is the username for the account that owns the repository.
Ownermust be specified for Bitbucket and GitHub Enterprise Server repositories. It has no effect if it is specified for an AWS CodeCommit repository.
-