Class: AWSCDK::QBusiness::CfnPlugin::OAuth2ClientCredentialConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
q_business/cfn_plugin.rb

Overview

Information about the OAuth 2.0 authentication credential/token used to configure a plugin.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(role_arn:, secret_arn:, authorization_url: nil, token_url: nil) ⇒ OAuth2ClientCredentialConfigurationProperty

Returns a new instance of OAuth2ClientCredentialConfigurationProperty.

Parameters:

  • role_arn (String)

    The ARN of an IAM role used by Amazon Q Business to access the OAuth 2.0 authentication credentials stored in a Secrets Manager secret.

  • secret_arn (String)

    The ARN of the Secrets Manager secret that stores the OAuth 2.0 credentials/token used for plugin configuration.

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

    The redirect URL required by the OAuth 2.0 protocol for Amazon Q Business to authenticate a plugin user through a third party authentication server.

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

    The URL required by the OAuth 2.0 protocol to exchange an end user authorization code for an access token.



790
791
792
793
794
795
796
797
798
799
# File 'q_business/cfn_plugin.rb', line 790

def initialize(role_arn:, secret_arn:, authorization_url: nil, token_url: nil)
  @role_arn = role_arn
  Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleArn")
  @secret_arn = secret_arn
  Jsii::Type.check_type(@secret_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "secretArn")
  @authorization_url = authorization_url
  Jsii::Type.check_type(@authorization_url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "authorizationUrl") unless @authorization_url.nil?
  @token_url = token_url
  Jsii::Type.check_type(@token_url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tokenUrl") unless @token_url.nil?
end

Instance Attribute Details

#authorization_urlString? (readonly)

The redirect URL required by the OAuth 2.0 protocol for Amazon Q Business to authenticate a plugin user through a third party authentication server.



815
816
817
# File 'q_business/cfn_plugin.rb', line 815

def authorization_url
  @authorization_url
end

#role_arnString (readonly)

The ARN of an IAM role used by Amazon Q Business to access the OAuth 2.0 authentication credentials stored in a Secrets Manager secret.



805
806
807
# File 'q_business/cfn_plugin.rb', line 805

def role_arn
  @role_arn
end

#secret_arnString (readonly)

The ARN of the Secrets Manager secret that stores the OAuth 2.0 credentials/token used for plugin configuration.



810
811
812
# File 'q_business/cfn_plugin.rb', line 810

def secret_arn
  @secret_arn
end

#token_urlString? (readonly)

The URL required by the OAuth 2.0 protocol to exchange an end user authorization code for an access token.



820
821
822
# File 'q_business/cfn_plugin.rb', line 820

def token_url
  @token_url
end

Class Method Details

.jsii_propertiesObject



822
823
824
825
826
827
828
829
# File 'q_business/cfn_plugin.rb', line 822

def self.jsii_properties
  {
    :role_arn => "roleArn",
    :secret_arn => "secretArn",
    :authorization_url => "authorizationUrl",
    :token_url => "tokenUrl",
  }
end

Instance Method Details

#to_jsiiObject



831
832
833
834
835
836
837
838
839
840
# File 'q_business/cfn_plugin.rb', line 831

def to_jsii
  result = {}
  result.merge!({
    "roleArn" => @role_arn,
    "secretArn" => @secret_arn,
    "authorizationUrl" => @authorization_url,
    "tokenUrl" => @token_url,
  })
  result.compact
end