Skip to content

Commit

Permalink
CodeGen from PR 18049 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Add API version 2022-03-01 to Microsoft.PolicyInsights (Azure#18049)

* Copy 2020-07-01 files

* Add new API version (2022-03-01) to Microsoft.PolicyInsights

The only change is adding support for MG-level calls to the /checkPolicyRestrictions API.

* Fix example title
  • Loading branch information
SDKAuto committed Mar 15, 2022
1 parent 2a2a77d commit 462b5dd
Show file tree
Hide file tree
Showing 115 changed files with 3,243 additions and 1,266 deletions.
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-03-15)

- Azure Resource Manager PolicyInsights client library for Java. This package contains Microsoft Azure SDK for PolicyInsights Management SDK. Package tag package-2022-03. 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 @@ -2,7 +2,7 @@

Azure Resource Manager PolicyInsights client library for Java.

This package contains Microsoft Azure SDK for PolicyInsights Management SDK. 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 PolicyInsights Management SDK. Package tag package-2022-03. 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

Expand Down Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-policyinsights</artifactId>
<version>1.0.0-beta.2</version>
<version>1.0.0-beta.3</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
156 changes: 146 additions & 10 deletions sdk/policyinsights/azure-resourcemanager-policyinsights/SAMPLE.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for PolicyInsights Management</name>
<description>This package contains Microsoft Azure SDK for PolicyInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2021-10.</description>
<description>This package contains Microsoft Azure SDK for PolicyInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2022-03.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,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 @@ -176,9 +176,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 @@ -200,7 +202,7 @@ public PolicyInsightsManager authenticate(TokenCredential credential, AzureProfi
.append("-")
.append("com.azure.resourcemanager.policyinsights")
.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 @@ -20,7 +20,7 @@ public interface AttestationsClient {
*
* @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 all attestations for the subscription.
* @return all attestations for the subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<AttestationInner> list();
Expand All @@ -34,7 +34,7 @@ public interface AttestationsClient {
* @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 all attestations for the subscription.
* @return all attestations for the subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<AttestationInner> list(Integer top, String filter, Context context);
Expand All @@ -47,7 +47,7 @@ public interface AttestationsClient {
* @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 an attestation resource.
* @return the {@link SyncPoller} for polling of an attestation resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<AttestationInner>, AttestationInner> beginCreateOrUpdateAtSubscription(
Expand All @@ -62,7 +62,7 @@ SyncPoller<PollResult<AttestationInner>, AttestationInner> beginCreateOrUpdateAt
* @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 an attestation resource.
* @return the {@link SyncPoller} for polling of an attestation resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<AttestationInner>, AttestationInner> beginCreateOrUpdateAtSubscription(
Expand Down Expand Up @@ -115,7 +115,7 @@ SyncPoller<PollResult<AttestationInner>, AttestationInner> beginCreateOrUpdateAt
* @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 an existing attestation at subscription scope.
* @return an existing attestation at subscription scope along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<AttestationInner> getAtSubscriptionWithResponse(String attestationName, Context context);
Expand All @@ -139,7 +139,7 @@ SyncPoller<PollResult<AttestationInner>, AttestationInner> beginCreateOrUpdateAt
* @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 response.
* @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<Void> deleteAtSubscriptionWithResponse(String attestationName, Context context);
Expand All @@ -151,7 +151,7 @@ SyncPoller<PollResult<AttestationInner>, AttestationInner> beginCreateOrUpdateAt
* @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 all attestations for the resource group.
* @return all attestations for the resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<AttestationInner> listByResourceGroup(String resourceGroupName);
Expand All @@ -166,7 +166,7 @@ SyncPoller<PollResult<AttestationInner>, AttestationInner> beginCreateOrUpdateAt
* @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 all attestations for the resource group.
* @return all attestations for the resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<AttestationInner> listByResourceGroup(
Expand All @@ -181,7 +181,7 @@ PagedIterable<AttestationInner> listByResourceGroup(
* @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 an attestation resource.
* @return the {@link SyncPoller} for polling of an attestation resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<AttestationInner>, AttestationInner> beginCreateOrUpdateAtResourceGroup(
Expand All @@ -197,7 +197,7 @@ SyncPoller<PollResult<AttestationInner>, AttestationInner> beginCreateOrUpdateAt
* @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 an attestation resource.
* @return the {@link SyncPoller} for polling of an attestation resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<AttestationInner>, AttestationInner> beginCreateOrUpdateAtResourceGroup(
Expand Down Expand Up @@ -256,7 +256,7 @@ AttestationInner createOrUpdateAtResourceGroup(
* @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 an existing attestation at resource group scope.
* @return an existing attestation at resource group scope along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<AttestationInner> getByResourceGroupWithResponse(
Expand All @@ -283,7 +283,7 @@ Response<AttestationInner> 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 response.
* @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<Void> deleteWithResponse(String resourceGroupName, String attestationName, Context context);
Expand All @@ -295,7 +295,7 @@ Response<AttestationInner> 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 all attestations for a resource.
* @return all attestations for a resource as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<AttestationInner> listForResource(String resourceId);
Expand All @@ -310,7 +310,7 @@ Response<AttestationInner> 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 all attestations for a resource.
* @return all attestations for a resource as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<AttestationInner> listForResource(String resourceId, Integer top, String filter, Context context);
Expand All @@ -324,7 +324,7 @@ Response<AttestationInner> 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 an attestation resource.
* @return the {@link SyncPoller} for polling of an attestation resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<AttestationInner>, AttestationInner> beginCreateOrUpdateAtResource(
Expand All @@ -340,7 +340,7 @@ SyncPoller<PollResult<AttestationInner>, AttestationInner> beginCreateOrUpdateAt
* @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 an attestation resource.
* @return the {@link SyncPoller} for polling of an attestation resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<AttestationInner>, AttestationInner> beginCreateOrUpdateAtResource(
Expand Down Expand Up @@ -398,7 +398,7 @@ AttestationInner createOrUpdateAtResource(
* @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 an existing attestation at resource scope.
* @return an existing attestation at resource scope along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<AttestationInner> getAtResourceWithResponse(String resourceId, String attestationName, Context context);
Expand All @@ -424,7 +424,7 @@ AttestationInner createOrUpdateAtResource(
* @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 response.
* @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<Void> deleteAtResourceWithResponse(String resourceId, String attestationName, Context context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 list of available operations.
* @return list of available operations along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<OperationsListResultsInner> listWithResponse(Context context);
Expand Down
Loading

0 comments on commit 462b5dd

Please sign in to comment.