ecs_composex.ecs.task_iam package ¶
Submodules ¶
ecs_composex.ecs.task_iam.helpers module ¶
- ecs_composex.ecs.task_iam.helpers. add_policies_from_x_iam ( task_policies , new_policies ) [source] ¶
-
Add IAM Policies to a list if not already defined.
- Parameters :
-
-
task_policies ( list [ Policy ] ) –
-
new_policies ( list [ dict ] ) –
-
- Returns :
-
ecs_composex.ecs.task_iam.task_role module ¶
- class ecs_composex.ecs.task_iam.task_role. EcsRole ( family , role_type ) [source] ¶
-
Bases:
object
Class to wrap around the AWS IAM Role
- property arn ¶
-
Return Ref() on arn parameter property
- property arn_param ¶
-
Returns the pointer to the ECS IAM Arn to use
- init_role ( role_type ) [source] ¶
-
Initialize the new IAM Role and based on the use for it, sets defaults IAM policies.
- property name ¶
-
Returns the Ref() on the name parameter
- property name_param ¶
-
Returns the pointer to the ECS IAM Role Name to use.
- property output_arn ¶
-
Returns the pointer on the IAM Role ARN from the IAM stack
- property output_name ¶
-
The pointer on output name from the IAM stack to use
- property role_type : str ¶
Module contents ¶
Package managing the IAM resources (roles, policies etc.) for a given ComposeFamily
- class ecs_composex.ecs.task_iam. TaskIam ( family ) [source] ¶
-
Bases:
object
Class to manage the compose family IAM roles, permissions and other settings
- add_new_managed_policies ( policies , role_name = None ) [source] ¶
-
Adds new managed policies to the given IAM role. If no role given, assume TaskRole
- Parameters :
-
-
policies ( list [ str ] ) –
-
role_name (
typing.Optional
[str
]) – Allows overriding which role to assign the policies to.
-
- add_new_managed_policy ( policy , role_name = None ) [source] ¶
-
Adds new managed policies to the given IAM role. If no role given, assume TaskRole
- Parameters :
-
-
policy –
-
role_name (
typing.Optional
[str
]) – Allows overriding which role to assign the policies to.
-
- add_new_policy ( policy , role_name = None ) [source] ¶
-
Adds new inline policy to the role
- Parameters :
-
-
policy (
troposphere.iam.Policy
) – -
role_name (
typing.Optional
[str
]) –
-
- Return type :
-
None
- Returns :
-
- property inline_policies_names ¶
- property managed_policies_list ¶
- property permissions_boundary ¶