use of com.microsoft.azure.management.network.implementation.NetworkSecurityGroupsInner in project photon-model by vmware.
the class AzureSecurityGroupService method createSecurityGroup.
private DeferredResult<AzureSecurityGroupContext> createSecurityGroup(AzureSecurityGroupContext context) {
String rgName = context.resourceGroup.name();
final String msg = "Creating Azure Security Group [" + context.securityGroupState.name + "] in resource group [" + rgName + "].";
NetworkSecurityGroupsInner azureSecurityGroupClient = context.azureSdkClients.getNetworkManagementClientImpl().networkSecurityGroups();
return AzureSecurityGroupUtils.createSecurityGroup(this, azureSecurityGroupClient, context.securityGroupState, rgName, context.securityGroupState.regionId, msg).thenApply(sg -> {
// Populate the security group id with Azure Network Security Group ID
context.securityGroupState.id = sg.id();
context.securityGroup = sg;
return context;
});
}
Aggregations