Skip to content

Commit

Permalink
feat(client-lightsail): This release adds Lightsail for Research feat…
Browse files Browse the repository at this point in the history
…ure support, such as GUI session access, cost estimates, stop instance on idle, and disk auto mount.
  • Loading branch information
awstools committed Feb 28, 2023
1 parent 08b46ce commit f86feb5
Show file tree
Hide file tree
Showing 20 changed files with 2,872 additions and 481 deletions.
32 changes: 32 additions & 0 deletions clients/client-lightsail/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,14 @@ CreateDomainEntry

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lightsail/classes/createdomainentrycommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lightsail/interfaces/createdomainentrycommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lightsail/interfaces/createdomainentrycommandoutput.html)

</details>
<details>
<summary>
CreateGUISessionAccessDetails
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lightsail/classes/createguisessionaccessdetailscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lightsail/interfaces/createguisessionaccessdetailscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lightsail/interfaces/createguisessionaccessdetailscommandoutput.html)

</details>
<details>
<summary>
Expand Down Expand Up @@ -850,6 +858,14 @@ GetContainerServices

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lightsail/classes/getcontainerservicescommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lightsail/interfaces/getcontainerservicescommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lightsail/interfaces/getcontainerservicescommandoutput.html)

</details>
<details>
<summary>
GetCostEstimate
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lightsail/classes/getcostestimatecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lightsail/interfaces/getcostestimatecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lightsail/interfaces/getcostestimatecommandoutput.html)

</details>
<details>
<summary>
Expand Down Expand Up @@ -1314,6 +1330,14 @@ SetResourceAccessForBucket

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lightsail/classes/setresourceaccessforbucketcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lightsail/interfaces/setresourceaccessforbucketcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lightsail/interfaces/setresourceaccessforbucketcommandoutput.html)

</details>
<details>
<summary>
StartGUISession
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lightsail/classes/startguisessioncommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lightsail/interfaces/startguisessioncommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lightsail/interfaces/startguisessioncommandoutput.html)

</details>
<details>
<summary>
Expand All @@ -1330,6 +1354,14 @@ StartRelationalDatabase

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lightsail/classes/startrelationaldatabasecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lightsail/interfaces/startrelationaldatabasecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lightsail/interfaces/startrelationaldatabasecommandoutput.html)

</details>
<details>
<summary>
StopGUISession
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lightsail/classes/stopguisessioncommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lightsail/interfaces/stopguisessioncommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-lightsail/interfaces/stopguisessioncommandoutput.html)

</details>
<details>
<summary>
Expand Down
152 changes: 152 additions & 0 deletions clients/client-lightsail/src/Lightsail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ import {
CreateDomainEntryCommandInput,
CreateDomainEntryCommandOutput,
} from "./commands/CreateDomainEntryCommand";
import {
CreateGUISessionAccessDetailsCommand,
CreateGUISessionAccessDetailsCommandInput,
CreateGUISessionAccessDetailsCommandOutput,
} from "./commands/CreateGUISessionAccessDetailsCommand";
import {
CreateInstancesCommand,
CreateInstancesCommandInput,
Expand Down Expand Up @@ -360,6 +365,11 @@ import {
GetContainerServicesCommandInput,
GetContainerServicesCommandOutput,
} from "./commands/GetContainerServicesCommand";
import {
GetCostEstimateCommand,
GetCostEstimateCommandInput,
GetCostEstimateCommandOutput,
} from "./commands/GetCostEstimateCommand";
import { GetDiskCommand, GetDiskCommandInput, GetDiskCommandOutput } from "./commands/GetDiskCommand";
import { GetDisksCommand, GetDisksCommandInput, GetDisksCommandOutput } from "./commands/GetDisksCommand";
import {
Expand Down Expand Up @@ -602,6 +612,11 @@ import {
SetResourceAccessForBucketCommandInput,
SetResourceAccessForBucketCommandOutput,
} from "./commands/SetResourceAccessForBucketCommand";
import {
StartGUISessionCommand,
StartGUISessionCommandInput,
StartGUISessionCommandOutput,
} from "./commands/StartGUISessionCommand";
import {
StartInstanceCommand,
StartInstanceCommandInput,
Expand All @@ -612,6 +627,11 @@ import {
StartRelationalDatabaseCommandInput,
StartRelationalDatabaseCommandOutput,
} from "./commands/StartRelationalDatabaseCommand";
import {
StopGUISessionCommand,
StopGUISessionCommandInput,
StopGUISessionCommandOutput,
} from "./commands/StopGUISessionCommand";
import {
StopInstanceCommand,
StopInstanceCommandInput,
Expand Down Expand Up @@ -1528,6 +1548,40 @@ export class Lightsail extends LightsailClient {
}
}

/**
* <p>Creates two URLs that are used to access a virtual computer’s graphical user interface (GUI)
* session. The primary URL initiates a web-based NICE DCV session to the virtual computer's application. The secondary URL initiates a web-based NICE DCV session to the virtual computer's operating session. </p>
* <p>Use <code>StartGUISession</code> to open the session.</p>
*/
public createGUISessionAccessDetails(
args: CreateGUISessionAccessDetailsCommandInput,
options?: __HttpHandlerOptions
): Promise<CreateGUISessionAccessDetailsCommandOutput>;
public createGUISessionAccessDetails(
args: CreateGUISessionAccessDetailsCommandInput,
cb: (err: any, data?: CreateGUISessionAccessDetailsCommandOutput) => void
): void;
public createGUISessionAccessDetails(
args: CreateGUISessionAccessDetailsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: CreateGUISessionAccessDetailsCommandOutput) => void
): void;
public createGUISessionAccessDetails(
args: CreateGUISessionAccessDetailsCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateGUISessionAccessDetailsCommandOutput) => void),
cb?: (err: any, data?: CreateGUISessionAccessDetailsCommandOutput) => void
): Promise<CreateGUISessionAccessDetailsCommandOutput> | void {
const command = new CreateGUISessionAccessDetailsCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* <p>Creates one or more Amazon Lightsail instances.</p>
* <p>The <code>create instances</code> operation supports tag-based access control via request
Expand Down Expand Up @@ -3532,6 +3586,38 @@ export class Lightsail extends LightsailClient {
}
}

