Skip to content

Commit f6f9e90

Browse files
author
awstools
committed
feat(client-groundstation): DigIF Expansion changes to the Customer APIs.
1 parent 02a5e1a commit f6f9e90

File tree

9 files changed

+2440
-200
lines changed

9 files changed

+2440
-200
lines changed

clients/client-groundstation/src/GroundStation.ts

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ import {
5656
DescribeEphemerisCommandInput,
5757
DescribeEphemerisCommandOutput,
5858
} from "./commands/DescribeEphemerisCommand";
59+
import {
60+
GetAgentConfigurationCommand,
61+
GetAgentConfigurationCommandInput,
62+
GetAgentConfigurationCommandOutput,
63+
} from "./commands/GetAgentConfigurationCommand";
5964
import { GetConfigCommand, GetConfigCommandInput, GetConfigCommandOutput } from "./commands/GetConfigCommand";
6065
import {
6166
GetDataflowEndpointGroupCommand,
@@ -113,6 +118,11 @@ import {
113118
ListTagsForResourceCommandInput,
114119
ListTagsForResourceCommandOutput,
115120
} from "./commands/ListTagsForResourceCommand";
121+
import {
122+
RegisterAgentCommand,
123+
RegisterAgentCommandInput,
124+
RegisterAgentCommandOutput,
125+
} from "./commands/RegisterAgentCommand";
116126
import {
117127
ReserveContactCommand,
118128
ReserveContactCommandInput,
@@ -124,6 +134,11 @@ import {
124134
UntagResourceCommandInput,
125135
UntagResourceCommandOutput,
126136
} from "./commands/UntagResourceCommand";
137+
import {
138+
UpdateAgentStatusCommand,
139+
UpdateAgentStatusCommandInput,
140+
UpdateAgentStatusCommandOutput,
141+
} from "./commands/UpdateAgentStatusCommand";
127142
import {
128143
UpdateConfigCommand,
129144
UpdateConfigCommandInput,
@@ -502,6 +517,38 @@ export class GroundStation extends GroundStationClient {
502517
}
503518
}
504519

520+
/**
521+
* <p>Gets the latest configuration information for a registered agent.</p>
522+
*/
523+
public getAgentConfiguration(
524+
args: GetAgentConfigurationCommandInput,
525+
options?: __HttpHandlerOptions
526+
): Promise<GetAgentConfigurationCommandOutput>;
527+
public getAgentConfiguration(
528+
args: GetAgentConfigurationCommandInput,
529+
cb: (err: any, data?: GetAgentConfigurationCommandOutput) => void
530+
): void;
531+
public getAgentConfiguration(
532+
args: GetAgentConfigurationCommandInput,
533+
options: __HttpHandlerOptions,
534+
cb: (err: any, data?: GetAgentConfigurationCommandOutput) => void
535+
): void;
536+
public getAgentConfiguration(
537+
args: GetAgentConfigurationCommandInput,
538+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetAgentConfigurationCommandOutput) => void),
539+
cb?: (err: any, data?: GetAgentConfigurationCommandOutput) => void
540+
): Promise<GetAgentConfigurationCommandOutput> | void {
541+
const command = new GetAgentConfigurationCommand(args);
542+
if (typeof optionsOrCb === "function") {
543+
this.send(command, optionsOrCb);
544+
} else if (typeof cb === "function") {
545+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
546+
this.send(command, optionsOrCb || {}, cb);
547+
} else {
548+
return this.send(command, optionsOrCb);
549+
}
550+
}
551+
505552
/**
506553
* <p>Returns <code>Config</code> information.</p>
507554
* <p>Only one <code>Config</code> response can be returned.</p>
@@ -904,6 +951,38 @@ export class GroundStation extends GroundStationClient {
904951
}
905952
}
906953

954+
/**
955+
* <p>Registers a new agent with AWS Groundstation.</p>
956+
*/
957+
public registerAgent(
958+
args: RegisterAgentCommandInput,
959+
options?: __HttpHandlerOptions
960+
): Promise<RegisterAgentCommandOutput>;
961+
public registerAgent(
962+
args: RegisterAgentCommandInput,
963+
cb: (err: any, data?: RegisterAgentCommandOutput) => void
964+
): void;
965+
public registerAgent(
966+
args: RegisterAgentCommandInput,
967+
options: __HttpHandlerOptions,
968+
cb: (err: any, data?: RegisterAgentCommandOutput) => void
969+
): void;
970+
public registerAgent(
971+
args: RegisterAgentCommandInput,
972+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: RegisterAgentCommandOutput) => void),
973+
cb?: (err: any, data?: RegisterAgentCommandOutput) => void
974+
): Promise<RegisterAgentCommandOutput> | void {
975+
const command = new RegisterAgentCommand(args);
976+
if (typeof optionsOrCb === "function") {
977+
this.send(command, optionsOrCb);
978+
} else if (typeof cb === "function") {
979+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
980+
this.send(command, optionsOrCb || {}, cb);
981+
} else {
982+
return this.send(command, optionsOrCb);
983+
}
984+
}
985+
907986
/**
908987
* <p>Reserves a contact using specified parameters.</p>
909988
*/
@@ -994,6 +1073,38 @@ export class GroundStation extends GroundStationClient {
9941073
}
9951074
}
9961075

