confluentcloud.getServiceAccount
Explore with Pulumi AI
confluentcloud.ServiceAccount
describes a Service Account data source.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using ConfluentCloud = Pulumi.ConfluentCloud;
return await Deployment.RunAsync(() =>
{
var exampleUsingIdServiceAccount = ConfluentCloud.GetServiceAccount.Invoke(new()
{
Id = "sa-abc123",
});
var exampleUsingName = ConfluentCloud.GetServiceAccount.Invoke(new()
{
DisplayName = "test_sa",
});
var test_env = new ConfluentCloud.Environment("test-env");
return new Dictionary<string, object?>
{
["exampleUsingId"] = exampleUsingIdServiceAccount,
};
});
package main
import (
"github.com/pulumi/pulumi-confluentcloud/sdk/go/confluentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleUsingIdServiceAccount, err := confluentcloud.LookupServiceAccount(ctx, &confluentcloud.LookupServiceAccountArgs{
Id: pulumi.StringRef("sa-abc123"),
}, nil)
if err != nil {
return err
}
ctx.Export("exampleUsingId", exampleUsingIdServiceAccount)
_, err = confluentcloud.LookupServiceAccount(ctx, &confluentcloud.LookupServiceAccountArgs{
DisplayName: pulumi.StringRef("test_sa"),
}, nil)
if err != nil {
return err
}
_, err = confluentcloud.NewEnvironment(ctx, "test-env", nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.confluentcloud.ConfluentcloudFunctions;
import com.pulumi.confluentcloud.inputs.GetServiceAccountArgs;
import com.pulumi.confluentcloud.Environment;
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 exampleUsingIdServiceAccount = ConfluentcloudFunctions.getServiceAccount(GetServiceAccountArgs.builder()
.id("sa-abc123")
.build());
ctx.export("exampleUsingId", exampleUsingIdServiceAccount.applyValue(getServiceAccountResult -> getServiceAccountResult));
final var exampleUsingName = ConfluentcloudFunctions.getServiceAccount(GetServiceAccountArgs.builder()
.displayName("test_sa")
.build());
var test_env = new Environment("test-env");
}
}
import pulumi
import pulumi_confluentcloud as confluentcloud
example_using_id_service_account = confluentcloud.get_service_account(id="sa-abc123")
pulumi.export("exampleUsingId", example_using_id_service_account)
example_using_name = confluentcloud.get_service_account(display_name="test_sa")
test_env = confluentcloud.Environment("test-env")
import * as pulumi from "@pulumi/pulumi";
import * as confluentcloud from "@pulumi/confluentcloud";
const exampleUsingIdServiceAccount = confluentcloud.getServiceAccount({
id: "sa-abc123",
});
export const exampleUsingId = exampleUsingIdServiceAccount;
const exampleUsingName = confluentcloud.getServiceAccount({
displayName: "test_sa",
});
const test_env = new confluentcloud.Environment("test-env", {});
resources:
test-env:
type: confluentcloud:Environment
variables:
exampleUsingIdServiceAccount:
fn::invoke:
Function: confluentcloud:getServiceAccount
Arguments:
id: sa-abc123
exampleUsingName:
fn::invoke:
Function: confluentcloud:getServiceAccount
Arguments:
displayName: test_sa
outputs:
exampleUsingId: ${exampleUsingIdServiceAccount}
Using getServiceAccount
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 getServiceAccount(args: GetServiceAccountArgs, opts?: InvokeOptions): Promise<GetServiceAccountResult>
function getServiceAccountOutput(args: GetServiceAccountOutputArgs, opts?: InvokeOptions): Output<GetServiceAccountResult>
def get_service_account(display_name: Optional[str] = None,
id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetServiceAccountResult
def get_service_account_output(display_name: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetServiceAccountResult]
func LookupServiceAccount(ctx *Context, args *LookupServiceAccountArgs, opts ...InvokeOption) (*LookupServiceAccountResult, error)
func LookupServiceAccountOutput(ctx *Context, args *LookupServiceAccountOutputArgs, opts ...InvokeOption) LookupServiceAccountResultOutput
> Note: This function is named LookupServiceAccount
in the Go SDK.
public static class GetServiceAccount
{
public static Task<GetServiceAccountResult> InvokeAsync(GetServiceAccountArgs args, InvokeOptions? opts = null)
public static Output<GetServiceAccountResult> Invoke(GetServiceAccountInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetServiceAccountResult> getServiceAccount(GetServiceAccountArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: confluentcloud:index/getServiceAccount:getServiceAccount
arguments:
# arguments dictionary
The following arguments are supported:
- Display
Name string A human-readable name for the Service Account.
Note: Exactly one from the
id
anddisplay_name
attributes must be specified.- Id string
The ID of the Service Account (e.g.,
sa-abc123
).
- Display
Name string A human-readable name for the Service Account.
Note: Exactly one from the
id
anddisplay_name
attributes must be specified.- Id string
The ID of the Service Account (e.g.,
sa-abc123
).
- display
Name String A human-readable name for the Service Account.
Note: Exactly one from the
id
anddisplay_name
attributes must be specified.- id String
The ID of the Service Account (e.g.,
sa-abc123
).
- display
Name string A human-readable name for the Service Account.
Note: Exactly one from the
id
anddisplay_name
attributes must be specified.- id string
The ID of the Service Account (e.g.,
sa-abc123
).
- display_
name str A human-readable name for the Service Account.
Note: Exactly one from the
id
anddisplay_name
attributes must be specified.- id str
The ID of the Service Account (e.g.,
sa-abc123
).
- display
Name String A human-readable name for the Service Account.
Note: Exactly one from the
id
anddisplay_name
attributes must be specified.- id String
The ID of the Service Account (e.g.,
sa-abc123
).
getServiceAccount Result
The following output properties are available:
- Api
Version string (Required String) An API Version of the schema version of the Service Account.
- Description string
(Required String) A free-form description of the Service Account.
- Display
Name string (Required String) A human-readable name for the Service Account.
- Id string
(Required String) The ID of the Service Account (e.g.,
sa-abc123
).- Kind string
(Required String) A kind of the Service Account.
- Api
Version string (Required String) An API Version of the schema version of the Service Account.
- Description string
(Required String) A free-form description of the Service Account.
- Display
Name string (Required String) A human-readable name for the Service Account.
- Id string
(Required String) The ID of the Service Account (e.g.,
sa-abc123
).- Kind string
(Required String) A kind of the Service Account.
- api
Version String (Required String) An API Version of the schema version of the Service Account.
- description String
(Required String) A free-form description of the Service Account.
- display
Name String (Required String) A human-readable name for the Service Account.
- id String
(Required String) The ID of the Service Account (e.g.,
sa-abc123
).- kind String
(Required String) A kind of the Service Account.
- api
Version string (Required String) An API Version of the schema version of the Service Account.
- description string
(Required String) A free-form description of the Service Account.
- display
Name string (Required String) A human-readable name for the Service Account.
- id string
(Required String) The ID of the Service Account (e.g.,
sa-abc123
).- kind string
(Required String) A kind of the Service Account.
- api_
version str (Required String) An API Version of the schema version of the Service Account.
- description str
(Required String) A free-form description of the Service Account.
- display_
name str (Required String) A human-readable name for the Service Account.
- id str
(Required String) The ID of the Service Account (e.g.,
sa-abc123
).- kind str
(Required String) A kind of the Service Account.
- api
Version String (Required String) An API Version of the schema version of the Service Account.
- description String
(Required String) A free-form description of the Service Account.
- display
Name String (Required String) A human-readable name for the Service Account.
- id String
(Required String) The ID of the Service Account (e.g.,
sa-abc123
).- kind String
(Required String) A kind of the Service Account.
Package Details
- Repository
- Confluent Cloud pulumi/pulumi-confluentcloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
confluent
Terraform Provider.