• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java ActiveDirectoryGroup类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中com.microsoft.azure.management.graphrbac.ActiveDirectoryGroup的典型用法代码示例。如果您正苦于以下问题:Java ActiveDirectoryGroup类的具体用法?Java ActiveDirectoryGroup怎么用?Java ActiveDirectoryGroup使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

ActiveDirectoryGroup类属于com.microsoft.azure.management.graphrbac包,在下文中一共展示了ActiveDirectoryGroup类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: print

点赞 3

import com.microsoft.azure.management.graphrbac.ActiveDirectoryGroup; //导入依赖的package包/类
/**
 * Print Active Directory Group info.
 * @param group active directory group
 */
public static void print(ActiveDirectoryGroup group) {
    StringBuilder builder = new StringBuilder()
            .append("Active Directory Group: ").append(group.id())
            .append("\n\tName: ").append(group.name())
            .append("\n\tMail: ").append(group.mail())
            .append("\n\tSecurity Enabled: ").append(group.securityEnabled())
            .append("\n\tGroup members:");

    for (ActiveDirectoryObject object : group.listMembers()) {
        builder.append("\n\t\tType: ").append(object.getClass().getSimpleName())
                .append("\tName: ").append(object.name());
    }

    System.out.println(builder.toString());
}
 

开发者ID:Azure-Samples,
项目名称:acr-java-manage-azure-container-registry,
代码行数:20,
代码来源:Utils.java

示例2: getByIdAsync

点赞 2

import com.microsoft.azure.management.graphrbac.ActiveDirectoryGroup; //导入依赖的package包/类
@Override
public Observable<ActiveDirectoryGroup> getByIdAsync(String id) {
    return manager.inner().groups().getAsync(id)
            .map(new Func1<ADGroupInner, ActiveDirectoryGroup>() {
                @Override
                public ActiveDirectoryGroup call(ADGroupInner groupInner) {
                    if (groupInner == null) {
                        return null;
                    } else {
                        return new ActiveDirectoryGroupImpl(groupInner, manager());
                    }
                }
            });
}
 

开发者ID:Azure,
项目名称:azure-libraries-for-java
代码行数:15,
代码来源:ActiveDirectoryGroupsImpl.java

示例3: getByNameAsync

点赞 2

import com.microsoft.azure.management.graphrbac.ActiveDirectoryGroup; //导入依赖的package包/类
@Override
public Observable<ActiveDirectoryGroup> getByNameAsync(String name) {
    return manager().inner().groups().listAsync(String.format("displayName eq '%s'", name))
            .map(new Func1<Page<ADGroupInner>, ActiveDirectoryGroup>() {
                @Override
                public ActiveDirectoryGroup call(Page<ADGroupInner> adGroupInnerPage) {
                    if (adGroupInnerPage.items() == null || adGroupInnerPage.items().isEmpty()) {
                        return null;
                    } else {
                        return new ActiveDirectoryGroupImpl(adGroupInnerPage.items().get(0), manager());
                    }
                }
            });
}
 

开发者ID:Azure,
项目名称:azure-libraries-for-java
代码行数:15,
代码来源:ActiveDirectoryGroupsImpl.java

示例4: checkImplicitMsiGroupName

点赞 2

import com.microsoft.azure.management.graphrbac.ActiveDirectoryGroup; //导入依赖的package包/类
/**
 * Checks to see if the configured AAD group exists (in the same tenant as the service principal
 * used by the plugin. Also checks to see if the service principal can read AAD for group and
 * group member info.
 *
 * NOTE: This validator does not check for write privilege for adding member to AAD group.
 *
 * @param directorConfig Director config
 * @param accumulator error accumulator
 * @param localizationContext localization context to extract config
 */
void checkImplicitMsiGroupName(Configured directorConfig,
    PluginExceptionConditionAccumulator accumulator,
    LocalizationContext localizationContext) {
  final String aadGroupDoesNotExistMsg = "Failed to find AAD group '%s' in Tenant '%s'. Please " +
      "confirm the service principal has read/write access to the AAD tenant, the name of the " +
      "AAD group or create the group.";
  final boolean useImplicitMsi = directorConfig.getConfigurationValue(
      AzureComputeInstanceTemplateConfigurationProperty.USE_IMPLICIT_MSI,
      localizationContext).equals("Yes");

  if (!useImplicitMsi) {
    LOG.debug("Not using implicit MSI, skip AAD group name validation.");
    return;
  }

  final String aadGroupName = directorConfig.getConfigurationValue(
      AzureComputeInstanceTemplateConfigurationProperty.IMPLICIT_MSI_AAD_GROUP_NAME,
      localizationContext);

  if (aadGroupName == null || aadGroupName.isEmpty()) {
    LOG.debug("Skip implicit MSI AAD group name validation because it is not configured.");
    return;
  }

  GraphRbacManager graphRbacManager = credentials.getGraphRbacManager();
  ActiveDirectoryGroup aadGroup = graphRbacManager.groups().getByName(aadGroupName);
  if (aadGroup == null) {
    LOG.debug(String.format(aadGroupDoesNotExistMsg, aadGroupName, graphRbacManager.tenantId()));
    addError(accumulator,
        AzureComputeInstanceTemplateConfigurationProperty.IMPLICIT_MSI_AAD_GROUP_NAME,
        localizationContext, null, aadGroupDoesNotExistMsg, aadGroupName,
        graphRbacManager.tenantId());
    return;
  }
  LOG.info("AAD group '{}' exists in Tenant {}.", aadGroupName, graphRbacManager.tenantId());
}
 

