Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Runs a command remotely on a container within a task.
If you use a condition key in your IAM policy to refine the conditions
for the policy statement, for example limit the actions to a specific
cluster, you receive an AccessDeniedException
when there is a mismatch
between the condition key value and the corresponding parameter value.
For information about required permissions and considerations, see Using Amazon ECS Exec for debugging in the Amazon ECS Developer Guide.
Synopsis
- data ExecuteCommand = ExecuteCommand' {}
- newExecuteCommand :: Text -> Bool -> Text -> ExecuteCommand
- executeCommand_cluster :: Lens' ExecuteCommand (Maybe Text)
- executeCommand_container :: Lens' ExecuteCommand (Maybe Text)
- executeCommand_command :: Lens' ExecuteCommand Text
- executeCommand_interactive :: Lens' ExecuteCommand Bool
- executeCommand_task :: Lens' ExecuteCommand Text
- data ExecuteCommandResponse = ExecuteCommandResponse' {
- clusterArn :: Maybe Text
- containerArn :: Maybe Text
- containerName :: Maybe Text
- interactive :: Maybe Bool
- session :: Maybe Session
- taskArn :: Maybe Text
- httpStatus :: Int
- newExecuteCommandResponse :: Int -> ExecuteCommandResponse
- executeCommandResponse_clusterArn :: Lens' ExecuteCommandResponse (Maybe Text)
- executeCommandResponse_containerArn :: Lens' ExecuteCommandResponse (Maybe Text)
- executeCommandResponse_containerName :: Lens' ExecuteCommandResponse (Maybe Text)
- executeCommandResponse_interactive :: Lens' ExecuteCommandResponse (Maybe Bool)
- executeCommandResponse_session :: Lens' ExecuteCommandResponse (Maybe Session)
- executeCommandResponse_taskArn :: Lens' ExecuteCommandResponse (Maybe Text)
- executeCommandResponse_httpStatus :: Lens' ExecuteCommandResponse Int
Creating a Request
data ExecuteCommand Source #
See: newExecuteCommand
smart constructor.
ExecuteCommand' | |
|
Instances
Create a value of ExecuteCommand
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:cluster:ExecuteCommand'
, executeCommand_cluster
- The Amazon Resource Name (ARN) or short name of the cluster the task is
running in. If you do not specify a cluster, the default cluster is
assumed.
$sel:container:ExecuteCommand'
, executeCommand_container
- The name of the container to execute the command on. A container name
only needs to be specified for tasks containing multiple containers.
ExecuteCommand
, executeCommand_command
- The command to run on the container.
ExecuteCommand
, executeCommand_interactive
- Use this flag to run your command in interactive mode.
$sel:task:ExecuteCommand'
, executeCommand_task
- The Amazon Resource Name (ARN) or ID of the task the container is part
of.
Request Lenses
executeCommand_cluster :: Lens' ExecuteCommand (Maybe Text) Source #
The Amazon Resource Name (ARN) or short name of the cluster the task is running in. If you do not specify a cluster, the default cluster is assumed.
executeCommand_container :: Lens' ExecuteCommand (Maybe Text) Source #
The name of the container to execute the command on. A container name only needs to be specified for tasks containing multiple containers.
executeCommand_command :: Lens' ExecuteCommand Text Source #
The command to run on the container.
executeCommand_interactive :: Lens' ExecuteCommand Bool Source #
Use this flag to run your command in interactive mode.
executeCommand_task :: Lens' ExecuteCommand Text Source #
The Amazon Resource Name (ARN) or ID of the task the container is part of.
Destructuring the Response
data ExecuteCommandResponse Source #
See: newExecuteCommandResponse
smart constructor.
ExecuteCommandResponse' | |
|
Instances
newExecuteCommandResponse Source #
Create a value of ExecuteCommandResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
ExecuteCommandResponse
, executeCommandResponse_clusterArn
- The Amazon Resource Name (ARN) of the cluster.
ExecuteCommandResponse
, executeCommandResponse_containerArn
- The Amazon Resource Name (ARN) of the container.
ExecuteCommandResponse
, executeCommandResponse_containerName
- The name of the container.
ExecuteCommand
, executeCommandResponse_interactive
- Determines whether the execute command session is running in interactive
mode. Amazon ECS only supports initiating interactive sessions, so you
must specify true
for this value.
$sel:session:ExecuteCommandResponse'
, executeCommandResponse_session
- The details of the SSM session that was created for this instance of
execute-command.
ExecuteCommandResponse
, executeCommandResponse_taskArn
- The Amazon Resource Name (ARN) of the task.
$sel:httpStatus:ExecuteCommandResponse'
, executeCommandResponse_httpStatus
- The response's http status code.
Response Lenses
executeCommandResponse_clusterArn :: Lens' ExecuteCommandResponse (Maybe Text) Source #
The Amazon Resource Name (ARN) of the cluster.
executeCommandResponse_containerArn :: Lens' ExecuteCommandResponse (Maybe Text) Source #
The Amazon Resource Name (ARN) of the container.
executeCommandResponse_containerName :: Lens' ExecuteCommandResponse (Maybe Text) Source #
The name of the container.
executeCommandResponse_interactive :: Lens' ExecuteCommandResponse (Maybe Bool) Source #
Determines whether the execute command session is running in interactive
mode. Amazon ECS only supports initiating interactive sessions, so you
must specify true
for this value.
executeCommandResponse_session :: Lens' ExecuteCommandResponse (Maybe Session) Source #
The details of the SSM session that was created for this instance of execute-command.
executeCommandResponse_taskArn :: Lens' ExecuteCommandResponse (Maybe Text) Source #
The Amazon Resource Name (ARN) of the task.
executeCommandResponse_httpStatus :: Lens' ExecuteCommandResponse Int Source #
The response's http status code.