Exports an async function that removes a IAM Role
- Source:
(require("destroyRole"))(region, roleName)
- Source:
Exports destroyRole
Parameters:
Name | Type | Description |
---|---|---|
region |
String | This is the region of where this AWS service is deployed |
roleName |
String | This is the name of the IAM role |
Methods
(async, inner) destroyRole(iam, roleName)
- Source:
Deletes a IAM role
Parameters:
Name | Type | Description |
---|---|---|
iam |
IAMClient | This is the IAM client |
roleName |
String | This is the name of the IAM role |
Throws:
Will throw an error if IAM client fails to execute its command
(async, inner) detachPermissions(iam, permissions, roleName)
- Source:
Removes multiple permissions/policies from a IAM role
Parameters:
Name | Type | Description |
---|---|---|
iam |
IAMClient | This is the IAM client |
permissions |
String | This is the policy arn |
roleName |
String | This is the name of the IAM role |
(async, inner) detachPolicy(iam, perm, roleName) → {Object}
- Source:
Removes a permission from a IAM role
Parameters:
Name | Type | Description |
---|---|---|
iam |
IAMClient | This is the IAM client |
perm |
String | This is the policy arn |
roleName |
String | This is the name of the IAM role |
Throws:
Will throw an error if IAM client fails to execute its command
Returns:
This is the object representing whether the removal was successful
- Type
- Object