Skip to content

CreateComputer

Source: src/AWS/DirectoryService/CreateComputer.ts

Runtime binding for the CreateComputer operation (IAM action ds:CreateComputer), scoped to one Directory.

Creates a computer account in the bound directory — the programmatic half of joining a machine to the domain (e.g. from an instance-provisioning workflow). Password is the one-time machine password and is sensitive; pass a Redacted value. The directory id is injected from the binding. Provide the implementation with Effect.provide(AWS.DirectoryService.CreateComputerHttp).

// init — bind the operation to the directory
const createComputer = yield* AWS.DirectoryService.CreateComputer(directory);
// runtime
const { Computer } = yield* createComputer({
ComputerName: "BUILD-AGENT-01",
Password: Redacted.make("0ne-Time-Secret!"),
});