Class: AWSCDK::Amplify::CfnApp::BasicAuthConfigProperty

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

Overview

Use the BasicAuthConfig property type to set password protection at an app level to all your branches.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of BasicAuthConfigProperty.

Parameters:

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

    Enables basic authorization for the Amplify app's branches.

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

    The password for basic authorization.

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

    The user name for basic authorization.



919
920
921
922
923
924
925
926
# File 'amplify/cfn_app.rb', line 919

def initialize(enable_basic_auth: nil, password: nil, username: nil)
  @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?
  @password = password
  Jsii::Type.check_type(@password, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "password") unless @password.nil?
  @username = username
  Jsii::Type.check_type(@username, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "username") unless @username.nil?
end

Instance Attribute Details

#enable_basic_authBoolean, ... (readonly)

Enables basic authorization for the Amplify app's branches.



932
933
934
# File 'amplify/cfn_app.rb', line 932

def enable_basic_auth
  @enable_basic_auth
end

#passwordString? (readonly)

The password for basic authorization.



937
938
939
# File 'amplify/cfn_app.rb', line 937

def password
  @password
end

#usernameString? (readonly)

The user name for basic authorization.



942
943
944
# File 'amplify/cfn_app.rb', line 942

def username
  @username
end

Class Method Details

.jsii_propertiesObject



944
945
946
947
948
949
950
# File 'amplify/cfn_app.rb', line 944

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

Instance Method Details

#to_jsiiObject



952
953
954
955
956
957
958
959
960
# File 'amplify/cfn_app.rb', line 952

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