# aws-sso-mapper

> [![Release](https://github.com/eliran89c/aws-sso-mapper/actions/workflows/release.yml/badge.svg)](https://github.com/eliran89c/aws-sso-mapper/actions/workflows/release.yml) ![npm](https://img.shields.io/npm/v/aws-sso-mapper?label=version)

Latest version **1.0.2** (published 2021-04-16) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install aws-sso-mapper
pnpm add aws-sso-mapper
yarn add aws-sso-mapper
bun add aws-sso-mapper
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2021-04-16 |
| First published | 2021-04-16 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 242.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Eliran Cohen |
| Maintainers | eliran89c |
| Keywords | cdk |

## Links

- npm: https://www.npmjs.com/package/aws-sso-mapper
- Repository: https://github.com/eliran89c/aws-sso-mapper
- Homepage: https://github.com/eliran89c/aws-sso-mapper#readme
- Issues: https://github.com/eliran89c/aws-sso-mapper/issues
- npm.io page: https://npm.io/package/aws-sso-mapper

## Dependencies (4)

- [@aws-cdk/core](https://npm.io/package/@aws-cdk/core.md) ^1.95.2
- [@aws-cdk/aws-iam](https://npm.io/package/@aws-cdk/aws-iam.md) ^1.95.2
- [@aws-cdk/aws-sso](https://npm.io/package/@aws-cdk/aws-sso.md) ^1.95.2
- [@aws-cdk/custom-resources](https://npm.io/package/@aws-cdk/custom-resources.md) ^1.95.2

## Recent versions

- 1.0.2 (latest) — 2021-04-16
- 1.0.1 — 2021-04-16

## README

[![Release](https://github.com/eliran89c/aws-sso-mapper/actions/workflows/release.yml/badge.svg)](https://github.com/eliran89c/aws-sso-mapper/actions/workflows/release.yml)
![npm](https://img.shields.io/npm/v/aws-sso-mapper?label=version)

# aws-sso-mapper module
Use this CDK module to create and map AWS SSO PermissionSets using principal names rather than principal ids
<!--BEGIN STABILITY BANNER-->

---

![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)

---
<!--END STABILITY BANNER-->


# API Reference

## class AwsSSOMapper  <a id="aws-sso-mapper-awsssomapper"></a>

### Initializer


```ts
new AwsSSOMapper(scope: Construct, id: string)
```

* **scope** (<code>[Construct](#aws-cdk-core-construct)</code>)  - represents the scope for all the resources.
* **id** (<code>string</code>)  - this is a a scope-unique id.



### Properties


Name | Type | Description 
-----|------|-------------
**identityStoreId** | <code>string</code> | <span>AWS SSO Identity Store id</span>
**instanceArn** | <code>string</code> | <span>AWS SSO instance ARN</span>

### Methods


#### addPermissionSet(id, props) <a id="aws-sso-mapper-awsssomapper-addpermissionset"></a>

Create new PermissionSet.

```ts
addPermissionSet(id: string, props: IAddPermissionSetProps): PermissionSet
```

* **id** (<code>string</code>)  this is a a scope-unique id.
* **props** (<code>[IAddPermissionSetProps](#aws-sso-mapper-iaddpermissionsetprops)</code>)  User provided props for the method.

__Returns__:
* <code>[PermissionSet](#aws-sso-mapper-permissionset)</code>



## class PermissionSet  <a id="aws-sso-mapper-permissionset"></a>

### Initializer


```ts
new PermissionSet(scope: Construct, id: string, props: IPermissionSetProps)
```

* **scope** (<code>[Construct](#aws-cdk-core-construct)</code>)  - represents the scope for all the resources.
* **id** (<code>string</code>)  - this is a a scope-unique id.
* **props** (<code>[IPermissionSetProps](#aws-sso-mapper-ipermissionsetprops)</code>)  - user provided props for the construct.


### Methods


#### assign(props) <a id="aws-sso-mapper-permissionset-assign"></a>

Assign principal to a specific AWS Account.

```ts
assign(props: IAssignProps): CfnAssignment
```

* **props** (<code>[IAssignProps](#aws-sso-mapper-iassignprops)</code>)  User provided props for the method.

__Returns__:
* <code>[CfnAssignment](#aws-cdk-aws-sso-cfnassignment)</code>



## interface IAddPermissionSetProps  <a id="aws-sso-mapper-iaddpermissionsetprops"></a>




### Properties


Name | Type | Description 
-----|------|-------------
**name** | <code>string</code> | The Permission Set name.
**description**? | <code>string</code> | The Permission Set description.<br/>__*Default*__: name
**inlinePolicy**? | <code>[PolicyDocument](#aws-cdk-aws-iam-policydocument)</code> | The Permission Set inline policy.<br/>__*Default*__: No inline policy
**managedPolicies**? | <code>Array<[IManagedPolicy](#aws-cdk-aws-iam-imanagedpolicy)></code> | A list with AWS managed policies to apply to the Permission Set.<br/>__*Default*__: No managed policies
**sessionDuration**? | <code>[Duration](#aws-cdk-core-duration)</code> | The Permission Set session duration.<br/>__*Default*__: 4 hours



## interface IAssignProps  <a id="aws-sso-mapper-iassignprops"></a>




### Properties


Name | Type | Description 
-----|------|-------------
**name** | <code>string</code> | The principal name.
**targetId** | <code>string</code> | The target id (AWS Account id).
**type** | <code>string</code> | The principal type (USER/GROUP).



## interface IPermissionSetProps  <a id="aws-sso-mapper-ipermissionsetprops"></a>




### Properties


Name | Type | Description 
-----|------|-------------
**identityStoreId** | <code>string</code> | The AWS SSO Identity Store id.
**instanceArn** | <code>string</code> | The AWS SSO instance ARN.
**name** | <code>string</code> | The Permission Set name.
**description**? | <code>string</code> | The Permission Set description.<br/>__*Default*__: name
**inlinePolicy**? | <code>[PolicyDocument](#aws-cdk-aws-iam-policydocument)</code> | The Permission Set inline policy.<br/>__*Default*__: No inline policy
**managedPolicies**? | <code>Array<[IManagedPolicy](#aws-cdk-aws-iam-imanagedpolicy)></code> | A list with AWS managed policies to apply to the Permission Set.<br/>__*Default*__: No managed policies
**sessionDuration**? | <code>[Duration](#aws-cdk-core-duration)</code> | The Permission Set session duration.<br/>__*Default*__: 4 hours

---
_Source: https://npm.io/package/aws-sso-mapper · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
