Skip to content
v2.274.0

OAuthAuthorizationProps Struct ​

Properties for Authorization.oauth().

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_events as events } from 'aws-cdk-lib';

declare const httpParameter: events.HttpParameter;
declare const secretValue: cdk.SecretValue;
const oAuthAuthorizationProps: events.OAuthAuthorizationProps = {
  authorizationEndpoint: 'authorizationEndpoint',
  clientId: 'clientId',
  clientSecret: secretValue,
  httpMethod: events.HttpMethod.POST,

  // the properties below are optional
  bodyParameters: {
    bodyParametersKey: httpParameter,
  },
  headerParameters: {
    headerParametersKey: httpParameter,
  },
  queryStringParameters: {
    queryStringParametersKey: httpParameter,
  },
};

Properties ​

authorizationEndpointstringauthorization_endpointstrauthorizationEndpointStringAuthorizationEndpointstringAuthorizationEndpoint*stringrequired#
The URL to the authorization endpoint.
bodyParametersoptional{ [key: string]: HttpParameter }body_parametersoptionaltyping.Mapping[str, HttpParameter]bodyParametersoptionalMap<String, HttpParameter>BodyParametersoptionalIDictionary<string, HttpParameter>BodyParametersoptional*map[string]HttpParameter#
Additional string parameters to add to the OAuth request body.

Default: No additional parameters

clientIdstringclient_idstrclientIdStringClientIdstringClientId*stringrequired#
The client ID to use for OAuth authorization for the connection.
clientSecretSecretValueclient_secretSecretValueclientSecretSecretValueClientSecretSecretValueClientSecretSecretValuerequired#
The client secret associated with the client ID to use for OAuth authorization for the connection.
headerParametersoptional{ [key: string]: HttpParameter }header_parametersoptionaltyping.Mapping[str, HttpParameter]headerParametersoptionalMap<String, HttpParameter>HeaderParametersoptionalIDictionary<string, HttpParameter>HeaderParametersoptional*map[string]HttpParameter#
Additional string parameters to add to the OAuth request header.

Default: No additional parameters

httpMethodHttpMethodhttp_methodHttpMethodhttpMethodHttpMethodHttpMethodHttpMethodHttpMethodHttpMethodrequired#
The method to use for the authorization request.

(Can only choose POST, GET or PUT).

queryStringParametersoptional{ [key: string]: HttpParameter }query_string_parametersoptionaltyping.Mapping[str, HttpParameter]queryStringParametersoptionalMap<String, HttpParameter>QueryStringParametersoptionalIDictionary<string, HttpParameter>QueryStringParametersoptional*map[string]HttpParameter#
Additional string parameters to add to the OAuth request query string.

Default: No additional parameters