key_pair#
- async idem_aws.exec.aws.ec2.key_pair.get(hub, ctx, name, resource_id: str = None, filters: List[Dict[str, str]] = None) Dict [source]#
Get a key_pair resource from AWS.
Supply one of the inputs as the filter to find a key pair. If more than one resource is found, the first resource returned from AWS will be used. The function returns None when no resource is found.
- Parameters:
name (str) – The name of the Idem state.
resource_id (str, Optional) – AWS key pair id to identify the resource.
filters (list[dict[str, str]], Optional) – One or more filters. For example: {“Name”: “key-pair-id”, “Values”: [resource_id]}, A complete list of filters can be found at https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html#EC2.Client.describe_key_pairs