[ aws . deploy ]

batch-get-on-premises-instances

Description

Gets information about one or more on-premises instances. The maximum number of on-premises instances that can be returned is 25.

See also: AWS API Documentation

See ‘aws help’ for descriptions of global parameters.

Synopsis

  batch-get-on-premises-instances
--instance-names <value>
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]

Options

--instance-names (list)

The names of the on-premises instances about which to get information. The maximum number of instance names you can specify is 25.

(string)

Syntax:

"string" "string" ...

--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See ‘aws help’ for descriptions of global parameters.

Examples

To get information about one or more on-premises instances

The follwoing batch-get-on-premises-instances example gets information about two on-premises instances.

aws deploy batch-get-on-premises-instances --instance-names AssetTag12010298EX AssetTag23121309EX

Output:

{
    "instanceInfos": [
        {
            "iamUserArn": "arn:aws:iam::123456789012:user/AWS/CodeDeploy/AssetTag12010298EX",
            "tags": [
                {
                    "Value": "CodeDeployDemo-OnPrem",
                    "Key": "Name"
                }
            ],
            "instanceName": "AssetTag12010298EX",
            "registerTime": 1425579465.228,
            "instanceArn": "arn:aws:codedeploy:us-west-2:123456789012:instance/AssetTag12010298EX_4IwLNI2Alh"
        },
        {
            "iamUserArn": "arn:aws:iam::123456789012:user/AWS/CodeDeploy/AssetTag23121309EX",
            "tags": [
                {
                    "Value": "CodeDeployDemo-OnPrem",
                    "Key": "Name"
                }
            ],
            "instanceName": "AssetTag23121309EX",
            "registerTime": 1425595585.988,
            "instanceArn": "arn:aws:codedeploy:us-west-2:80398EXAMPLE:instance/AssetTag23121309EX_PomUy64Was"
        }
    ]
}

Output

instanceInfos -> (list)

Information about the on-premises instances.

(structure)

Information about an on-premises instance.

instanceName -> (string)

The name of the on-premises instance.

iamSessionArn -> (string)

The ARN of the IAM session associated with the on-premises instance.

iamUserArn -> (string)

The IAM user ARN associated with the on-premises instance.

instanceArn -> (string)

The ARN of the on-premises instance.

registerTime -> (timestamp)

The time at which the on-premises instance was registered.

deregisterTime -> (timestamp)

If the on-premises instance was deregistered, the time at which the on-premises instance was deregistered.

tags -> (list)

The tags currently associated with the on-premises instance.

(structure)

Information about a tag.

Key -> (string)

The tag’s key.

Value -> (string)

The tag’s value.