Harness v0.4.4 published on Tuesday, Nov 12, 2024 by Pulumi
harness.platform.getCurrentAccount
Explore with Pulumi AI
Data source for retrieving information on the current Harness account.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const current = harness.platform.getCurrentAccount({});
import pulumi
import pulumi_harness as harness
current = harness.platform.get_current_account()
package main
import (
"github.com/pulumi/pulumi-harness/sdk/go/harness/platform"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := platform.GetCurrentAccount(ctx, &platform.GetCurrentAccountArgs{}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;
return await Deployment.RunAsync(() =>
{
var current = Harness.Platform.GetCurrentAccount.Invoke();
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.platform.PlatformFunctions;
import com.pulumi.harness.platform.inputs.GetCurrentAccountArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var current = PlatformFunctions.getCurrentAccount();
}
}
variables:
current:
fn::invoke:
Function: harness:platform:getCurrentAccount
Arguments: {}
Using getCurrentAccount
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getCurrentAccount(args: GetCurrentAccountArgs, opts?: InvokeOptions): Promise<GetCurrentAccountResult>
function getCurrentAccountOutput(args: GetCurrentAccountOutputArgs, opts?: InvokeOptions): Output<GetCurrentAccountResult>
def get_current_account(id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCurrentAccountResult
def get_current_account_output(id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCurrentAccountResult]
func GetCurrentAccount(ctx *Context, args *GetCurrentAccountArgs, opts ...InvokeOption) (*GetCurrentAccountResult, error)
func GetCurrentAccountOutput(ctx *Context, args *GetCurrentAccountOutputArgs, opts ...InvokeOption) GetCurrentAccountResultOutput
> Note: This function is named GetCurrentAccount
in the Go SDK.
public static class GetCurrentAccount
{
public static Task<GetCurrentAccountResult> InvokeAsync(GetCurrentAccountArgs args, InvokeOptions? opts = null)
public static Output<GetCurrentAccountResult> Invoke(GetCurrentAccountInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCurrentAccountResult> getCurrentAccount(GetCurrentAccountArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: harness:platform/getCurrentAccount:getCurrentAccount
arguments:
# arguments dictionary
The following arguments are supported:
- Id string
- Id of the account.
- Id string
- Id of the account.
- id String
- Id of the account.
- id string
- Id of the account.
- id str
- Id of the account.
- id String
- Id of the account.
getCurrentAccount Result
The following output properties are available:
- account_
id str - Id of the account.
- endpoint str
- The url of the Harness control plane.
- id str
- Id of the account.
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harness
Terraform Provider.