Classes
Name | Description |
---|---|
URLShortener | Represents a URL shortener. |
Structs
Name | Description |
---|---|
CustomDomainOptions | Properties to configure a domain name. |
URLShortenerProps | Properties to configure a URL shortener. |
Represents a URL shortener.
Use addDomainName
to configure a custom domain.
By default, this construct will deploy:
- An API Gateway API that can be accessed from a public endpoint.
- A DynamoDB table for storing links.
- A Lambda Function for shortening the link and storing it to DynamoDB table.
Implements: IConstruct, IConstruct, IConstruct, IDependable Extends: Construct
new URLShortener(scope: Construct, id: string, props?: URLShortenerProps)
- scope (
Construct
) No description - id (
string
) No description - props (
URLShortenerProps
) No description- dynamoTable (
Table
) The DynamoDB table used for storing links. Default: A new DynamoDB Table is created.
- dynamoTable (
Name | Type | Description |
---|---|---|
static defaultDynamoTableProps🔹 | TableProps |
Default table props with partition key set to id , you can use it to extend your TableProps . |
addDomainName(options: CustomDomainOptions): URLShortener
- options (
CustomDomainOptions
) No description- domainName (
string
) Domain name to be associated with URL shortener service, supports apex domain and subdomain. - zone (
IHostedZone
) Hosted zone of the domain which will be used to create alias record(s) from domain name in the hosted zone to URL shortener API endpoint. - certificate (
ICertificate
) The AWS Certificate Manager (ACM) certificate that will be associated with the URL shortener that will be created. Default: A new DNS validated certificate is created in the same region.
- domainName (
Returns:
Properties to configure a domain name.
Name | Type | Description |
---|---|---|
domainName🔹 | string |
Domain name to be associated with URL shortener service, supports apex domain and subdomain. |
zone🔹 | IHostedZone |
Hosted zone of the domain which will be used to create alias record(s) from domain name in the hosted zone to URL shortener API endpoint. |
certificate?🔹 | ICertificate |
The AWS Certificate Manager (ACM) certificate that will be associated with the URL shortener that will be created. Default: A new DNS validated certificate is created in the same region. |
Properties to configure a URL shortener.
Name | Type | Description |
---|---|---|
dynamoTable?🔹 | Table |
The DynamoDB table used for storing links. Default: A new DynamoDB Table is created. |