- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
GetOnPremisesInstanceCommand
Gets information about an on-premises instance.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { CodeDeployClient, GetOnPremisesInstanceCommand } from "@aws-sdk/client-codedeploy"; // ES Modules import
// const { CodeDeployClient, GetOnPremisesInstanceCommand } = require("@aws-sdk/client-codedeploy"); // CommonJS import
const client = new CodeDeployClient(config);
const input = { // GetOnPremisesInstanceInput
instanceName: "STRING_VALUE", // required
};
const command = new GetOnPremisesInstanceCommand(input);
const response = await client.send(command);
// { // GetOnPremisesInstanceOutput
// instanceInfo: { // InstanceInfo
// instanceName: "STRING_VALUE",
// iamSessionArn: "STRING_VALUE",
// iamUserArn: "STRING_VALUE",
// instanceArn: "STRING_VALUE",
// registerTime: new Date("TIMESTAMP"),
// deregisterTime: new Date("TIMESTAMP"),
// tags: [ // TagList
// { // Tag
// Key: "STRING_VALUE",
// Value: "STRING_VALUE",
// },
// ],
// },
// };
GetOnPremisesInstanceCommand Input
See GetOnPremisesInstanceCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
instanceName Required | string | undefined | The name of the on-premises instance about which to get information. |
GetOnPremisesInstanceCommand Output
See GetOnPremisesInstanceCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
instanceInfo | InstanceInfo | undefined | Information about the on-premises instance. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InstanceNameRequiredException | client | An on-premises instance name was not specified. |
InstanceNotRegisteredException | client | The specified on-premises instance is not registered. |
InvalidInstanceNameException | client | The on-premises instance name was specified in an invalid format. |
CodeDeployServiceException | Base exception class for all service exceptions from CodeDeploy service. |