getCurrentUser function

Future<GetCurrentUserResult> getCurrentUser({
  1. InvokeOptions? options,
})

Returns the Pulumi Cloud user that the provider's access token belongs to. Useful for seeding a newly-created Team with the creator as a member, since Pulumi Cloud auto-adds the creator. Omitting this user from the team will result in a refresh drift. options Invoke options controlling this call.

Implementation

Future<GetCurrentUserResult> getCurrentUser(
  {
  pulumi.InvokeOptions? options,
}) async {
  final deployment = pulumi.Deployment.instance;
  final result = await deployment.invoke<Map<String, dynamic>>(
    'pulumiservice:index:getCurrentUser',
    const <String, dynamic>{},
    options: pulumi.toDeploymentInvokeOptions(options),
  );
  return GetCurrentUserResult.fromMap(result);
}