Skip to main content

Creates a product in the organisations service

Project description

@reapit-cdk/reapit-product

npm version npm downloads coverage: 0%25 Integ Tests: X

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,
})

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reapit-cdk.reapit-product-0.1.0.tar.gz (128.8 kB view hashes)

Uploaded Source

Built Distribution

reapit_cdk.reapit_product-0.1.0-py3-none-any.whl (127.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page