Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.4 (Unreleased)
## 1.0.0-beta.1 (2022-08-05)

- Azure Resource Manager ImageBuilder client library for Java. This package contains Microsoft Azure SDK for ImageBuilder Management SDK. Azure Virtual Machine Image Builder Client. Package tag package-2022-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Features Added

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-imagebuilder</artifactId>
<version>1.0.0-beta.3</version>
<version>1.0.0-beta.4</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public ImageBuilderManager authenticate(TokenCredential credential, AzureProfile
.append("-")
.append("com.azure.resourcemanager.imagebuilder")
.append("/")
.append("1.0.0-beta.3");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,13 @@ public final class ImageTemplateProperties {
private ImageTemplateSource source;

/*
* Specifies the properties used to describe the customization steps of the
* image, like Image source etc
* Specifies the properties used to describe the customization steps of the image, like Image source etc
*/
@JsonProperty(value = "customize")
private List<ImageTemplateCustomizer> customize;

/*
* Configuration options and list of validations to be performed on the
* resulting image.
* Configuration options and list of validations to be performed on the resulting image.
*/
@JsonProperty(value = "validate")
private ImageTemplatePropertiesValidate validation;
Expand Down Expand Up @@ -65,9 +63,8 @@ public final class ImageTemplateProperties {
private ImageTemplateLastRunStatus lastRunStatus;

/*
* Maximum duration to wait while building the image template (includes all
* customizations, validations, and distributions). Omit or specify 0 to
* use the default (4 hours).
* Maximum duration to wait while building the image template (includes all customizations, validations, and
* distributions). Omit or specify 0 to use the default (4 hours).
*/
@JsonProperty(value = "buildTimeoutInMinutes")
private Integer buildTimeoutInMinutes;
Expand All @@ -79,25 +76,20 @@ public final class ImageTemplateProperties {
private ImageTemplateVmProfile vmProfile;

/*
* The staging resource group id in the same subscription as the image
* template that will be used to build the image. If this field is empty, a
* resource group with a random name will be created. If the resource group
* specified in this field doesn't exist, it will be created with the same
* name. If the resource group specified exists, it must be empty and in
* the same region as the image template. The resource group created will
* be deleted during template deletion if this field is empty or the
* resource group specified doesn't exist, but if the resource group
* specified exists the resources created in the resource group will be
* deleted during template deletion and the resource group itself will
* remain.
* The staging resource group id in the same subscription as the image template that will be used to build the
* image. If this field is empty, a resource group with a random name will be created. If the resource group
* specified in this field doesn't exist, it will be created with the same name. If the resource group specified
* exists, it must be empty and in the same region as the image template. The resource group created will be
* deleted during template deletion if this field is empty or the resource group specified doesn't exist, but if
* the resource group specified exists the resources created in the resource group will be deleted during template
* deletion and the resource group itself will remain.
*/
@JsonProperty(value = "stagingResourceGroup")
private String stagingResourceGroup;

/*
* The staging resource group id in the same subscription as the image
* template that will be used to build the image. This read-only field
* differs from 'stagingResourceGroup' only if the value specified in the
* The staging resource group id in the same subscription as the image template that will be used to build the
* image. This read-only field differs from 'stagingResourceGroup' only if the value specified in the
* 'stagingResourceGroup' field is empty.
*/
@JsonProperty(value = "exactStagingResourceGroup", access = JsonProperty.Access.WRITE_ONLY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
@Fluent
public final class OperationInner {
/*
* The operation name. This is of the format
* {provider}/{resource}/{operation}
* The operation name.
*
* This is of the format {provider}/{resource}/{operation}
*/
@JsonProperty(value = "name")
private String name;
Expand Down Expand Up @@ -43,7 +44,9 @@ public final class OperationInner {
private Boolean isDataAction;

/**
* Get the name property: The operation name. This is of the format {provider}/{resource}/{operation}.
* Get the name property: The operation name.
*
* <p>This is of the format {provider}/{resource}/{operation}.
*
* @return the name value.
*/
Expand All @@ -52,7 +55,9 @@ public String name() {
}

/**
* Set the name property: The operation name. This is of the format {provider}/{resource}/{operation}.
* Set the name property: The operation name.
*
* <p>This is of the format {provider}/{resource}/{operation}.
*
* @param name the name value to set.
* @return the OperationInner object itself.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
@ServiceClientBuilder(serviceClients = {ImageBuilderClientImpl.class})
public final class ImageBuilderClientBuilder {
/*
* Subscription credentials which uniquely identify Microsoft Azure
* subscription. The subscription Id forms part of the URI for every
* service call.
* Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription Id forms part of
* the URI for every service call.
*/
private String subscriptionId;

Expand Down Expand Up @@ -122,24 +121,26 @@ public ImageBuilderClientBuilder serializerAdapter(SerializerAdapter serializerA
* @return an instance of ImageBuilderClientImpl.
*/
public ImageBuilderClientImpl buildClient() {
if (endpoint == null) {
this.endpoint = "https://management.azure.com";
}
if (environment == null) {
this.environment = AzureEnvironment.AZURE;
}
if (pipeline == null) {
this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
}
if (defaultPollInterval == null) {
this.defaultPollInterval = Duration.ofSeconds(30);
}
if (serializerAdapter == null) {
this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
}
String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
HttpPipeline localPipeline =
(pipeline != null)
? pipeline
: new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
Duration localDefaultPollInterval =
(defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
SerializerAdapter localSerializerAdapter =
(serializerAdapter != null)
? serializerAdapter
: SerializerFactory.createDefaultManagementSerializerAdapter();
ImageBuilderClientImpl client =
new ImageBuilderClientImpl(
pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
localPipeline,
localSerializerAdapter,
localDefaultPollInterval,
localEnvironment,
subscriptionId,
localEndpoint);
return client;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ public class ImageTemplateDistributor {
private String runOutputName;

/*
* Tags that will be applied to the artifact once it has been
* created/updated by the distributor.
* Tags that will be applied to the artifact once it has been created/updated by the distributor.
*/
@JsonProperty(value = "artifactTags")
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
@Fluent
public final class ImageTemplateFileCustomizer extends ImageTemplateCustomizer {
/*
* The URI of the file to be uploaded for customizing the VM. It can be a
* github link, SAS URI for Azure Storage, etc
* The URI of the file to be uploaded for customizing the VM. It can be a github link, SAS URI for Azure Storage,
* etc
*/
@JsonProperty(value = "sourceUri")
private String sourceUri;
Expand All @@ -28,8 +28,8 @@ public final class ImageTemplateFileCustomizer extends ImageTemplateCustomizer {
private String sha256Checksum;

/*
* The absolute path to a file (with nested directory structures already
* created) where the file (from sourceUri) will be uploaded to in the VM
* The absolute path to a file (with nested directory structures already created) where the file (from sourceUri)
* will be uploaded to in the VM
*/
@JsonProperty(value = "destination")
private String destination;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
@Fluent
public class ImageTemplateIdentity {
/*
* The type of identity used for the image template. The type 'None' will
* remove any identities from the image template.
* The type of identity used for the image template. The type 'None' will remove any identities from the image
* template.
*/
@JsonProperty(value = "type")
private ResourceIdentityType type;

/*
* The list of user identities associated with the image template. The user
* identity dictionary key references will be ARM resource ids in the form:
* The list of user identities associated with the image template. The user identity dictionary key references will
* be ARM resource ids in the form:
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
*/
@JsonProperty(value = "userAssignedIdentities")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,16 @@ public final class ImageTemplatePlatformImageSource extends ImageTemplateSource

/*
* Image version from the [Azure Gallery
* Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages).
* If 'latest' is specified here, the version is evaluated when the image
* build takes place, not when the template is submitted.
* Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). If 'latest' is specified here,
* the version is evaluated when the image build takes place, not when the template is submitted.
*/
@JsonProperty(value = "version")
private String version;

/*
* Image version from the [Azure Gallery
* Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages).
* This readonly field differs from 'version', only if the value specified
* in 'version' field is 'latest'.
* Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). This readonly field differs
* from 'version', only if the value specified in 'version' field is 'latest'.
*/
@JsonProperty(value = "exactVersion", access = JsonProperty.Access.WRITE_ONLY)
private String exactVersion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@
@Fluent
public final class ImageTemplatePowerShellCustomizer extends ImageTemplateCustomizer {
/*
* URI of the PowerShell script to be run for customizing. It can be a
* github link, SAS URI for Azure Storage, etc
* URI of the PowerShell script to be run for customizing. It can be a github link, SAS URI for Azure Storage, etc
*/
@JsonProperty(value = "scriptUri")
private String scriptUri;

/*
* SHA256 checksum of the power shell script provided in the scriptUri
* field above
* SHA256 checksum of the power shell script provided in the scriptUri field above
*/
@JsonProperty(value = "sha256Checksum")
private String sha256Checksum;
Expand All @@ -45,9 +43,8 @@ public final class ImageTemplatePowerShellCustomizer extends ImageTemplateCustom
private Boolean runElevated;

/*
* If specified, the PowerShell script will be run with elevated privileges
* using the Local System user. Can only be true when the runElevated field
* above is set to true.
* If specified, the PowerShell script will be run with elevated privileges using the Local System user. Can only
* be true when the runElevated field above is set to true.
*/
@JsonProperty(value = "runAsSystem")
private Boolean runAsSystem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@
@Fluent
public final class ImageTemplatePowerShellValidator extends ImageTemplateInVMValidator {
/*
* URI of the PowerShell script to be run for validation. It can be a
* github link, Azure Storage URI, etc
* URI of the PowerShell script to be run for validation. It can be a github link, Azure Storage URI, etc
*/
@JsonProperty(value = "scriptUri")
private String scriptUri;

/*
* SHA256 checksum of the power shell script provided in the scriptUri
* field above
* SHA256 checksum of the power shell script provided in the scriptUri field above
*/
@JsonProperty(value = "sha256Checksum")
private String sha256Checksum;
Expand All @@ -45,9 +43,8 @@ public final class ImageTemplatePowerShellValidator extends ImageTemplateInVMVal
private Boolean runElevated;

/*
* If specified, the PowerShell script will be run with elevated privileges
* using the Local System user. Can only be true when the runElevated field
* above is set to true.
* If specified, the PowerShell script will be run with elevated privileges using the Local System user. Can only
* be true when the runElevated field above is set to true.
*/
@JsonProperty(value = "runAsSystem")
private Boolean runAsSystem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,18 @@
@Fluent
public final class ImageTemplatePropertiesValidate {
/*
* If validation fails and this field is set to false, output image(s) will
* not be distributed. This is the default behavior. If validation fails
* and this field is set to true, output image(s) will still be
* distributed. Please use this option with caution as it may result in bad
* images being distributed for use. In either case (true or false), the
* end to end image run will be reported as having failed in case of a
* validation failure. [Note: This field has no effect if validation
* succeeds.]
* If validation fails and this field is set to false, output image(s) will not be distributed. This is the default
* behavior. If validation fails and this field is set to true, output image(s) will still be distributed. Please
* use this option with caution as it may result in bad images being distributed for use. In either case (true or
* false), the end to end image run will be reported as having failed in case of a validation failure. [Note: This
* field has no effect if validation succeeds.]
*/
@JsonProperty(value = "continueDistributeOnFailure")
private Boolean continueDistributeOnFailure;

/*
* If this field is set to true, the image specified in the 'source'
* section will directly be validated. No separate build will be run to
* generate and then validate a customized image.
* If this field is set to true, the image specified in the 'source' section will directly be validated. No
* separate build will be run to generate and then validate a customized image.
*/
@JsonProperty(value = "sourceValidationOnly")
private Boolean sourceValidationOnly;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
@Fluent
public final class ImageTemplateRestartCustomizer extends ImageTemplateCustomizer {
/*
* Command to execute the restart [Default: 'shutdown /r /f /t 0 /c "packer
* restart"']
* Command to execute the restart [Default: 'shutdown /r /f /t 0 /c "packer restart"']
*/
@JsonProperty(value = "restartCommand")
private String restartCommand;
Expand All @@ -28,8 +27,8 @@ public final class ImageTemplateRestartCustomizer extends ImageTemplateCustomize
private String restartCheckCommand;

/*
* Restart timeout specified as a string of magnitude and unit, e.g. '5m'
* (5 minutes) or '2h' (2 hours) [Default: '5m']
* Restart timeout specified as a string of magnitude and unit, e.g. '5m' (5 minutes) or '2h' (2 hours) [Default:
* '5m']
*/
@JsonProperty(value = "restartTimeout")
private String restartTimeout;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,14 @@ public final class ImageTemplateSharedImageDistributor extends ImageTemplateDist
private List<String> replicationRegions;

/*
* Flag that indicates whether created image version should be excluded
* from latest. Omit to use the default (false).
* Flag that indicates whether created image version should be excluded from latest. Omit to use the default
* (false).
*/
@JsonProperty(value = "excludeFromLatest")
private Boolean excludeFromLatest;

/*
* Storage account type to be used to store the shared image. Omit to use
* the default (Standard_LRS).
* Storage account type to be used to store the shared image. Omit to use the default (Standard_LRS).
*/
@JsonProperty(value = "storageAccountType")
private SharedImageStorageAccountType storageAccountType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
@Fluent
public final class ImageTemplateShellCustomizer extends ImageTemplateCustomizer {
/*
* URI of the shell script to be run for customizing. It can be a github
* link, SAS URI for Azure Storage, etc
* URI of the shell script to be run for customizing. It can be a github link, SAS URI for Azure Storage, etc
*/
@JsonProperty(value = "scriptUri")
private String scriptUri;
Expand Down
Loading