/**
* <p>Retrieves information about the cost estimate for a specified resource. A cost estimate will not generate for a resource that has been deleted.</p>
*/
public getCostEstimate(
args: GetCostEstimateCommandInput,
options?: __HttpHandlerOptions
): Promise<GetCostEstimateCommandOutput>;
public getCostEstimate(
args: GetCostEstimateCommandInput,
cb: (err: any, data?: GetCostEstimateCommandOutput) => void
): void;
public getCostEstimate(
args: GetCostEstimateCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetCostEstimateCommandOutput) => void
): void;
public getCostEstimate(
args: GetCostEstimateCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetCostEstimateCommandOutput) => void),
cb?: (err: any, data?: GetCostEstimateCommandOutput) => void
): Promise<GetCostEstimateCommandOutput> | void {
const command = new GetCostEstimateCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* <p>Returns information about a specific block storage disk.</p>
*/
Expand Down Expand Up @@ -5422,6 +5508,39 @@ export class Lightsail extends LightsailClient {
}
}

/**
* <p>Initiates a graphical user interface (GUI) session that’s used to access a virtual
* computer’s operating system and application. The session will be active for 1 hour. Use this action to resume the session after it expires. </p>
*/
public startGUISession(
args: StartGUISessionCommandInput,
options?: __HttpHandlerOptions
): Promise<StartGUISessionCommandOutput>;
public startGUISession(
args: StartGUISessionCommandInput,
cb: (err: any, data?: StartGUISessionCommandOutput) => void
): void;
public startGUISession(
args: StartGUISessionCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: StartGUISessionCommandOutput) => void
): void;
public startGUISession(
args: StartGUISessionCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StartGUISessionCommandOutput) => void),
cb?: (err: any, data?: StartGUISessionCommandOutput) => void
): Promise<StartGUISessionCommandOutput> | void {
const command = new StartGUISessionCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* <p>Starts a specific Amazon Lightsail instance from a stopped state. To restart an instance,
* use the <code>reboot instance</code> operation.</p>
Expand Down Expand Up @@ -5499,6 +5618,39 @@ export class Lightsail extends LightsailClient {
}
}

