Skip to content

Commit

Permalink
feat(construct): adding aws-imagegen-appsync-lambda construct
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinesh Sajwan committed Feb 15, 2024
1 parent 36401ac commit d4aa369
Show file tree
Hide file tree
Showing 13 changed files with 2,552 additions and 1 deletion.
184 changes: 184 additions & 0 deletions apidocs/classes/ImageGenerationAppsyncLambda.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
[@cdklabs/generative-ai-cdk-constructs](../README.md) / ImageGenerationAppsyncLambda

# Class: ImageGenerationAppsyncLambda

**`Summary`**

The QaAppsyncOpensearch class.

## Hierarchy

- `Construct`

**`ImageGenerationAppsyncLambda`**

## Table of contents

### Constructors

- [constructor](ImageGenerationAppsyncLambda.md#constructor)

### Properties

- [generatedImageBus](ImageGenerationAppsyncLambda.md#generatedimagebus)
- [graphqlApi](ImageGenerationAppsyncLambda.md#graphqlapi)
- [node](ImageGenerationAppsyncLambda.md#node)
- [s3GenerateAssetsBucket](ImageGenerationAppsyncLambda.md#s3generateassetsbucket)
- [s3GenerateAssetsBucketInterface](ImageGenerationAppsyncLambda.md#s3generateassetsbucketinterface)
- [securityGroup](ImageGenerationAppsyncLambda.md#securitygroup)
- [vpc](ImageGenerationAppsyncLambda.md#vpc)

### Methods

- [toString](ImageGenerationAppsyncLambda.md#tostring)
- [isConstruct](ImageGenerationAppsyncLambda.md#isconstruct)

## Constructors

### constructor

**new ImageGenerationAppsyncLambda**(`scope`, `id`, `props`): [`ImageGenerationAppsyncLambda`](ImageGenerationAppsyncLambda.md)

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `scope` | `Construct` | represents the scope for all the resources. |
| `id` | `string` | this is a a scope-unique id. |
| `props` | [`ImageGenerationAppsyncLambdaProps`](../interfaces/ImageGenerationAppsyncLambdaProps.md) | user provided props for the construct. |

#### Returns

[`ImageGenerationAppsyncLambda`](ImageGenerationAppsyncLambda.md)

**`Summary`**

Constructs a new instance of the ImageGenerationAppsyncLambda class.

**`Since`**

0.0.0

**`Access`**

public

#### Overrides

Construct.constructor

## Properties

### generatedImageBus

`Readonly` **generatedImageBus**: `IEventBus`

Returns the instance of events.IEventBus used by the construct

___

### graphqlApi

`Readonly` **graphqlApi**: `IGraphqlApi`

Returns an instance of appsync.IGraphqlApi created by the construct

___

### node

`Readonly` **node**: `Node`

The tree node.

#### Inherited from

Construct.node

___

### s3GenerateAssetsBucket

`Optional` `Readonly` **s3GenerateAssetsBucket**: `Bucket`

Returns an instance of s3.Bucket created by the construct.
IMPORTANT: If existingGeneratedAssetsBucketObj was provided in Pattern Construct Props,
this property will be undefined

___

### s3GenerateAssetsBucketInterface

`Readonly` **s3GenerateAssetsBucketInterface**: `IBucket`

Returns an instance of s3.IBucket created by the construct

___

### securityGroup

`Readonly` **securityGroup**: `ISecurityGroup`

Returns the instance of ec2.ISecurityGroup used by the construct

___

### vpc

`Readonly` **vpc**: `IVpc`

Returns the instance of ec2.IVpc used by the construct

## Methods

### toString

**toString**(): `string`

Returns a string representation of this construct.

#### Returns

`string`

#### Inherited from

Construct.toString

___

### isConstruct

**isConstruct**(`x`): x is Construct

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct`
instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on
disk are seen as independent, completely different libraries. As a
consequence, the class `Construct` in each copy of the `constructs` library
is seen as a different class, and an instance of one class will not test as
`instanceof` the other class. `npm install` will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the `constructs`
library can be accidentally installed, and `instanceof` will behave
unpredictably. It is safest to avoid using `instanceof`, and using
this type-testing method instead.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `x` | `any` | Any object |

#### Returns

x is Construct

true if `x` is an object created from a class which extends `Construct`.

#### Inherited from

Construct.isConstruct
196 changes: 196 additions & 0 deletions apidocs/interfaces/ImageGenerationAppsyncLambdaProps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
[@cdklabs/generative-ai-cdk-constructs](../README.md) / ImageGenerationAppsyncLambdaProps

# Interface: ImageGenerationAppsyncLambdaProps

The properties for the ImageGenerationAppsyncLambdaProps class.

## Table of contents

### Properties

- [cognitoUserPool](ImageGenerationAppsyncLambdaProps.md#cognitouserpool)
- [enableOperationalMetric](ImageGenerationAppsyncLambdaProps.md#enableoperationalmetric)
- [existingBusInterface](ImageGenerationAppsyncLambdaProps.md#existingbusinterface)
- [existingGeneratedAssetsBucketObj](ImageGenerationAppsyncLambdaProps.md#existinggeneratedassetsbucketobj)
- [existingMergedApi](ImageGenerationAppsyncLambdaProps.md#existingmergedapi)
- [existingSecurityGroup](ImageGenerationAppsyncLambdaProps.md#existingsecuritygroup)
- [existingVpc](ImageGenerationAppsyncLambdaProps.md#existingvpc)
- [generatedAssetsBucketProps](ImageGenerationAppsyncLambdaProps.md#generatedassetsbucketprops)
- [lambdaProvisionedConcurrency](ImageGenerationAppsyncLambdaProps.md#lambdaprovisionedconcurrency)
- [observability](ImageGenerationAppsyncLambdaProps.md#observability)
- [stage](ImageGenerationAppsyncLambdaProps.md#stage)
- [vpcProps](ImageGenerationAppsyncLambdaProps.md#vpcprops)

## Properties

### cognitoUserPool

`Readonly` **cognitoUserPool**: `IUserPool`

Cognito user pool used for authentication.

**`Default`**

```ts
- None
```

___

### enableOperationalMetric

`Optional` `Readonly` **enableOperationalMetric**: `boolean`

Optional.CDK constructs provided collects anonymous operational
metrics to help AWS improve the quality and features of the
constructs. Data collection is subject to the AWS Privacy Policy
(https://aws.amazon.com/privacy/). To opt out of this feature,
simply disable it by setting the construct property
"enableOperationalMetric" to false for each construct used.

**`Default`**

```ts
- true
```

___

### existingBusInterface

`Optional` `Readonly` **existingBusInterface**: `IEventBus`

Optional Existing instance of an EventBridge bus. If not provided, the construct will create one.

**`Default`**

```ts
- None
```

___

### existingGeneratedAssetsBucketObj

`Optional` `Readonly` **existingGeneratedAssetsBucketObj**: `IBucket`

Existing instance of S3 Bucket object, providing both this and `generatedAssetsBucketProps` will cause an error.

**`Default`**

```ts
- None
```

___

### existingMergedApi

`Optional` `Readonly` **existingMergedApi**: `CfnGraphQLApi`

Existing merged Appsync GraphQL api.

**`Default`**

```ts
- None
```

___

### existingSecurityGroup

`Optional` `Readonly` **existingSecurityGroup**: `ISecurityGroup`

Optional existing security group allowing access to opensearch. Used by the lambda functions
built by this construct. If not provided, the construct will create one.

**`Default`**

```ts
- none
```

___

### existingVpc

`Optional` `Readonly` **existingVpc**: `IVpc`

Optional An existing VPC in which to deploy the construct. Providing both this and
vpcProps is an error.

**`Default`**

```ts
- none
```

___

### generatedAssetsBucketProps

`Optional` `Readonly` **generatedAssetsBucketProps**: `BucketProps`

Optional user provided props to override the default props for the S3 Bucket.
Providing both this and `existingGeneratedAssetsBucketObj` will cause an error.

**`Default`**

```ts
- Default props are used
```

___

### lambdaProvisionedConcurrency

`Optional` `Readonly` **lambdaProvisionedConcurrency**: `number`

Optional. Allows a user to configure
Lambda provisioned concurrency for consistent performance

___

### observability

`Optional` `Readonly` **observability**: `boolean`

Enable observability. Warning: associated cost with the services
used. Best practive to enable by default.

**`Default`**

```ts
- true
```

___

### stage

`Optional` `Readonly` **stage**: `string`

Value will be appended to resources name.

**`Default`**

```ts
- _dev
```

___

### vpcProps

`Optional` `Readonly` **vpcProps**: `VpcProps`

Optional custom properties for a VPC the construct will create. This VPC will
be used by the Lambda functions the construct creates. Providing
both this and existingVpc is an error.

**`Default`**

```ts
- none
```
747 changes: 746 additions & 1 deletion docs/generative_ai_cdk_constructs.drawio

Large diffs are not rendered by default.

Loading

0 comments on commit d4aa369

Please sign in to comment.