com.microsoft.azure.management.Azure.subscriptionId()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(245)

本文整理了Java中com.microsoft.azure.management.Azure.subscriptionId()方法的一些代码示例,展示了Azure.subscriptionId()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Azure.subscriptionId()方法的具体详情如下:
包路径:com.microsoft.azure.management.Azure
类名称:Azure
方法名:subscriptionId

Azure.subscriptionId介绍

暂无

代码示例

代码示例来源:origin: Microsoft/azure-tools-for-java

public static Map<String, DockerHost> getDockerHosts(Azure azureClient, Map<String, AzureDockerCertVault> dockerVaultsMap) {
 Map<String, DockerHost> dockerHostMap = getDockerHosts(azureClient.virtualMachines().list(), dockerVaultsMap);
 for (DockerHost dockerHost : dockerHostMap.values()) {
  dockerHost.sid = azureClient.subscriptionId();
  if (dockerHost.hostVM != null) dockerHost.hostVM.sid = azureClient.subscriptionId();
 }
 return dockerHostMap;
}

代码示例来源:origin: com.microsoft.azure/azure

/**
 * @return the currently selected subscription this client is authenticated to work with
 */
public Subscription getCurrentSubscription() {
  return this.subscriptions().getById(this.subscriptionId());
}

代码示例来源:origin: Azure/azure-libraries-for-java

/**
 * @return the currently selected subscription this client is authenticated to work with
 */
public Subscription getCurrentSubscription() {
  return this.subscriptions().getById(this.subscriptionId());
}

代码示例来源:origin: Microsoft/azure-tools-for-java

public static AzureDockerVM getDockerVM(Azure azureClient, String resourceGroup, String hostName) {
 try {
  AzureDockerVM azureDockerVM = getDockerVM(azureClient.virtualMachines().getByResourceGroup(resourceGroup, hostName));
  azureDockerVM.sid = azureClient.subscriptionId();
  return azureDockerVM;
 } catch (Exception e) {
  throw new AzureDockerException(e.getMessage(), e);
 }
}

代码示例来源:origin: Microsoft/azure-tools-for-java

public static List<AzureDockerStorageAccount> getStorageAccounts(Azure azureClient) {
 List<AzureDockerStorageAccount> result = new ArrayList<>();
 if (azureClient != null) {
  for (StorageAccount storageAccount : azureClient.storageAccounts().list()) {
   AzureDockerStorageAccount dockerStorageAccount = new AzureDockerStorageAccount();
   dockerStorageAccount.name = storageAccount.name();
   dockerStorageAccount.region = storageAccount.regionName();
   dockerStorageAccount.resourceGroup = storageAccount.resourceGroupName();
   dockerStorageAccount.sid = azureClient.subscriptionId();
   dockerStorageAccount.skuType = storageAccount.sku().name().name();
   result.add(dockerStorageAccount);
  }
 }
 return result;
}

代码示例来源:origin: Microsoft/azure-maven-plugins

public Azure getAzureClient() throws AzureAuthFailureException {
  if (azure == null) {
    azure = azureAuthHelper.getAzureClient();
    if (azure == null) {
      getTelemetryProxy().trackEvent(INIT_FAILURE);
      throw new AzureAuthFailureException(AZURE_INIT_FAIL);
    } else {
      // Repopulate subscriptionId in case it is not configured.
      getTelemetryProxy().addDefaultProperty(SUBSCRIPTION_ID_KEY, azure.subscriptionId());
    }
  }
  return azure;
}

代码示例来源:origin: com.microsoft.azure/azure-maven-plugin-lib

public Azure getAzureClient() throws AzureAuthFailureException {
  if (azure == null) {
    azure = azureAuthHelper.getAzureClient();
    if (azure == null) {
      getTelemetryProxy().trackEvent(INIT_FAILURE);
      throw new AzureAuthFailureException(AZURE_INIT_FAIL);
    } else {
      // Repopulate subscriptionId in case it is not configured.
      getTelemetryProxy().addDefaultProperty(SUBSCRIPTION_ID_KEY, azure.subscriptionId());
    }
  }
  return azure;
}

代码示例来源:origin: jenkinsci/azure-vm-agents-plugin

properties.put(AppInsightsConstants.AZURE_SUBSCRIPTION_ID, getAzureClient().subscriptionId());
properties.put(AppInsightsConstants.AZURE_LOCATION, template.getLocation());
properties.put("AgentOS", template.getOsType());

相关文章