Skip to content
v2.278.0

OAuth2CredentialsProperty ​

Struct External

The OAuth 2.0 credentials required for OAuth 2.0 authentication.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appflow as appflow } from 'aws-cdk-lib';
const oAuth2CredentialsProperty: appflow.CfnConnectorProfile.OAuth2CredentialsProperty = {
  accessToken: 'accessToken',
  clientId: 'clientId',
  clientSecret: 'clientSecret',
  oAuthRequest: {
    authCode: 'authCode',
    redirectUri: 'redirectUri',
  },
  refreshToken: 'refreshToken',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appflow as appflow

o_auth2_credentials_property = appflow.CfnConnectorProfile.OAuth2CredentialsProperty(
    access_token="accessToken",
    client_id="clientId",
    client_secret="clientSecret",
    o_auth_request=appflow.CfnConnectorProfile.ConnectorOAuthRequestProperty(
        auth_code="authCode",
        redirect_uri="redirectUri"
    ),
    refresh_token="refreshToken"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.appflow.*;

OAuth2CredentialsProperty oAuth2CredentialsProperty = OAuth2CredentialsProperty.builder()
        .accessToken("accessToken")
        .clientId("clientId")
        .clientSecret("clientSecret")
        .oAuthRequest(ConnectorOAuthRequestProperty.builder()
                .authCode("authCode")
                .redirectUri("redirectUri")
                .build())
        .refreshToken("refreshToken")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppFlow;

var oAuth2CredentialsProperty = new OAuth2CredentialsProperty {
    AccessToken = "accessToken",
    ClientId = "clientId",
    ClientSecret = "clientSecret",
    OAuthRequest = new ConnectorOAuthRequestProperty {
        AuthCode = "authCode",
        RedirectUri = "redirectUri"
    },
    RefreshToken = "refreshToken"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

oAuth2CredentialsProperty := &OAuth2CredentialsProperty{
	AccessToken: jsii.String("accessToken"),
	ClientId: jsii.String("clientId"),
	ClientSecret: jsii.String("clientSecret"),
	OAuthRequest: &ConnectorOAuthRequestProperty{
		AuthCode: jsii.String("authCode"),
		RedirectUri: jsii.String("redirectUri"),
	},
	RefreshToken: jsii.String("refreshToken"),
}

Properties ​

accessTokenoptionalstringaccess_tokenoptionalstraccessTokenoptionalStringAccessTokenoptionalstringAccessTokenoptional*string #
The access token used to access the connector on your behalf.
clientIdoptionalstringclient_idoptionalstrclientIdoptionalStringClientIdoptionalstringClientIdoptional*string #
The identifier for the desired client.
clientSecretoptionalstringclient_secretoptionalstrclientSecretoptionalStringClientSecretoptionalstringClientSecretoptional*string #
The client secret used by the OAuth client to authenticate to the authorization server.
oAuthRequestoptionalIResolvable | CfnConnectorProfile.ConnectorOAuthRequestPropertyo_auth_requestoptionaltyping.Union[IResolvable, ConnectorOAuthRequestProperty]oAuthRequestoptionalIResolvableOAuthRequestoptionalIResolvableOAuthRequestoptionalinterface{} #
refreshTokenoptionalstringrefresh_tokenoptionalstrrefreshTokenoptionalStringRefreshTokenoptionalstringRefreshTokenoptional*string #
The refresh token used to refresh an expired access token.