/**
* <p>Terminates a web-based NICE DCV session that’s used to access a virtual computer’s
* operating system or application. The session will close and any unsaved data will be lost.</p>
*/
public stopGUISession(
args: StopGUISessionCommandInput,
options?: __HttpHandlerOptions
): Promise<StopGUISessionCommandOutput>;
public stopGUISession(
args: StopGUISessionCommandInput,
cb: (err: any, data?: StopGUISessionCommandOutput) => void
): void;
public stopGUISession(
args: StopGUISessionCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: StopGUISessionCommandOutput) => void
): void;
public stopGUISession(
args: StopGUISessionCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StopGUISessionCommandOutput) => void),
cb?: (err: any, data?: StopGUISessionCommandOutput) => void
): Promise<StopGUISessionCommandOutput> | void {
const command = new StopGUISessionCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* <p>Stops a specific Amazon Lightsail instance that is currently running.</p>
* <note>
Expand Down
15 changes: 15 additions & 0 deletions clients/client-lightsail/src/LightsailClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ import { CreateDiskSnapshotCommandInput, CreateDiskSnapshotCommandOutput } from
import { CreateDistributionCommandInput, CreateDistributionCommandOutput } from "./commands/CreateDistributionCommand";
import { CreateDomainCommandInput, CreateDomainCommandOutput } from "./commands/CreateDomainCommand";
import { CreateDomainEntryCommandInput, CreateDomainEntryCommandOutput } from "./commands/CreateDomainEntryCommand";
import {
CreateGUISessionAccessDetailsCommandInput,
CreateGUISessionAccessDetailsCommandOutput,
} from "./commands/CreateGUISessionAccessDetailsCommand";
import { CreateInstancesCommandInput, CreateInstancesCommandOutput } from "./commands/CreateInstancesCommand";
import {
CreateInstancesFromSnapshotCommandInput,
Expand Down Expand Up @@ -239,6 +243,7 @@ import {
GetContainerServicesCommandInput,
GetContainerServicesCommandOutput,
} from "./commands/GetContainerServicesCommand";
import { GetCostEstimateCommandInput, GetCostEstimateCommandOutput } from "./commands/GetCostEstimateCommand";
import { GetDiskCommandInput, GetDiskCommandOutput } from "./commands/GetDiskCommand";
import { GetDisksCommandInput, GetDisksCommandOutput } from "./commands/GetDisksCommand";
import { GetDiskSnapshotCommandInput, GetDiskSnapshotCommandOutput } from "./commands/GetDiskSnapshotCommand";
Expand Down Expand Up @@ -393,11 +398,13 @@ import {
SetResourceAccessForBucketCommandInput,
SetResourceAccessForBucketCommandOutput,
} from "./commands/SetResourceAccessForBucketCommand";
import { StartGUISessionCommandInput, StartGUISessionCommandOutput } from "./commands/StartGUISessionCommand";
import { StartInstanceCommandInput, StartInstanceCommandOutput } from "./commands/StartInstanceCommand";
import {
StartRelationalDatabaseCommandInput,
StartRelationalDatabaseCommandOutput,
} from "./commands/StartRelationalDatabaseCommand";
import { StopGUISessionCommandInput, StopGUISessionCommandOutput } from "./commands/StopGUISessionCommand";
import { StopInstanceCommandInput, StopInstanceCommandOutput } from "./commands/StopInstanceCommand";
import {
StopRelationalDatabaseCommandInput,
Expand Down Expand Up @@ -466,6 +473,7 @@ export type ServiceInputTypes =
| CreateDistributionCommandInput
| CreateDomainCommandInput
| CreateDomainEntryCommandInput
| CreateGUISessionAccessDetailsCommandInput
| CreateInstanceSnapshotCommandInput
| CreateInstancesCommandInput
| CreateInstancesFromSnapshotCommandInput
Expand Down Expand Up @@ -523,6 +531,7 @@ export type ServiceInputTypes =
| GetContainerServiceMetricDataCommandInput
| GetContainerServicePowersCommandInput
| GetContainerServicesCommandInput
| GetCostEstimateCommandInput
| GetDiskCommandInput
| GetDiskSnapshotCommandInput
| GetDiskSnapshotsCommandInput
Expand Down Expand Up @@ -581,8 +590,10 @@ export type ServiceInputTypes =
| SendContactMethodVerificationCommandInput
| SetIpAddressTypeCommandInput
| SetResourceAccessForBucketCommandInput
| StartGUISessionCommandInput
| StartInstanceCommandInput
| StartRelationalDatabaseCommandInput
| StopGUISessionCommandInput
| StopInstanceCommandInput
| StopRelationalDatabaseCommandInput
| TagResourceCommandInput
Expand Down Expand Up @@ -623,6 +634,7 @@ export type ServiceOutputTypes =
| CreateDistributionCommandOutput
| CreateDomainCommandOutput
| CreateDomainEntryCommandOutput
| CreateGUISessionAccessDetailsCommandOutput
| CreateInstanceSnapshotCommandOutput
| CreateInstancesCommandOutput
| CreateInstancesFromSnapshotCommandOutput
Expand Down Expand Up @@ -680,6 +692,7 @@ export type ServiceOutputTypes =
| GetContainerServiceMetricDataCommandOutput
| GetContainerServicePowersCommandOutput
| GetContainerServicesCommandOutput
| GetCostEstimateCommandOutput
| GetDiskCommandOutput
| GetDiskSnapshotCommandOutput
| GetDiskSnapshotsCommandOutput
Expand Down Expand Up @@ -738,8 +751,10 @@ export type ServiceOutputTypes =
| SendContactMethodVerificationCommandOutput
| SetIpAddressTypeCommandOutput
| SetResourceAccessForBucketCommandOutput
| StartGUISessionCommandOutput
| StartInstanceCommandOutput
| StartRelationalDatabaseCommandOutput
| StopGUISessionCommandOutput
| StopInstanceCommandOutput
| StopRelationalDatabaseCommandOutput
| TagResourceCommandOutput
Expand Down
Loading

0 comments on commit f86feb5

Please sign in to comment.