BatchGetDeploymentGroupsCommand

Gets information about one or more deployment groups.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { CodeDeployClient, BatchGetDeploymentGroupsCommand } from "@aws-sdk/client-codedeploy"; // ES Modules import
// const { CodeDeployClient, BatchGetDeploymentGroupsCommand } = require("@aws-sdk/client-codedeploy"); // CommonJS import
const client = new CodeDeployClient(config);
const input = { // BatchGetDeploymentGroupsInput
  applicationName: "STRING_VALUE", // required
  deploymentGroupNames: [ // DeploymentGroupsList // required
    "STRING_VALUE",
  ],
};
const command = new BatchGetDeploymentGroupsCommand(input);
const response = await client.send(command);
// { // BatchGetDeploymentGroupsOutput
//   deploymentGroupsInfo: [ // DeploymentGroupInfoList
//     { // DeploymentGroupInfo
//       applicationName: "STRING_VALUE",
//       deploymentGroupId: "STRING_VALUE",
//       deploymentGroupName: "STRING_VALUE",
//       deploymentConfigName: "STRING_VALUE",
//       ec2TagFilters: [ // EC2TagFilterList
//         { // EC2TagFilter
//           Key: "STRING_VALUE",
//           Value: "STRING_VALUE",
//           Type: "KEY_ONLY" || "VALUE_ONLY" || "KEY_AND_VALUE",
//         },
//       ],
//       onPremisesInstanceTagFilters: [ // TagFilterList
//         { // TagFilter
//           Key: "STRING_VALUE",
//           Value: "STRING_VALUE",
//           Type: "KEY_ONLY" || "VALUE_ONLY" || "KEY_AND_VALUE",
//         },
//       ],
//       autoScalingGroups: [ // AutoScalingGroupList
//         { // AutoScalingGroup
//           name: "STRING_VALUE",
//           hook: "STRING_VALUE",
//           terminationHook: "STRING_VALUE",
//         },
//       ],
//       serviceRoleArn: "STRING_VALUE",
//       targetRevision: { // RevisionLocation
//         revisionType: "S3" || "GitHub" || "String" || "AppSpecContent",
//         s3Location: { // S3Location
//           bucket: "STRING_VALUE",
//           key: "STRING_VALUE",
//           bundleType: "tar" || "tgz" || "zip" || "YAML" || "JSON",
//           version: "STRING_VALUE",
//           eTag: "STRING_VALUE",
//         },
//         gitHubLocation: { // GitHubLocation
//           repository: "STRING_VALUE",
//           commitId: "STRING_VALUE",
//         },
//         string: { // RawString
//           content: "STRING_VALUE",
//           sha256: "STRING_VALUE",
//         },
//         appSpecContent: { // AppSpecContent
//           content: "STRING_VALUE",
//           sha256: "STRING_VALUE",
//         },
//       },
//       triggerConfigurations: [ // TriggerConfigList
//         { // TriggerConfig
//           triggerName: "STRING_VALUE",
//           triggerTargetArn: "STRING_VALUE",
//           triggerEvents: [ // TriggerEventTypeList
//             "DeploymentStart" || "DeploymentSuccess" || "DeploymentFailure" || "DeploymentStop" || "DeploymentRollback" || "DeploymentReady" || "InstanceStart" || "InstanceSuccess" || "InstanceFailure" || "InstanceReady",
//           ],
//         },
//       ],
//       alarmConfiguration: { // AlarmConfiguration
//         enabled: true || false,
//         ignorePollAlarmFailure: true || false,
//         alarms: [ // AlarmList
//           { // Alarm
//             name: "STRING_VALUE",
//           },
//         ],
//       },
//       autoRollbackConfiguration: { // AutoRollbackConfiguration
//         enabled: true || false,
//         events: [ // AutoRollbackEventsList
//           "DEPLOYMENT_FAILURE" || "DEPLOYMENT_STOP_ON_ALARM" || "DEPLOYMENT_STOP_ON_REQUEST",
//         ],
//       },
//       deploymentStyle: { // DeploymentStyle
//         deploymentType: "IN_PLACE" || "BLUE_GREEN",
//         deploymentOption: "WITH_TRAFFIC_CONTROL" || "WITHOUT_TRAFFIC_CONTROL",
//       },
//       outdatedInstancesStrategy: "UPDATE" || "IGNORE",
//       blueGreenDeploymentConfiguration: { // BlueGreenDeploymentConfiguration
//         terminateBlueInstancesOnDeploymentSuccess: { // BlueInstanceTerminationOption
//           action: "TERMINATE" || "KEEP_ALIVE",
//           terminationWaitTimeInMinutes: Number("int"),
//         },
//         deploymentReadyOption: { // DeploymentReadyOption
//           actionOnTimeout: "CONTINUE_DEPLOYMENT" || "STOP_DEPLOYMENT",
//           waitTimeInMinutes: Number("int"),
//         },
//         greenFleetProvisioningOption: { // GreenFleetProvisioningOption
//           action: "DISCOVER_EXISTING" || "COPY_AUTO_SCALING_GROUP",
//         },
//       },
//       loadBalancerInfo: { // LoadBalancerInfo
//         elbInfoList: [ // ELBInfoList
//           { // ELBInfo
//             name: "STRING_VALUE",
//           },
//         ],
//         targetGroupInfoList: [ // TargetGroupInfoList
//           { // TargetGroupInfo
//             name: "STRING_VALUE",
//           },
//         ],
//         targetGroupPairInfoList: [ // TargetGroupPairInfoList
//           { // TargetGroupPairInfo
//             targetGroups: [
//               {
//                 name: "STRING_VALUE",
//               },
//             ],
//             prodTrafficRoute: { // TrafficRoute
//               listenerArns: [ // ListenerArnList
//                 "STRING_VALUE",
//               ],
//             },
//             testTrafficRoute: {
//               listenerArns: [
//                 "STRING_VALUE",
//               ],
//             },
//           },
//         ],
//       },
//       lastSuccessfulDeployment: { // LastDeploymentInfo
//         deploymentId: "STRING_VALUE",
//         status: "Created" || "Queued" || "InProgress" || "Baking" || "Succeeded" || "Failed" || "Stopped" || "Ready",
//         endTime: new Date("TIMESTAMP"),
//         createTime: new Date("TIMESTAMP"),
//       },
//       lastAttemptedDeployment: {
//         deploymentId: "STRING_VALUE",
//         status: "Created" || "Queued" || "InProgress" || "Baking" || "Succeeded" || "Failed" || "Stopped" || "Ready",
//         endTime: new Date("TIMESTAMP"),
//         createTime: new Date("TIMESTAMP"),
//       },
//       ec2TagSet: { // EC2TagSet
//         ec2TagSetList: [ // EC2TagSetList
//           [
//             {
//               Key: "STRING_VALUE",
//               Value: "STRING_VALUE",
//               Type: "KEY_ONLY" || "VALUE_ONLY" || "KEY_AND_VALUE",
//             },
//           ],
//         ],
//       },
//       onPremisesTagSet: { // OnPremisesTagSet
//         onPremisesTagSetList: [ // OnPremisesTagSetList
//           [
//             {
//               Key: "STRING_VALUE",
//               Value: "STRING_VALUE",
//               Type: "KEY_ONLY" || "VALUE_ONLY" || "KEY_AND_VALUE",
//             },
//           ],
//         ],
//       },
//       computePlatform: "Server" || "Lambda" || "ECS",
//       ecsServices: [ // ECSServiceList
//         { // ECSService
//           serviceName: "STRING_VALUE",
//           clusterName: "STRING_VALUE",
//         },
//       ],
//       terminationHookEnabled: true || false,
//     },
//   ],
//   errorMessage: "STRING_VALUE",
// };

BatchGetDeploymentGroupsCommand Input

Parameter
Type
Description
applicationName
Required
string | undefined

The name of an CodeDeploy application associated with the applicable user or Amazon Web Services account.

deploymentGroupNames
Required
string[] | undefined

The names of the deployment groups.

BatchGetDeploymentGroupsCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
deploymentGroupsInfo
DeploymentGroupInfo[] | undefined

Information about the deployment groups.

errorMessage
string | undefined

Information about errors that might have occurred during the API call.

Throws

Name
Fault
Details
ApplicationDoesNotExistException
client

The application does not exist with the user or Amazon Web Services account.

ApplicationNameRequiredException
client

The minimum number of required application names was not specified.

BatchLimitExceededException
client

The maximum number of names or IDs allowed for this request (100) was exceeded.

DeploymentConfigDoesNotExistException
client

The deployment configuration does not exist with the user or Amazon Web Services account.

DeploymentGroupNameRequiredException
client

The deployment group name was not specified.

InvalidApplicationNameException
client

The application name was specified in an invalid format.

InvalidDeploymentGroupNameException
client

The deployment group name was specified in an invalid format.

CodeDeployServiceException
Base exception class for all service exceptions from CodeDeploy service.