instance_profile#

async idem_aws.exec.aws.iam.instance_profile.get(hub, ctx, name, resource_id: str = None)[source]#

Provides details about a specific instance profile as a data-source

Parameters:
  • name (str) – The AWS Instance Profile name

  • resource_id (str, Optional) – AWS Instance Profile name to identify the resource

Returns:

Returns the instance profile

Return type:

dict[str, Any]

Examples

Calling this exec module function from the cli:

idem exec aws.iam.instance_profile.get name="name" resource_id="resource_id"

Using in a state:

my_unmanaged_resource:
  exec.run:
    - path: aws.iam.instance_profile.get
    - kwargs:
        name: name
        resource_id: resource_id
async idem_aws.exec.aws.iam.instance_profile.update_instance_profile_tags(hub, ctx, instance_profile_name: str, old_tags: Dict[str, Any], new_tags: Dict[str, Any])[source]#

Update tags of AWS IAM Instance Profile

TODO - this method might fail with localstack but is successful with a real AWS account

Parameters:
  • instance_profile_name (str) – The AWS Instance Profile name

  • old_tags (dict) – A dict of old tags

  • new_tags (dict) – A dict of new tags

Returns:

Tags after the update

Return type:

dict[str, Any]

Examples

Calling this exec module function from the cli:

idem exec aws.iam.instance_profile.update_instance_profile_tags instance_profile_name="name" old_tags='{}' new_tags='{}'

Using in a state:

my_unmanaged_resource:
  exec.run:
    - path: aws.iam.instance_profile.update_instance_profile_tags
    - kwargs:
        instance_profile_name: name
        old_tags:
            old_tag: old_val
        new_tags:
            new_tag: new_val