开发者ID:cloudera,
项目名称:director-azure-plugin,
代码行数:48,
代码来源:AzureComputeInstanceTemplateConfigurationValidator.java

示例5: forGroup

点赞 2

import com.microsoft.azure.management.graphrbac.ActiveDirectoryGroup; //导入依赖的package包/类
@Override
public AccessPolicyImpl forGroup(ActiveDirectoryGroup activeDirectoryGroup) {
    inner().withObjectId(activeDirectoryGroup.id());
    return this;
}
 

开发者ID:Azure,
项目名称:azure-libraries-for-java
代码行数:6,
代码来源:AccessPolicyImpl.java

示例6: list

点赞 2

import com.microsoft.azure.management.graphrbac.ActiveDirectoryGroup; //导入依赖的package包/类
@Override
public PagedList<ActiveDirectoryGroup> list() {
    return wrapList(this.manager.inner().groups().list());
}
 

开发者ID:Azure,
项目名称:azure-libraries-for-java
代码行数:5,
代码来源:ActiveDirectoryGroupsImpl.java

示例7: listAsync

点赞 2

import com.microsoft.azure.management.graphrbac.ActiveDirectoryGroup; //导入依赖的package包/类
@Override
public Observable<ActiveDirectoryGroup> listAsync() {
    return wrapPageAsync(manager().inner().groups().listAsync());
}
 

开发者ID:Azure,
项目名称:azure-libraries-for-java
代码行数:5,
代码来源:ActiveDirectoryGroupsImpl.java

示例8: getByName

点赞 2

import com.microsoft.azure.management.graphrbac.ActiveDirectoryGroup; //导入依赖的package包/类
@Override
public ActiveDirectoryGroup getByName(String name) {
    return getByNameAsync(name).toBlocking().single();
}
 

开发者ID:Azure,
项目名称:azure-libraries-for-java,
代码行数:5,
代码来源:ActiveDirectoryGroupsImpl.java

示例9: forGroup

点赞 2

import com.microsoft.azure.management.graphrbac.ActiveDirectoryGroup; //导入依赖的package包/类
@Override
public RoleAssignmentImpl forGroup(ActiveDirectoryGroup activeDirectoryGroup) {
    this.objectId = activeDirectoryGroup.id();
    return this;
}
 

开发者ID:Azure,
项目名称:azure-libraries-for-java,
代码行数:6,
代码来源:RoleAssignmentImpl.java

示例10: withMember

点赞 2

import com.microsoft.azure.management.graphrbac.ActiveDirectoryGroup; //导入依赖的package包/类
@Override
public ActiveDirectoryGroupImpl withMember(ActiveDirectoryGroup group) {
    return withMember(group.id());
}
 

开发者ID:Azure,
项目名称:azure-libraries-for-java,
代码行数:5,
代码来源:ActiveDirectoryGroupImpl.java

示例11: withoutMember

点赞 2

import com.microsoft.azure.management.graphrbac.ActiveDirectoryGroup; //导入依赖的package包/类
@Override
public ActiveDirectoryGroupImpl withoutMember(ActiveDirectoryGroup group) {
    return withoutMember(group.id());
}
 

开发者ID:Azure,
项目名称:azure-libraries-for-java,
代码行数:5,
代码来源:ActiveDirectoryGroupImpl.java

示例12: forGroup

点赞 1

import com.microsoft.azure.management.graphrbac.ActiveDirectoryGroup; //导入依赖的package包/类
/**
 * Specifies the Active Directory group this access policy is for.
 *
 * @param activeDirectoryGroup the AD group object
 * @return the next stage of access policy definition
 */
WithAttach<ParentT> forGroup(ActiveDirectoryGroup activeDirectoryGroup);
 

开发者ID:Azure,
项目名称:azure-libraries-for-java,
代码行数:8,
代码来源:AccessPolicy.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)