Azure / azure-sdk-for-java

This repository is for active development of the Azure SDK for Java. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/java/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-java.
MIT License
2.34k stars 1.98k forks source link

[QUERY] Is it possible to set DnsNameLabelReusePolicy/autoGeneratedDomainNameLabelScope during creation of a new ContainerGroup? #42341

Open solar-planit opened 1 week ago

solar-planit commented 1 week ago

Query/Question Is it possibe to explicitly set a value for the member autoGeneratedDomainNameLabelScope of IpAddress during the creation of a ContainerGroup when using the fluent creation style shown below? If this currently isn't possible, what would be feasible workarounds in the context of the usage of Java?

  ContainerGroup containerGroup = azureResourceManager.containerGroups().define(aciName)
      .withRegion(Region.US_WEST)
      .withNewResourceGroup(rgName)
      .withLinux()
      .withPublicImageRegistryOnly()
      .withoutVolume()
      .defineContainerInstance(aciName + "-1")
          .withImage(containerImageName1)
          .withExternalTcpPort(80)
          .withCpuCoreCount(.5)
          .withMemorySizeInGB(0.8)
          .attach()
      .defineContainerInstance(aciName + "-2")
          .withImage(containerImageName2)
          .withoutPorts()
          .withCpuCoreCount(.5)
          .withMemorySizeInGB(0.8)
          .attach()
      .withRestartPolicy(ContainerGroupRestartPolicy.NEVER)
      .withDnsPrefix(aciName)
      .create();

(Source: https://github.com/Azure-Samples/aci-java-create-container-groups/blob/master/src/main/java/com/azure/resourcemanager/containerinstance/samples/ManageContainerInstanceWithMultipleContainerImages.java#L45C1-L65C27)

Why is this not a Bug or a feature Request? Depending on the answer or simple workarounds, a feature request might result from this.

Setup (please complete the following information if applicable):

github-actions[bot] commented 1 week ago

Thank you for your feedback. Tagging and routing to the team member best able to assist.