README
Usage
serverless-resources [options] [command]
Commands
info
Get information in JSON format for this command
Usage
serverless-resources info [options]
Options
- -y --yaml Format as YAML
- -s --service <
service
> Service name (default infers from the serverless.yml - -p --path <
path
> Path to serverless base definition (default is cwd) - -r --region <
region
> AWS Region - defaults to environment value - -t --stage <
stage
> Stage to target, usually dev or prod - -a --aws-profile <
profile
> Name of AWS profile to use
@raydeck/serverless-resources - v3.1.1
Index
Functions
- fixYaml
- fixYamlFile
- getAppSync
- getArnForDatabaseTable
- getArnForLambda
- getArnForQueue
- getArnForRole
- getGSIsForDatabaseTable
- getLSIsForDatabaseTable
- getOutputs
- getResources
- getServiceName
- getStreamArnForDatabaseTable
- getUnqualifiedArnForLambda
- isDDBResource
Functions
fixYaml
▸ fixYaml(yamlObj
: object, path
: string): object
Defined in index.ts:32
Fill in an object with external file references
internal
Parameters:
Name | Type | Description |
---|---|---|
yamlObj |
object | object to be fixed |
path |
string | path reference for finding other matches (really for config.json) |
Returns: object
- [ key: string]: any
fixYamlFile
▸ fixYamlFile(path
: string): object
Defined in index.ts:18
Fix a yaml file at path specified -
internal
Parameters:
Name | Type | Description |
---|---|---|
path |
string | path to yaml file |
Returns: object
- [ key: string]: any
getAppSync
▸ getAppSync(appResources
: object, cmd
: object): Promise‹undefined | GraphqlApi›
Defined in index.ts:440
Get profile for Appsync resource in this stack
Parameters:
▪ appResources: object
Resources as returened by getResources above
▪ cmd: object
arguments from CLI tool
Name | Type |
---|---|
awsProfile? |
undefined | string |
json? |
undefined | false | true |
path? |
undefined | string |
region? |
undefined | string |
service? |
undefined | string |
stage? |
undefined | string |
yaml? |
undefined | false | true |
Returns: Promise‹undefined | GraphqlApi›
getArnForDatabaseTable
▸ getArnForDatabaseTable(TableName
: string, region
: string): Promise‹undefined | string›
Defined in index.ts:133
Get the arn by table name
internal
Parameters:
Name | Type | Default | Description |
---|---|---|---|
TableName |
string | - | DDB table name |
region |
string | "us-east-1" | AWS region |
Returns: Promise‹undefined | string›
getArnForLambda
▸ getArnForLambda(FunctionName
: string, region
: string): Promise‹undefined | string›
Defined in index.ts:216
get the arn of a lambda from the function name
internal
Parameters:
Name | Type | Default | Description |
---|---|---|---|
FunctionName |
string | - | name of the lambda function |
region |
string | "us-east-1" | AWS region |
Returns: Promise‹undefined | string›
getArnForQueue
▸ getArnForQueue(url
: string, region
: string): Promise‹undefined | string›
Defined in index.ts:89
Parameters:
Name | Type |
---|---|
url |
string |
region |
string |
Returns: Promise‹undefined | string›
getArnForRole
▸ getArnForRole(role
: string, region
: string): Promise‹undefined | string›
Defined in index.ts:268
Get the ARN of a role by name
internal
Parameters:
Name | Type | Default | Description |
---|---|---|---|
role |
string | - | Name of the role |
region |
string | "us-east-1" | AWS Region |
Returns: Promise‹undefined | string›
getGSIsForDatabaseTable
▸ getGSIsForDatabaseTable(TableName
: string, region
: string): Promise‹object[]›
Defined in index.ts:156
Get Global Secondary Inidices of a table
internal
Parameters:
Name | Type | Default | Description |
---|---|---|---|
TableName |
string | - | DDB Table name |
region |
string | "us-east-1" | AWS region |
Returns: Promise‹object[]›
getLSIsForDatabaseTable
▸ getLSIsForDatabaseTable(TableName
: string, region
: string): Promise‹object[]›
Defined in index.ts:186
Get Local Secondary Indicies for a table
internal
Parameters:
Name | Type | Default | Description |
---|---|---|---|
TableName |
string | - | DDB Table name |
region |
string | "us-east-1" | AWS region |
Returns: Promise‹object[]›
getOutputs
▸ getOutputs(cmd
: object): Promise‹object›
Defined in index.ts:282
Get outputs of a single stack at the path in question
Parameters:
▪ cmd: object
Command line options from the tool
Name | Type |
---|---|
awsProfile? |
undefined | string |
json? |
undefined | false | true |
path? |
undefined | string |
region? |
undefined | string |
service? |
undefined | string |
stage? |
undefined | string |
yaml? |
undefined | false | true |
Returns: Promise‹object›
getResources
▸ getResources(cmd
: object): Promise‹object›
Defined in index.ts:327
Get resources of the stack at this path
Parameters:
▪ cmd: object
Inputs from command line tool
Name | Type |
---|---|
awsProfile? |
undefined | string |
path? |
undefined | string |
region? |
undefined | string |
service? |
undefined | string |
stage? |
undefined | string |
Returns: Promise‹object›
getServiceName
▸ getServiceName(path?
: undefined | string): any
Defined in index.ts:80
Get name of stack we are building right here
internal
Parameters:
Name | Type | Description |
---|---|---|
path? |
undefined | string | current path to serverless.yml file (will append /serverless.yml if missing) |
Returns: any
getStreamArnForDatabaseTable
▸ getStreamArnForDatabaseTable(TableName
: string, region
: string): Promise‹undefined | string›
Defined in index.ts:110
Get Stream for database
internal
Parameters:
Name | Type | Default | Description |
---|---|---|---|
TableName |
string | - | DDB table name |
region |
string | "us-east-1" | region |
Returns: Promise‹undefined | string›
getUnqualifiedArnForLambda
▸ getUnqualifiedArnForLambda(FunctionName
: string, region
: string): Promise‹undefined | string›
Defined in index.ts:237
Get the unqualified arn of a lambda
internal
Parameters:
Name | Type | Default | Description |
---|---|---|---|
FunctionName |
string | - | Name of Function |
region |
string | "us-east-1" | AWS Region |
Returns: Promise‹undefined | string›
isDDBResource
▸ isDDBResource(resource
: object): boolean
Defined in index.ts:259
Detect whether a given resource is for DDB
internal
Parameters:
▪ resource: object
Resource object
Name | Type |
---|---|
ResourceType |
string |
Returns: boolean