Skip to content

Latest commit

 

History

History
793 lines (470 loc) · 22.4 KB

File metadata and controls

793 lines (470 loc) · 22.4 KB

API Reference

Constructs

AmplifyExportedBackend

  • Used to include the backend generated by running amplify export --out <path> into the cdk app.

Initializers

import { AmplifyExportedBackend } from '@aws-amplify/cdk-exported-backend'

new AmplifyExportedBackend(scope: Construct, id: string, props: AmplifyExportedBackendProps)
scopeRequired

The parent construct of this template.


idRequired
  • Type: string

The ID of this construct.


propsRequired

Initialization properties.


Methods

apiRestNestedStack
public apiRestNestedStack(resourceName: string)
resourceNameRequired
  • Type: string

authNestedStack
public authNestedStack()
graphqlNestedStacks
public graphqlNestedStacks()
lambdaFunctionNestedStackByName
public lambdaFunctionNestedStackByName(functionName: string)
functionNameRequired
  • Type: string

the function name to get from the nested stack.


lambdaFunctionNestedStacks
public lambdaFunctionNestedStacks()
nestedStackByCategortService
public nestedStackByCategortService(category: string, service: string)
categoryRequired
  • Type: string

serviceRequired
  • Type: string

nestedStacksByCategory
public nestedStacksByCategory(category: string, resourceName?: string)
categoryRequired
  • Type: string

Categories defined in Amplify CLI like function, api, auth etc.


resourceNameOptional
  • Type: string

Properties

cfnIncludeRequired
public readonly cfnInclude: CfnInclude;

cfnInclude of the Amplify backend.


rootStackRequired
public readonly rootStack: Stack;

The root stack created.


Structs

AmplifyExportedBackendProps

Initializer

import { AmplifyExportedBackendProps } from '@aws-amplify/cdk-exported-backend'

const amplifyExportedBackendProps: AmplifyExportedBackendProps = { ... }
analyticsReportingOptional
public readonly analyticsReporting: boolean;
  • Type: boolean
  • Default: analyticsReporting setting of containing App, or value of 'aws:cdk:version-reporting' context key

Include runtime versioning information in this Stack.


crossRegionReferencesOptional
public readonly crossRegionReferences: boolean;
  • Type: boolean
  • Default: false

Enable this flag to allow native cross region stack references.

Enabling this will create a CloudFormation custom resource in both the producing stack and consuming stack in order to perform the export/import

This feature is currently experimental


descriptionOptional
public readonly description: string;
  • Type: string
  • Default: No description.

A description of the stack.


envOptional
public readonly env: Environment;
  • Type: aws-cdk-lib.Environment
  • Default: The environment of the containing Stage if available, otherwise create the stack will be environment-agnostic.

The AWS environment (account/region) where this stack will be deployed.

Set the region/account fields of env to either a concrete value to select the indicated environment (recommended for production stacks), or to the values of environment variables CDK_DEFAULT_REGION/CDK_DEFAULT_ACCOUNT to let the target environment depend on the AWS credentials/configuration that the CDK CLI is executed under (recommended for development stacks).

If the Stack is instantiated inside a Stage, any undefined region/account fields from env will default to the same field on the encompassing Stage, if configured there.

If either region or account are not set nor inherited from Stage, the Stack will be considered "environment-agnostic"". Environment-agnostic stacks can be deployed to any environment but may not be able to take advantage of all features of the CDK. For example, they will not be able to use environmental context lookups such as ec2.Vpc.fromLookup and will not automatically translate Service Principals to the right format based on the environment's AWS partition, and other such enhancements.


permissionsBoundaryOptional
public readonly permissionsBoundary: PermissionsBoundary;

Options for applying a permissions boundary to all IAM Roles and Users created within this Stage.


stackNameOptional
public readonly stackName: string;
  • Type: string
  • Default: Derived from construct path.

Name to deploy the stack with.


synthesizerOptional
public readonly synthesizer: IStackSynthesizer;

Synthesis method to use while deploying this stack.

The Stack Synthesizer controls aspects of synthesis and deployment, like how assets are referenced and what IAM roles to use. For more information, see the README of the main CDK package.

If not specified, the defaultStackSynthesizer from App will be used. If that is not specified, DefaultStackSynthesizer is used if @aws-cdk/core:newStyleStackSynthesis is set to true or the CDK major version is v2. In CDK v1 LegacyStackSynthesizer is the default if no other synthesizer is specified.


tagsOptional
public readonly tags: {[ key: string ]: string};
  • Type: {[ key: string ]: string}
  • Default: {}

