Class: AWSCDK::Kendra::CfnDataSource::GoogleDriveConfigurationProperty

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

Overview

Provides the configuration information to connect to Google Drive as your data source.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(secret_arn:, exclude_mime_types: nil, exclude_shared_drives: nil, exclude_user_accounts: nil, exclusion_patterns: nil, field_mappings: nil, inclusion_patterns: nil) ⇒ GoogleDriveConfigurationProperty

Returns a new instance of GoogleDriveConfigurationProperty.

Parameters:

  • secret_arn (String)

    The Amazon Resource Name (ARN) of a AWS Secrets Manager secret that contains the credentials required to connect to Google Drive.

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

    A list of MIME types to exclude from the index. All documents matching the specified MIME type are excluded.

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

    A list of identifiers or shared drives to exclude from the index.

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

    A list of email addresses of the users.

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

    A list of regular expression patterns to exclude certain items in your Google Drive, including shared drives and users' My Drives.

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

    Maps Google Drive 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 items in your Google Drive, including shared drives and users' My Drives.



2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
# File 'kendra/cfn_data_source.rb', line 2100

def initialize(secret_arn:, exclude_mime_types: nil, exclude_shared_drives: nil, exclude_user_accounts: nil, exclusion_patterns: nil, field_mappings: nil, inclusion_patterns: nil)
  @secret_arn = secret_arn
  Jsii::Type.check_type(@secret_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "secretArn")
  @exclude_mime_types = exclude_mime_types
  Jsii::Type.check_type(@exclude_mime_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "excludeMimeTypes") unless @exclude_mime_types.nil?
  @exclude_shared_drives = exclude_shared_drives
  Jsii::Type.check_type(@exclude_shared_drives, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "excludeSharedDrives") unless @exclude_shared_drives.nil?
  @exclude_user_accounts = exclude_user_accounts
  Jsii::Type.check_type(@exclude_user_accounts, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "excludeUserAccounts") unless @exclude_user_accounts.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

#exclude_mime_typesArray<String>? (readonly)

A list of MIME types to exclude from the index. All documents matching the specified MIME type are excluded.

For a list of MIME types, see Using a Google Workspace Drive data source .



2130
2131
2132
# File 'kendra/cfn_data_source.rb', line 2130

def exclude_mime_types
  @exclude_mime_types
end

#exclude_shared_drivesArray<String>? (readonly)

A list of identifiers or shared drives to exclude from the index.

All files and folders stored on the shared drive are excluded.



2137
2138
2139
# File 'kendra/cfn_data_source.rb', line 2137

def exclude_shared_drives
  @exclude_shared_drives
end

#exclude_user_accountsArray<String>? (readonly)

A list of email addresses of the users.

Documents owned by these users are excluded from the index. Documents shared with excluded users are indexed unless they are excluded in another way.



2144
2145
2146
# File 'kendra/cfn_data_source.rb', line 2144

def exclude_user_accounts
  @exclude_user_accounts
end

#exclusion_patternsArray<String>? (readonly)

A list of regular expression patterns to exclude certain items in your Google Drive, including shared drives and users' My Drives.

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



2151
2152
2153
# File 'kendra/cfn_data_source.rb', line 2151

def exclusion_patterns
  @exclusion_patterns
end

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

Maps Google Drive data source attributes or field names to Amazon Kendra index field names.

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



2158
2159
2160
# File 'kendra/cfn_data_source.rb', line 2158

def field_mappings
  @field_mappings
end

#inclusion_patternsArray<String>? (readonly)

A list of regular expression patterns to include certain items in your Google Drive, including shared drives and users' My Drives.

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



2165
2166
2167
# File 'kendra/cfn_data_source.rb', line 2165

def inclusion_patterns
  @inclusion_patterns
end

#secret_arnString (readonly)

The Amazon Resource Name (ARN) of a AWS Secrets Manager secret that contains the credentials required to connect to Google Drive.

For more information, see Using a Google Workspace Drive data source .



2123
2124
2125
# File 'kendra/cfn_data_source.rb', line 2123

def secret_arn
  @secret_arn
end

Class Method Details

.jsii_propertiesObject



2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
# File 'kendra/cfn_data_source.rb', line 2167

def self.jsii_properties
  {
    :secret_arn => "secretArn",
    :exclude_mime_types => "excludeMimeTypes",
    :exclude_shared_drives => "excludeSharedDrives",
    :exclude_user_accounts => "excludeUserAccounts",
    :exclusion_patterns => "exclusionPatterns",
    :field_mappings => "fieldMappings",
    :inclusion_patterns => "inclusionPatterns",
  }
end

Instance Method Details

#to_jsiiObject



2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
# File 'kendra/cfn_data_source.rb', line 2179

def to_jsii
  result = {}
  result.merge!({
    "secretArn" => @secret_arn,
    "excludeMimeTypes" => @exclude_mime_types,
    "excludeSharedDrives" => @exclude_shared_drives,
    "excludeUserAccounts" => @exclude_user_accounts,
    "exclusionPatterns" => @exclusion_patterns,
    "fieldMappings" => @field_mappings,
    "inclusionPatterns" => @inclusion_patterns,
  })
  result.compact
end