Class: AWSCDK::Sagemaker::CfnCodeRepository::GitConfigProperty

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

Overview

Specifies configuration details for a Git repository in your AWS account.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(repository_url:, branch: nil, secret_arn: nil) ⇒ GitConfigProperty

Returns a new instance of GitConfigProperty.

Parameters:

  • repository_url (String)

    The URL where the Git repository is located.

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

    The default branch for the Git repository.

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

    The Amazon Resource Name (ARN) of the AWS Secrets Manager secret that contains the credentials used to access the git repository.



556
557
558
559
560
561
562
563
# File 'sagemaker/cfn_code_repository.rb', line 556

def initialize(repository_url:, branch: nil, secret_arn: nil)
  @repository_url = repository_url
  Jsii::Type.check_type(@repository_url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "repositoryUrl")
  @branch = branch
  Jsii::Type.check_type(@branch, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "branch") unless @branch.nil?
  @secret_arn = secret_arn
  Jsii::Type.check_type(@secret_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "secretArn") unless @secret_arn.nil?
end

Instance Attribute Details

#branchString? (readonly)

The default branch for the Git repository.



574
575
576
# File 'sagemaker/cfn_code_repository.rb', line 574

def branch
  @branch
end

#repository_urlString (readonly)

The URL where the Git repository is located.



569
570
571
# File 'sagemaker/cfn_code_repository.rb', line 569

def repository_url
  @repository_url
end

#secret_arnString? (readonly)

The Amazon Resource Name (ARN) of the AWS Secrets Manager secret that contains the credentials used to access the git repository.

The secret must have a staging label of AWSCURRENT and must be in the following format:

{"username": *UserName* , "password": *Password* }



583
584
585
# File 'sagemaker/cfn_code_repository.rb', line 583

def secret_arn
  @secret_arn
end

Class Method Details

.jsii_propertiesObject



585
586
587
588
589
590
591
# File 'sagemaker/cfn_code_repository.rb', line 585

def self.jsii_properties
  {
    :repository_url => "repositoryUrl",
    :branch => "branch",
    :secret_arn => "secretArn",
  }
end

Instance Method Details

#to_jsiiObject



593
594
595
596
597
598
599
600
601
# File 'sagemaker/cfn_code_repository.rb', line 593

def to_jsii
  result = {}
  result.merge!({
    "repositoryUrl" => @repository_url,
    "branch" => @branch,
    "secretArn" => @secret_arn,
  })
  result.compact
end