Stack tags that will be applied to all the taggable resources and the stack itself.


terminationProtectionOptional
public readonly terminationProtection: boolean;
  • Type: boolean
  • Default: false

Whether to enable termination protection for this stack.


amplifyEnvironmentRequired
public readonly amplifyEnvironment: string;
  • Type: string
  • Default: is 'dev'

The Amplify CLI environment deploy to The amplify backend requires a stage to deploy.


pathRequired
public readonly path: string;
  • Type: string

The path to the exported folder that contains the artifacts for the Amplify CLI backend ex: ./amplify-synth-out/.


CategoryStackMapping

Initializer

import { CategoryStackMapping } from '@aws-amplify/cdk-exported-backend'

const categoryStackMapping: CategoryStackMapping = { ... }
categoryRequired
public readonly category: string;
  • Type: string

resourceNameRequired
public readonly resourceName: string;
  • Type: string

serviceRequired
public readonly service: string;
  • Type: string

ExportManifest

Initializer

import { ExportManifest } from '@aws-amplify/cdk-exported-backend'

const exportManifest: ExportManifest = { ... }
propsRequired
public readonly props: CfnIncludeProps;

stackNameRequired
public readonly stackName: string;
  • Type: string

ExportTag

Initializer

import { ExportTag } from '@aws-amplify/cdk-exported-backend'

const exportTag: ExportTag = { ... }
keyRequired
public readonly key: string;
  • Type: string

valueRequired
public readonly value: string;
  • Type: string

ProviderCredential

Initializer

import { ProviderCredential } from '@aws-amplify/cdk-exported-backend'

const providerCredential: ProviderCredential = { ... }
clientIdRequired
public readonly clientId: string;
  • Type: string

clientSecretRequired
public readonly clientSecret: string;
  • Type: string

providerNameRequired
public readonly providerName: string;
  • Type: string

Classes

APIGraphQLIncludedNestedStack

Initializers

import { APIGraphQLIncludedNestedStack } from '@aws-amplify/cdk-exported-backend'

new APIGraphQLIncludedNestedStack(includedStack: IncludedNestedStack)
includedStackRequired

Methods

appSyncAPIKey
public appSyncAPIKey()
getResourceConstruct
public getResourceConstruct(logicalId: string)
logicalIdRequired
  • Type: string

graphQLAPI
public graphQLAPI()
graphQLSchema
public graphQLSchema()
modelNestedStack
public modelNestedStack(tableName: string)
tableNameRequired
  • Type: string

is the model name in your Graph QL API.


Properties

includedTemplateRequired
public readonly includedTemplate: CfnInclude;

stackRequired
public readonly stack: NestedStack;

APIRestIncludedStack

Initializers

import { APIRestIncludedStack } from '@aws-amplify/cdk-exported-backend'

new APIRestIncludedStack(includedStack: IncludedNestedStack, resourceName: string)
includedStackRequired

resourceNameRequired
  • Type: string

Methods

apiDeployment
public apiDeployment()
getResourceConstruct
public getResourceConstruct(logicalId: string)
logicalIdRequired
  • Type: string

restAPI
public restAPI()

Properties

includedTemplateRequired
public readonly includedTemplate: CfnInclude;

resourceNameRequired
public readonly resourceName: string;
  • Type: string

stackRequired
public readonly stack: NestedStack;

AuthIncludedNestedStack

Initializers

import { AuthIncludedNestedStack } from '@aws-amplify/cdk-exported-backend'

new AuthIncludedNestedStack(includedStack: IncludedNestedStack)
includedStackRequired

Methods

getResourceConstruct
public getResourceConstruct(logicalId: string)
logicalIdRequired
  • Type: string

hostedUiProviderCredentials
public hostedUiProviderCredentials(credentials: ProviderCredential[])
credentialsRequired

identityPool
public identityPool()
userPool
public userPool()

Properties

includedTemplateRequired
public readonly includedTemplate: CfnInclude;

stackRequired
public readonly stack: NestedStack;

LambdaFunctionIncludedNestedStack

Initializers

import { LambdaFunctionIncludedNestedStack } from '@aws-amplify/cdk-exported-backend'

new LambdaFunctionIncludedNestedStack(includedStack: IncludedNestedStack)
includedStackRequired

Methods

getResourceConstruct
public getResourceConstruct(logicalId: string)
logicalIdRequired
  • Type: string

lambdaFunction
public lambdaFunction()

Properties

includedTemplateRequired
public readonly includedTemplate: CfnInclude;

stackRequired
public readonly stack: NestedStack;