reapit-cdk.reapit-product 0.1.2

Creator: bradpython12

Last updated:

Add to Cart

Description:

reapitcdk.reapitproduct 0.1.2

@reapit-cdk/reapit-product




Creates a product in the organisations service
Package Installation:
yarn add --dev @reapit-cdk/reapit-product
# or
npm install @reapit-cdk/reapit-product --save-dev

Usage
import { CfnOutput, Stack, App } from 'aws-cdk-lib'
import { ReapitProductProvider } from '@reapit-cdk/reapit-product'
import { RestApi } from 'aws-cdk-lib/aws-apigateway'

const app = new App()
const stack = new Stack(app, 'stack-name')

const orgsApiGwId = '' // imported from somewhere or hard coded

const organisationsServiceApiGateway = RestApi.fromRestApiId(stack, 'orgs-api-gw', orgsApiGwId)

const productProvider = new ReapitProductProvider(stack, 'product-provider', {
organisationsServiceApiGateway,
stageName: 'api',
})

const product = productProvider.createProduct(stack, 'product', {
name: 'a product name',
callbackUrls: [],
grant: 'authorizationCode',
isInternalApp: true,
requiresUserAdmin: false,
scopes: [],
signoutUrls: [],
})

new CfnOutput(stack, 'client-id', {
value: product.externalId,
})

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.