1. Packages
  2. Auth0
  3. API Docs
  4. RolePermissions
Auth0 v3.3.1 published on Thursday, Mar 14, 2024 by Pulumi

auth0.RolePermissions

Explore with Pulumi AI

auth0 logo
Auth0 v3.3.1 published on Thursday, Mar 14, 2024 by Pulumi

    With this resource, you can manage role permissions (1-many).

    !> This resource manages all the permissions assigned to a role. In contrast, the auth0.RolePermission resource only appends a permission to a role. To avoid potential issues, it is recommended not to use this resource in conjunction with the auth0.RolePermission resource when managing permissions for the same role id.

    Create RolePermissions Resource

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

    Constructor syntax

    new RolePermissions(name: string, args: RolePermissionsArgs, opts?: CustomResourceOptions);
    @overload
    def RolePermissions(resource_name: str,
                        args: RolePermissionsArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def RolePermissions(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        permissions: Optional[Sequence[RolePermissionsPermissionArgs]] = None,
                        role_id: Optional[str] = None)
    func NewRolePermissions(ctx *Context, name string, args RolePermissionsArgs, opts ...ResourceOption) (*RolePermissions, error)
    public RolePermissions(string name, RolePermissionsArgs args, CustomResourceOptions? opts = null)
    public RolePermissions(String name, RolePermissionsArgs args)
    public RolePermissions(String name, RolePermissionsArgs args, CustomResourceOptions options)
    
    type: auth0:RolePermissions
    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 RolePermissionsArgs
    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 RolePermissionsArgs
    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 RolePermissionsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RolePermissionsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RolePermissionsArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var rolePermissionsResource = new Auth0.RolePermissions("rolePermissionsResource", new()
    {
        Permissions = new[]
        {
            new Auth0.Inputs.RolePermissionsPermissionArgs
            {
                Name = "string",
                ResourceServerIdentifier = "string",
                Description = "string",
                ResourceServerName = "string",
            },
        },
        RoleId = "string",
    });
    
    example, err := auth0.NewRolePermissions(ctx, "rolePermissionsResource", &auth0.RolePermissionsArgs{
    	Permissions: auth0.RolePermissionsPermissionArray{
    		&auth0.RolePermissionsPermissionArgs{
    			Name:                     pulumi.String("string"),
    			ResourceServerIdentifier: pulumi.String("string"),
    			Description:              pulumi.String("string"),
    			ResourceServerName:       pulumi.String("string"),
    		},
    	},
    	RoleId: pulumi.String("string"),
    })
    
    var rolePermissionsResource = new RolePermissions("rolePermissionsResource", RolePermissionsArgs.builder()        
        .permissions(RolePermissionsPermissionArgs.builder()
            .name("string")
            .resourceServerIdentifier("string")
            .description("string")
            .resourceServerName("string")
            .build())
        .roleId("string")
        .build());
    
    role_permissions_resource = auth0.RolePermissions("rolePermissionsResource",
        permissions=[auth0.RolePermissionsPermissionArgs(
            name="string",
            resource_server_identifier="string",
            description="string",
            resource_server_name="string",
        )],
        role_id="string")
    
    const rolePermissionsResource = new auth0.RolePermissions("rolePermissionsResource", {
        permissions: [{
            name: "string",
            resourceServerIdentifier: "string",
            description: "string",
            resourceServerName: "string",
        }],
        roleId: "string",
    });
    
    type: auth0:RolePermissions
    properties:
        permissions:
            - description: string
              name: string
              resourceServerIdentifier: string
              resourceServerName: string
        roleId: string
    

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

    Permissions List<RolePermissionsPermission>
    List of API permissions granted to the role.
    RoleId string
    ID of the role to associate the permission to.
    Permissions []RolePermissionsPermissionArgs
    List of API permissions granted to the role.
    RoleId string
    ID of the role to associate the permission to.
    permissions List<RolePermissionsPermission>
    List of API permissions granted to the role.
    roleId String
    ID of the role to associate the permission to.
    permissions RolePermissionsPermission[]
    List of API permissions granted to the role.
    roleId string
    ID of the role to associate the permission to.
    permissions Sequence[RolePermissionsPermissionArgs]
    List of API permissions granted to the role.
    role_id str
    ID of the role to associate the permission to.
    permissions List<Property Map>
    List of API permissions granted to the role.
    roleId String
    ID of the role to associate the permission to.

    Outputs

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

    Get an existing RolePermissions 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?: RolePermissionsState, opts?: CustomResourceOptions): RolePermissions
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            permissions: Optional[Sequence[RolePermissionsPermissionArgs]] = None,
            role_id: Optional[str] = None) -> RolePermissions
    func GetRolePermissions(ctx *Context, name string, id IDInput, state *RolePermissionsState, opts ...ResourceOption) (*RolePermissions, error)
    public static RolePermissions Get(string name, Input<string> id, RolePermissionsState? state, CustomResourceOptions? opts = null)
    public static RolePermissions get(String name, Output<String> id, RolePermissionsState 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:
    Permissions List<RolePermissionsPermission>
    List of API permissions granted to the role.
    RoleId string
    ID of the role to associate the permission to.
    Permissions []RolePermissionsPermissionArgs
    List of API permissions granted to the role.
    RoleId string
    ID of the role to associate the permission to.
    permissions List<RolePermissionsPermission>
    List of API permissions granted to the role.
    roleId String
    ID of the role to associate the permission to.
    permissions RolePermissionsPermission[]
    List of API permissions granted to the role.
    roleId string
    ID of the role to associate the permission to.
    permissions Sequence[RolePermissionsPermissionArgs]
    List of API permissions granted to the role.
    role_id str
    ID of the role to associate the permission to.
    permissions List<Property Map>
    List of API permissions granted to the role.
    roleId String
    ID of the role to associate the permission to.

    Supporting Types

    RolePermissionsPermission, RolePermissionsPermissionArgs

    Name string
    Name of permission.
    ResourceServerIdentifier string
    Resource server identifier associated with the permission.
    Description string
    Description of the permission.
    ResourceServerName string
    Name of resource server that the permission is associated with.
    Name string
    Name of permission.
    ResourceServerIdentifier string
    Resource server identifier associated with the permission.
    Description string
    Description of the permission.
    ResourceServerName string
    Name of resource server that the permission is associated with.
    name String
    Name of permission.
    resourceServerIdentifier String
    Resource server identifier associated with the permission.
    description String
    Description of the permission.
    resourceServerName String
    Name of resource server that the permission is associated with.
    name string
    Name of permission.
    resourceServerIdentifier string
    Resource server identifier associated with the permission.
    description string
    Description of the permission.
    resourceServerName string
    Name of resource server that the permission is associated with.
    name str
    Name of permission.
    resource_server_identifier str
    Resource server identifier associated with the permission.
    description str
    Description of the permission.
    resource_server_name str
    Name of resource server that the permission is associated with.
    name String
    Name of permission.
    resourceServerIdentifier String
    Resource server identifier associated with the permission.
    description String
    Description of the permission.
    resourceServerName String
    Name of resource server that the permission is associated with.

    Package Details

    Repository
    Auth0 pulumi/pulumi-auth0
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the auth0 Terraform Provider.
    auth0 logo
    Auth0 v3.3.1 published on Thursday, Mar 14, 2024 by Pulumi