Class: AWSCDK::Codecommit::RepositoryProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
codecommit/repository_props.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(repository_name:, code: nil, description: nil, kms_key: nil) ⇒ RepositoryProps

Returns a new instance of RepositoryProps.

Parameters:

  • repository_name (String)

    Name of the repository.

  • code (AWSCDK::Codecommit::Code, nil) (defaults to: nil)

    The contents with which to initialize the repository after it has been created.

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

    A description of the repository.

  • kms_key (AWSCDK::Interfaces::AWSKMS::IKeyRef, nil) (defaults to: nil)

    The customer managed key used to encrypt and decrypt the data in repository.



10
11
12
13
14
15
16
17
18
19
# File 'codecommit/repository_props.rb', line 10

def initialize(repository_name:, code: nil, description: nil, kms_key: nil)
  @repository_name = repository_name
  Jsii::Type.check_type(@repository_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "repositoryName")
  @code = code
  Jsii::Type.check_type(@code, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWNvbW1pdC5Db2RlIn0=")), "code") unless @code.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @kms_key = kms_key
  Jsii::Type.check_type(@kms_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19rbXMuSUtleVJlZiJ9")), "kmsKey") unless @kms_key.nil?
end

Instance Attribute Details

#codeAWSCDK::Codecommit::Code? (readonly)

Note:

Default: - No initialization (create empty repo)

The contents with which to initialize the repository after it has been created.

Returns:



31
32
33
# File 'codecommit/repository_props.rb', line 31

def code
  @code
end

#descriptionString? (readonly)

Note:

Default: - No description.

A description of the repository.

Use the description to identify the purpose of the repository.

Returns:

  • (String, nil)


39
40
41
# File 'codecommit/repository_props.rb', line 39

def description
  @description
end

#kms_keyAWSCDK::Interfaces::AWSKMS::IKeyRef? (readonly)

Note:

Default: - Use an AWS managed key

The customer managed key used to encrypt and decrypt the data in repository.



44
45
46
# File 'codecommit/repository_props.rb', line 44

def kms_key
  @kms_key
end

#repository_nameString (readonly)

Name of the repository.

This property is required for all CodeCommit repositories.

Returns:

  • (String)


26
27
28
# File 'codecommit/repository_props.rb', line 26

def repository_name
  @repository_name
end

Class Method Details

.jsii_propertiesObject



46
47
48
49
50
51
52
53
# File 'codecommit/repository_props.rb', line 46

def self.jsii_properties
  {
    :repository_name => "repositoryName",
    :code => "code",
    :description => "description",
    :kms_key => "kmsKey",
  }
end

Instance Method Details

#to_jsiiObject



55
56
57
58
59
60
61
62
63
64
# File 'codecommit/repository_props.rb', line 55

def to_jsii
  result = {}
  result.merge!({
    "repositoryName" => @repository_name,
    "code" => @code,
    "description" => @description,
    "kmsKey" => @kms_key,
  })
  result.compact
end