Class: AWSCDK::AppFlow::CfnConnectorProfile::SlackConnectorProfileCredentialsProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
app_flow/cfn_connector_profile.rb

Overview

The connector-specific profile credentials required when using Slack.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client_id:, client_secret:, access_token: nil, connector_o_auth_request: nil) ⇒ SlackConnectorProfileCredentialsProperty

Returns a new instance of SlackConnectorProfileCredentialsProperty.

Parameters:

  • client_id (String)

    The identifier for the client.

  • client_secret (String)

    The client secret used by the OAuth client to authenticate to the authorization server.

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

    The credentials used to access protected Slack resources.

  • connector_o_auth_request (AWSCDK::IResolvable, AWSCDK::AppFlow::CfnConnectorProfile::ConnectorOAuthRequestProperty, nil) (defaults to: nil)

    Used by select connectors for which the OAuth workflow is supported, such as Salesforce, Google Analytics, Marketo, Zendesk, and Slack.



2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
# File 'app_flow/cfn_connector_profile.rb', line 2695

def initialize(client_id:, client_secret:, access_token: nil, connector_o_auth_request: nil)
  @client_id = client_id
  Jsii::Type.check_type(@client_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clientId")
  @client_secret = client_secret
  Jsii::Type.check_type(@client_secret, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clientSecret")
  @access_token = access_token
  Jsii::Type.check_type(@access_token, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "accessToken") unless @access_token.nil?
  @connector_o_auth_request = connector_o_auth_request.is_a?(Hash) ? ::AWSCDK::AppFlow::CfnConnectorProfile::ConnectorOAuthRequestProperty.new(**connector_o_auth_request.transform_keys(&:to_sym)) : connector_o_auth_request
  Jsii::Type.check_type(@connector_o_auth_request, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBmbG93LkNmbkNvbm5lY3RvclByb2ZpbGUuQ29ubmVjdG9yT0F1dGhSZXF1ZXN0UHJvcGVydHkifV19fQ==")), "connectorOAuthRequest") unless @connector_o_auth_request.nil?
end

Instance Attribute Details

#access_tokenString? (readonly)

The credentials used to access protected Slack resources.



2720
2721
2722
# File 'app_flow/cfn_connector_profile.rb', line 2720

def access_token
  @access_token
end

#client_idString (readonly)

The identifier for the client.



2710
2711
2712
# File 'app_flow/cfn_connector_profile.rb', line 2710

def client_id
  @client_id
end

#client_secretString (readonly)

The client secret used by the OAuth client to authenticate to the authorization server.



2715
2716
2717
# File 'app_flow/cfn_connector_profile.rb', line 2715

def client_secret
  @client_secret
end

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

Used by select connectors for which the OAuth workflow is supported, such as Salesforce, Google Analytics, Marketo, Zendesk, and Slack.



2725
2726
2727
# File 'app_flow/cfn_connector_profile.rb', line 2725

def connector_o_auth_request
  @connector_o_auth_request
end

Class Method Details

.jsii_propertiesObject



2727
2728
2729
2730
2731
2732
2733
2734
# File 'app_flow/cfn_connector_profile.rb', line 2727

def self.jsii_properties
  {
    :client_id => "clientId",
    :client_secret => "clientSecret",
    :access_token => "accessToken",
    :connector_o_auth_request => "connectorOAuthRequest",
  }
end

Instance Method Details

#to_jsiiObject



2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
# File 'app_flow/cfn_connector_profile.rb', line 2736

def to_jsii
  result = {}
  result.merge!({
    "clientId" => @client_id,
    "clientSecret" => @client_secret,
    "accessToken" => @access_token,
    "connectorOAuthRequest" => @connector_o_auth_request,
  })
  result.compact
end