We have seen how to add a store,create an application, add an operation, add tasks, create roles, add application groups, and add users via SID or UPN to groups in AzMan using C#. All of these are available here.
Here is the fourth post regarding the usage of these helper classes:
public string[] GetRoleDefinitions(string storeUrl, string applicationName)I'll have 1-2 more posts on this and then move onto something else.
{
IAzApplication app = ApplicationHelper.GetApplication(storeUrl, applicationName);
return RoleDefinitionHelper.GetRoleDefinitionNames(app);
}
public void AddRoleDefinition(string storeUrl, string applicationName, string roleDefinitionName)
{
IAzApplication app = ApplicationHelper.GetApplication(storeUrl, applicationName);
RoleDefinitionHelper.AddRoleDefinition(app, roleDefinitionName);
}
public void RemoveRoleDefinition(string storeUrl, string applicationName, string roleDefinitionName)
{
IAzApplication app = ApplicationHelper.GetApplication(storeUrl, applicationName);
RoleDefinitionHelper.RemoveRoleDefinition(app, roleDefinitionName);
}
public bool IsRoleDefinitionExists(string storeUrl, string applicationName, string roleDefinitionName)
{
IAzApplication app = ApplicationHelper.GetApplication(storeUrl, applicationName);
return RoleDefinitionHelper.IsRoleDefinitionExists(app, roleDefinitionName);
}
public string[] GetApplicationGroups(string storeUrl, string applicationName)
{
IAzApplication app = ApplicationHelper.GetApplication(storeUrl, applicationName);
return ApplicationGroupHelper.GetApplicationGroupNames(app);
}
public void AddApplicationGroup(string storeUrl, string applicationName, string applicationGroupName)
{
IAzApplication app = ApplicationHelper.GetApplication(storeUrl, applicationName);
ApplicationGroupHelper.AddApplicationGroup(app, applicationGroupName);
}
public void RemoveApplicationGroup(string storeUrl, string applicationName, string applicationGroupName)
{
IAzApplication app = ApplicationHelper.GetApplication(storeUrl, applicationName);
ApplicationGroupHelper.RemoveApplicationGroup(app, applicationGroupName);
}
public bool IsApplicationGroupExists(string storeUrl, string applicationName, string applicationGroupName)
{
IAzApplication app = ApplicationHelper.GetApplication(storeUrl, applicationName);
return ApplicationGroupHelper.IsApplicationGroupExists(app, applicationGroupName);
}
No comments:
Post a Comment