ServicePrincipal.UpdateStages.WithRoleAssignment Interface

public interface WithRoleAssignment

A service principal update allowing role assignments to be added.

Method Summary

Modifier and Type Method and Description
ServicePrincipal.Update withNewRole(BuiltInRole role, String scope)

Assigns a new role to the service principal.

ServicePrincipal.Update withNewRoleInResourceGroup(BuiltInRole role, ResourceGroup resourceGroup)

Assigns a new role to the service principal.

ServicePrincipal.Update withNewRoleInSubscription(BuiltInRole role, String subscriptionId)

Assigns a new role to the service principal.

ServicePrincipal.Update withoutRole(RoleAssignment roleAssignment)

Removes a role from the service principal.

Method Details

withNewRole

public Update withNewRole(BuiltInRole role, String scope)

Assigns a new role to the service principal.

Parameters:

role - the role to assign to the service principal
scope - the scope the service principal can access

Returns:

the next stage of the service principal update

withNewRoleInResourceGroup

public Update withNewRoleInResourceGroup(BuiltInRole role, ResourceGroup resourceGroup)

Assigns a new role to the service principal.

Parameters:

role - the role to assign to the service principal
resourceGroup - the resource group the service principal can access

Returns:

the next stage of the service principal update

withNewRoleInSubscription

public Update withNewRoleInSubscription(BuiltInRole role, String subscriptionId)

Assigns a new role to the service principal.

Parameters:

role - the role to assign to the service principal
subscriptionId - the subscription the service principal can access

Returns:

the next stage of the service principal update

withoutRole

public Update withoutRole(RoleAssignment roleAssignment)

Removes a role from the service principal.

Parameters:

roleAssignment - the role assignment to remove

Returns:

the next stage of the service principal update

Applies to