Complete the airflow survey & get a free airflow 3 certification!

airflow.providers.amazon.aws.hooks.ssm

Classes

SsmHook

Interact with Amazon Systems Manager (SSM).

Module Contents

class airflow.providers.amazon.aws.hooks.ssm.SsmHook(*args, **kwargs)[source]

Bases: airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook

Interact with Amazon Systems Manager (SSM).

Provide thin wrapper around boto3.client("ssm").

Additional arguments (such as aws_conn_id) may be specified and are passed down to the underlying AwsBaseHook.

get_parameter_value(parameter, default=NOTSET)[source]

Return the provided Parameter or an optional default.

If it is encrypted, then decrypt and mask.

Parameters:
  • parameter (str) – The SSM Parameter name to return the value for.

  • default (str | airflow.utils.types.ArgNotSet) – Optional default value to return if none is found.

get_command_invocation(command_id, instance_id)[source]

Get the output of a command invocation for a specific instance.

Parameters:
  • command_id (str) – The ID of the command.

  • instance_id (str) – The ID of the instance.

Returns:

The command invocation details including output.

Return type:

dict

list_command_invocations(command_id)[source]

List all command invocations for a given command ID.

Parameters:

command_id (str) – The ID of the command.

Returns:

Response from SSM list_command_invocations API.

Return type:

dict

Was this entry helpful?