import { S3UploadPresignedUrlApi } from 'cdk-s3-upload-presignedurl-api'
new S3UploadPresignedUrlApi(scope: Construct, id: string, props?: IS3UploadSignedUrlApiProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
IS3UploadSignedUrlApiProps |
No description. |
- Type: constructs.Construct
- Type: string
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
public toString(): string
Returns a string representation of this construct.
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
import { S3UploadPresignedUrlApi } from 'cdk-s3-upload-presignedurl-api'
S3UploadPresignedUrlApi.isConstruct(x: any)
Checks if x
is a construct.
- Type: any
Any object.
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
bucket |
aws-cdk-lib.aws_s3.Bucket |
No description. |
restApi |
aws-cdk-lib.aws_apigateway.RestApi |
No description. |
userPool |
any |
No description. |
userPoolClient |
any |
No description. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
public readonly bucket: Bucket;
- Type: aws-cdk-lib.aws_s3.Bucket
public readonly restApi: RestApi;
- Type: aws-cdk-lib.aws_apigateway.RestApi
public readonly userPool: any;
- Type: any
public readonly userPoolClient: any;
- Type: any
- Implemented By: IS3UploadSignedUrlApiProps
Name | Type | Description |
---|---|---|
allowedOrigins |
string[] |
Optional CORS allowedOrigins. |
apiGatewayProps |
any |
Optional user provided props to override the default props for the API Gateway. |
existingBucketObj |
aws-cdk-lib.aws_s3.Bucket |
Optional bucket where files should be uploaded to. |
existingUserPoolObj |
aws-cdk-lib.aws_cognito.UserPool |
Optional Cognito User Pool to secure the API. |
expiration |
number |
Optional expiration time in second. |
logRetention |
aws-cdk-lib.aws_logs.RetentionDays |
Optional log retention time for Lambda and API Gateway. |
secured |
boolean |
Optional boolean to specify if the API is secured (with Cognito) or publicly open. |
public readonly allowedOrigins: string[];
- Type: string[]
- Default: ['*']
Optional CORS allowedOrigins.
Should allow your domain(s) as allowed origin to request the API
public readonly apiGatewayProps: any;
- Type: any
- Default: Default props are used
Optional user provided props to override the default props for the API Gateway.
public readonly existingBucketObj: Bucket;
- Type: aws-cdk-lib.aws_s3.Bucket
- Default: Default Bucket is created
Optional bucket where files should be uploaded to.
Should contains the CORS properties
public readonly existingUserPoolObj: UserPool;
- Type: aws-cdk-lib.aws_cognito.UserPool
- Default: Default User Pool (and User Pool Client) are created
Optional Cognito User Pool to secure the API.
You should have created a User Pool Client too.
public readonly expiration: number;
- Type: number
- Default: 300
Optional expiration time in second.
Time before the presigned url expires.
public readonly logRetention: RetentionDays;
- Type: aws-cdk-lib.aws_logs.RetentionDays
- Default: one week
Optional log retention time for Lambda and API Gateway.
public readonly secured: boolean;
- Type: boolean
- Default: true
Optional boolean to specify if the API is secured (with Cognito) or publicly open.