Class: AWSCDK::Kendra::CfnDataSource::OneDriveConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
kendra/cfn_data_source.rb

Overview

Provides the configuration information to connect to OneDrive as your data source.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(one_drive_users:, secret_arn:, tenant_domain:, disable_local_groups: nil, exclusion_patterns: nil, field_mappings: nil, inclusion_patterns: nil) ⇒ OneDriveConfigurationProperty

Returns a new instance of OneDriveConfigurationProperty.

Parameters:

  • one_drive_users (AWSCDK::IResolvable, AWSCDK::Kendra::CfnDataSource::OneDriveUsersProperty)

    A list of user accounts whose documents should be indexed.

  • secret_arn (String)

    The Amazon Resource Name (ARN) of an AWS Secrets Manager secret that contains the user name and password to connect to OneDrive.

  • tenant_domain (String)

    The Azure Active Directory domain of the organization.

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

    TRUE to disable local groups information.

  • exclusion_patterns (Array<String>, nil) (defaults to: nil)

    A list of regular expression patterns to exclude certain documents in your OneDrive.

  • field_mappings (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Kendra::CfnDataSource::DataSourceToIndexFieldMappingProperty>, nil) (defaults to: nil)

    A list of DataSourceToIndexFieldMapping objects that map OneDrive data source attributes or field names to Amazon Kendra index field names.

  • inclusion_patterns (Array<String>, nil) (defaults to: nil)

    A list of regular expression patterns to include certain documents in your OneDrive.



2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
# File 'kendra/cfn_data_source.rb', line 2329

def initialize(one_drive_users:, secret_arn:, tenant_domain:, disable_local_groups: nil, exclusion_patterns: nil, field_mappings: nil, inclusion_patterns: nil)
  @one_drive_users = one_drive_users.is_a?(Hash) ? ::AWSCDK::Kendra::CfnDataSource::OneDriveUsersProperty.new(**one_drive_users.transform_keys(&:to_sym)) : one_drive_users
  Jsii::Type.check_type(@one_drive_users, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19rZW5kcmEuQ2ZuRGF0YVNvdXJjZS5PbmVEcml2ZVVzZXJzUHJvcGVydHkifV19fQ==")), "oneDriveUsers")
  @secret_arn = secret_arn
  Jsii::Type.check_type(@secret_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "secretArn")
  @tenant_domain = tenant_domain
  Jsii::Type.check_type(@tenant_domain, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tenantDomain")
  @disable_local_groups = disable_local_groups
  Jsii::Type.check_type(@disable_local_groups, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "disableLocalGroups") unless @disable_local_groups.nil?
  @exclusion_patterns = exclusion_patterns
  Jsii::Type.check_type(@exclusion_patterns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "exclusionPatterns") unless @exclusion_patterns.nil?
  @field_mappings = field_mappings
  Jsii::Type.check_type(@field_mappings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa2VuZHJhLkNmbkRhdGFTb3VyY2UuRGF0YVNvdXJjZVRvSW5kZXhGaWVsZE1hcHBpbmdQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "fieldMappings") unless @field_mappings.nil?
  @inclusion_patterns = inclusion_patterns
  Jsii::Type.check_type(@inclusion_patterns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "inclusionPatterns") unless @inclusion_patterns.nil?
end

Instance Attribute Details

#disable_local_groupsBoolean, ... (readonly)

TRUE to disable local groups information.



2367
2368
2369
# File 'kendra/cfn_data_source.rb', line 2367

def disable_local_groups
  @disable_local_groups
end

#exclusion_patternsArray<String>? (readonly)

A list of regular expression patterns to exclude certain documents in your OneDrive.

Documents that match the patterns are excluded from the index. Documents that don't match the patterns are included in the index. If a document matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the document isn't included in the index.

The pattern is applied to the file name.



2376
2377
2378
# File 'kendra/cfn_data_source.rb', line 2376

def exclusion_patterns
  @exclusion_patterns
end

#field_mappingsAWSCDK::IResolvable, ... (readonly)

A list of DataSourceToIndexFieldMapping objects that map OneDrive data source attributes or field names to Amazon Kendra index field names.

To create custom fields, use the UpdateIndex API before you map to OneDrive fields. For more information, see Mapping data source fields . The OneDrive data source field names must exist in your OneDrive custom metadata.



2383
2384
2385
# File 'kendra/cfn_data_source.rb', line 2383

def field_mappings
  @field_mappings
end

#inclusion_patternsArray<String>? (readonly)

A list of regular expression patterns to include certain documents in your OneDrive.

Documents that match the patterns are included in the index. Documents that don't match the patterns are excluded from the index. If a document matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the document isn't included in the index.

The pattern is applied to the file name.



2392
2393
2394
# File 'kendra/cfn_data_source.rb', line 2392

def inclusion_patterns
  @inclusion_patterns
end

#one_drive_usersAWSCDK::IResolvable, AWSCDK::Kendra::CfnDataSource::OneDriveUsersProperty (readonly)

A list of user accounts whose documents should be indexed.



2350
2351
2352
# File 'kendra/cfn_data_source.rb', line 2350

def one_drive_users
  @one_drive_users
end

#secret_arnString (readonly)

The Amazon Resource Name (ARN) of an AWS Secrets Manager secret that contains the user name and password to connect to OneDrive.

The user name should be the application ID for the OneDrive application, and the password is the application key for the OneDrive application.



2357
2358
2359
# File 'kendra/cfn_data_source.rb', line 2357

def secret_arn
  @secret_arn
end

#tenant_domainString (readonly)

The Azure Active Directory domain of the organization.



2362
2363
2364
# File 'kendra/cfn_data_source.rb', line 2362

def tenant_domain
  @tenant_domain
end

Class Method Details

.jsii_propertiesObject



2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
# File 'kendra/cfn_data_source.rb', line 2394

def self.jsii_properties
  {
    :one_drive_users => "oneDriveUsers",
    :secret_arn => "secretArn",
    :tenant_domain => "tenantDomain",
    :disable_local_groups => "disableLocalGroups",
    :exclusion_patterns => "exclusionPatterns",
    :field_mappings => "fieldMappings",
    :inclusion_patterns => "inclusionPatterns",
  }
end

Instance Method Details

#to_jsiiObject



2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
# File 'kendra/cfn_data_source.rb', line 2406

def to_jsii
  result = {}
  result.merge!({
    "oneDriveUsers" => @one_drive_users,
    "secretArn" => @secret_arn,
    "tenantDomain" => @tenant_domain,
    "disableLocalGroups" => @disable_local_groups,
    "exclusionPatterns" => @exclusion_patterns,
    "fieldMappings" => @field_mappings,
    "inclusionPatterns" => @inclusion_patterns,
  })
  result.compact
end