Class: AWSCDK::CodeGuruReviewer::CfnRepositoryAssociationProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
code_guru_reviewer/cfn_repository_association_props.rb

Overview

Properties for defining a CfnRepositoryAssociation.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, type:, bucket_name: nil, connection_arn: nil, owner: nil, tags: nil) ⇒ CfnRepositoryAssociationProps

Returns a new instance of CfnRepositoryAssociationProps.

Parameters:

  • name (String)

    The name of the repository.

  • type (String)

    The type of repository that contains the source code to be reviewed. The valid values are:.

  • bucket_name (String, nil) (defaults to: nil)

    The name of the bucket.

  • connection_arn (String, nil) (defaults to: nil)

    The Amazon Resource Name (ARN) of an AWS CodeStar Connections connection.

  • owner (String, nil) (defaults to: nil)

    The owner of the repository.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    An array of key-value pairs used to tag an associated repository.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'code_guru_reviewer/cfn_repository_association_props.rb', line 15

def initialize(name:, type:, bucket_name: nil, connection_arn: nil, owner: nil, tags: nil)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type")
  @bucket_name = bucket_name
  Jsii::Type.check_type(@bucket_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bucketName") unless @bucket_name.nil?
  @connection_arn = connection_arn
  Jsii::Type.check_type(@connection_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "connectionArn") unless @connection_arn.nil?
  @owner = owner
  Jsii::Type.check_type(@owner, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "owner") unless @owner.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#bucket_nameString? (readonly)

The name of the bucket.

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



51
52
53
# File 'code_guru_reviewer/cfn_repository_association_props.rb', line 51

def bucket_name
  @bucket_name
end

#connection_arnString? (readonly)

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.



60
61
62
# File 'code_guru_reviewer/cfn_repository_association_props.rb', line 60

def connection_arn
  @connection_arn
end

#nameString (readonly)

The name of the repository.



34
35
36
# File 'code_guru_reviewer/cfn_repository_association_props.rb', line 34

def name
  @name
end

#ownerString? (readonly)

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.



69
70
71
# File 'code_guru_reviewer/cfn_repository_association_props.rb', line 69

def owner
  @owner
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

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.


79
80
81
# File 'code_guru_reviewer/cfn_repository_association_props.rb', line 79

def tags
  @tags
end

#typeString (readonly)

The type of repository that contains the source code to be reviewed. The valid values are:.

  • CodeCommit
  • Bitbucket
  • GitHubEnterpriseServer
  • S3Bucket


44
45
46
# File 'code_guru_reviewer/cfn_repository_association_props.rb', line 44

def type
  @type
end

Class Method Details

.jsii_propertiesObject



81
82
83
84
85
86
87
88
89
90
# File 'code_guru_reviewer/cfn_repository_association_props.rb', line 81

def self.jsii_properties
  {
    :name => "name",
    :type => "type",
    :bucket_name => "bucketName",
    :connection_arn => "connectionArn",
    :owner => "owner",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



92
93
94
95
96
97
98
99
100
101
102
103
# File 'code_guru_reviewer/cfn_repository_association_props.rb', line 92

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "type" => @type,
    "bucketName" => @bucket_name,
    "connectionArn" => @connection_arn,
    "owner" => @owner,
    "tags" => @tags,
  })
  result.compact
end