diff --git a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/CHANGELOG.md b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/CHANGELOG.md
index 00f2e439fc1a..1e9ece9d5e23 100644
--- a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/CHANGELOG.md
+++ b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/CHANGELOG.md
@@ -1,6 +1,8 @@
# Release History
-## 1.0.0-beta.3 (Unreleased)
+## 1.0.0-beta.1 (2022-05-20)
+
+- 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
diff --git a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/README.md b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/README.md
index a6f6f91dee04..f4f104eee7b0 100644
--- a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/README.md
+++ b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/README.md
@@ -2,7 +2,7 @@
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).
+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).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanagerazure-resourcemanager-imagebuilder
- 1.0.0-beta.2
+ 1.0.0-beta.3
```
[//]: # ({x-version-update-end})
diff --git a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/SAMPLE.md b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/SAMPLE.md
index 42cd9ed0bdad..97064990e2eb 100644
--- a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/SAMPLE.md
+++ b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/SAMPLE.md
@@ -25,7 +25,7 @@ import com.azure.core.util.Context;
/** Samples for Operations List. */
public final class OperationsListSamples {
/*
- * x-ms-original-file: specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/OperationsList.json
+ * x-ms-original-file: specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/OperationsList.json
*/
/**
* Sample code: Retrieve operations list.
@@ -46,7 +46,7 @@ import com.azure.core.util.Context;
/** Samples for VirtualMachineImageTemplates Cancel. */
public final class VirtualMachineImageTemplatesCancelSamples {
/*
- * x-ms-original-file: specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/CancelImageBuild.json
+ * x-ms-original-file: specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CancelImageBuild.json
*/
/**
* Sample code: Cancel the image build based on the imageTemplate.
@@ -81,7 +81,7 @@ import java.util.Map;
/** Samples for VirtualMachineImageTemplates CreateOrUpdate. */
public final class VirtualMachineImageTemplatesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/CreateImageTemplateLinux.json
+ * x-ms-original-file: specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CreateImageTemplateLinux.json
*/
/**
* Sample code: Create an Image Template for Linux.
@@ -134,7 +134,7 @@ public final class VirtualMachineImageTemplatesCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/CreateImageTemplateWindows.json
+ * x-ms-original-file: specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CreateImageTemplateWindows.json
*/
/**
* Sample code: Create an Image Template for Windows.
@@ -244,7 +244,7 @@ import com.azure.core.util.Context;
/** Samples for VirtualMachineImageTemplates Delete. */
public final class VirtualMachineImageTemplatesDeleteSamples {
/*
- * x-ms-original-file: specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/DeleteImageTemplate.json
+ * x-ms-original-file: specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/DeleteImageTemplate.json
*/
/**
* Sample code: Delete an Image Template.
@@ -265,7 +265,7 @@ import com.azure.core.util.Context;
/** Samples for VirtualMachineImageTemplates GetByResourceGroup. */
public final class VirtualMachineImageTemplatesGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/GetImageTemplate.json
+ * x-ms-original-file: specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/GetImageTemplate.json
*/
/**
* Sample code: Retrieve an Image Template.
@@ -288,7 +288,7 @@ import com.azure.core.util.Context;
/** Samples for VirtualMachineImageTemplates GetRunOutput. */
public final class VirtualMachineImageTemplatesGetRunOutputSamples {
/*
- * x-ms-original-file: specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/GetRunOutput.json
+ * x-ms-original-file: specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/GetRunOutput.json
*/
/**
* Sample code: Retrieve single runOutput.
@@ -311,7 +311,7 @@ import com.azure.core.util.Context;
/** Samples for VirtualMachineImageTemplates List. */
public final class VirtualMachineImageTemplatesListSamples {
/*
- * x-ms-original-file: specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/ListImageTemplates.json
+ * x-ms-original-file: specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListImageTemplates.json
*/
/**
* Sample code: List images by subscription.
@@ -332,7 +332,7 @@ import com.azure.core.util.Context;
/** Samples for VirtualMachineImageTemplates ListByResourceGroup. */
public final class VirtualMachineImageTemplatesListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/ListImageTemplatesByRg.json
+ * x-ms-original-file: specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListImageTemplatesByRg.json
*/
/**
* Sample code: List images by resource group.
@@ -353,7 +353,7 @@ import com.azure.core.util.Context;
/** Samples for VirtualMachineImageTemplates ListRunOutputs. */
public final class VirtualMachineImageTemplatesListRunOutputsSamples {
/*
- * x-ms-original-file: specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/ListRunOutputs.json
+ * x-ms-original-file: specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListRunOutputs.json
*/
/**
* Sample code: Retrieve a list of all outputs created by the last run of an Image Template.
@@ -375,7 +375,7 @@ import com.azure.core.util.Context;
/** Samples for VirtualMachineImageTemplates Run. */
public final class VirtualMachineImageTemplatesRunSamples {
/*
- * x-ms-original-file: specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/RunImageTemplate.json
+ * x-ms-original-file: specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/RunImageTemplate.json
*/
/**
* Sample code: Create image(s) from existing imageTemplate.
@@ -402,7 +402,7 @@ import java.util.Map;
/** Samples for VirtualMachineImageTemplates Update. */
public final class VirtualMachineImageTemplatesUpdateSamples {
/*
- * x-ms-original-file: specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/UpdateImageTemplateToRemoveIdentities.json
+ * x-ms-original-file: specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/UpdateImageTemplateToRemoveIdentities.json
*/
/**
* Sample code: Remove identities for an Image Template.
@@ -420,7 +420,7 @@ public final class VirtualMachineImageTemplatesUpdateSamples {
}
/*
- * x-ms-original-file: specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/UpdateImageTemplateTags.json
+ * x-ms-original-file: specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/UpdateImageTemplateTags.json
*/
/**
* Sample code: Update the tags for an Image Template.
diff --git a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/pom.xml b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/pom.xml
index 7cc7b158c7cd..cd8b44fa197e 100644
--- a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/pom.xml
+++ b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/pom.xml
@@ -13,7 +13,7 @@
jarMicrosoft Azure SDK for ImageBuilder Management
- This package contains Microsoft Azure SDK for ImageBuilder Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Virtual Machine Image Builder Client. Package tag package-2021-10.
+ This package contains Microsoft Azure SDK for ImageBuilder Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Virtual Machine Image Builder Client. Package tag package-2022-02.https://github.com/Azure/azure-sdk-for-java
diff --git a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/ImageBuilderManager.java b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/ImageBuilderManager.java
index 24f87e4840a7..83788d7a9770 100644
--- a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/ImageBuilderManager.java
+++ b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/ImageBuilderManager.java
@@ -10,11 +10,13 @@
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
+import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
+import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
@@ -67,6 +69,19 @@ public static ImageBuilderManager authenticate(TokenCredential credential, Azure
return configure().authenticate(credential, profile);
}
+ /**
+ * Creates an instance of ImageBuilder service API entry point.
+ *
+ * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
+ * @param profile the Azure profile for client.
+ * @return the ImageBuilder service API instance.
+ */
+ public static ImageBuilderManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return new ImageBuilderManager(httpPipeline, profile, null);
+ }
+
/**
* Gets a Configurable instance that can be used to create ImageBuilderManager with optional configuration.
*
@@ -78,13 +93,14 @@ 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;
private final List policies = new ArrayList<>();
private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
private Duration defaultPollInterval;
private Configurable() {
@@ -145,6 +161,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ *
This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
@@ -152,9 +181,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;
}
@@ -176,7 +207,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(" (")
@@ -194,10 +225,15 @@ public ImageBuilderManager authenticate(TokenCredential credential, AzureProfile
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
}
if (retryPolicy == null) {
- retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
policies
.addAll(
@@ -228,7 +264,11 @@ public ImageBuilderManager authenticate(TokenCredential credential, AzureProfile
}
}
- /** @return Resource collection API of VirtualMachineImageTemplates. */
+ /**
+ * Gets the resource collection API of VirtualMachineImageTemplates. It manages ImageTemplate.
+ *
+ * @return Resource collection API of VirtualMachineImageTemplates.
+ */
public VirtualMachineImageTemplates virtualMachineImageTemplates() {
if (this.virtualMachineImageTemplates == null) {
this.virtualMachineImageTemplates =
@@ -237,7 +277,11 @@ public VirtualMachineImageTemplates virtualMachineImageTemplates() {
return virtualMachineImageTemplates;
}
- /** @return Resource collection API of Operations. */
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
public Operations operations() {
if (this.operations == null) {
this.operations = new OperationsImpl(clientObject.getOperations(), this);
diff --git a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/OperationsClient.java b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/OperationsClient.java
index 3d3f28dc0f86..021f83aaeca9 100644
--- a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/OperationsClient.java
+++ b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/OperationsClient.java
@@ -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 list();
@@ -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 list(Context context);
diff --git a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/VirtualMachineImageTemplatesClient.java b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/VirtualMachineImageTemplatesClient.java
index ace1175b055f..03a310d3f57b 100644
--- a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/VirtualMachineImageTemplatesClient.java
+++ b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/VirtualMachineImageTemplatesClient.java
@@ -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 list();
@@ -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 list(Context context);
@@ -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 listByResourceGroup(String resourceGroupName);
@@ -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 listByResourceGroup(String resourceGroupName, Context context);
@@ -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, ImageTemplateInner> beginCreateOrUpdate(
@@ -89,7 +94,8 @@ SyncPoller, 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, ImageTemplateInner> beginCreateOrUpdate(
@@ -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, ImageTemplateInner> beginUpdate(
@@ -151,7 +158,8 @@ SyncPoller, 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, ImageTemplateInner> beginUpdate(
@@ -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 getByResourceGroupWithResponse(
@@ -224,7 +232,7 @@ Response 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, Void> beginDelete(String resourceGroupName, String imageTemplateName);
@@ -238,7 +246,7 @@ Response 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, Void> beginDelete(String resourceGroupName, String imageTemplateName, Context context);
@@ -276,7 +284,7 @@ Response 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, Void> beginRun(String resourceGroupName, String imageTemplateName);
@@ -290,7 +298,7 @@ Response 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, Void> beginRun(String resourceGroupName, String imageTemplateName, Context context);
@@ -328,7 +336,7 @@ Response 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, Void> beginCancel(String resourceGroupName, String imageTemplateName);
@@ -342,7 +350,7 @@ Response 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, Void> beginCancel(String resourceGroupName, String imageTemplateName, Context context);
@@ -380,7 +388,7 @@ Response 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 listRunOutputs(String resourceGroupName, String imageTemplateName);
@@ -394,7 +402,7 @@ Response 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 listRunOutputs(String resourceGroupName, String imageTemplateName, Context context);
@@ -423,7 +431,7 @@ Response 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 getRunOutputWithResponse(
diff --git a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/models/ImageTemplateInner.java b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/models/ImageTemplateInner.java
index 6ae25b95a993..11efec0b1984 100644
--- a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/models/ImageTemplateInner.java
+++ b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/models/ImageTemplateInner.java
@@ -6,17 +6,16 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
-import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.imagebuilder.models.ImageTemplateCustomizer;
import com.azure.resourcemanager.imagebuilder.models.ImageTemplateDistributor;
import com.azure.resourcemanager.imagebuilder.models.ImageTemplateIdentity;
import com.azure.resourcemanager.imagebuilder.models.ImageTemplateLastRunStatus;
+import com.azure.resourcemanager.imagebuilder.models.ImageTemplatePropertiesValidate;
import com.azure.resourcemanager.imagebuilder.models.ImageTemplateSource;
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;
@@ -24,8 +23,6 @@
/** 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
*/
@@ -38,12 +35,6 @@ public final class ImageTemplateInner extends Resource {
@JsonProperty(value = "identity", required = true)
private ImageTemplateIdentity identity;
- /*
- * Metadata pertaining to creation and last modification of the resource.
- */
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
-
/**
* Get the innerProperties property: The properties of the image template.
*
@@ -73,15 +64,6 @@ public ImageTemplateInner withIdentity(ImageTemplateIdentity identity) {
return this;
}
- /**
- * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
/** {@inheritDoc} */
@Override
public ImageTemplateInner withLocation(String location) {
@@ -144,6 +126,29 @@ public ImageTemplateInner withCustomize(List customize)
return this;
}
+ /**
+ * Get the validate property: Configuration options and list of validations to be performed on the resulting image.
+ *
+ * @return the validate value.
+ */
+ public ImageTemplatePropertiesValidate validate() {
+ return this.innerProperties() == null ? null : this.innerProperties().validate();
+ }
+
+ /**
+ * Set the validate property: Configuration options and list of validations to be performed on the resulting image.
+ *
+ * @param validate the validate value to set.
+ * @return the ImageTemplateInner object itself.
+ */
+ public ImageTemplateInner withValidate(ImageTemplatePropertiesValidate validate) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ImageTemplateProperties();
+ }
+ this.innerProperties().withValidate(validate);
+ return this;
+ }
+
/**
* Get the distribute property: The distribution targets where the image output needs to go to.
*
@@ -195,8 +200,8 @@ public ImageTemplateLastRunStatus lastRunStatus() {
}
/**
- * Get the buildTimeoutInMinutes property: Maximum duration to wait while building the image template. Omit or
- * specify 0 to use the default (4 hours).
+ * Get the buildTimeoutInMinutes property: 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).
*
* @return the buildTimeoutInMinutes value.
*/
@@ -205,8 +210,8 @@ public Integer buildTimeoutInMinutes() {
}
/**
- * Set the buildTimeoutInMinutes property: Maximum duration to wait while building the image template. Omit or
- * specify 0 to use the default (4 hours).
+ * Set the buildTimeoutInMinutes property: 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).
*
* @param buildTimeoutInMinutes the buildTimeoutInMinutes value to set.
* @return the ImageTemplateInner object itself.
@@ -242,6 +247,52 @@ public ImageTemplateInner withVmProfile(ImageTemplateVmProfile vmProfile) {
return this;
}
+ /**
+ * Get the stagingResourceGroup property: 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.
+ *
+ * @return the stagingResourceGroup value.
+ */
+ public String stagingResourceGroup() {
+ return this.innerProperties() == null ? null : this.innerProperties().stagingResourceGroup();
+ }
+
+ /**
+ * Set the stagingResourceGroup property: 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.
+ *
+ * @param stagingResourceGroup the stagingResourceGroup value to set.
+ * @return the ImageTemplateInner object itself.
+ */
+ public ImageTemplateInner withStagingResourceGroup(String stagingResourceGroup) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ImageTemplateProperties();
+ }
+ this.innerProperties().withStagingResourceGroup(stagingResourceGroup);
+ return this;
+ }
+
+ /**
+ * Get the exactStagingResourceGroup property: 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.
+ *
+ * @return the exactStagingResourceGroup value.
+ */
+ public String exactStagingResourceGroup() {
+ return this.innerProperties() == null ? null : this.innerProperties().exactStagingResourceGroup();
+ }
+
/**
* Validates the instance.
*
@@ -252,11 +303,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);
}
diff --git a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/models/ImageTemplateProperties.java b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/models/ImageTemplateProperties.java
index 9c4436f47b77..d987ea00cf72 100644
--- a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/models/ImageTemplateProperties.java
+++ b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/models/ImageTemplateProperties.java
@@ -9,19 +9,17 @@
import com.azure.resourcemanager.imagebuilder.models.ImageTemplateCustomizer;
import com.azure.resourcemanager.imagebuilder.models.ImageTemplateDistributor;
import com.azure.resourcemanager.imagebuilder.models.ImageTemplateLastRunStatus;
+import com.azure.resourcemanager.imagebuilder.models.ImageTemplatePropertiesValidate;
import com.azure.resourcemanager.imagebuilder.models.ImageTemplateSource;
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.
*/
@@ -35,6 +33,13 @@ public final class ImageTemplateProperties {
@JsonProperty(value = "customize")
private List customize;
+ /*
+ * Configuration options and list of validations to be performed on the
+ * resulting image.
+ */
+ @JsonProperty(value = "validate")
+ private ImageTemplatePropertiesValidate validate;
+
/*
* The distribution targets where the image output needs to go to.
*/
@@ -60,8 +65,9 @@ public final class ImageTemplateProperties {
private ImageTemplateLastRunStatus lastRunStatus;
/*
- * Maximum duration to wait while building the image template. 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;
@@ -72,6 +78,31 @@ public final class ImageTemplateProperties {
@JsonProperty(value = "vmProfile")
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.
+ */
+ @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
+ * 'stagingResourceGroup' field is empty.
+ */
+ @JsonProperty(value = "exactStagingResourceGroup", access = JsonProperty.Access.WRITE_ONLY)
+ private String exactStagingResourceGroup;
+
/**
* Get the source property: Specifies the properties used to describe the source image.
*
@@ -114,6 +145,26 @@ public ImageTemplateProperties withCustomize(List custo
return this;
}
+ /**
+ * Get the validate property: Configuration options and list of validations to be performed on the resulting image.
+ *
+ * @return the validate value.
+ */
+ public ImageTemplatePropertiesValidate validate() {
+ return this.validate;
+ }
+
+ /**
+ * Set the validate property: Configuration options and list of validations to be performed on the resulting image.
+ *
+ * @param validate the validate value to set.
+ * @return the ImageTemplateProperties object itself.
+ */
+ public ImageTemplateProperties withValidate(ImageTemplatePropertiesValidate validate) {
+ this.validate = validate;
+ return this;
+ }
+
/**
* Get the distribute property: The distribution targets where the image output needs to go to.
*
@@ -162,8 +213,8 @@ public ImageTemplateLastRunStatus lastRunStatus() {
}
/**
- * Get the buildTimeoutInMinutes property: Maximum duration to wait while building the image template. Omit or
- * specify 0 to use the default (4 hours).
+ * Get the buildTimeoutInMinutes property: 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).
*
* @return the buildTimeoutInMinutes value.
*/
@@ -172,8 +223,8 @@ public Integer buildTimeoutInMinutes() {
}
/**
- * Set the buildTimeoutInMinutes property: Maximum duration to wait while building the image template. Omit or
- * specify 0 to use the default (4 hours).
+ * Set the buildTimeoutInMinutes property: 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).
*
* @param buildTimeoutInMinutes the buildTimeoutInMinutes value to set.
* @return the ImageTemplateProperties object itself.
@@ -203,6 +254,49 @@ public ImageTemplateProperties withVmProfile(ImageTemplateVmProfile vmProfile) {
return this;
}
+ /**
+ * Get the stagingResourceGroup property: 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.
+ *
+ * @return the stagingResourceGroup value.
+ */
+ public String stagingResourceGroup() {
+ return this.stagingResourceGroup;
+ }
+
+ /**
+ * Set the stagingResourceGroup property: 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.
+ *
+ * @param stagingResourceGroup the stagingResourceGroup value to set.
+ * @return the ImageTemplateProperties object itself.
+ */
+ public ImageTemplateProperties withStagingResourceGroup(String stagingResourceGroup) {
+ this.stagingResourceGroup = stagingResourceGroup;
+ return this;
+ }
+
+ /**
+ * Get the exactStagingResourceGroup property: 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.
+ *
+ * @return the exactStagingResourceGroup value.
+ */
+ public String exactStagingResourceGroup() {
+ return this.exactStagingResourceGroup;
+ }
+
/**
* Validates the instance.
*
@@ -210,7 +304,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 {
@@ -219,8 +313,11 @@ public void validate() {
if (customize() != null) {
customize().forEach(e -> e.validate());
}
+ if (validate() != null) {
+ validate().validate();
+ }
if (distribute() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property distribute in model ImageTemplateProperties"));
@@ -237,4 +334,6 @@ public void validate() {
vmProfile().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(ImageTemplateProperties.class);
}
diff --git a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/models/OperationInner.java b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/models/OperationInner.java
index 13ece2445da0..2de6f1f08218 100644
--- a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/models/OperationInner.java
+++ b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/models/OperationInner.java
@@ -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}
@@ -35,7 +31,7 @@ public final class OperationInner {
private String origin;
/*
- * Any object
+ * Properties of the operation.
*/
@JsonProperty(value = "properties")
private Object properties;
@@ -107,7 +103,7 @@ public OperationInner withOrigin(String origin) {
}
/**
- * Get the properties property: Any object.
+ * Get the properties property: Properties of the operation.
*
* @return the properties value.
*/
@@ -116,7 +112,7 @@ public Object properties() {
}
/**
- * Set the properties property: Any object.
+ * Set the properties property: Properties of the operation.
*
* @param properties the properties value to set.
* @return the OperationInner object itself.
diff --git a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/models/RunOutputInner.java b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/models/RunOutputInner.java
index bf9d034812cb..d223b646a971 100644
--- a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/models/RunOutputInner.java
+++ b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/models/RunOutputInner.java
@@ -5,35 +5,19 @@
package com.azure.resourcemanager.imagebuilder.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.management.SubResource;
-import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.management.ProxyResource;
import com.azure.resourcemanager.imagebuilder.models.ProvisioningState;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Represents an output that was created by running an image template. */
@Fluent
-public final class RunOutputInner extends SubResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(RunOutputInner.class);
-
+public final class RunOutputInner extends ProxyResource {
/*
* The properties of the run output
*/
@JsonProperty(value = "properties")
private RunOutputProperties innerProperties;
- /*
- * Resource name
- */
- @JsonProperty(value = "name", required = true)
- private String name;
-
- /*
- * Resource type
- */
- @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
- private String type;
-
/**
* Get the innerProperties property: The properties of the run output.
*
@@ -43,42 +27,6 @@ private RunOutputProperties innerProperties() {
return this.innerProperties;
}
- /**
- * Get the name property: Resource name.
- *
- * @return the name value.
- */
- public String name() {
- return this.name;
- }
-
- /**
- * Set the name property: Resource name.
- *
- * @param name the name value to set.
- * @return the RunOutputInner object itself.
- */
- public RunOutputInner withName(String name) {
- this.name = name;
- return this;
- }
-
- /**
- * Get the type property: Resource type.
- *
- * @return the type value.
- */
- public String type() {
- return this.type;
- }
-
- /** {@inheritDoc} */
- @Override
- public RunOutputInner withId(String id) {
- super.withId(id);
- return this;
- }
-
/**
* Get the artifactId property: The resource id of the artifact.
*
@@ -143,10 +91,5 @@ public void validate() {
if (innerProperties() != null) {
innerProperties().validate();
}
- if (name() == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException("Missing required property name in model RunOutputInner"));
- }
}
}
diff --git a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/models/RunOutputProperties.java b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/models/RunOutputProperties.java
index 78c6ab075389..c3648ea34ab5 100644
--- a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/models/RunOutputProperties.java
+++ b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/fluent/models/RunOutputProperties.java
@@ -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.ProvisioningState;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Describes the properties of a run output. */
@Fluent
public final class RunOutputProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(RunOutputProperties.class);
-
/*
* The resource id of the artifact.
*/
diff --git a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/implementation/ImageBuilderClientBuilder.java b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/implementation/ImageBuilderClientBuilder.java
index 5187865e2291..d6f0148718ab 100644
--- a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/implementation/ImageBuilderClientBuilder.java
+++ b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/implementation/ImageBuilderClientBuilder.java
@@ -7,7 +7,6 @@
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
-import com.azure.core.http.policy.CookiePolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.AzureEnvironment;
@@ -70,34 +69,34 @@ public ImageBuilderClientBuilder environment(AzureEnvironment environment) {
}
/*
- * The default poll interval for long-running operation
+ * The HTTP pipeline to send requests through
*/
- private Duration defaultPollInterval;
+ private HttpPipeline pipeline;
/**
- * Sets The default poll interval for long-running operation.
+ * Sets The HTTP pipeline to send requests through.
*
- * @param defaultPollInterval the defaultPollInterval value.
+ * @param pipeline the pipeline value.
* @return the ImageBuilderClientBuilder.
*/
- public ImageBuilderClientBuilder defaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = defaultPollInterval;
+ public ImageBuilderClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
return this;
}
/*
- * The HTTP pipeline to send requests through
+ * The default poll interval for long-running operation
*/
- private HttpPipeline pipeline;
+ private Duration defaultPollInterval;
/**
- * Sets The HTTP pipeline to send requests through.
+ * Sets The default poll interval for long-running operation.
*
- * @param pipeline the pipeline value.
+ * @param defaultPollInterval the defaultPollInterval value.
* @return the ImageBuilderClientBuilder.
*/
- public ImageBuilderClientBuilder pipeline(HttpPipeline pipeline) {
- this.pipeline = pipeline;
+ public ImageBuilderClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -129,15 +128,12 @@ public ImageBuilderClientImpl buildClient() {
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 (pipeline == null) {
- this.pipeline =
- new HttpPipelineBuilder()
- .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
- .build();
- }
if (serializerAdapter == null) {
this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
}
diff --git a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/implementation/ImageBuilderClientImpl.java b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/implementation/ImageBuilderClientImpl.java
index 5a225b0b20a9..a8f9829611f0 100644
--- a/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/implementation/ImageBuilderClientImpl.java
+++ b/sdk/imagebuilder/azure-resourcemanager-imagebuilder/src/main/java/com/azure/resourcemanager/imagebuilder/implementation/ImageBuilderClientImpl.java
@@ -15,6 +15,7 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.AsyncPollResponse;
import com.azure.core.util.polling.LongRunningOperationStatus;
@@ -30,15 +31,12 @@
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
-import java.util.Map;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/** Initializes a new instance of the ImageBuilderClientImpl type. */
@ServiceClient(builder = ImageBuilderClientBuilder.class)
public final class ImageBuilderClientImpl implements ImageBuilderClient {
- private final ClientLogger logger = new ClientLogger(ImageBuilderClientImpl.class);
-
/**
* Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription Id forms part of
* the URI for every service call.
@@ -162,7 +160,7 @@ public OperationsClient getOperations() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2021-10-01";
+ this.apiVersion = "2022-02-14";
this.virtualMachineImageTemplates = new VirtualMachineImageTemplatesClientImpl(this);
this.operations = new OperationsClientImpl(this);
}
@@ -183,10 +181,7 @@ public Context getContext() {
* @return the merged context.
*/
public Context mergeContext(Context context) {
- for (Map.Entry