1. Packages
  2. Auth0
  3. API Docs
  4. RolePermission
Auth0 v3.4.0 published on Wednesday, Jun 19, 2024 by Pulumi

auth0.RolePermission

Explore with Pulumi AI

auth0 logo
Auth0 v3.4.0 published on Wednesday, Jun 19, 2024 by Pulumi

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

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

    Create RolePermission Resource

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

    Constructor syntax

    new RolePermission(name: string, args: RolePermissionArgs, opts?: CustomResourceOptions);
    @overload
    def RolePermission(resource_name: str,
                       args: RolePermissionArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def RolePermission(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       permission: Optional[str] = None,
                       resource_server_identifier: Optional[str] = None,
                       role_id: Optional[str] = None)
    func NewRolePermission(ctx *Context, name string, args RolePermissionArgs, opts ...ResourceOption) (*RolePermission, error)
    public RolePermission(string name, RolePermissionArgs args, CustomResourceOptions? opts = null)
    public RolePermission(String name, RolePermissionArgs args)
    public RolePermission(String name, RolePermissionArgs args, CustomResourceOptions options)
    
    type: auth0:RolePermission
    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 RolePermissionArgs
    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 RolePermissionArgs
    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 RolePermissionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RolePermissionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RolePermissionArgs
    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 rolePermissionResource = new Auth0.RolePermission("rolePermissionResource", new()
    {
        Permission = "string",
        ResourceServerIdentifier = "string",
        RoleId = "string",
    });
    
    example, err := auth0.NewRolePermission(ctx, "rolePermissionResource", &auth0.RolePermissionArgs{
    	Permission:               pulumi.String("string"),
    	ResourceServerIdentifier: pulumi.String("string"),
    	RoleId:                   pulumi.String("string"),
    })
    
    var rolePermissionResource = new RolePermission("rolePermissionResource", RolePermissionArgs.builder()
        .permission("string")
        .resourceServerIdentifier("string")
        .roleId("string")
        .build());
    
    role_permission_resource = auth0.RolePermission("rolePermissionResource",
        permission="string",
        resource_server_identifier="string",
        role_id="string")
    
    const rolePermissionResource = new auth0.RolePermission("rolePermissionResource", {
        permission: "string",
        resourceServerIdentifier: "string",
        roleId: "string",
    });
    
    type: auth0:RolePermission
    properties:
        permission: string
        resourceServerIdentifier: string
        roleId: string
    

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

    Permission string
    Name of the permission.
    ResourceServerIdentifier string
    Identifier of the resource server that the permission is associated with.
    RoleId string
    ID of the role to associate the permission to.
    Permission string
    Name of the permission.
    ResourceServerIdentifier string
    Identifier of the resource server that the permission is associated with.
    RoleId string
    ID of the role to associate the permission to.
    permission String
    Name of the permission.
    resourceServerIdentifier String
    Identifier of the resource server that the permission is associated with.
    roleId String
    ID of the role to associate the permission to.
    permission string
    Name of the permission.
    resourceServerIdentifier string
    Identifier of the resource server that the permission is associated with.
    roleId string
    ID of the role to associate the permission to.
    permission str
    Name of the permission.
    resource_server_identifier str
    Identifier of the resource server that the permission is associated with.
    role_id str
    ID of the role to associate the permission to.
    permission String
    Name of the permission.
    resourceServerIdentifier String
    Identifier of the resource server that the permission is associated with.
    roleId String
    ID of the role to associate the permission to.

    Outputs

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

    Description string
    Description of the permission.
    Id string
    The provider-assigned unique ID for this managed resource.
    ResourceServerName string
    Name of the resource server that the permission is associated with.
    Description string
    Description of the permission.
    Id string
    The provider-assigned unique ID for this managed resource.
    ResourceServerName string
    Name of the resource server that the permission is associated with.
    description String
    Description of the permission.
    id String
    The provider-assigned unique ID for this managed resource.
    resourceServerName String
    Name of the resource server that the permission is associated with.
    description string
    Description of the permission.
    id string
    The provider-assigned unique ID for this managed resource.
    resourceServerName string
    Name of the resource server that the permission is associated with.
    description str
    Description of the permission.
    id str
    The provider-assigned unique ID for this managed resource.
    resource_server_name str
    Name of the resource server that the permission is associated with.
    description String
    Description of the permission.
    id String
    The provider-assigned unique ID for this managed resource.
    resourceServerName String
    Name of the resource server that the permission is associated with.

    Look up Existing RolePermission Resource

    Get an existing RolePermission 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?: RolePermissionState, opts?: CustomResourceOptions): RolePermission
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            permission: Optional[str] = None,
            resource_server_identifier: Optional[str] = None,
            resource_server_name: Optional[str] = None,
            role_id: Optional[str] = None) -> RolePermission
    func GetRolePermission(ctx *Context, name string, id IDInput, state *RolePermissionState, opts ...ResourceOption) (*RolePermission, error)
    public static RolePermission Get(string name, Input<string> id, RolePermissionState? state, CustomResourceOptions? opts = null)
    public static RolePermission get(String name, Output<String> id, RolePermissionState 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:
    Description string
    Description of the permission.
    Permission string
    Name of the permission.
    ResourceServerIdentifier string
    Identifier of the resource server that the permission is associated with.
    ResourceServerName string
    Name of the resource server that the permission is associated with.
    RoleId string
    ID of the role to associate the permission to.
    Description string
    Description of the permission.
    Permission string
    Name of the permission.
    ResourceServerIdentifier string
    Identifier of the resource server that the permission is associated with.
    ResourceServerName string
    Name of the resource server that the permission is associated with.
    RoleId string
    ID of the role to associate the permission to.
    description String
    Description of the permission.
    permission String
    Name of the permission.
    resourceServerIdentifier String
    Identifier of the resource server that the permission is associated with.
    resourceServerName String
    Name of the resource server that the permission is associated with.
    roleId String
    ID of the role to associate the permission to.
    description string
    Description of the permission.
    permission string
    Name of the permission.
    resourceServerIdentifier string
    Identifier of the resource server that the permission is associated with.
    resourceServerName string
    Name of the resource server that the permission is associated with.
    roleId string
    ID of the role to associate the permission to.
    description str
    Description of the permission.
    permission str
    Name of the permission.
    resource_server_identifier str
    Identifier of the resource server that the permission is associated with.
    resource_server_name str
    Name of the resource server that the permission is associated with.
    role_id str
    ID of the role to associate the permission to.
    description String
    Description of the permission.
    permission String
    Name of the permission.
    resourceServerIdentifier String
    Identifier of the resource server that the permission is associated with.
    resourceServerName String
    Name of the resource server that the permission is associated with.
    roleId String
    ID of the role to associate the permission to.

    Import

    This resource can be imported by specifying the

    role ID, resource identifier, and permission name separated by “::” (note the double colon)

    ::::

    Example:

    $ pulumi import auth0:index/rolePermission:RolePermission permission "rol_XXXXXXXXXXXXX::https://example.com::read:foo"
    

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

    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.4.0 published on Wednesday, Jun 19, 2024 by Pulumi