Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 1.49 KB

pagination.md

File metadata and controls

31 lines (24 loc) · 1.49 KB

list users

Open in playground

export const main = asl.deploy.asStateMachine(async (input: any) => {
  var marker: string | undefined;
  do {
    var response = await asl.sdk(IAM).listUsers({
      name: "List Users",
      parameters: {
        PathPrefix: "/path",
        Marker: marker,
      },
    });

    for (const user of response.Users || []) {
      //put your logic here
      await doSomething(user);
    }
    marker = response.IsTruncated ? response.Marker : undefined;
  } while (marker);
});

export const doSomething = asl.deploy.asStateMachine(async (input: User) => {
  console.log(input);
});