Class: AWSCDK::Amplify::CfnBranch::BasicAuthConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
amplify/cfn_branch.rb

Overview

Use the BasicAuthConfig property type to set password protection for a specific branch.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(password:, username:, enable_basic_auth: nil) ⇒ BasicAuthConfigProperty

Returns a new instance of BasicAuthConfigProperty.

Parameters:

  • password (String)

    The password for basic authorization.

  • username (String)
  • enable_basic_auth (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Enables basic authorization for the branch.



761
762
763
764
765
766
767
768
# File 'amplify/cfn_branch.rb', line 761

def initialize(password:, username:, enable_basic_auth: nil)
  @password = password
  Jsii::Type.check_type(@password, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "password")
  @username = username
  Jsii::Type.check_type(@username, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "username")
  @enable_basic_auth = enable_basic_auth
  Jsii::Type.check_type(@enable_basic_auth, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enableBasicAuth") unless @enable_basic_auth.nil?
end

Instance Attribute Details

#enable_basic_authBoolean, ... (readonly)

Enables basic authorization for the branch.



782
783
784
# File 'amplify/cfn_branch.rb', line 782

def enable_basic_auth
  @enable_basic_auth
end

#passwordString (readonly)

The password for basic authorization.



774
775
776
# File 'amplify/cfn_branch.rb', line 774

def password
  @password
end

#usernameString (readonly)



777
778
779
# File 'amplify/cfn_branch.rb', line 777

def username
  @username
end

Class Method Details

.jsii_propertiesObject



784
785
786
787
788
789
790
# File 'amplify/cfn_branch.rb', line 784

def self.jsii_properties
  {
    :password => "password",
    :username => "username",
    :enable_basic_auth => "enableBasicAuth",
  }
end

Instance Method Details

#to_jsiiObject



792
793
794
795
796
797
798
799
800
# File 'amplify/cfn_branch.rb', line 792

def to_jsii
  result = {}
  result.merge!({
    "password" => @password,
    "username" => @username,
    "enableBasicAuth" => @enable_basic_auth,
  })
  result.compact
end