Class: AWSCDK::AppFlow::CfnConnectorProfile::MarketoConnectorProfileCredentialsProperty

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

Overview

The connector-specific profile credentials required by Marketo.

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) ⇒ MarketoConnectorProfileCredentialsProperty

Returns a new instance of MarketoConnectorProfileCredentialsProperty.

Parameters:

  • client_id (String)

    The identifier for the desired 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 Marketo 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.



1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
# File 'app_flow/cfn_connector_profile.rb', line 1643

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 Marketo resources.



1668
1669
1670
# File 'app_flow/cfn_connector_profile.rb', line 1668

def access_token
  @access_token
end

#client_idString (readonly)

The identifier for the desired client.



1658
1659
1660
# File 'app_flow/cfn_connector_profile.rb', line 1658

def client_id
  @client_id
end

#client_secretString (readonly)

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



1663
1664
1665
# File 'app_flow/cfn_connector_profile.rb', line 1663

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.



1673
1674
1675
# File 'app_flow/cfn_connector_profile.rb', line 1673

def connector_o_auth_request
  @connector_o_auth_request
end

Class Method Details

.jsii_propertiesObject



1675
1676
1677
1678
1679
1680
1681
1682
# File 'app_flow/cfn_connector_profile.rb', line 1675

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

Instance Method Details

#to_jsiiObject



1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
# File 'app_flow/cfn_connector_profile.rb', line 1684

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