1076+
/**
1077+
* <p>Update the status of the agent.</p>
1078+
*/
1079+
public updateAgentStatus(
1080+
args: UpdateAgentStatusCommandInput,
1081+
options?: __HttpHandlerOptions
1082+
): Promise<UpdateAgentStatusCommandOutput>;
1083+
public updateAgentStatus(
1084+
args: UpdateAgentStatusCommandInput,
1085+
cb: (err: any, data?: UpdateAgentStatusCommandOutput) => void
1086+
): void;
1087+
public updateAgentStatus(
1088+
args: UpdateAgentStatusCommandInput,
1089+
options: __HttpHandlerOptions,
1090+
cb: (err: any, data?: UpdateAgentStatusCommandOutput) => void
1091+
): void;
1092+
public updateAgentStatus(
1093+
args: UpdateAgentStatusCommandInput,
1094+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateAgentStatusCommandOutput) => void),
1095+
cb?: (err: any, data?: UpdateAgentStatusCommandOutput) => void
1096+
): Promise<UpdateAgentStatusCommandOutput> | void {
1097+
const command = new UpdateAgentStatusCommand(args);
1098+
if (typeof optionsOrCb === "function") {
1099+
this.send(command, optionsOrCb);
1100+
} else if (typeof cb === "function") {
1101+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1102+
this.send(command, optionsOrCb || {}, cb);
1103+
} else {
1104+
return this.send(command, optionsOrCb);
1105+
}
1106+
}
1107+
9971108
/**
9981109
* <p>Updates the <code>Config</code> used when scheduling contacts.</p>
9991110
* <p>Updating a <code>Config</code> will not update the execution parameters

clients/client-groundstation/src/GroundStationClient.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ import {
7272
} from "./commands/DeleteMissionProfileCommand";
7373
import { DescribeContactCommandInput, DescribeContactCommandOutput } from "./commands/DescribeContactCommand";
7474
import { DescribeEphemerisCommandInput, DescribeEphemerisCommandOutput } from "./commands/DescribeEphemerisCommand";
75+
import {
76+
GetAgentConfigurationCommandInput,
77+
GetAgentConfigurationCommandOutput,
78+
} from "./commands/GetAgentConfigurationCommand";
7579
import { GetConfigCommandInput, GetConfigCommandOutput } from "./commands/GetConfigCommand";
7680
import {
7781
GetDataflowEndpointGroupCommandInput,
@@ -97,9 +101,11 @@ import {
97101
ListTagsForResourceCommandInput,
98102
ListTagsForResourceCommandOutput,
99103
} from "./commands/ListTagsForResourceCommand";
104+
import { RegisterAgentCommandInput, RegisterAgentCommandOutput } from "./commands/RegisterAgentCommand";
100105
import { ReserveContactCommandInput, ReserveContactCommandOutput } from "./commands/ReserveContactCommand";
101106
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
102107
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
108+
import { UpdateAgentStatusCommandInput, UpdateAgentStatusCommandOutput } from "./commands/UpdateAgentStatusCommand";
103109
import { UpdateConfigCommandInput, UpdateConfigCommandOutput } from "./commands/UpdateConfigCommand";
104110
import { UpdateEphemerisCommandInput, UpdateEphemerisCommandOutput } from "./commands/UpdateEphemerisCommand";
105111
import {
@@ -126,6 +132,7 @@ export type ServiceInputTypes =
126132
| DeleteMissionProfileCommandInput
127133
| DescribeContactCommandInput
128134
| DescribeEphemerisCommandInput
135+
| GetAgentConfigurationCommandInput
129136
| GetConfigCommandInput
130137
| GetDataflowEndpointGroupCommandInput
131138
| GetMinuteUsageCommandInput
@@ -139,9 +146,11 @@ export type ServiceInputTypes =
139146
| ListMissionProfilesCommandInput
140147
| ListSatellitesCommandInput
141148
| ListTagsForResourceCommandInput
149+
| RegisterAgentCommandInput
142150
| ReserveContactCommandInput
143151
| TagResourceCommandInput
144152
| UntagResourceCommandInput
153+
| UpdateAgentStatusCommandInput
145154
| UpdateConfigCommandInput
146155
| UpdateEphemerisCommandInput
147156
| UpdateMissionProfileCommandInput;
@@ -158,6 +167,7 @@ export type ServiceOutputTypes =
158167
| DeleteMissionProfileCommandOutput
159168
| DescribeContactCommandOutput
160169
| DescribeEphemerisCommandOutput
170+
| GetAgentConfigurationCommandOutput
161171
| GetConfigCommandOutput
162172
| GetDataflowEndpointGroupCommandOutput
163173
| GetMinuteUsageCommandOutput
@@ -171,9 +181,11 @@ export type ServiceOutputTypes =
171181
| ListMissionProfilesCommandOutput
172182
| ListSatellitesCommandOutput
173183
| ListTagsForResourceCommandOutput
184+
| RegisterAgentCommandOutput
174185
| ReserveContactCommandOutput
175186
| TagResourceCommandOutput
176187
| UntagResourceCommandOutput
188+
| UpdateAgentStatusCommandOutput
177189
| UpdateConfigCommandOutput
178190
| UpdateEphemerisCommandOutput
179191
| UpdateMissionProfileCommandOutput;
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
// smithy-typescript generated code
2+
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
3+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
4+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
5+
import { Command as $Command } from "@aws-sdk/smithy-client";
6+
import {
7+
FinalizeHandlerArguments,
8+
Handler,
9+
HandlerExecutionContext,
10+
HttpHandlerOptions as __HttpHandlerOptions,
11+
MetadataBearer as __MetadataBearer,
12+
MiddlewareStack,
13+
SerdeContext as __SerdeContext,
14+
} from "@aws-sdk/types";
15+
16+
import { GroundStationClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GroundStationClient";
17+
import {
18+
GetAgentConfigurationRequest,
19+
GetAgentConfigurationRequestFilterSensitiveLog,
20+
GetAgentConfigurationResponse,
21+
GetAgentConfigurationResponseFilterSensitiveLog,
22+
} from "../models/models_0";
23+
import {
24+
deserializeAws_restJson1GetAgentConfigurationCommand,
25+
serializeAws_restJson1GetAgentConfigurationCommand,
26+
} from "../protocols/Aws_restJson1";
27+
28+
export interface GetAgentConfigurationCommandInput extends GetAgentConfigurationRequest {}
29+
export interface GetAgentConfigurationCommandOutput extends GetAgentConfigurationResponse, __MetadataBearer {}
30+
31+
/**
32+
* <p>Gets the latest configuration information for a registered agent.</p>
33+
* @example
34+
* Use a bare-bones client and the command you need to make an API call.
35+
* ```javascript
36+
* import { GroundStationClient, GetAgentConfigurationCommand } from "@aws-sdk/client-groundstation"; // ES Modules import
37+
* // const { GroundStationClient, GetAgentConfigurationCommand } = require("@aws-sdk/client-groundstation"); // CommonJS import
38+
* const client = new GroundStationClient(config);
39+
* const command = new GetAgentConfigurationCommand(input);
40+
* const response = await client.send(command);
41+
* ```
42+
*
43+
* @see {@link GetAgentConfigurationCommandInput} for command's `input` shape.
44+
* @see {@link GetAgentConfigurationCommandOutput} for command's `response` shape.
45+
* @see {@link GroundStationClientResolvedConfig | config} for GroundStationClient's `config` shape.
46+
*
47+
*/
48+
export class GetAgentConfigurationCommand extends $Command<
49+
GetAgentConfigurationCommandInput,
50+
GetAgentConfigurationCommandOutput,
51+
GroundStationClientResolvedConfig
52+
> {
53+
// Start section: command_properties
54+
// End section: command_properties
55+
56+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
57+
return {
58+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
59+
Endpoint: { type: "builtInParams", name: "endpoint" },
60+
Region: { type: "builtInParams", name: "region" },
61+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
62+
};
63+
}
64+
65+
constructor(readonly input: GetAgentConfigurationCommandInput) {
66+
// Start section: command_constructor
67+
super();
68+
// End section: command_constructor
69+
}
70+
71+
/**
72+
* @internal
73+
*/
74+
resolveMiddleware(
75+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
76+
configuration: GroundStationClientResolvedConfig,
77+
options?: __HttpHandlerOptions
78+
): Handler<GetAgentConfigurationCommandInput, GetAgentConfigurationCommandOutput> {
79+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
80+
this.middlewareStack.use(
81+
getEndpointPlugin(configuration, GetAgentConfigurationCommand.getEndpointParameterInstructions())
82+
);
83+
84+
const stack = clientStack.concat(this.middlewareStack);
85+
86+
const { logger } = configuration;
87+
const clientName = "GroundStationClient";
88+
const commandName = "GetAgentConfigurationCommand";
89+
const handlerExecutionContext: HandlerExecutionContext = {
90+
logger,
91+
clientName,
92+
commandName,
93+
inputFilterSensitiveLog: GetAgentConfigurationRequestFilterSensitiveLog,
94+
outputFilterSensitiveLog: GetAgentConfigurationResponseFilterSensitiveLog,
95+
};
96+
const { requestHandler } = configuration;
97+
return stack.resolve(
98+
(request: FinalizeHandlerArguments<any>) =>
99+
requestHandler.handle(request.request as __HttpRequest, options || {}),
100+
handlerExecutionContext
101+
);
102+
}
103+
104+
private serialize(input: GetAgentConfigurationCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
105+
return serializeAws_restJson1GetAgentConfigurationCommand(input, context);
106+
}
107+
108+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetAgentConfigurationCommandOutput> {
109+
return deserializeAws_restJson1GetAgentConfigurationCommand(output, context);
110+
}
111+
112+
// Start section: command_body_extra
113+
// End section: command_body_extra
114+
}

0 commit comments

Comments
 (0)