1. Packages
  2. Confluent Cloud
  3. API Docs
  4. RoleBinding
Confluent v1.48.0 published on Friday, Jun 21, 2024 by Pulumi

confluentcloud.RoleBinding

Explore with Pulumi AI

confluentcloud logo
Confluent v1.48.0 published on Friday, Jun 21, 2024 by Pulumi

    General Availability

    confluentcloud.RoleBinding provides a Role Binding resource that enables creating, reading, and deleting role bindings on Confluent Cloud.

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

    Create RoleBinding Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new RoleBinding(name: string, args: RoleBindingArgs, opts?: CustomResourceOptions);
    @overload
    def RoleBinding(resource_name: str,
                    args: RoleBindingArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def RoleBinding(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    crn_pattern: Optional[str] = None,
                    principal: Optional[str] = None,
                    role_name: Optional[str] = None)
    func NewRoleBinding(ctx *Context, name string, args RoleBindingArgs, opts ...ResourceOption) (*RoleBinding, error)
    public RoleBinding(string name, RoleBindingArgs args, CustomResourceOptions? opts = null)
    public RoleBinding(String name, RoleBindingArgs args)
    public RoleBinding(String name, RoleBindingArgs args, CustomResourceOptions options)
    
    type: confluentcloud:RoleBinding
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args RoleBindingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args RoleBindingArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args RoleBindingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RoleBindingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RoleBindingArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var roleBindingResource = new ConfluentCloud.RoleBinding("roleBindingResource", new()
    {
        CrnPattern = "string",
        Principal = "string",
        RoleName = "string",
    });
    
    example, err := confluentcloud.NewRoleBinding(ctx, "roleBindingResource", &confluentcloud.RoleBindingArgs{
    	CrnPattern: pulumi.String("string"),
    	Principal:  pulumi.String("string"),
    	RoleName:   pulumi.String("string"),
    })
    
    var roleBindingResource = new RoleBinding("roleBindingResource", RoleBindingArgs.builder()
        .crnPattern("string")
        .principal("string")
        .roleName("string")
        .build());
    
    role_binding_resource = confluentcloud.RoleBinding("roleBindingResource",
        crn_pattern="string",
        principal="string",
        role_name="string")
    
    const roleBindingResource = new confluentcloud.RoleBinding("roleBindingResource", {
        crnPattern: "string",
        principal: "string",
        roleName: "string",
    });
    
    type: confluentcloud:RoleBinding
    properties:
        crnPattern: string
        principal: string
        roleName: string
    

    RoleBinding Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The RoleBinding resource accepts the following input properties:

    CrnPattern string
    A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
    Principal 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
    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
    A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
    Principal 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
    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
    A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
    principal 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
    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
    A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
    principal 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
    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
    A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
    principal str
    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
    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
    A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
    principal 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
    A name of the role to bind to the principal. See Confluent Cloud RBAC Roles for a full list of supported role names.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the RoleBinding resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing RoleBinding Resource

    Get an existing RoleBinding resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: RoleBindingState, opts?: CustomResourceOptions): RoleBinding
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            crn_pattern: Optional[str] = None,
            principal: Optional[str] = None,
            role_name: Optional[str] = None) -> RoleBinding
    func GetRoleBinding(ctx *Context, name string, id IDInput, state *RoleBindingState, opts ...ResourceOption) (*RoleBinding, error)
    public static RoleBinding Get(string name, Input<string> id, RoleBindingState? state, CustomResourceOptions? opts = null)
    public static RoleBinding get(String name, Output<String> id, RoleBindingState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CrnPattern string
    A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
    Principal 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
    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
    A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
    Principal 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
    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
    A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
    principal 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
    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
    A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
    principal 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
    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
    A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
    principal str
    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
    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
    A Confluent Resource Name(CRN) that specifies the scope and resource patterns necessary for the role to bind.
    principal 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
    A name of the role to bind to the principal. See Confluent Cloud RBAC Roles for a full list of supported role names.

    Import

    You can import a Role Binding by using Role Binding ID, for example:

    $ export CONFLUENT_CLOUD_API_KEY="<cloud_api_key>"

    $ export CONFLUENT_CLOUD_API_SECRET="<cloud_api_secret>"

    $ pulumi import confluentcloud:index/roleBinding:RoleBinding my_rb rb-f3a90de
    

    !> Warning: Do not forget to delete terminal command history afterwards for security purposes.

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Confluent Cloud pulumi/pulumi-confluentcloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the confluent Terraform Provider.
    confluentcloud logo
    Confluent v1.48.0 published on Friday, Jun 21, 2024 by Pulumi