Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See License.txt in the project root for license information.
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. */
package com.microsoft.azure.management.containerinstance; import com.microsoft.azure.management.apigeneration.Beta; import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.apigeneration.Method; import com.microsoft.azure.management.containerinstance.implementation.ContainerGroupInner; import com.microsoft.azure.management.containerinstance.implementation.ContainerInstanceManager; import com.microsoft.azure.management.graphrbac.BuiltInRole; import com.microsoft.azure.management.msi.Identity; import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource; import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource; import com.microsoft.azure.management.resources.fluentcore.model.Appliable; import com.microsoft.azure.management.resources.fluentcore.model.Attachable; import com.microsoft.azure.management.resources.fluentcore.model.Creatable; import com.microsoft.azure.management.resources.fluentcore.model.Refreshable; import com.microsoft.azure.management.resources.fluentcore.model.Updatable; import rx.Completable; import rx.Observable; import java.util.Collection; import java.util.List; import java.util.Map; import java.util.Set;
An immutable client-side representation of an Azure Container Group.
/** * An immutable client-side representation of an Azure Container Group. */
@Fluent @Beta(Beta.SinceVersion.V1_23_0) public interface ContainerGroup extends GroupableResource<ContainerInstanceManager, ContainerGroupInner>, Refreshable<ContainerGroup>, Updatable<ContainerGroup.Update> { /*********************************************************** * Getters ***********************************************************/
Returns:the container instances in this container group
/** * @return the container instances in this container group */
Map<String, Container> containers();
Returns:all the ports publicly exposed for this container group
/** * @return all the ports publicly exposed for this container group */
@Beta(Beta.SinceVersion.V1_5_0) Set<Port> externalPorts();
Returns:the TCP ports publicly exposed for this container group
/** * @return the TCP ports publicly exposed for this container group */
int[] externalTcpPorts();
Returns:the UDP ports publicly exposed for this container group
/** * @return the UDP ports publicly exposed for this container group */
int[] externalUdpPorts();
Returns:the volumes for this container group
/** * @return the volumes for this container group */
Map<String, Volume> volumes();
Returns:the Docker image registry servers by which the container group is created from
/** * @return the Docker image registry servers by which the container group is created from */
Collection<String> imageRegistryServers();
Returns:the container group restart policy
/** * @return the container group restart policy */
@Beta(Beta.SinceVersion.V1_5_0) ContainerGroupRestartPolicy restartPolicy();
Returns:the DNS prefix which was specified at creation time
/** * @return the DNS prefix which was specified at creation time */
@Beta(Beta.SinceVersion.V1_7_0) String dnsPrefix();
Returns:the FQDN for the container group
/** * @return the FQDN for the container group */
@Beta(Beta.SinceVersion.V1_7_0) String fqdn();
Returns:the IP address
/** * @return the IP address */
String ipAddress();
Returns:true if IP address is public
/** * @return true if IP address is public */
boolean isIPAddressPublic();
Returns:true if IP address is private
/** * @return true if IP address is private */
boolean isIPAddressPrivate();
Returns:the base level OS type required by the containers in the group
/** * @return the base level OS type required by the containers in the group */
OperatingSystemTypes osType();
Returns:the state of the container group; only valid in response
/** * @return the state of the container group; only valid in response */
String state();
Returns:the provisioningState of the container group
/** * @return the provisioningState of the container group */
String provisioningState();
Returns:the container group events
/** * @return the container group events */
@Beta(Beta.SinceVersion.V1_5_0) Set<Event> events();
Returns:the DNS configuration for the container group
/** * @return the DNS configuration for the container group */
@Beta(Beta.SinceVersion.V1_23_0) DnsConfiguration dnsConfig();
Returns:the id of the network profile for the container group
/** * @return the id of the network profile for the container group */
@Beta(Beta.SinceVersion.V1_23_0) String networkProfileId();
Returns:whether managed service identity is enabled for the container group
/** * @return whether managed service identity is enabled for the container group */
@Beta(Beta.SinceVersion.V1_23_0) boolean isManagedServiceIdentityEnabled();
Returns:the tenant id of the system assigned managed service identity. Null if managed service identity is not configured.
/** * @return the tenant id of the system assigned managed service identity. Null if managed * service identity is not configured. */
@Beta(Beta.SinceVersion.V1_23_0) String systemAssignedManagedServiceIdentityTenantId();
Returns:the principal id of the system assigned managed service identity. Null if managed service identity is not configured.
/** * @return the principal id of the system assigned managed service identity. Null if managed * service identity is not configured. */
@Beta(Beta.SinceVersion.V1_23_0) String systemAssignedManagedServiceIdentityPrincipalId();
Returns:whether managed service identity is system assigned, user assigned, both, or neither
/** * @return whether managed service identity is system assigned, user assigned, both, or neither */
@Beta(Beta.SinceVersion.V1_23_0) ResourceIdentityType managedServiceIdentityType();
Returns:the ids of the user assigned managed service identities. Returns an empty set if no MSIs are set.
/** * @return the ids of the user assigned managed service identities. Returns an empty set if no * MSIs are set. */
@Beta(Beta.SinceVersion.V1_23_0) Set<String> userAssignedManagedServiceIdentityIds();
Returns:the log analytics information of the container group.
/** * @return the log analytics information of the container group. */
LogAnalytics logAnalytics(); /*********************************************************** * Actions ***********************************************************/
Restarts all containers in a container group in place. If container image has updates, new image will be downloaded.
/** * Restarts all containers in a container group in place. If container image has updates, new image will be downloaded. */
@Beta(Beta.SinceVersion.V1_15_0) @Method void restart();
Restarts all containers in a container group in place asynchronously. If container image has updates, new image will be downloaded.
Returns:a representation of the deferred computation of this call
/** * Restarts all containers in a container group in place asynchronously. If container image has updates, new image will be downloaded. * * @return a representation of the deferred computation of this call */
@Beta(Beta.SinceVersion.V1_15_0) @Method Completable restartAsync();
Stops all containers in a container group. Compute resources will be de-allocated and billing will stop.
/** * Stops all containers in a container group. Compute resources will be de-allocated and billing will stop. */
@Beta(Beta.SinceVersion.V1_15_0) @Method void stop();
Stops all containers in a container group asynchronously. Compute resources will be de-allocated and billing will stop.
Returns:a representation of the deferred computation of this call
/** * Stops all containers in a container group asynchronously. Compute resources will be de-allocated and billing will stop. * * @return a representation of the deferred computation of this call */
@Beta(Beta.SinceVersion.V1_15_0) @Method Completable stopAsync();
Get the log content for the specified container instance within the container group.
Params:
  • containerName – the container instance name
Throws:
Returns:all available log lines
/** * Get the log content for the specified container instance within the container group. * * @param containerName the container instance name * @throws IllegalArgumentException thrown if parameters fail the validation * @return all available log lines */
String getLogContent(String containerName);
Get the log content for the specified container instance within the container group.
Params:
  • containerName – the container instance name
  • tailLineCount – only get the last log lines up to this
Throws:
Returns:the log lines from the end, up to the number specified
/** * Get the log content for the specified container instance within the container group. * * @param containerName the container instance name * @param tailLineCount only get the last log lines up to this * @throws IllegalArgumentException thrown if parameters fail the validation * @return the log lines from the end, up to the number specified */
String getLogContent(String containerName, int tailLineCount);
Get the log content for the specified container instance within the container group.
Params:
  • containerName – the container instance name
Throws:
Returns:a representation of the future computation of this call
/** * Get the log content for the specified container instance within the container group. * * @param containerName the container instance name * @throws IllegalArgumentException thrown if parameters fail the validation * @return a representation of the future computation of this call */
Observable<String> getLogContentAsync(String containerName);
Get the log content for the specified container instance within the container group.
Params:
  • containerName – the container instance name
  • tailLineCount – only get the last log lines up to this
Throws:
Returns:a representation of the future computation of this call
/** * Get the log content for the specified container instance within the container group. * * @param containerName the container instance name * @param tailLineCount only get the last log lines up to this * @throws IllegalArgumentException thrown if parameters fail the validation * @return a representation of the future computation of this call */
Observable<String> getLogContentAsync(String containerName, int tailLineCount);
Starts the exec command for a specific container instance.
Params:
  • containerName – the container instance name
  • command – the command to be executed
  • row – the row size of the terminal
  • column – the column size of the terminal
Throws:
Returns:the log lines from the end, up to the number specified
/** * Starts the exec command for a specific container instance. * * @param containerName the container instance name * @param command the command to be executed * @param row the row size of the terminal * @param column the column size of the terminal * @throws IllegalArgumentException thrown if parameters fail the validation * @return the log lines from the end, up to the number specified */
@Beta(Beta.SinceVersion.V1_11_0) ContainerExecResponse executeCommand(String containerName, String command, int row, int column);
Starts the exec command for a specific container instance within the container group.
Params:
  • containerName – the container instance name
  • command – the command to be executed
  • row – the row size of the terminal
  • column – the column size of the terminal
Throws:
Returns:a representation of the future computation of this call
/** * Starts the exec command for a specific container instance within the container group. * * @param containerName the container instance name * @param command the command to be executed * @param row the row size of the terminal * @param column the column size of the terminal * @throws IllegalArgumentException thrown if parameters fail the validation * @return a representation of the future computation of this call */
@Beta(Beta.SinceVersion.V1_11_0) Observable<ContainerExecResponse> executeCommandAsync(String containerName, String command, int row, int column);
Starts the exec command for a specific container instance within the current group asynchronously.
/** * Starts the exec command for a specific container instance within the current group asynchronously. */
interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithOsType, DefinitionStages.WithPublicOrPrivateImageRegistry, DefinitionStages.WithPrivateImageRegistryOrVolume, DefinitionStages.WithVolume, DefinitionStages.WithFirstContainerInstance, DefinitionStages.WithSystemAssignedManagedServiceIdentity, DefinitionStages.WithSystemAssignedIdentityBasedAccessOrCreate, DefinitionStages.WithNextContainerInstance, DefinitionStages.DnsConfigFork, DefinitionStages.WithCreate { }
Grouping of the container group definition stages.
/** * Grouping of the container group definition stages. */
interface DefinitionStages {
The first stage of the container group definition.
/** * The first stage of the container group definition. */
interface Blank extends GroupableResource.DefinitionWithRegion<WithGroup> { }
The stage of the container group definition allowing to specify the resource group.
/** * The stage of the container group definition allowing to specify the resource group. */
interface WithGroup extends GroupableResource.DefinitionStages.WithGroup<DefinitionStages.WithOsType> { }
The stage of the container group definition allowing to specify the OS type.
/** * The stage of the container group definition allowing to specify the OS type. */
interface WithOsType {
Specifies this is a Linux container group.
Returns:the next stage of the definition
/** * Specifies this is a Linux container group. * * @return the next stage of the definition */
WithPublicOrPrivateImageRegistry withLinux();
Specifies this is a Windows container group.
Returns:the next stage of the definition
/** * Specifies this is a Windows container group. * * @return the next stage of the definition */
WithPublicOrPrivateImageRegistry withWindows(); }
The stage of the container group definition allowing to specify a public only or private image registry.
/** * The stage of the container group definition allowing to specify a public only or private image registry. */
interface WithPublicOrPrivateImageRegistry extends WithPublicImageRegistryOnly, WithPrivateImageRegistry { }
The stage of the container group definition allowing to skip the private image registry.
/** * The stage of the container group definition allowing to skip the private image registry. */
interface WithPublicImageRegistryOnly {
Only public container image repository will be used to create the container instances in the container group.
Returns:the next stage of the definition
/** * Only public container image repository will be used to create the container instances in the container group. * * @return the next stage of the definition */
WithPrivateImageRegistryOrVolume withPublicImageRegistryOnly(); }
The stage of the container group definition allowing to specify a private image registry.
/** * The stage of the container group definition allowing to specify a private image registry. */
interface WithPrivateImageRegistry {
Specifies the private container image registry server login for the container group.
Params:
  • server – Docker image registry server, without protocol such as "http" and "https"
  • username – the username for the private registry
  • password – the password for the private registry
Returns:the next stage of the definition
/** * Specifies the private container image registry server login for the container group. * * @param server Docker image registry server, without protocol such as "http" and "https" * @param username the username for the private registry * @param password the password for the private registry * @return the next stage of the definition */
WithPrivateImageRegistryOrVolume withPrivateImageRegistry(String server, String username, String password); }
The stage of the container group definition allowing to specify a private image registry or a volume.
/** * The stage of the container group definition allowing to specify a private image registry or a volume. */
interface WithPrivateImageRegistryOrVolume extends WithPrivateImageRegistry {
Skips the definition of volumes to be shared by the container instances.

An IllegalArgumentException will be thrown if a container instance attempts to define a volume mounting.

Returns:the next stage of the definition
/** * Skips the definition of volumes to be shared by the container instances. * * <p> * An IllegalArgumentException will be thrown if a container instance attempts to define a volume mounting. * @return the next stage of the definition */
WithFirstContainerInstance withoutVolume();
Specifies a new Azure file share name to be created.
Params:
  • volumeName – the name of the volume
  • shareName – the Azure file share name to be created
Returns:the next stage of the definition
/** * Specifies a new Azure file share name to be created. * * @param volumeName the name of the volume * @param shareName the Azure file share name to be created * @return the next stage of the definition */
WithFirstContainerInstance withNewAzureFileShareVolume(String volumeName, String shareName);
Specifies an empty directory volume that can be shared by the container instances in the container group.
Params:
  • name – the name of the empty directory volume
Returns:the next stage of the definition
/** * Specifies an empty directory volume that can be shared by the container instances in the container group. * * @param name the name of the empty directory volume * @return the next stage of the definition */
@Beta(Beta.SinceVersion.V1_7_0) WithFirstContainerInstance withEmptyDirectoryVolume(String name);
Begins the definition of a volume that can be shared by the container instances in the container group.

The definition must be completed with a call to InDefinition.attach()

Params:
  • name – the name of the volume
Returns:the next stage of the definition
/** * Begins the definition of a volume that can be shared by the container instances in the container group. * * <p> * The definition must be completed with a call to {@link VolumeDefinitionStages.WithVolumeAttach#attach()} * @param name the name of the volume * @return the next stage of the definition */
VolumeDefinitionStages.VolumeDefinitionBlank<WithVolume> defineVolume(String name); }
The stage of the container group definition allowing to specify a volume that can be mounted by a container instance.
/** * The stage of the container group definition allowing to specify a volume that can be mounted by a container instance. */
interface WithVolume extends WithFirstContainerInstance {
Begins the definition of a volume that can be shared by the container instances in the container group.

The definition must be completed with a call to InDefinition.attach()

Params:
  • name – the name of the volume
Returns:the next stage of the definition
/** * Begins the definition of a volume that can be shared by the container instances in the container group. * * <p> * The definition must be completed with a call to {@link VolumeDefinitionStages.WithVolumeAttach#attach()} * @param name the name of the volume * @return the next stage of the definition */
VolumeDefinitionStages.VolumeDefinitionBlank<WithVolume> defineVolume(String name); }
Grouping of volume definition stages.
/** * Grouping of volume definition stages. */
interface VolumeDefinitionStages {
The first stage of the volume definition.
Type parameters:
  • <ParentT> – the stage of the parent definition to return to after attaching this definition
/** * The first stage of the volume definition. * * @param <ParentT> the stage of the parent definition to return to after attaching this definition */
interface VolumeDefinitionBlank<ParentT> extends WithAzureFileShare<ParentT> { }
The stage of the volume definition allowing to specify a read only Azure File Share name.
Type parameters:
  • <ParentT> – the stage of the parent definition to return to after attaching this definition
/** * The stage of the volume definition allowing to specify a read only Azure File Share name. * @param <ParentT> the stage of the parent definition to return to after attaching this definition */
interface WithAzureFileShare<ParentT> {
Specifies an existing Azure file share name.
Params:
  • shareName – an existing Azure file share name
Returns:the next stage of the definition
/** * Specifies an existing Azure file share name. * * @param shareName an existing Azure file share name * @return the next stage of the definition */
WithStorageAccountName<ParentT> withExistingReadWriteAzureFileShare(String shareName);
Specifies an existing Azure file share name.
Params:
  • shareName – an existing Azure file share name
Returns:the next stage of the definition
/** * Specifies an existing Azure file share name. * * @param shareName an existing Azure file share name * @return the next stage of the definition */
WithStorageAccountName<ParentT> withExistingReadOnlyAzureFileShare(String shareName); }
The stage of the volume definition allowing to specify the storage account name to access to the Azure file.
Type parameters:
  • <ParentT> – the stage of the parent definition to return to after attaching this definition
/** * The stage of the volume definition allowing to specify the storage account name to access to the Azure file. * @param <ParentT> the stage of the parent definition to return to after attaching this definition */
interface WithStorageAccountName<ParentT> {
Specifies the storage account name to access to the Azure file.
Params:
  • storageAccountName – the storage account name
Returns:the next stage of the definition
/** * Specifies the storage account name to access to the Azure file. * * @param storageAccountName the storage account name * @return the next stage of the definition */
WithStorageAccountKey<ParentT> withStorageAccountName(String storageAccountName); }
The stage of the volume definition allowing to specify the storage account key to access to the Azure file.
Type parameters:
  • <ParentT> – the stage of the parent definition to return to after attaching this definition
/** * The stage of the volume definition allowing to specify the storage account key to access to the Azure file. * * @param <ParentT> the stage of the parent definition to return to after attaching this definition */
interface WithStorageAccountKey<ParentT> {
Specifies the storage account key to access to the Azure file.
Params:
  • storageAccountKey – the storage account key
Returns:the next stage of the definition
/** * Specifies the storage account key to access to the Azure file. * * @param storageAccountKey the storage account key * @return the next stage of the definition */
WithVolumeAttach<ParentT> withStorageAccountKey(String storageAccountKey); }
The stage of the volume definition allowing to specify the secrets map.
Type parameters:
  • <ParentT> – the stage of the parent definition to return to after attaching this definition
/** * The stage of the volume definition allowing to specify the secrets map. * * @param <ParentT> the stage of the parent definition to return to after attaching this definition */
interface WithSecretsMap<ParentT> {
Specifies the secrets map.

The secret value must be specified in Base64 encoding

Params:
  • secrets – the new volume secrets map; value must be in Base64 encoding
Returns:the next stage of the definition
/** * Specifies the secrets map. * <p> * The secret value must be specified in Base64 encoding * * @param secrets the new volume secrets map; value must be in Base64 encoding * @return the next stage of the definition */
@Beta(Beta.SinceVersion.V1_7_0) WithVolumeAttach<ParentT> withSecrets(Map<String, String> secrets); }
The stage of the volume definition allowing to specify the Git URL mappings.
Type parameters:
  • <ParentT> – the stage of the parent definition to return to after attaching this definition
/** * The stage of the volume definition allowing to specify the Git URL mappings. * * @param <ParentT> the stage of the parent definition to return to after attaching this definition */
interface WithGitUrl<ParentT> {
Specifies the Git URL for the new volume.
Params:
  • gitUrl – the Git URL for the new volume
Returns:the next stage of the definition
/** * Specifies the Git URL for the new volume. * * @param gitUrl the Git URL for the new volume * @return the next stage of the definition */
@Beta(Beta.SinceVersion.V1_7_0) WithGitDirectoryName<ParentT> withGitUrl(String gitUrl); }
The stage of the volume definition allowing to specify the Git target directory name mappings.
Type parameters:
  • <ParentT> – the stage of the parent definition to return to after attaching this definition
/** * The stage of the volume definition allowing to specify the Git target directory name mappings. * * @param <ParentT> the stage of the parent definition to return to after attaching this definition */
interface WithGitDirectoryName<ParentT> extends WithGitRevision<ParentT> {
Specifies the Git target directory name for the new volume.

Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.

Params:
  • gitDirectoryName – the Git target directory name for the new volume
Returns:the next stage of the definition
/** * Specifies the Git target directory name for the new volume. * <p> * Must not contain or start with '..'. If '.' is supplied, the volume directory will be the * git repository. Otherwise, if specified, the volume will contain the git repository in the * subdirectory with the given name. * * @param gitDirectoryName the Git target directory name for the new volume * @return the next stage of the definition */
@Beta(Beta.SinceVersion.V1_7_0) WithGitRevision<ParentT> withGitDirectoryName(String gitDirectoryName); }
The stage of the volume definition allowing to specify the Git revision.
Type parameters:
  • <ParentT> – the stage of the parent definition to return to after attaching this definition
/** * The stage of the volume definition allowing to specify the Git revision. * * @param <ParentT> the stage of the parent definition to return to after attaching this definition */
interface WithGitRevision<ParentT> extends WithVolumeAttach<ParentT> {
Specifies the Git revision for the new volume.
Params:
  • gitRevision – the Git revision for the new volume
Returns:the next stage of the definition
/** * Specifies the Git revision for the new volume. * * @param gitRevision the Git revision for the new volume * @return the next stage of the definition */
@Beta(Beta.SinceVersion.V1_7_0) WithVolumeAttach<ParentT> withGitRevision(String gitRevision); }
The final stage of the volume definition.

At this stage, any remaining optional settings can be specified, or the subnet definition can be attached to the parent virtual network definition.

Type parameters:
  • <ParentT> – the stage of the parent definition to return to after attaching this definition
/** The final stage of the volume definition. * <p> * At this stage, any remaining optional settings can be specified, or the subnet definition * can be attached to the parent virtual network definition. * @param <ParentT> the stage of the parent definition to return to after attaching this definition */
interface WithVolumeAttach<ParentT> extends Attachable.InDefinition<ParentT> { }
Grouping of the container group's volume definition stages.
/** * Grouping of the container group's volume definition stages. */
interface VolumeDefinition<ParentT> extends VolumeDefinitionBlank<ParentT>, WithAzureFileShare<ParentT>, WithStorageAccountName<ParentT>, WithStorageAccountKey<ParentT>, WithSecretsMap<ParentT>, WithGitUrl<ParentT>, WithGitDirectoryName<ParentT>, WithGitRevision<ParentT>, WithVolumeAttach<ParentT> { } }
The stage of the container group definition allowing to specify first required container instance.
/** * The stage of the container group definition allowing to specify first required container instance. */
interface WithFirstContainerInstance {
Begins the definition of a container instance.
Params:
  • name – the name of the container instance
Returns:the next stage of the definition
/** * Begins the definition of a container instance. * * @param name the name of the container instance * @return the next stage of the definition */
ContainerInstanceDefinitionStages.ContainerInstanceDefinitionBlank<WithNextContainerInstance> defineContainerInstance(String name);
Defines one container instance for the specified image with one CPU count and 1.5 GB memory, with TCP port 80 opened externally.
Params:
  • imageName – the name of the container image
Returns:the next stage of the definition
/** * Defines one container instance for the specified image with one CPU count and 1.5 GB memory, with TCP port 80 opened externally. * * @param imageName the name of the container image * @return the next stage of the definition */
WithCreate withContainerInstance(String imageName);
Defines one container instance for the specified image with one CPU count and 1.5 GB memory, with a custom TCP port opened externally.
Params:
  • imageName – the name of the container image
  • port – the external port to be opened
Returns:the next stage of the definition
/** * Defines one container instance for the specified image with one CPU count and 1.5 GB memory, with a custom TCP port opened externally. * * @param imageName the name of the container image * @param port the external port to be opened * @return the next stage of the definition */
WithCreate withContainerInstance(String imageName, int port); }
The stage of the container group definition allowing to specify a container instance.
/** * The stage of the container group definition allowing to specify a container instance. */
interface WithNextContainerInstance extends WithCreate {
Begins the definition of a container instance.
Params:
  • name – the name of the volume
Returns:the next stage of the definition
/** * Begins the definition of a container instance. * * @param name the name of the volume * @return the next stage of the definition */
ContainerInstanceDefinitionStages.ContainerInstanceDefinitionBlank<WithNextContainerInstance> defineContainerInstance(String name); }
Grouping of volume definition stages.
/** * Grouping of volume definition stages. */
interface ContainerInstanceDefinitionStages {
The first stage of the container instance definition.
Type parameters:
  • <ParentT> – the stage of the parent definition to return to after attaching this definition
/** * The first stage of the container instance definition. * * @param <ParentT> the stage of the parent definition to return to after attaching this definition */
interface ContainerInstanceDefinitionBlank<ParentT> extends WithImage<ParentT> { }
The stage of the container instance definition allowing to specify the container image.
Type parameters:
  • <ParentT> – the stage of the parent definition to return to after attaching this definition
/** * The stage of the container instance definition allowing to specify the container image. * * @param <ParentT> the stage of the parent definition to return to after attaching this definition */
interface WithImage<ParentT> {
Specifies the container image to be used.
Params:
  • imageName – the container image
Returns:the next stage of the definition
/** * Specifies the container image to be used. * * @param imageName the container image * @return the next stage of the definition */
WithOrWithoutPorts<ParentT> withImage(String imageName); }
The stage of the container instance definition allowing to specify (or not) the container ports.
Type parameters:
  • <ParentT> – the stage of the parent definition to return to after attaching this definition
/** * The stage of the container instance definition allowing to specify (or not) the container ports. * * @param <ParentT> the stage of the parent definition to return to after attaching this definition */
interface WithOrWithoutPorts<ParentT> extends WithPorts<ParentT>, WithoutPorts<ParentT> { }
The stage of the container instance definition allowing not to specify any container ports internal or external.
Type parameters:
  • <ParentT> – the stage of the parent definition to return to after attaching this definition
/** * The stage of the container instance definition allowing not to specify any container ports internal or external. * * @param <ParentT> the stage of the parent definition to return to after attaching this definition */
interface WithoutPorts<ParentT> {
Specifies that not ports will be opened internally or externally for this container instance.
Returns:the next stage of the definition
/** * Specifies that not ports will be opened internally or externally for this container instance. * * @return the next stage of the definition */
WithContainerInstanceAttach<ParentT> withoutPorts(); }
The stage of the container instance definition allowing to specify one or more container ports.
Type parameters:
  • <ParentT> – the stage of the parent definition to return to after attaching this definition
/** * The stage of the container instance definition allowing to specify one or more container ports. * * @param <ParentT> the stage of the parent definition to return to after attaching this definition */
interface WithPortsOrContainerInstanceAttach<ParentT> extends WithPorts<ParentT>, WithContainerInstanceAttach<ParentT> { }
The stage of the container instance definition allowing to specify the container ports.
Type parameters:
  • <ParentT> – the stage of the parent definition to return to after attaching this definition
/** * The stage of the container instance definition allowing to specify the container ports. * * @param <ParentT> the stage of the parent definition to return to after attaching this definition */
@Beta(Beta.SinceVersion.V1_8_0) interface WithPorts<ParentT> {
Specifies the container's TCP ports available to external clients.

A public IP address will be create to allow external clients to reach the containers within the group. To enable external clients to reach a container within the group, you must expose the port on the IP address and from the container. Because containers within the group share a port namespace, port mapping is not supported.

Params:
  • ports – array of TCP ports to be exposed externally
Returns:the next stage of the definition
/** * Specifies the container's TCP ports available to external clients. * <p> * A public IP address will be create to allow external clients to reach the containers within the group. * To enable external clients to reach a container within the group, you must expose the port on the * IP address and from the container. Because containers within the group share a port namespace, port * mapping is not supported. * * @param ports array of TCP ports to be exposed externally * @return the next stage of the definition */
WithPortsOrContainerInstanceAttach<ParentT> withExternalTcpPorts(int... ports);
Specifies the container's TCP port available to external clients.

A public IP address will be create to allow external clients to reach the containers within the group. To enable external clients to reach a container within the group, you must expose the port on the IP address and from the container. Because containers within the group share a port namespace, port mapping is not supported.

Params:
  • port – TCP port to be exposed externally
Returns:the next stage of the definition
/** * Specifies the container's TCP port available to external clients. * <p> * A public IP address will be create to allow external clients to reach the containers within the group. * To enable external clients to reach a container within the group, you must expose the port on the * IP address and from the container. Because containers within the group share a port namespace, port * mapping is not supported. * * @param port TCP port to be exposed externally * @return the next stage of the definition */
WithPortsOrContainerInstanceAttach<ParentT> withExternalTcpPort(int port);
Specifies the container's UDP ports available to external clients.

A public IP address will be create to allow external clients to reach the containers within the group. To enable external clients to reach a container within the group, you must expose the port on the IP address and from the container. Because containers within the group share a port namespace, port mapping is not supported.

Params:
  • ports – array of UDP ports to be exposed externally
Returns:the next stage of the definition
/** * Specifies the container's UDP ports available to external clients. * <p> * A public IP address will be create to allow external clients to reach the containers within the group. * To enable external clients to reach a container within the group, you must expose the port on the * IP address and from the container. Because containers within the group share a port namespace, port * mapping is not supported. * * @param ports array of UDP ports to be exposed externally * @return the next stage of the definition */
WithPortsOrContainerInstanceAttach<ParentT> withExternalUdpPorts(int... ports);
Specifies the container's UDP port available to external clients.

A public IP address will be create to allow external clients to reach the containers within the group. To enable external clients to reach a container within the group, you must expose the port on the IP address and from the container. Because containers within the group share a port namespace, port mapping is not supported.

Params:
  • port – UDP port to be exposed externally
Returns:the next stage of the definition
/** * Specifies the container's UDP port available to external clients. * <p> * A public IP address will be create to allow external clients to reach the containers within the group. * To enable external clients to reach a container within the group, you must expose the port on the * IP address and from the container. Because containers within the group share a port namespace, port * mapping is not supported. * * @param port UDP port to be exposed externally * @return the next stage of the definition */
WithPortsOrContainerInstanceAttach<ParentT> withExternalUdpPort(int port);
Specifies the container's TCP ports are available to internal clients only (other container instances within the container group).

Containers within a group can reach each other via localhost on the ports that they have exposed, even if those ports are not exposed externally on the group's IP address.

Params:
  • ports – array of TCP ports to be exposed internally
Returns:the next stage of the definition
/** * Specifies the container's TCP ports are available to internal clients only (other container instances within the container group). * <p> * Containers within a group can reach each other via localhost on the ports that they have exposed, * even if those ports are not exposed externally on the group's IP address. * * @param ports array of TCP ports to be exposed internally * @return the next stage of the definition */
@Beta(Beta.SinceVersion.V1_8_0) WithPortsOrContainerInstanceAttach<ParentT> withInternalTcpPorts(int... ports);
Specifies the container's Udp ports are available to internal clients only (other container instances within the container group).

Containers within a group can reach each other via localhost on the ports that they have exposed, even if those ports are not exposed externally on the group's IP address.

Params:
  • ports – array of UDP ports to be exposed internally
Returns:the next stage of the definition
/** * Specifies the container's Udp ports are available to internal clients only (other container instances within the container group). * <p> * Containers within a group can reach each other via localhost on the ports that they have exposed, * even if those ports are not exposed externally on the group's IP address. * * @param ports array of UDP ports to be exposed internally * @return the next stage of the definition */
@Beta(Beta.SinceVersion.V1_8_0) WithPortsOrContainerInstanceAttach<ParentT> withInternalUdpPorts(int... ports);
Specifies the container's TCP port is available to internal clients only (other container instances within the container group).

Containers within a group can reach each other via localhost on the ports that they have exposed, even if those ports are not exposed externally on the group's IP address.

Params:
  • port – TCP port to be exposed internally
Returns:the next stage of the definition
/** * Specifies the container's TCP port is available to internal clients only (other container instances within the container group). * <p> * Containers within a group can reach each other via localhost on the ports that they have exposed, * even if those ports are not exposed externally on the group's IP address. * * @param port TCP port to be exposed internally * @return the next stage of the definition */
@Beta(Beta.SinceVersion.V1_8_0) WithPortsOrContainerInstanceAttach<ParentT> withInternalTcpPort(int port);
Specifies the container's UDP port is available to internal clients only (other container instances within the container group).

Containers within a group can reach each other via localhost on the ports that they have exposed, even if those ports are not exposed externally on the group's IP address.

Params:
  • port – UDP port to be exposed internally
Returns:the next stage of the definition
/** * Specifies the container's UDP port is available to internal clients only (other container instances within the container group). * <p> * Containers within a group can reach each other via localhost on the ports that they have exposed, * even if those ports are not exposed externally on the group's IP address. * * @param port UDP port to be exposed internally * @return the next stage of the definition */
@Beta(Beta.SinceVersion.V1_8_0) WithPortsOrContainerInstanceAttach<ParentT> withInternalUdpPort(int port); }
The stage of the container instance definition allowing to specify the number of CPU cores.

The CPU cores can be specified as a fraction, i.e. 1.5 represents one and a half atomic CPU cores will be assigned to this container instance.

Type parameters:
  • <ParentT> – the stage of the parent definition to return to after attaching this definition
/** * The stage of the container instance definition allowing to specify the number of CPU cores. * <p> * The CPU cores can be specified as a fraction, i.e. 1.5 represents one and a half atomic CPU cores * will be assigned to this container instance. * * @param <ParentT> the stage of the parent definition to return to after attaching this definition */
interface WithCpuCoreCount<ParentT> {
Specifies the number of CPU cores assigned to this container instance.
Params:
  • cpuCoreCount – the number of CPU cores
Returns:the next stage of the definition
/** * Specifies the number of CPU cores assigned to this container instance. * * @param cpuCoreCount the number of CPU cores * @return the next stage of the definition */
WithContainerInstanceAttach<ParentT> withCpuCoreCount(double cpuCoreCount); } interface WithGpuResource<ParentT> { WithContainerInstanceAttach<ParentT> withGpuResource(int gpuCoreCount, GpuSku gpuSku); }
The stage of the container instance definition allowing to specify the memory size in GB.

The memory size can be specified as a fraction, i.e. 1.5 represents one and a half GB of memory.

Type parameters:
  • <ParentT> – the stage of the parent definition to return to after attaching this definition
/** * The stage of the container instance definition allowing to specify the memory size in GB. * <p> * The memory size can be specified as a fraction, i.e. 1.5 represents one and a half GB of memory. * * @param <ParentT> the stage of the parent definition to return to after attaching this definition */
interface WithMemorySize<ParentT> {
Specifies the memory size in GB assigned to this container instance.
Params:
  • memorySize – the memory size in GB
Returns:the next stage of the definition
/** * Specifies the memory size in GB assigned to this container instance. * * @param memorySize the memory size in GB * @return the next stage of the definition */
WithContainerInstanceAttach<ParentT> withMemorySizeInGB(double memorySize); }
The stage of the container instance definition allowing to specify the starting command line.
Type parameters:
  • <ParentT> – the stage of the parent definition to return to after attaching this definition
/** * The stage of the container instance definition allowing to specify the starting command line. * * @param <ParentT> the stage of the parent definition to return to after attaching this definition */
interface WithStartingCommandLine<ParentT> {
Specifies the starting command lines.
Params:
  • executable – the executable which it will call after initializing the container
  • parameters – the parameter list for the executable to be called
Returns:the next stage of the definition
/** * Specifies the starting command lines. * * @param executable the executable which it will call after initializing the container * @param parameters the parameter list for the executable to be called * @return the next stage of the definition */
@Beta(Beta.SinceVersion.V1_11_0) WithContainerInstanceAttach<ParentT> withStartingCommandLine(String executable, String... parameters);
Specifies the starting command line.
Params:
  • executable – the executable or path to the executable that will be called after initializing the container
Returns:the next stage of the definition
/** * Specifies the starting command line. * * @param executable the executable or path to the executable that will be called after initializing the container * @return the next stage of the definition */
WithContainerInstanceAttach<ParentT> withStartingCommandLine(String executable); }
The stage of the container instance definition allowing to specify the environment variables.
Type parameters:
  • <ParentT> – the stage of the parent definition to return to after attaching this definition
/** * The stage of the container instance definition allowing to specify the environment variables. * * @param <ParentT> the stage of the parent definition to return to after attaching this definition */
@Beta(Beta.SinceVersion.V1_15_0) interface WithEnvironmentVariables<ParentT> {
Specifies the environment variables.
Params:
  • environmentVariables – the environment variables in a name and value pair to be set after the container gets initialized
Returns:the next stage of the definition
/** * Specifies the environment variables. * * @param environmentVariables the environment variables in a name and value pair to be set after the container gets initialized * @return the next stage of the definition */
WithContainerInstanceAttach<ParentT> withEnvironmentVariables(Map<String, String> environmentVariables);
Specifies the environment variable.
Params:
  • envName – the environment variable name
  • envValue – the environment variable value
Returns:the next stage of the definition
/** * Specifies the environment variable. * * @param envName the environment variable name * @param envValue the environment variable value * @return the next stage of the definition */
WithContainerInstanceAttach<ParentT> withEnvironmentVariable(String envName, String envValue);
Specifies a collection of name and secure value pairs for the environment variables.
Params:
  • environmentVariables – the environment variables in a name and value pair to be set after the container gets initialized
Returns:the next stage of the definition
/** * Specifies a collection of name and secure value pairs for the environment variables. * * @param environmentVariables the environment variables in a name and value pair to be set after the container gets initialized * @return the next stage of the definition */
@Beta(Beta.SinceVersion.V1_15_0) WithContainerInstanceAttach<ParentT> withEnvironmentVariableWithSecuredValue(Map<String, String> environmentVariables);
Specifies the environment variable that has a secured value.
Params:
  • envName – the environment variable name
  • securedValue – the environment variable secured value
Returns:the next stage of the definition
/** * Specifies the environment variable that has a secured value. * * @param envName the environment variable name * @param securedValue the environment variable secured value * @return the next stage of the definition */
@Beta(Beta.SinceVersion.V1_15_0) WithContainerInstanceAttach<ParentT> withEnvironmentVariableWithSecuredValue(String envName, String securedValue); }
The stage of the container instance definition allowing to specify volume mount setting.
Type parameters:
  • <ParentT> – the stage of the parent definition to return to after attaching this definition
/** * The stage of the container instance definition allowing to specify volume mount setting. * * @param <ParentT> the stage of the parent definition to return to after attaching this definition */
interface WithVolumeMountSetting<ParentT> {
Specifies the container group's volume to be mounted by the container instance at a specified mount path.

Mounting an Azure file share as a volume in a container is a two-step process. First, you provide the details of the share as part of defining the container group, then you specify how you wan the volume mounted within one or more of the containers in the group.

Params:
  • volumeName – the volume name as defined in the volumes of the container group
  • mountPath – the local path the volume will be mounted at
Throws:
Returns:the next stage of the definition
/** * Specifies the container group's volume to be mounted by the container instance at a specified mount path. * <p> * Mounting an Azure file share as a volume in a container is a two-step process. First, you provide * the details of the share as part of defining the container group, then you specify how you wan * the volume mounted within one or more of the containers in the group. * * @param volumeName the volume name as defined in the volumes of the container group * @param mountPath the local path the volume will be mounted at * @return the next stage of the definition * @throws IllegalArgumentException thrown if volumeName was not defined in the respective container group definition stage. */
WithContainerInstanceAttach<ParentT> withVolumeMountSetting(String volumeName, String mountPath);
Specifies the container group's volume to be mounted by the container instance at a specified mount path.

Mounting an Azure file share as a volume in a container is a two-step process. First, you provide the details of the share as part of defining the container group, then you specify how you wan the volume mounted within one or more of the containers in the group.

Params:
  • volumeMountSetting – the name and value pair representing volume names as defined in the volumes of the container group and the local paths the volume will be mounted at
Throws:
Returns:the next stage of the definition
/** * Specifies the container group's volume to be mounted by the container instance at a specified mount path. * <p> * Mounting an Azure file share as a volume in a container is a two-step process. First, you provide * the details of the share as part of defining the container group, then you specify how you wan * the volume mounted within one or more of the containers in the group. * * @param volumeMountSetting the name and value pair representing volume names as defined in the volumes of the container group and the local paths the volume will be mounted at * @return the next stage of the definition * @throws IllegalArgumentException thrown if volumeName was not defined in the respective container group definition stage. */
WithContainerInstanceAttach<ParentT> withVolumeMountSetting(Map<String, String> volumeMountSetting);
Specifies the container group's volume to be mounted by the container instance at a specified mount path.

Mounting an Azure file share as a volume in a container is a two-step process. First, you provide the details of the share as part of defining the container group, then you specify how you wan the volume mounted within one or more of the containers in the group.

Params:
  • volumeName – the volume name as defined in the volumes of the container group
  • mountPath – the local path the volume will be mounted at
Throws:
Returns:the next stage of the definition
/** * Specifies the container group's volume to be mounted by the container instance at a specified mount path. * <p> * Mounting an Azure file share as a volume in a container is a two-step process. First, you provide * the details of the share as part of defining the container group, then you specify how you wan * the volume mounted within one or more of the containers in the group. * * @param volumeName the volume name as defined in the volumes of the container group * @param mountPath the local path the volume will be mounted at * @return the next stage of the definition * @throws IllegalArgumentException thrown if volumeName was not defined in the respective container group definition stage. */
WithContainerInstanceAttach<ParentT> withReadOnlyVolumeMountSetting(String volumeName, String mountPath);
Specifies the container group's volume to be mounted by the container instance at a specified mount path.

Mounting an Azure file share as a volume in a container is a two-step process. First, you provide the details of the share as part of defining the container group, then you specify how you wan the volume mounted within one or more of the containers in the group.

Params:
  • volumeMountSetting – the name and value pair representing volume names as defined in the volumes of the container group and the local paths the volume will be mounted at
Throws:
Returns:the next stage of the definition
/** * Specifies the container group's volume to be mounted by the container instance at a specified mount path. * <p> * Mounting an Azure file share as a volume in a container is a two-step process. First, you provide * the details of the share as part of defining the container group, then you specify how you wan * the volume mounted within one or more of the containers in the group. * * @param volumeMountSetting the name and value pair representing volume names as defined in the volumes of the container group and the local paths the volume will be mounted at * @return the next stage of the definition * @throws IllegalArgumentException thrown if volumeName was not defined in the respective container group definition stage. */
WithContainerInstanceAttach<ParentT> withReadOnlyVolumeMountSetting(Map<String, String> volumeMountSetting); }
The final stage of the container instance definition.

At this stage, any remaining optional settings can be specified, or the subnet definition can be attached to the parent virtual network definition.

Type parameters:
  • <ParentT> – the stage of the parent definition to return to after attaching this definition
/** The final stage of the container instance definition. * <p> * At this stage, any remaining optional settings can be specified, or the subnet definition * can be attached to the parent virtual network definition. * @param <ParentT> the stage of the parent definition to return to after attaching this definition */
interface WithContainerInstanceAttach<ParentT> extends WithCpuCoreCount<ParentT>, WithGpuResource<ParentT>, WithMemorySize<ParentT>, WithStartingCommandLine<ParentT>, WithEnvironmentVariables<ParentT>, WithVolumeMountSetting<ParentT>, Attachable.InDefinition<ParentT> { }
Grouping of the container group's volume definition stages.
/** * Grouping of the container group's volume definition stages. */
interface ContainerInstanceDefinition<ParentT> extends ContainerInstanceDefinitionBlank<ParentT>, WithImage<ParentT>, WithOrWithoutPorts<ParentT>, WithPortsOrContainerInstanceAttach<ParentT>, WithContainerInstanceAttach<ParentT> { } }
The stage of the container instance definition allowing to specify having system assigned managed service identity.
/** * The stage of the container instance definition allowing to specify having system assigned managed service identity. */
interface WithSystemAssignedManagedServiceIdentity {
Specifies a system assigned managed service identity for the container group.
Returns:the next stage of the definition
/** * Specifies a system assigned managed service identity for the container group. * * @return the next stage of the definition */
@Beta(Beta.SinceVersion.V1_23_0) WithSystemAssignedIdentityBasedAccessOrCreate withSystemAssignedManagedServiceIdentity(); }
The stage of the container instance definition allowing to specify system assigned managed service identity with specific role based access.
/** * The stage of the container instance definition allowing to specify system assigned managed service identity with specific * role based access. */
interface WithSystemAssignedIdentityBasedAccessOrCreate extends WithCreate {
Specifies a system assigned managed service identity with access to a specific resource with a specified role.
Params:
  • resourceId – the id of the resource you are setting up access to
  • role – access role to be assigned to the identity
Returns:the next stage of the definition
/** * Specifies a system assigned managed service identity with access to a specific resource with a specified role. * * @param resourceId the id of the resource you are setting up access to * @param role access role to be assigned to the identity * @return the next stage of the definition */
@Beta(Beta.SinceVersion.V1_23_0) WithSystemAssignedIdentityBasedAccessOrCreate withSystemAssignedIdentityBasedAccessTo(String resourceId, BuiltInRole role);
Specifies a system assigned managed service identity with access to the current resource group and with the specified role.
Params:
  • role – access role to be assigned to the identity
Returns:the next stage of the definition
/** * Specifies a system assigned managed service identity with access to the current resource group and with the specified role. * * @param role access role to be assigned to the identity * @return the next stage of the definition */
@Beta(Beta.SinceVersion.V1_23_0) WithSystemAssignedIdentityBasedAccessOrCreate withSystemAssignedIdentityBasedAccessToCurrentResourceGroup(BuiltInRole role);
Specifies a system assigned managed service identity with access to a specific resource with a specified role from the id.
Params:
  • resourceId – the id of the resource you are setting up access to
  • roleDefinitionId – id of the access role to be assigned to the identity
Returns:the next stage of the definition
/** * Specifies a system assigned managed service identity with access to a specific resource with a specified role from the id. * * @param resourceId the id of the resource you are setting up access to * @param roleDefinitionId id of the access role to be assigned to the identity * @return the next stage of the definition */
@Beta(Beta.SinceVersion.V1_23_0) WithSystemAssignedIdentityBasedAccessOrCreate withSystemAssignedIdentityBasedAccessTo(String resourceId, String roleDefinitionId);
Specifies a system assigned managed service identity with access to the current resource group and with the specified role from the id.
Params:
  • roleDefinitionId – id of the access role to be assigned to the identity
Returns:the next stage of the definition
/** * Specifies a system assigned managed service identity with access to the current resource group and with the specified role from the id. * * @param roleDefinitionId id of the access role to be assigned to the identity * @return the next stage of the definition */
@Beta(Beta.SinceVersion.V1_23_0) WithSystemAssignedIdentityBasedAccessOrCreate withSystemAssignedIdentityBasedAccessToCurrentResourceGroup(String roleDefinitionId); }
The stage of the container instance definition allowing to specify user assigned managed service identity.
/** * The stage of the container instance definition allowing to specify user assigned managed service identity. */
interface WithUserAssignedManagedServiceIdentity {
Specifies the definition of a not-yet-created user assigned identity to be associated with the virtual machine.
Params:
  • creatableIdentity – a creatable identity definition
Returns:the next stage of the definition
/** * Specifies the definition of a not-yet-created user assigned identity to be associated with the virtual machine. * * @param creatableIdentity a creatable identity definition * @return the next stage of the definition */
@Beta(Beta.SinceVersion.V1_23_0) WithCreate withNewUserAssignedManagedServiceIdentity(Creatable<Identity> creatableIdentity);
Specifies an existing user assigned identity to be associate with the container group.
Params:
  • identity – the identity
Returns:the next stage of the definition
/** * Specifies an existing user assigned identity to be associate with the container group. * * @param identity the identity * @return the next stage of the definition */
@Beta(Beta.SinceVersion.V1_23_0) WithCreate withExistingUserAssignedManagedServiceIdentity(Identity identity); }
The stage of the container group definition allowing to specify the container group restart policy.
/** * The stage of the container group definition allowing to specify the container group restart policy. */
interface WithRestartPolicy {
Specifies the restart policy for all the container instances within the container group.
Params:
  • restartPolicy – the restart policy for all the container instances within the container group
Returns:the next stage of the definition
/** * Specifies the restart policy for all the container instances within the container group. * * @param restartPolicy the restart policy for all the container instances within the container group * @return the next stage of the definition */
@Beta(Beta.SinceVersion.V1_5_0) WithCreate withRestartPolicy(ContainerGroupRestartPolicy restartPolicy); }
The stage of the container group definition allowing to specify the DNS prefix label.
/** * The stage of the container group definition allowing to specify the DNS prefix label. */
interface WithDnsPrefix {
Specifies the DNS prefix to be used to create the FQDN for the container group.
Params:
  • dnsPrefix – the DNS prefix to be used to create the FQDN for the container group
Returns:the next stage of the definition
/** * Specifies the DNS prefix to be used to create the FQDN for the container group. * * @param dnsPrefix the DNS prefix to be used to create the FQDN for the container group * @return the next stage of the definition */
WithCreate withDnsPrefix(String dnsPrefix); }
The stage of the container group definition allowing to specify the network profile id.
/** * The stage of the container group definition allowing to specify the network profile id. */
interface WithNetworkProfile {
Specifies the network profile information for a container group.
Params:
  • subscriptionId – the ID of the subscription of the network profile
  • resourceGroupName – the name of the resource group of the network profile
  • networkProfileName – the name of the network profile
Returns:the next stage of the definition
/** * Specifies the network profile information for a container group. * * @param subscriptionId the ID of the subscription of the network profile * @param resourceGroupName the name of the resource group of the network profile * @param networkProfileName the name of the network profile * @return the next stage of the definition */
@Beta(Beta.SinceVersion.V1_23_0) DnsConfigFork withNetworkProfileId(String subscriptionId, String resourceGroupName, String networkProfileName); } interface DnsConfigFork extends WithDnsConfig, WithCreate { }
The stage of the container group definition allowing to specify the DNS configuration of the container group.
/** * The stage of the container group definition allowing to specify the DNS configuration of the container group. */
interface WithDnsConfig {
Specifies the DNS servers for the container group.
Params:
  • dnsServerNames – the names of the DNS servers
Returns:the next stage of the definition
/** * Specifies the DNS servers for the container group. * * @param dnsServerNames the names of the DNS servers * @return the next stage of the definition */
@Beta(Beta.SinceVersion.V1_23_0) WithCreate withDnsServerNames(List<String> dnsServerNames);
Specifies the DNS configuration for the container group.
Params:
  • dnsServerNames – the names of the DNS servers for the container group
  • dnsSearchDomains – the DNS search domains for hostname lookup in the container group
  • dnsOptions – the DNS options for the container group
Returns:the next stage of the definition
/** * Specifies the DNS configuration for the container group. * * @param dnsServerNames the names of the DNS servers for the container group * @param dnsSearchDomains the DNS search domains for hostname lookup in the container group * @param dnsOptions the DNS options for the container group * @return the next stage of the definition */
@Beta(Beta.SinceVersion.V1_23_0) WithCreate withDnsConfiguration(List<String> dnsServerNames, String dnsSearchDomains, String dnsOptions); }
The stage of the container group definition allowing to specify the log analytics platform for the container group.
/** * The stage of the container group definition allowing to specify the log analytics platform for the container group. */
interface WithLogAnalytics {
Specifies the log analytics workspace to use for the container group.
Params:
  • workspaceId – the id of the previously-created log analytics workspace
  • workspaceKey – the key of the previously-created log analytics workspace
Returns:the next stage of the definition
/** * Specifies the log analytics workspace to use for the container group. * * @param workspaceId the id of the previously-created log analytics workspace * @param workspaceKey the key of the previously-created log analytics workspace * @return the next stage of the definition */
@Beta(Beta.SinceVersion.V1_23_0) WithCreate withLogAnalytics(String workspaceId, String workspaceKey);
Specifies the log analytics workspace with optional add-ons for the container group.
Params:
  • workspaceId – the id of the previously-created log analytics workspace
  • workspaceKey – the key of the previously-created log analytics workspace
  • logType – the log type to be used. Possible values include: 'ContainerInsights', 'ContainerInstanceLogs'.
  • metadata – the metadata for log analytics
Returns:the next stage of the definition
/** * Specifies the log analytics workspace with optional add-ons for the container group. * * @param workspaceId the id of the previously-created log analytics workspace * @param workspaceKey the key of the previously-created log analytics workspace * @param logType the log type to be used. Possible values include: 'ContainerInsights', 'ContainerInstanceLogs'. * @param metadata the metadata for log analytics * @return the next stage of the definition */
@Beta(Beta.SinceVersion.V1_23_0) WithCreate withLogAnalytics(String workspaceId, String workspaceKey, LogAnalyticsLogType logType, Map<String, String> metadata); }
The stage of the definition which contains all the minimum required inputs for the resource to be created (via Creatable<ContainerGroup>.create()), but also allows for any other optional settings to be specified.
/** * The stage of the definition which contains all the minimum required inputs for the resource to be created * (via {@link WithCreate#create()}), but also allows for any other optional settings to be specified. */
interface WithCreate extends WithRestartPolicy, WithSystemAssignedManagedServiceIdentity, WithUserAssignedManagedServiceIdentity, WithDnsPrefix, WithNetworkProfile, WithLogAnalytics, Creatable<ContainerGroup>, Resource.DefinitionWithTags<WithCreate> { } }
The template for an update operation, containing all the settings that can be modified.
/** * The template for an update operation, containing all the settings that can be modified. */
interface Update extends Resource.UpdateWithTags<Update>, Appliable<ContainerGroup> { } }