1. Packages
  2. CockroachDB Cloud
  3. API Docs
  4. UserRoleGrants
CockroachDB v0.2.3 published on Monday, May 27, 2024 by pulumiverse

cockroach.UserRoleGrants

Explore with Pulumi AI

cockroach logo
CockroachDB v0.2.3 published on Monday, May 27, 2024 by pulumiverse

    Role grants for a single user.

    Create UserRoleGrants Resource

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

    Constructor syntax

    new UserRoleGrants(name: string, args: UserRoleGrantsArgs, opts?: CustomResourceOptions);
    @overload
    def UserRoleGrants(resource_name: str,
                       args: UserRoleGrantsArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def UserRoleGrants(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       roles: Optional[Sequence[UserRoleGrantsRoleArgs]] = None,
                       user_id: Optional[str] = None)
    func NewUserRoleGrants(ctx *Context, name string, args UserRoleGrantsArgs, opts ...ResourceOption) (*UserRoleGrants, error)
    public UserRoleGrants(string name, UserRoleGrantsArgs args, CustomResourceOptions? opts = null)
    public UserRoleGrants(String name, UserRoleGrantsArgs args)
    public UserRoleGrants(String name, UserRoleGrantsArgs args, CustomResourceOptions options)
    
    type: cockroach:UserRoleGrants
    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 UserRoleGrantsArgs
    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 UserRoleGrantsArgs
    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 UserRoleGrantsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args UserRoleGrantsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args UserRoleGrantsArgs
    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 userRoleGrantsResource = new Cockroach.UserRoleGrants("userRoleGrantsResource", new()
    {
        Roles = new[]
        {
            new Cockroach.Inputs.UserRoleGrantsRoleArgs
            {
                ResourceType = "string",
                RoleName = "string",
                ResourceId = "string",
            },
        },
        UserId = "string",
    });
    
    example, err := cockroach.NewUserRoleGrants(ctx, "userRoleGrantsResource", &cockroach.UserRoleGrantsArgs{
    	Roles: cockroach.UserRoleGrantsRoleArray{
    		&cockroach.UserRoleGrantsRoleArgs{
    			ResourceType: pulumi.String("string"),
    			RoleName:     pulumi.String("string"),
    			ResourceId:   pulumi.String("string"),
    		},
    	},
    	UserId: pulumi.String("string"),
    })
    
    var userRoleGrantsResource = new UserRoleGrants("userRoleGrantsResource", UserRoleGrantsArgs.builder()
        .roles(UserRoleGrantsRoleArgs.builder()
            .resourceType("string")
            .roleName("string")
            .resourceId("string")
            .build())
        .userId("string")
        .build());
    
    user_role_grants_resource = cockroach.UserRoleGrants("userRoleGrantsResource",
        roles=[cockroach.UserRoleGrantsRoleArgs(
            resource_type="string",
            role_name="string",
            resource_id="string",
        )],
        user_id="string")
    
    const userRoleGrantsResource = new cockroach.UserRoleGrants("userRoleGrantsResource", {
        roles: [{
            resourceType: "string",
            roleName: "string",
            resourceId: "string",
        }],
        userId: "string",
    });
    
    type: cockroach:UserRoleGrants
    properties:
        roles:
            - resourceId: string
              resourceType: string
              roleName: string
        userId: string
    

    UserRoleGrants 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 UserRoleGrants resource accepts the following input properties:

    Roles List<Pulumiverse.Cockroach.Inputs.UserRoleGrantsRole>
    UserId string
    ID of the user to grant these roles to.
    Roles []UserRoleGrantsRoleArgs
    UserId string
    ID of the user to grant these roles to.
    roles List<UserRoleGrantsRole>
    userId String
    ID of the user to grant these roles to.
    roles UserRoleGrantsRole[]
    userId string
    ID of the user to grant these roles to.
    roles Sequence[UserRoleGrantsRoleArgs]
    user_id str
    ID of the user to grant these roles to.
    roles List<Property Map>
    userId String
    ID of the user to grant these roles to.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the UserRoleGrants 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 UserRoleGrants Resource

    Get an existing UserRoleGrants 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?: UserRoleGrantsState, opts?: CustomResourceOptions): UserRoleGrants
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            roles: Optional[Sequence[UserRoleGrantsRoleArgs]] = None,
            user_id: Optional[str] = None) -> UserRoleGrants
    func GetUserRoleGrants(ctx *Context, name string, id IDInput, state *UserRoleGrantsState, opts ...ResourceOption) (*UserRoleGrants, error)
    public static UserRoleGrants Get(string name, Input<string> id, UserRoleGrantsState? state, CustomResourceOptions? opts = null)
    public static UserRoleGrants get(String name, Output<String> id, UserRoleGrantsState 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:
    Roles List<Pulumiverse.Cockroach.Inputs.UserRoleGrantsRole>
    UserId string
    ID of the user to grant these roles to.
    Roles []UserRoleGrantsRoleArgs
    UserId string
    ID of the user to grant these roles to.
    roles List<UserRoleGrantsRole>
    userId String
    ID of the user to grant these roles to.
    roles UserRoleGrantsRole[]
    userId string
    ID of the user to grant these roles to.
    roles Sequence[UserRoleGrantsRoleArgs]
    user_id str
    ID of the user to grant these roles to.
    roles List<Property Map>
    userId String
    ID of the user to grant these roles to.

    Supporting Types

    UserRoleGrantsRole, UserRoleGrantsRoleArgs

    ResourceType string
    Type of resource. Allowed values are:

    • ORGANIZATION
    • CLUSTER
    • FOLDER
    RoleName string
    Name of the role to grant. Allowed values are:

    • DEVELOPER
    • ADMIN
    • BILLING_COORDINATOR
    • ORG_ADMIN
    • ORG_MEMBER
    • CLUSTER_ADMIN
    • CLUSTER_OPERATOR_WRITER
    • CLUSTER_DEVELOPER
    • CLUSTER_CREATOR
    • FOLDER_ADMIN
    • FOLDER_MOVER
    ResourceId string
    ID of the resource. Omit if resource_type is 'ORGANIZATION'.
    ResourceType string
    Type of resource. Allowed values are:

    • ORGANIZATION
    • CLUSTER
    • FOLDER
    RoleName string
    Name of the role to grant. Allowed values are:

    • DEVELOPER
    • ADMIN
    • BILLING_COORDINATOR
    • ORG_ADMIN
    • ORG_MEMBER
    • CLUSTER_ADMIN
    • CLUSTER_OPERATOR_WRITER
    • CLUSTER_DEVELOPER
    • CLUSTER_CREATOR
    • FOLDER_ADMIN
    • FOLDER_MOVER
    ResourceId string
    ID of the resource. Omit if resource_type is 'ORGANIZATION'.
    resourceType String
    Type of resource. Allowed values are:

    • ORGANIZATION
    • CLUSTER
    • FOLDER
    roleName String
    Name of the role to grant. Allowed values are:

    • DEVELOPER
    • ADMIN
    • BILLING_COORDINATOR
    • ORG_ADMIN
    • ORG_MEMBER
    • CLUSTER_ADMIN
    • CLUSTER_OPERATOR_WRITER
    • CLUSTER_DEVELOPER
    • CLUSTER_CREATOR
    • FOLDER_ADMIN
    • FOLDER_MOVER
    resourceId String
    ID of the resource. Omit if resource_type is 'ORGANIZATION'.
    resourceType string
    Type of resource. Allowed values are:

    • ORGANIZATION
    • CLUSTER
    • FOLDER
    roleName string
    Name of the role to grant. Allowed values are:

    • DEVELOPER
    • ADMIN
    • BILLING_COORDINATOR
    • ORG_ADMIN
    • ORG_MEMBER
    • CLUSTER_ADMIN
    • CLUSTER_OPERATOR_WRITER
    • CLUSTER_DEVELOPER
    • CLUSTER_CREATOR
    • FOLDER_ADMIN
    • FOLDER_MOVER
    resourceId string
    ID of the resource. Omit if resource_type is 'ORGANIZATION'.
    resource_type str
    Type of resource. Allowed values are:

    • ORGANIZATION
    • CLUSTER
    • FOLDER
    role_name str
    Name of the role to grant. Allowed values are:

    • DEVELOPER
    • ADMIN
    • BILLING_COORDINATOR
    • ORG_ADMIN
    • ORG_MEMBER
    • CLUSTER_ADMIN
    • CLUSTER_OPERATOR_WRITER
    • CLUSTER_DEVELOPER
    • CLUSTER_CREATOR
    • FOLDER_ADMIN
    • FOLDER_MOVER
    resource_id str
    ID of the resource. Omit if resource_type is 'ORGANIZATION'.
    resourceType String
    Type of resource. Allowed values are:

    • ORGANIZATION
    • CLUSTER
    • FOLDER
    roleName String
    Name of the role to grant. Allowed values are:

    • DEVELOPER
    • ADMIN
    • BILLING_COORDINATOR
    • ORG_ADMIN
    • ORG_MEMBER
    • CLUSTER_ADMIN
    • CLUSTER_OPERATOR_WRITER
    • CLUSTER_DEVELOPER
    • CLUSTER_CREATOR
    • FOLDER_ADMIN
    • FOLDER_MOVER
    resourceId String
    ID of the resource. Omit if resource_type is 'ORGANIZATION'.

    Package Details

    Repository
    cockroach pulumiverse/pulumi-cockroach
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cockroach Terraform Provider.
    cockroach logo
    CockroachDB v0.2.3 published on Monday, May 27, 2024 by pulumiverse