Class: AWSCDK::AppFlow::CfnConnectorProfile::SalesforceConnectorProfileCredentialsProperty

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

Overview

The connector-specific profile credentials required when using Salesforce.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(access_token: nil, client_credentials_arn: nil, connector_o_auth_request: nil, jwt_token: nil, o_auth2_grant_type: nil, refresh_token: nil) ⇒ SalesforceConnectorProfileCredentialsProperty

Returns a new instance of SalesforceConnectorProfileCredentialsProperty.

Parameters:

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

    The credentials used to access protected Salesforce resources.

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

    The secret manager ARN, which contains the client ID and client secret of the connected app.

  • 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.

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

    A JSON web token (JWT) that authorizes Amazon AppFlow to access your Salesforce records.

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

    Specifies the OAuth 2.0 grant type that Amazon AppFlow uses when it requests an access token from Salesforce. Amazon AppFlow requires an access token each time it attempts to access your Salesforce records.

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

    The credentials used to acquire new access tokens.



2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
# File 'app_flow/cfn_connector_profile.rb', line 2413

def initialize(access_token: nil, client_credentials_arn: nil, connector_o_auth_request: nil, jwt_token: nil, o_auth2_grant_type: nil, refresh_token: nil)
  @access_token = access_token
  Jsii::Type.check_type(@access_token, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "accessToken") unless @access_token.nil?
  @client_credentials_arn = client_credentials_arn
  Jsii::Type.check_type(@client_credentials_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clientCredentialsArn") unless @client_credentials_arn.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?
  @jwt_token = jwt_token
  Jsii::Type.check_type(@jwt_token, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "jwtToken") unless @jwt_token.nil?
  @o_auth2_grant_type = o_auth2_grant_type
  Jsii::Type.check_type(@o_auth2_grant_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "oAuth2GrantType") unless @o_auth2_grant_type.nil?
  @refresh_token = refresh_token
  Jsii::Type.check_type(@refresh_token, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "refreshToken") unless @refresh_token.nil?
end

Instance Attribute Details

#access_tokenString? (readonly)

The credentials used to access protected Salesforce resources.



2432
2433
2434
# File 'app_flow/cfn_connector_profile.rb', line 2432

def access_token
  @access_token
end

#client_credentials_arnString? (readonly)

The secret manager ARN, which contains the client ID and client secret of the connected app.



2437
2438
2439
# File 'app_flow/cfn_connector_profile.rb', line 2437

def client_credentials_arn
  @client_credentials_arn
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.



2442
2443
2444
# File 'app_flow/cfn_connector_profile.rb', line 2442

def connector_o_auth_request
  @connector_o_auth_request
end

#jwt_tokenString? (readonly)

A JSON web token (JWT) that authorizes Amazon AppFlow to access your Salesforce records.



2447
2448
2449
# File 'app_flow/cfn_connector_profile.rb', line 2447

def jwt_token
  @jwt_token
end

#o_auth2_grant_typeString? (readonly)

Specifies the OAuth 2.0 grant type that Amazon AppFlow uses when it requests an access token from Salesforce. Amazon AppFlow requires an access token each time it attempts to access your Salesforce records.

You can specify one of the following values:

  • AUTHORIZATION_CODE - Amazon AppFlow passes an authorization code when it requests the access token from Salesforce. Amazon AppFlow receives the authorization code from Salesforce after you log in to your Salesforce account and authorize Amazon AppFlow to access your records.
  • JWT_BEARER - Amazon AppFlow passes a JSON web token (JWT) when it requests the access token from Salesforce. You provide the JWT to Amazon AppFlow when you define the connection to your Salesforce account. When you use this grant type, you don't need to log in to your Salesforce account to authorize Amazon AppFlow to access your records.

The CLIENT_CREDENTIALS value is not supported for Salesforce.



2459
2460
2461
# File 'app_flow/cfn_connector_profile.rb', line 2459

def o_auth2_grant_type
  @o_auth2_grant_type
end

#refresh_tokenString? (readonly)

The credentials used to acquire new access tokens.



2464
2465
2466
# File 'app_flow/cfn_connector_profile.rb', line 2464

def refresh_token
  @refresh_token
end

Class Method Details

.jsii_propertiesObject



2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
# File 'app_flow/cfn_connector_profile.rb', line 2466

def self.jsii_properties
  {
    :access_token => "accessToken",
    :client_credentials_arn => "clientCredentialsArn",
    :connector_o_auth_request => "connectorOAuthRequest",
    :jwt_token => "jwtToken",
    :o_auth2_grant_type => "oAuth2GrantType",
    :refresh_token => "refreshToken",
  }
end

Instance Method Details

#to_jsiiObject



2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
# File 'app_flow/cfn_connector_profile.rb', line 2477

def to_jsii
  result = {}
  result.merge!({
    "accessToken" => @access_token,
    "clientCredentialsArn" => @client_credentials_arn,
    "connectorOAuthRequest" => @connector_o_auth_request,
    "jwtToken" => @jwt_token,
    "oAuth2GrantType" => @o_auth2_grant_type,
    "refreshToken" => @refresh_token,
  })
  result.compact
end