Class: AWSCDK::Kendra::CfnDataSource::ServiceNowConfigurationProperty

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

Overview

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host_url:, secret_arn:, service_now_build_version:, authentication_type: nil, knowledge_article_configuration: nil, service_catalog_configuration: nil) ⇒ ServiceNowConfigurationProperty

Returns a new instance of ServiceNowConfigurationProperty.

Parameters:

  • host_url (String)

    The ServiceNow instance that the data source connects to.

  • secret_arn (String)

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

  • service_now_build_version (String)

    The identifier of the release that the ServiceNow host is running.

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

    The type of authentication used to connect to the ServiceNow instance.

  • knowledge_article_configuration (AWSCDK::IResolvable, AWSCDK::Kendra::CfnDataSource::ServiceNowKnowledgeArticleConfigurationProperty, nil) (defaults to: nil)

    Configuration information for crawling knowledge articles in the ServiceNow site.

  • service_catalog_configuration (AWSCDK::IResolvable, AWSCDK::Kendra::CfnDataSource::ServiceNowServiceCatalogConfigurationProperty, nil) (defaults to: nil)

    Configuration information for crawling service catalogs in the ServiceNow site.



3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
# File 'kendra/cfn_data_source.rb', line 3183

def initialize(host_url:, secret_arn:, service_now_build_version:, authentication_type: nil, knowledge_article_configuration: nil, service_catalog_configuration: nil)
  @host_url = host_url
  Jsii::Type.check_type(@host_url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "hostUrl")
  @secret_arn = secret_arn
  Jsii::Type.check_type(@secret_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "secretArn")
  @service_now_build_version = service_now_build_version
  Jsii::Type.check_type(@service_now_build_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceNowBuildVersion")
  @authentication_type = authentication_type
  Jsii::Type.check_type(@authentication_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "authenticationType") unless @authentication_type.nil?
  @knowledge_article_configuration = knowledge_article_configuration.is_a?(Hash) ? ::AWSCDK::Kendra::CfnDataSource::ServiceNowKnowledgeArticleConfigurationProperty.new(**knowledge_article_configuration.transform_keys(&:to_sym)) : knowledge_article_configuration
  Jsii::Type.check_type(@knowledge_article_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19rZW5kcmEuQ2ZuRGF0YVNvdXJjZS5TZXJ2aWNlTm93S25vd2xlZGdlQXJ0aWNsZUNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "knowledgeArticleConfiguration") unless @knowledge_article_configuration.nil?
  @service_catalog_configuration = service_catalog_configuration.is_a?(Hash) ? ::AWSCDK::Kendra::CfnDataSource::ServiceNowServiceCatalogConfigurationProperty.new(**service_catalog_configuration.transform_keys(&:to_sym)) : service_catalog_configuration
  Jsii::Type.check_type(@service_catalog_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19rZW5kcmEuQ2ZuRGF0YVNvdXJjZS5TZXJ2aWNlTm93U2VydmljZUNhdGFsb2dDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "serviceCatalogConfiguration") unless @service_catalog_configuration.nil?
end

Instance Attribute Details

#authentication_typeString? (readonly)

The type of authentication used to connect to the ServiceNow instance.

If you choose HTTP_BASIC , Amazon Kendra is authenticated using the user name and password provided in the AWS Secrets Manager secret in the SecretArn field. If you choose OAUTH2 , Amazon Kendra is authenticated using the credentials of client ID, client secret, user name and password.

When you use OAUTH2 authentication, you must generate a token and a client secret using the ServiceNow console. For more information, see Using a ServiceNow data source .



3227
3228
3229
# File 'kendra/cfn_data_source.rb', line 3227

def authentication_type
  @authentication_type
end

#host_urlString (readonly)

The ServiceNow instance that the data source connects to.

The host endpoint should look like the following: instance.service-now.com.



3204
3205
3206
# File 'kendra/cfn_data_source.rb', line 3204

def host_url
  @host_url
end

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

Configuration information for crawling knowledge articles in the ServiceNow site.



3232
3233
3234
# File 'kendra/cfn_data_source.rb', line 3232

def knowledge_article_configuration
  @knowledge_article_configuration
end

#secret_arnString (readonly)

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

You can also provide OAuth authentication credentials of user name, password, client ID, and client secret. For more information, see Using a ServiceNow data source .



3211
3212
3213
# File 'kendra/cfn_data_source.rb', line 3211

def secret_arn
  @secret_arn
end

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

Configuration information for crawling service catalogs in the ServiceNow site.



3237
3238
3239
# File 'kendra/cfn_data_source.rb', line 3237

def service_catalog_configuration
  @service_catalog_configuration
end

#service_now_build_versionString (readonly)

The identifier of the release that the ServiceNow host is running.

If the host is not running the LONDON release, use OTHERS .



3218
3219
3220
# File 'kendra/cfn_data_source.rb', line 3218

def service_now_build_version
  @service_now_build_version
end

Class Method Details

.jsii_propertiesObject



3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
# File 'kendra/cfn_data_source.rb', line 3239

def self.jsii_properties
  {
    :host_url => "hostUrl",
    :secret_arn => "secretArn",
    :service_now_build_version => "serviceNowBuildVersion",
    :authentication_type => "authenticationType",
    :knowledge_article_configuration => "knowledgeArticleConfiguration",
    :service_catalog_configuration => "serviceCatalogConfiguration",
  }
end

Instance Method Details

#to_jsiiObject



3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
# File 'kendra/cfn_data_source.rb', line 3250

def to_jsii
  result = {}
  result.merge!({
    "hostUrl" => @host_url,
    "secretArn" => @secret_arn,
    "serviceNowBuildVersion" => @service_now_build_version,
    "authenticationType" => @authentication_type,
    "knowledgeArticleConfiguration" => @knowledge_article_configuration,
    "serviceCatalogConfiguration" => @service_catalog_configuration,
  })
  result.compact
end