Class: AWSCDK::Sagemaker::CfnCodeRepositoryProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
sagemaker/cfn_code_repository_props.rb

Overview

Properties for defining a CfnCodeRepository.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(git_config:, code_repository_name: nil, tags: nil) ⇒ CfnCodeRepositoryProps

Returns a new instance of CfnCodeRepositoryProps.

Parameters:

  • git_config (AWSCDK::IResolvable, AWSCDK::Sagemaker::CfnCodeRepository::GitConfigProperty)

    Configuration details for the Git repository, including the URL where it is located and the ARN of the AWS Secrets Manager secret that contains the credentials used to access the repository.

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

    The name of the Git repository.

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

    List of tags for Code Repository.



12
13
14
15
16
17
18
19
# File 'sagemaker/cfn_code_repository_props.rb', line 12

def initialize(git_config:, code_repository_name: nil, tags: nil)
  @git_config = git_config.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnCodeRepository::GitConfigProperty.new(**git_config.transform_keys(&:to_sym)) : git_config
  Jsii::Type.check_type(@git_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuQ29kZVJlcG9zaXRvcnkuR2l0Q29uZmlnUHJvcGVydHkifV19fQ==")), "gitConfig")
  @code_repository_name = code_repository_name
  Jsii::Type.check_type(@code_repository_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "codeRepositoryName") unless @code_repository_name.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

#code_repository_nameString? (readonly)

The name of the Git repository.



30
31
32
# File 'sagemaker/cfn_code_repository_props.rb', line 30

def code_repository_name
  @code_repository_name
end

#git_configAWSCDK::IResolvable, AWSCDK::Sagemaker::CfnCodeRepository::GitConfigProperty (readonly)

Configuration details for the Git repository, including the URL where it is located and the ARN of the AWS Secrets Manager secret that contains the credentials used to access the repository.



25
26
27
# File 'sagemaker/cfn_code_repository_props.rb', line 25

def git_config
  @git_config
end

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

List of tags for Code Repository.



35
36
37
# File 'sagemaker/cfn_code_repository_props.rb', line 35

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



37
38
39
40
41
42
43
# File 'sagemaker/cfn_code_repository_props.rb', line 37

def self.jsii_properties
  {
    :git_config => "gitConfig",
    :code_repository_name => "codeRepositoryName",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



45
46
47
48
49
50
51
52
53
# File 'sagemaker/cfn_code_repository_props.rb', line 45

def to_jsii
  result = {}
  result.merge!({
    "gitConfig" => @git_config,
    "codeRepositoryName" => @code_repository_name,
    "tags" => @tags,
  })
  result.compact
end