SFTP adapter request and response for a chgrp command
To configure an adapter request to communicate with a host that is not defined in the adapter configuration, you can designate a dynamic target by assigning values for the required configuration elements. These elements work as a set. You cannot retrieve partial information from the configuration node.
You can omit the <targets>
block from the adapter request. In the absence of a <targets>
block, the default target from the adapter configuration is used.
The following table describes the elements of an SFTP adapter request with a chgrp command.
Elements of an SFTP adapter request with a chgrp command
Element |
Description |
Required |
---|---|---|
|
Contains the |
Conditional; required if a target is referenced or defined in the request |
|
Contains a |
Conditional; required if a target is referenced or defined in the request |
|
Specifies the host name or the IP address of the remote host |
Conditional; required when defining a dynamic target computer |
|
Specifies the port on which the remote host listens |
Conditional |
|
Specifies the user name to be used for remote host authentication |
Conditional; required when defining a dynamic target |
|
Specifies the password that corresponds to the |
Conditional; used if you do not provide the |
|
Indicates whether the password specified is encrypted; is an attribute of the |
No |
|
Specifies the time, in seconds, to wait for the expected prompt to return |
No |
|
Identifies the path to the local known_hosts file |
Conditional |
|
Determines whether a connection must continue if the key verification fails |
Conditional |
|
Specifies the preference of the algorithm used to encrypt the public key |
Conditional |
|
Specifies the time, in seconds, to wait for user authentication on the target server |
No |
|
Creates an extra channel session for use with Sun Solaris 9 |
No |
|
Contains the SFTP command element |
Yes |
|
Indicates the file's group is changed |
Yes |
|
Specifies the remote file path, including the file name |
Yes |
|
Specifies the group ID that is assigned to the specified file |
Yes |
|
Specifies the supporting CharSet |
No |
The following figure shows an XML template of the adapter request for the SFTP adapter with the chgrp command.
XML template of the SFTP adapter request with chgrp command
<sftp-request>
<targets>
<target name=""/>
<target>
<host></host>
<port></port>
<user-name></user-name>
<password encryption-type=""></password>
<timeout-secs></timeout-secs>
<known-hosts-config></known-hosts-config>
<allow-unknown-hosts></allow-unknown-hosts>
<preferred-pk-algorithm></preferred-pk-algorithm>
<establish-connection-timeout-secs></establish-connection-timeout-secs>
<network-environment></network-environment>
<character-set></character-set>
</target>
</targets>
<commands>
<chgrp>
<file></file>
<gid></gid>
</chgrp>
</commands>
</sftp-request>
The following figure shows an XML sample of the adapter request for the SFTP adapter with chgrp command. In this sample, the first target references the adapter configuration and the second target is a dynamic target.
XML sample of the SFTP adapter request with chgrp command
<sftp-request>
<targets>
<target name="host1"/>
<target>
<host>server1</host>
<port>2200</port>
<user-name>user</user-name>
<password encryption-type="Plain">test</password>
<timeout-secs>90</timeout-secs>
<known-hosts-config>/path/to/known_hosts</known-hosts-config>
<allow-unknown-hosts>false</allow-unknown-hosts>
<preferred-pk-algorithm>ssh-dss</preferred-pk-algorithm>
<establish-connection-timeout-secs>90</establish-connection-timeout-secs>
<network-environment>true</network-environment>
<character-set>Shift_JIS</character-set>
</target>
</targets>
<commands>
<chgrp>
<file>/path/to/file/filename</file>
<gid>1</gid>
</chgrp>
</commands>
</sftp-request>
The chgrp command request for a SFTP adapter returns an adapter response that contains the summary information for the command. The following table describes the elements of an SFTP adapter response to a request with chgrp command.
Elements of an SFTP adapter response to a request with chgrp command
Element |
Description |
---|---|
|
Contains the request level summary information |
|
Indicates the status of the request |
|
Indicates the error message returned when the value of the |
|
Contains the command output for all target computers |
|
Contains the command output for a specific target computer |
|
Contains the target level summary information |
|
Indicates the status of the target connection |
|
Contains the error message if a target level error occurs |
|
Contains the command responses for all the commands executed on the target computer |
|
Contains the command response for a specific command |
|
Contains the command summary information |
|
Specifies the sequence in which the command is executed |
|
Specifies the command executed |
|
Specifies the duration of the command execution, in milliseconds |
|
Indicates the status of the command execution |
|
Contains the error message if the execution of a command is interrupted |
|
Contains the lines that result from the command |
The following figure shows an XML sample of the adapter request for the SFTP adapter with the chgrp command.
XML sample of the SFTP adapter response with chgrp command
<sftp-command-output>
<request-metadata>
<status>success</status>
<error>Present only with status of 'error'</error>
</request-metadata>
<targets-output>
<target-output host="server1">
<target-metadata>
<status>success</status>
<error>Present only with status of 'error'</error>
</target-metadata>
<commands-output>
<command-output>
<metadata>
<id>1</id>
<command>chgrp</command>
<execution-milliseconds>value</execution-milliseconds>
<status>success</status>
<error>Present only with status of 'error'</error>
</metadata>
<output/>
</command-output>
</commands-output>
</target-output>
</targets-output>
</sftp-command-output>
Comments
Log in or register to comment.