Skip to content
Draft
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.3 (Unreleased)
## 1.0.0-beta.1 (2022-04-04)

- 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-2021-10. 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.2</version>
<version>1.0.0-beta.3</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static Configurable configure() {

/** The Configurable allowing configurations to be set. */
public static final class Configurable {
private final ClientLogger logger = new ClientLogger(Configurable.class);
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);

private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
Expand Down Expand Up @@ -152,9 +152,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
this.defaultPollInterval =
Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
throw LOGGER
.logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
Expand All @@ -176,7 +178,7 @@ public ImageBuilderManager authenticate(TokenCredential credential, AzureProfile
.append("-")
.append("com.azure.resourcemanager.imagebuilder")
.append("/")
.append("1.0.0-beta.2");
.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 @@ -17,7 +17,7 @@ public interface OperationsClient {
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return result of the request to list REST API operations.
* @return result of the request to list REST API operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<OperationInner> list();
Expand All @@ -29,7 +29,7 @@ public interface OperationsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return result of the request to list REST API operations.
* @return result of the request to list REST API operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<OperationInner> list(Context context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public interface VirtualMachineImageTemplatesClient {
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return information about the VM image templates associated with the subscription.
* @return information about the VM image templates associated with the subscription as paginated response with
* {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ImageTemplateInner> list();
Expand All @@ -34,7 +35,8 @@ public interface VirtualMachineImageTemplatesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return information about the VM image templates associated with the subscription.
* @return information about the VM image templates associated with the subscription as paginated response with
* {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ImageTemplateInner> list(Context context);
Expand All @@ -46,7 +48,8 @@ public interface VirtualMachineImageTemplatesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return information about the VM image templates associated with the specified resource group.
* @return information about the VM image templates associated with the specified resource group as paginated
* response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ImageTemplateInner> listByResourceGroup(String resourceGroupName);
Expand All @@ -59,7 +62,8 @@ public interface VirtualMachineImageTemplatesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return information about the VM image templates associated with the specified resource group.
* @return information about the VM image templates associated with the specified resource group as paginated
* response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ImageTemplateInner> listByResourceGroup(String resourceGroupName, Context context);
Expand All @@ -73,7 +77,8 @@ public interface VirtualMachineImageTemplatesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return image template is an ARM resource managed by Microsoft.VirtualMachineImages provider.
* @return the {@link SyncPoller} for polling of image template is an ARM resource managed by
* Microsoft.VirtualMachineImages provider.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<ImageTemplateInner>, ImageTemplateInner> beginCreateOrUpdate(
Expand All @@ -89,7 +94,8 @@ SyncPoller<PollResult<ImageTemplateInner>, ImageTemplateInner> beginCreateOrUpda
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return image template is an ARM resource managed by Microsoft.VirtualMachineImages provider.
* @return the {@link SyncPoller} for polling of image template is an ARM resource managed by
* Microsoft.VirtualMachineImages provider.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<ImageTemplateInner>, ImageTemplateInner> beginCreateOrUpdate(
Expand Down Expand Up @@ -135,7 +141,8 @@ ImageTemplateInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return image template is an ARM resource managed by Microsoft.VirtualMachineImages provider.
* @return the {@link SyncPoller} for polling of image template is an ARM resource managed by
* Microsoft.VirtualMachineImages provider.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<ImageTemplateInner>, ImageTemplateInner> beginUpdate(
Expand All @@ -151,7 +158,8 @@ SyncPoller<PollResult<ImageTemplateInner>, ImageTemplateInner> beginUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return image template is an ARM resource managed by Microsoft.VirtualMachineImages provider.
* @return the {@link SyncPoller} for polling of image template is an ARM resource managed by
* Microsoft.VirtualMachineImages provider.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<ImageTemplateInner>, ImageTemplateInner> beginUpdate(
Expand Down Expand Up @@ -210,7 +218,7 @@ ImageTemplateInner update(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return information about a virtual machine image template.
* @return information about a virtual machine image template along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<ImageTemplateInner> getByResourceGroupWithResponse(
Expand All @@ -224,7 +232,7 @@ Response<ImageTemplateInner> getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
* @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String imageTemplateName);
Expand All @@ -238,7 +246,7 @@ Response<ImageTemplateInner> getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
* @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String imageTemplateName, Context context);
Expand Down Expand Up @@ -276,7 +284,7 @@ Response<ImageTemplateInner> getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
* @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginRun(String resourceGroupName, String imageTemplateName);
Expand All @@ -290,7 +298,7 @@ Response<ImageTemplateInner> getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
* @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginRun(String resourceGroupName, String imageTemplateName, Context context);
Expand Down Expand Up @@ -328,7 +336,7 @@ Response<ImageTemplateInner> getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
* @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginCancel(String resourceGroupName, String imageTemplateName);
Expand All @@ -342,7 +350,7 @@ Response<ImageTemplateInner> getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
* @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginCancel(String resourceGroupName, String imageTemplateName, Context context);
Expand Down Expand Up @@ -380,7 +388,7 @@ Response<ImageTemplateInner> getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the result of List run outputs operation.
* @return the result of List run outputs operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<RunOutputInner> listRunOutputs(String resourceGroupName, String imageTemplateName);
Expand All @@ -394,7 +402,7 @@ Response<ImageTemplateInner> getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the result of List run outputs operation.
* @return the result of List run outputs operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<RunOutputInner> listRunOutputs(String resourceGroupName, String imageTemplateName, Context context);
Expand Down Expand Up @@ -423,7 +431,7 @@ Response<ImageTemplateInner> getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the specified run output for the specified image template resource.
* @return the specified run output for the specified image template resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<RunOutputInner> getRunOutputWithResponse(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,13 @@
import com.azure.resourcemanager.imagebuilder.models.ImageTemplateVmProfile;
import com.azure.resourcemanager.imagebuilder.models.ProvisioningError;
import com.azure.resourcemanager.imagebuilder.models.ProvisioningState;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;

/** Image template is an ARM resource managed by Microsoft.VirtualMachineImages provider. */
@Fluent
public final class ImageTemplateInner extends Resource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ImageTemplateInner.class);

/*
* The properties of the image template
*/
Expand Down Expand Up @@ -252,11 +249,13 @@ public void validate() {
innerProperties().validate();
}
if (identity() == null) {
throw logger
throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property identity in model ImageTemplateInner"));
} else {
identity().validate();
}
}

private static final ClientLogger LOGGER = new ClientLogger(ImageTemplateInner.class);
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,12 @@
import com.azure.resourcemanager.imagebuilder.models.ImageTemplateVmProfile;
import com.azure.resourcemanager.imagebuilder.models.ProvisioningError;
import com.azure.resourcemanager.imagebuilder.models.ProvisioningState;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Describes the properties of an image template. */
@Fluent
public final class ImageTemplateProperties {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ImageTemplateProperties.class);

/*
* Specifies the properties used to describe the source image.
*/
Expand Down Expand Up @@ -210,7 +207,7 @@ public ImageTemplateProperties withVmProfile(ImageTemplateVmProfile vmProfile) {
*/
public void validate() {
if (source() == null) {
throw logger
throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property source in model ImageTemplateProperties"));
} else {
Expand All @@ -220,7 +217,7 @@ public void validate() {
customize().forEach(e -> e.validate());
}
if (distribute() == null) {
throw logger
throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property distribute in model ImageTemplateProperties"));
Expand All @@ -237,4 +234,6 @@ public void validate() {
vmProfile().validate();
}
}

private static final ClientLogger LOGGER = new ClientLogger(ImageTemplateProperties.class);
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@
package com.azure.resourcemanager.imagebuilder.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.imagebuilder.models.OperationDisplay;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** A REST API operation. */
@Fluent
public final class OperationInner {
@JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);

/*
* The operation name. This is of the format
* {provider}/{resource}/{operation}
Expand Down
Loading