# Readme for: Core_GetSecret_1_0_0

This is an internal function only, and cannot be called externally.  

This method is for getting a secret value out of AWS Secrets Manager.  

Use this internally to gain secure values like:
* Database Usernames & Passwords - To connect to databases
* Secret `Key` > `Value` Stores

## How to call in a TypeScript File
```TypeScript
import { GetAWSSecret } from '../../../Utils/GetSecret/1.0.0';
```

```TypeScript
const DatabaseSettings = await GetAWSSecret('DBName')
...
const MySecret = await GetAWSSecret('secret Name', 'ap-southeast-2')
```
### Function Parameter Types
```TypeScript
GetAWSSecret(awsSecretName: string, regionName?: string)
```

## Expected Return Object

### Return Type
```TypeScript
Promise<any>
```

This could return any structure, depending on the secret that is stored.
```JSON
{
  "key1": {},
  "key2": [],
  "key3": "",
}
```
