1. Packages
  2. Confluent Provider
  3. API Docs
  4. getRoleBinding
Confluent v2.24.0 published on Saturday, Apr 19, 2025 by Pulumi

confluentcloud.getRoleBinding

Explore with Pulumi AI

Confluent v2.24.0 published on Saturday, Apr 19, 2025 by Pulumi

General Availability

confluentcloud.RoleBinding describes a Role Binding.

Note: For more information on the Role Bindings, see Predefined RBAC roles in Confluent Cloud.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as confluentcloud from "@pulumi/confluentcloud";

export = async () => {
    const example = await confluentcloud.getRoleBinding({
        id: "rb-abc123",
    });
    return {
        example: example,
    };
}
Copy
import pulumi
import pulumi_confluentcloud as confluentcloud

example = confluentcloud.get_role_binding(id="rb-abc123")
pulumi.export("example", example)
Copy
package main

import (
	"github.com/pulumi/pulumi-confluentcloud/sdk/v2/go/confluentcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := confluentcloud.LookupRoleBinding(ctx, &confluentcloud.LookupRoleBindingArgs{
			Id: "rb-abc123",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("example", example)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using ConfluentCloud = Pulumi.ConfluentCloud;

return await Deployment.RunAsync(() => 
{
    var example = ConfluentCloud.GetRoleBinding.Invoke(new()
    {
        Id = "rb-abc123",
    });

    return new Dictionary<string, object?>
    {
        ["example"] = example,
    };
});
Copy
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.GetRoleBindingArgs;
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 example = ConfluentcloudFunctions.getRoleBinding(GetRoleBindingArgs.builder()
            .id("rb-abc123")
            .build());

        ctx.export("example", example);
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: confluentcloud:getRoleBinding
      arguments:
        id: rb-abc123
outputs:
  example: ${example}
Copy

Using getRoleBinding

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 getRoleBinding(args: GetRoleBindingArgs, opts?: InvokeOptions): Promise<GetRoleBindingResult>
function getRoleBindingOutput(args: GetRoleBindingOutputArgs, opts?: InvokeOptions): Output<GetRoleBindingResult>
Copy
def get_role_binding(id: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetRoleBindingResult
def get_role_binding_output(id: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetRoleBindingResult]
Copy
func LookupRoleBinding(ctx *Context, args *LookupRoleBindingArgs, opts ...InvokeOption) (*LookupRoleBindingResult, error)
func LookupRoleBindingOutput(ctx *Context, args *LookupRoleBindingOutputArgs, opts ...InvokeOption) LookupRoleBindingResultOutput
Copy

> Note: This function is named LookupRoleBinding in the Go SDK.

public static class GetRoleBinding 
{
    public static Task<GetRoleBindingResult> InvokeAsync(GetRoleBindingArgs args, InvokeOptions? opts = null)
    public static Output<GetRoleBindingResult> Invoke(GetRoleBindingInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetRoleBindingResult> getRoleBinding(GetRoleBindingArgs args, InvokeOptions options)
public static Output<GetRoleBindingResult> getRoleBinding(GetRoleBindingArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: confluentcloud:index/getRoleBinding:getRoleBinding
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Id This property is required. string
The ID of the Role Binding (for example, rb-abc123).
Id This property is required. string
The ID of the Role Binding (for example, rb-abc123).
id This property is required. String
The ID of the Role Binding (for example, rb-abc123).
id This property is required. string
The ID of the Role Binding (for example, rb-abc123).
id This property is required. str
The ID of the Role Binding (for example, rb-abc123).
id This property is required. String
The ID of the Role Binding (for example, rb-abc123).

getRoleBinding Result

The following output properties are available:

CrnPattern string
(Required String) A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
Id string
Principal string
(Required String) A principal User to bind the role to, for example, "User:u-111aaa" for binding to a user "u-111aaa", or "User:sa-111aaa" for binding to a service account "sa-111aaa".
RoleName string
(Required String) A name of the role to bind to the principal. See Confluent Cloud RBAC Roles for a full list of supported role names.
CrnPattern string
(Required String) A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
Id string
Principal string
(Required String) A principal User to bind the role to, for example, "User:u-111aaa" for binding to a user "u-111aaa", or "User:sa-111aaa" for binding to a service account "sa-111aaa".
RoleName string
(Required String) A name of the role to bind to the principal. See Confluent Cloud RBAC Roles for a full list of supported role names.
crnPattern String
(Required String) A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
id String
principal String
(Required String) A principal User to bind the role to, for example, "User:u-111aaa" for binding to a user "u-111aaa", or "User:sa-111aaa" for binding to a service account "sa-111aaa".
roleName String
(Required String) A name of the role to bind to the principal. See Confluent Cloud RBAC Roles for a full list of supported role names.
crnPattern string
(Required String) A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
id string
principal string
(Required String) A principal User to bind the role to, for example, "User:u-111aaa" for binding to a user "u-111aaa", or "User:sa-111aaa" for binding to a service account "sa-111aaa".
roleName string
(Required String) A name of the role to bind to the principal. See Confluent Cloud RBAC Roles for a full list of supported role names.
crn_pattern str
(Required String) A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
id str
principal str
(Required String) A principal User to bind the role to, for example, "User:u-111aaa" for binding to a user "u-111aaa", or "User:sa-111aaa" for binding to a service account "sa-111aaa".
role_name str
(Required String) A name of the role to bind to the principal. See Confluent Cloud RBAC Roles for a full list of supported role names.
crnPattern String
(Required String) A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
id String
principal String
(Required String) A principal User to bind the role to, for example, "User:u-111aaa" for binding to a user "u-111aaa", or "User:sa-111aaa" for binding to a service account "sa-111aaa".
roleName String
(Required String) A name of the role to bind to the principal. See Confluent Cloud RBAC Roles for a full list of supported role names.

Package Details

Repository
Confluent Cloud pulumi/pulumi-confluentcloud
License
Apache-2.0
Notes
This Pulumi package is based on the confluent Terraform Provider.
Confluent v2.24.0 published on Saturday, Apr 19, 2025 by Pulumi