scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
private Duration defaultPollInterval;
private Configurable() {
@@ -169,6 +185,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.
*
@@ -176,9 +205,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;
}
@@ -200,7 +231,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(" (")
@@ -218,10 +249,15 @@ public PolicyInsightsManager authenticate(TokenCredential credential, AzureProfi
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(
@@ -252,7 +288,11 @@ public PolicyInsightsManager authenticate(TokenCredential credential, AzureProfi
}
}
- /** @return Resource collection API of PolicyTrackedResources. */
+ /**
+ * Gets the resource collection API of PolicyTrackedResources.
+ *
+ * @return Resource collection API of PolicyTrackedResources.
+ */
public PolicyTrackedResources policyTrackedResources() {
if (this.policyTrackedResources == null) {
this.policyTrackedResources =
@@ -261,7 +301,11 @@ public PolicyTrackedResources policyTrackedResources() {
return policyTrackedResources;
}
- /** @return Resource collection API of Remediations. */
+ /**
+ * Gets the resource collection API of Remediations. It manages Remediation.
+ *
+ * @return Resource collection API of Remediations.
+ */
public Remediations remediations() {
if (this.remediations == null) {
this.remediations = new RemediationsImpl(clientObject.getRemediations(), this);
@@ -269,7 +313,11 @@ public Remediations remediations() {
return remediations;
}
- /** @return Resource collection API of PolicyEvents. */
+ /**
+ * Gets the resource collection API of PolicyEvents.
+ *
+ * @return Resource collection API of PolicyEvents.
+ */
public PolicyEvents policyEvents() {
if (this.policyEvents == null) {
this.policyEvents = new PolicyEventsImpl(clientObject.getPolicyEvents(), this);
@@ -277,7 +325,11 @@ public PolicyEvents policyEvents() {
return policyEvents;
}
- /** @return Resource collection API of PolicyStates. */
+ /**
+ * Gets the resource collection API of PolicyStates.
+ *
+ * @return Resource collection API of PolicyStates.
+ */
public PolicyStates policyStates() {
if (this.policyStates == null) {
this.policyStates = new PolicyStatesImpl(clientObject.getPolicyStates(), this);
@@ -285,7 +337,11 @@ public PolicyStates policyStates() {
return policyStates;
}
- /** @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);
@@ -293,7 +349,11 @@ public Operations operations() {
return operations;
}
- /** @return Resource collection API of PolicyMetadatas. */
+ /**
+ * Gets the resource collection API of PolicyMetadatas.
+ *
+ * @return Resource collection API of PolicyMetadatas.
+ */
public PolicyMetadatas policyMetadatas() {
if (this.policyMetadatas == null) {
this.policyMetadatas = new PolicyMetadatasImpl(clientObject.getPolicyMetadatas(), this);
@@ -301,7 +361,11 @@ public PolicyMetadatas policyMetadatas() {
return policyMetadatas;
}
- /** @return Resource collection API of PolicyRestrictions. */
+ /**
+ * Gets the resource collection API of PolicyRestrictions.
+ *
+ * @return Resource collection API of PolicyRestrictions.
+ */
public PolicyRestrictions policyRestrictions() {
if (this.policyRestrictions == null) {
this.policyRestrictions = new PolicyRestrictionsImpl(clientObject.getPolicyRestrictions(), this);
@@ -309,7 +373,11 @@ public PolicyRestrictions policyRestrictions() {
return policyRestrictions;
}
- /** @return Resource collection API of Attestations. */
+ /**
+ * Gets the resource collection API of Attestations. It manages Attestation.
+ *
+ * @return Resource collection API of Attestations.
+ */
public Attestations attestations() {
if (this.attestations == null) {
this.attestations = new AttestationsImpl(clientObject.getAttestations(), this);
diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/AttestationsClient.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/AttestationsClient.java
index 27762cb0732b..2d8e3958436d 100644
--- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/AttestationsClient.java
+++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/AttestationsClient.java
@@ -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 list();
@@ -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 list(Integer top, String filter, Context context);
@@ -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, AttestationInner> beginCreateOrUpdateAtSubscription(
@@ -62,7 +62,7 @@ SyncPoller, 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, AttestationInner> beginCreateOrUpdateAtSubscription(
@@ -115,7 +115,7 @@ SyncPoller, 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 getAtSubscriptionWithResponse(String attestationName, Context context);
@@ -139,7 +139,7 @@ SyncPoller, 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 deleteAtSubscriptionWithResponse(String attestationName, Context context);
@@ -151,7 +151,7 @@ SyncPoller, 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 listByResourceGroup(String resourceGroupName);
@@ -166,7 +166,7 @@ SyncPoller, 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 listByResourceGroup(
@@ -181,7 +181,7 @@ PagedIterable 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, AttestationInner> beginCreateOrUpdateAtResourceGroup(
@@ -197,7 +197,7 @@ SyncPoller, 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, AttestationInner> beginCreateOrUpdateAtResourceGroup(
@@ -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 getByResourceGroupWithResponse(
@@ -283,7 +283,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 response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(String resourceGroupName, String attestationName, Context context);
@@ -295,7 +295,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 all attestations for a resource.
+ * @return all attestations for a resource as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listForResource(String resourceId);
@@ -310,7 +310,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 all attestations for a resource.
+ * @return all attestations for a resource as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listForResource(String resourceId, Integer top, String filter, Context context);
@@ -324,7 +324,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 an attestation resource.
+ * @return the {@link SyncPoller} for polling of an attestation resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, AttestationInner> beginCreateOrUpdateAtResource(
@@ -340,7 +340,7 @@ SyncPoller, 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, AttestationInner> beginCreateOrUpdateAtResource(
@@ -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 getAtResourceWithResponse(String resourceId, String attestationName, Context context);
@@ -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 deleteAtResourceWithResponse(String resourceId, String attestationName, Context context);
diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/OperationsClient.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/OperationsClient.java
index fd08a116756e..eee9909301ad 100644
--- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/OperationsClient.java
+++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/OperationsClient.java
@@ -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 listWithResponse(Context context);
diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyEventsClient.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyEventsClient.java
index 3d264be6c247..4375008175a2 100644
--- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyEventsClient.java
+++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyEventsClient.java
@@ -9,6 +9,7 @@
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
import com.azure.resourcemanager.policyinsights.fluent.models.PolicyEventInner;
+import com.azure.resourcemanager.policyinsights.models.PolicyEventsResourceType;
import java.time.OffsetDateTime;
/** An instance of this class provides access to all the operations defined in PolicyEventsClient. */
@@ -16,18 +17,23 @@ public interface PolicyEventsClient {
/**
* Queries policy events for the resources under the management group.
*
+ * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is
+ * allowed.
* @param managementGroupName Management group name.
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listQueryResultsForManagementGroup(String managementGroupName);
+ PagedIterable listQueryResultsForManagementGroup(
+ PolicyEventsResourceType policyEventsResource, String managementGroupName);
/**
* Queries policy events for the resources under the management group.
*
+ * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is
+ * allowed.
* @param managementGroupName Management group name.
* @param top Maximum number of records to return.
* @param orderBy Ordering expression using OData notation. One or more comma-separated column names with an
@@ -46,10 +52,11 @@ public interface PolicyEventsClient {
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForManagementGroup(
+ PolicyEventsResourceType policyEventsResource,
String managementGroupName,
Integer top,
String orderBy,
@@ -64,18 +71,23 @@ PagedIterable listQueryResultsForManagementGroup(
/**
* Queries policy events for the resources under the subscription.
*
+ * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is
+ * allowed.
* @param subscriptionId Microsoft Azure subscription ID.
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listQueryResultsForSubscription(String subscriptionId);
+ PagedIterable listQueryResultsForSubscription(
+ PolicyEventsResourceType policyEventsResource, String subscriptionId);
/**
* Queries policy events for the resources under the subscription.
*
+ * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is
+ * allowed.
* @param subscriptionId Microsoft Azure subscription ID.
* @param top Maximum number of records to return.
* @param orderBy Ordering expression using OData notation. One or more comma-separated column names with an
@@ -94,10 +106,11 @@ PagedIterable listQueryResultsForManagementGroup(
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForSubscription(
+ PolicyEventsResourceType policyEventsResource,
String subscriptionId,
Integer top,
String orderBy,
@@ -112,19 +125,24 @@ PagedIterable listQueryResultsForSubscription(
/**
* Queries policy events for the resources under the resource group.
*
+ * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is
+ * allowed.
* @param subscriptionId Microsoft Azure subscription ID.
* @param resourceGroupName Resource group name.
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listQueryResultsForResourceGroup(String subscriptionId, String resourceGroupName);
+ PagedIterable listQueryResultsForResourceGroup(
+ PolicyEventsResourceType policyEventsResource, String subscriptionId, String resourceGroupName);
/**
* Queries policy events for the resources under the resource group.
*
+ * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is
+ * allowed.
* @param subscriptionId Microsoft Azure subscription ID.
* @param resourceGroupName Resource group name.
* @param top Maximum number of records to return.
@@ -144,10 +162,11 @@ PagedIterable listQueryResultsForSubscription(
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForResourceGroup(
+ PolicyEventsResourceType policyEventsResource,
String subscriptionId,
String resourceGroupName,
Integer top,
@@ -163,18 +182,23 @@ PagedIterable listQueryResultsForResourceGroup(
/**
* Queries policy events for the resource.
*
+ * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is
+ * allowed.
* @param resourceId Resource ID.
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listQueryResultsForResource(String resourceId);
+ PagedIterable listQueryResultsForResource(
+ PolicyEventsResourceType policyEventsResource, String resourceId);
/**
* Queries policy events for the resource.
*
+ * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is
+ * allowed.
* @param resourceId Resource ID.
* @param top Maximum number of records to return.
* @param orderBy Ordering expression using OData notation. One or more comma-separated column names with an
@@ -194,10 +218,11 @@ PagedIterable listQueryResultsForResourceGroup(
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForResource(
+ PolicyEventsResourceType policyEventsResource,
String resourceId,
Integer top,
String orderBy,
@@ -213,20 +238,24 @@ PagedIterable listQueryResultsForResource(
/**
* Queries policy events for the subscription level policy set definition.
*
+ * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is
+ * allowed.
* @param subscriptionId Microsoft Azure subscription ID.
* @param policySetDefinitionName Policy set definition name.
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForPolicySetDefinition(
- String subscriptionId, String policySetDefinitionName);
+ PolicyEventsResourceType policyEventsResource, String subscriptionId, String policySetDefinitionName);
/**
* Queries policy events for the subscription level policy set definition.
*
+ * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is
+ * allowed.
* @param subscriptionId Microsoft Azure subscription ID.
* @param policySetDefinitionName Policy set definition name.
* @param top Maximum number of records to return.
@@ -246,10 +275,11 @@ PagedIterable listQueryResultsForPolicySetDefinition(
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForPolicySetDefinition(
+ PolicyEventsResourceType policyEventsResource,
String subscriptionId,
String policySetDefinitionName,
Integer top,
@@ -265,20 +295,24 @@ PagedIterable listQueryResultsForPolicySetDefinition(
/**
* Queries policy events for the subscription level policy definition.
*
+ * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is
+ * allowed.
* @param subscriptionId Microsoft Azure subscription ID.
* @param policyDefinitionName Policy definition name.
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForPolicyDefinition(
- String subscriptionId, String policyDefinitionName);
+ PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyDefinitionName);
/**
* Queries policy events for the subscription level policy definition.
*
+ * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is
+ * allowed.
* @param subscriptionId Microsoft Azure subscription ID.
* @param policyDefinitionName Policy definition name.
* @param top Maximum number of records to return.
@@ -298,10 +332,11 @@ PagedIterable listQueryResultsForPolicyDefinition(
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForPolicyDefinition(
+ PolicyEventsResourceType policyEventsResource,
String subscriptionId,
String policyDefinitionName,
Integer top,
@@ -317,20 +352,24 @@ PagedIterable listQueryResultsForPolicyDefinition(
/**
* Queries policy events for the subscription level policy assignment.
*
+ * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is
+ * allowed.
* @param subscriptionId Microsoft Azure subscription ID.
* @param policyAssignmentName Policy assignment name.
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForSubscriptionLevelPolicyAssignment(
- String subscriptionId, String policyAssignmentName);
+ PolicyEventsResourceType policyEventsResource, String subscriptionId, String policyAssignmentName);
/**
* Queries policy events for the subscription level policy assignment.
*
+ * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is
+ * allowed.
* @param subscriptionId Microsoft Azure subscription ID.
* @param policyAssignmentName Policy assignment name.
* @param top Maximum number of records to return.
@@ -350,10 +389,11 @@ PagedIterable listQueryResultsForSubscriptionLevelPolicyAssign
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForSubscriptionLevelPolicyAssignment(
+ PolicyEventsResourceType policyEventsResource,
String subscriptionId,
String policyAssignmentName,
Integer top,
@@ -369,21 +409,28 @@ PagedIterable listQueryResultsForSubscriptionLevelPolicyAssign
/**
* Queries policy events for the resource group level policy assignment.
*
+ * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is
+ * allowed.
* @param subscriptionId Microsoft Azure subscription ID.
* @param resourceGroupName Resource group name.
* @param policyAssignmentName Policy assignment name.
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForResourceGroupLevelPolicyAssignment(
- String subscriptionId, String resourceGroupName, String policyAssignmentName);
+ PolicyEventsResourceType policyEventsResource,
+ String subscriptionId,
+ String resourceGroupName,
+ String policyAssignmentName);
/**
* Queries policy events for the resource group level policy assignment.
*
+ * @param policyEventsResource The name of the virtual resource under PolicyEvents resource type; only "default" is
+ * allowed.
* @param subscriptionId Microsoft Azure subscription ID.
* @param resourceGroupName Resource group name.
* @param policyAssignmentName Policy assignment name.
@@ -404,10 +451,11 @@ PagedIterable listQueryResultsForResourceGroupLevelPolicyAssig
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForResourceGroupLevelPolicyAssignment(
+ PolicyEventsResourceType policyEventsResource,
String subscriptionId,
String resourceGroupName,
String policyAssignmentName,
diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyMetadatasClient.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyMetadatasClient.java
index 9a2b70311eaa..50215392d46b 100644
--- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyMetadatasClient.java
+++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyMetadatasClient.java
@@ -34,7 +34,7 @@ public interface PolicyMetadatasClient {
* @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 policy metadata resource.
+ * @return policy metadata resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getResourceWithResponse(String resourceName, Context context);
@@ -44,7 +44,7 @@ public interface PolicyMetadatasClient {
*
* @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 a list of the policy metadata resources.
+ * @return a list of the policy metadata resources as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -57,7 +57,7 @@ public interface PolicyMetadatasClient {
* @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 a list of the policy metadata resources.
+ * @return a list of the policy metadata resources as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Integer top, Context context);
diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyRestrictionsClient.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyRestrictionsClient.java
index a08ccecbf477..b3a85082a49f 100644
--- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyRestrictionsClient.java
+++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyRestrictionsClient.java
@@ -9,6 +9,7 @@
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.policyinsights.fluent.models.CheckRestrictionsResultInner;
+import com.azure.resourcemanager.policyinsights.models.CheckManagementGroupRestrictionsRequest;
import com.azure.resourcemanager.policyinsights.models.CheckRestrictionsRequest;
/** An instance of this class provides access to all the operations defined in PolicyRestrictionsClient. */
@@ -33,7 +34,7 @@ public interface PolicyRestrictionsClient {
* @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 a check policy restrictions evaluation on a resource.
+ * @return the result of a check policy restrictions evaluation on a resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response checkAtSubscriptionScopeWithResponse(
@@ -64,9 +65,38 @@ CheckRestrictionsResultInner checkAtResourceGroupScope(
* @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 a check policy restrictions evaluation on a resource.
+ * @return the result of a check policy restrictions evaluation on a resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response checkAtResourceGroupScopeWithResponse(
String resourceGroupName, CheckRestrictionsRequest parameters, Context context);
+
+ /**
+ * Checks what restrictions Azure Policy will place on resources within a management group.
+ *
+ * @param managementGroupId Management group ID.
+ * @param parameters The check policy restrictions parameters.
+ * @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 a check policy restrictions evaluation on a resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CheckRestrictionsResultInner checkAtManagementGroupScope(
+ String managementGroupId, CheckManagementGroupRestrictionsRequest parameters);
+
+ /**
+ * Checks what restrictions Azure Policy will place on resources within a management group.
+ *
+ * @param managementGroupId Management group ID.
+ * @param parameters The check policy restrictions parameters.
+ * @param context The context to associate with this operation.
+ * @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 a check policy restrictions evaluation on a resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response checkAtManagementGroupScopeWithResponse(
+ String managementGroupId, CheckManagementGroupRestrictionsRequest parameters, Context context);
}
diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyStatesClient.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyStatesClient.java
index 174231c66d88..0225dda114a6 100644
--- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyStatesClient.java
+++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyStatesClient.java
@@ -14,6 +14,7 @@
import com.azure.resourcemanager.policyinsights.fluent.models.PolicyStateInner;
import com.azure.resourcemanager.policyinsights.fluent.models.SummarizeResultsInner;
import com.azure.resourcemanager.policyinsights.models.PolicyStatesResource;
+import com.azure.resourcemanager.policyinsights.models.PolicyStatesSummaryResourceType;
import java.time.OffsetDateTime;
/** An instance of this class provides access to all the operations defined in PolicyStatesClient. */
@@ -27,7 +28,7 @@ public interface PolicyStatesClient {
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForManagementGroup(
@@ -56,7 +57,7 @@ PagedIterable listQueryResultsForManagementGroup(
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForManagementGroup(
@@ -75,6 +76,8 @@ PagedIterable listQueryResultsForManagementGroup(
/**
* Summarizes policy states for the resources under the management group.
*
+ * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In
+ * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.
* @param managementGroupName Management group name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -82,11 +85,14 @@ PagedIterable listQueryResultsForManagementGroup(
* @return summarize action results.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SummarizeResultsInner summarizeForManagementGroup(String managementGroupName);
+ SummarizeResultsInner summarizeForManagementGroup(
+ PolicyStatesSummaryResourceType policyStatesSummaryResource, String managementGroupName);
/**
* Summarizes policy states for the resources under the management group.
*
+ * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In
+ * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.
* @param managementGroupName Management group name.
* @param top Maximum number of records to return.
* @param from ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified,
@@ -98,10 +104,11 @@ PagedIterable listQueryResultsForManagementGroup(
* @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 summarize action results.
+ * @return summarize action results along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response summarizeForManagementGroupWithResponse(
+ PolicyStatesSummaryResourceType policyStatesSummaryResource,
String managementGroupName,
Integer top,
OffsetDateTime from,
@@ -118,7 +125,7 @@ Response summarizeForManagementGroupWithResponse(
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForSubscription(
@@ -147,7 +154,7 @@ PagedIterable listQueryResultsForSubscription(
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForSubscription(
@@ -166,6 +173,8 @@ PagedIterable listQueryResultsForSubscription(
/**
* Summarizes policy states for the resources under the subscription.
*
+ * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In
+ * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.
* @param subscriptionId Microsoft Azure subscription ID.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -173,11 +182,14 @@ PagedIterable listQueryResultsForSubscription(
* @return summarize action results.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SummarizeResultsInner summarizeForSubscription(String subscriptionId);
+ SummarizeResultsInner summarizeForSubscription(
+ PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId);
/**
* Summarizes policy states for the resources under the subscription.
*
+ * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In
+ * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.
* @param subscriptionId Microsoft Azure subscription ID.
* @param top Maximum number of records to return.
* @param from ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified,
@@ -189,11 +201,17 @@ PagedIterable listQueryResultsForSubscription(
* @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 summarize action results.
+ * @return summarize action results along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response summarizeForSubscriptionWithResponse(
- String subscriptionId, Integer top, OffsetDateTime from, OffsetDateTime to, String filter, Context context);
+ PolicyStatesSummaryResourceType policyStatesSummaryResource,
+ String subscriptionId,
+ Integer top,
+ OffsetDateTime from,
+ OffsetDateTime to,
+ String filter,
+ Context context);
/**
* Queries policy states for the resources under the resource group.
@@ -205,7 +223,7 @@ Response summarizeForSubscriptionWithResponse(
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForResourceGroup(
@@ -235,7 +253,7 @@ PagedIterable listQueryResultsForResourceGroup(
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForResourceGroup(
@@ -255,6 +273,8 @@ PagedIterable listQueryResultsForResourceGroup(
/**
* Summarizes policy states for the resources under the resource group.
*
+ * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In
+ * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.
* @param subscriptionId Microsoft Azure subscription ID.
* @param resourceGroupName Resource group name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -263,11 +283,14 @@ PagedIterable listQueryResultsForResourceGroup(
* @return summarize action results.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SummarizeResultsInner summarizeForResourceGroup(String subscriptionId, String resourceGroupName);
+ SummarizeResultsInner summarizeForResourceGroup(
+ PolicyStatesSummaryResourceType policyStatesSummaryResource, String subscriptionId, String resourceGroupName);
/**
* Summarizes policy states for the resources under the resource group.
*
+ * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In
+ * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.
* @param subscriptionId Microsoft Azure subscription ID.
* @param resourceGroupName Resource group name.
* @param top Maximum number of records to return.
@@ -280,10 +303,11 @@ PagedIterable listQueryResultsForResourceGroup(
* @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 summarize action results.
+ * @return summarize action results along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response summarizeForResourceGroupWithResponse(
+ PolicyStatesSummaryResourceType policyStatesSummaryResource,
String subscriptionId,
String resourceGroupName,
Integer top,
@@ -301,7 +325,7 @@ Response summarizeForResourceGroupWithResponse(
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForResource(
@@ -331,7 +355,7 @@ PagedIterable listQueryResultsForResource(
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForResource(
@@ -351,6 +375,8 @@ PagedIterable listQueryResultsForResource(
/**
* Summarizes policy states for the resource.
*
+ * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In
+ * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.
* @param resourceId Resource ID.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -358,11 +384,14 @@ PagedIterable listQueryResultsForResource(
* @return summarize action results.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SummarizeResultsInner summarizeForResource(String resourceId);
+ SummarizeResultsInner summarizeForResource(
+ PolicyStatesSummaryResourceType policyStatesSummaryResource, String resourceId);
/**
* Summarizes policy states for the resource.
*
+ * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In
+ * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.
* @param resourceId Resource ID.
* @param top Maximum number of records to return.
* @param from ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified,
@@ -374,11 +403,17 @@ PagedIterable listQueryResultsForResource(
* @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 summarize action results.
+ * @return summarize action results along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response summarizeForResourceWithResponse(
- String resourceId, Integer top, OffsetDateTime from, OffsetDateTime to, String filter, Context context);
+ PolicyStatesSummaryResourceType policyStatesSummaryResource,
+ String resourceId,
+ Integer top,
+ OffsetDateTime from,
+ OffsetDateTime to,
+ String filter,
+ Context context);
/**
* Triggers a policy evaluation scan for all the resources under the subscription.
@@ -387,7 +422,7 @@ Response summarizeForResourceWithResponse(
* @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> beginTriggerSubscriptionEvaluation(String subscriptionId);
@@ -400,7 +435,7 @@ Response summarizeForResourceWithResponse(
* @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> beginTriggerSubscriptionEvaluation(String subscriptionId, Context context);
@@ -436,7 +471,7 @@ Response summarizeForResourceWithResponse(
* @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> beginTriggerResourceGroupEvaluation(
@@ -451,7 +486,7 @@ SyncPoller, Void> beginTriggerResourceGroupEvaluation(
* @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> beginTriggerResourceGroupEvaluation(
@@ -492,7 +527,7 @@ SyncPoller, Void> beginTriggerResourceGroupEvaluation(
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForPolicySetDefinition(
@@ -522,7 +557,7 @@ PagedIterable listQueryResultsForPolicySetDefinition(
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForPolicySetDefinition(
@@ -542,6 +577,8 @@ PagedIterable listQueryResultsForPolicySetDefinition(
/**
* Summarizes policy states for the subscription level policy set definition.
*
+ * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In
+ * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.
* @param subscriptionId Microsoft Azure subscription ID.
* @param policySetDefinitionName Policy set definition name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -550,11 +587,16 @@ PagedIterable listQueryResultsForPolicySetDefinition(
* @return summarize action results.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SummarizeResultsInner summarizeForPolicySetDefinition(String subscriptionId, String policySetDefinitionName);
+ SummarizeResultsInner summarizeForPolicySetDefinition(
+ PolicyStatesSummaryResourceType policyStatesSummaryResource,
+ String subscriptionId,
+ String policySetDefinitionName);
/**
* Summarizes policy states for the subscription level policy set definition.
*
+ * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In
+ * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.
* @param subscriptionId Microsoft Azure subscription ID.
* @param policySetDefinitionName Policy set definition name.
* @param top Maximum number of records to return.
@@ -567,10 +609,11 @@ PagedIterable listQueryResultsForPolicySetDefinition(
* @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 summarize action results.
+ * @return summarize action results along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response summarizeForPolicySetDefinitionWithResponse(
+ PolicyStatesSummaryResourceType policyStatesSummaryResource,
String subscriptionId,
String policySetDefinitionName,
Integer top,
@@ -589,7 +632,7 @@ Response summarizeForPolicySetDefinitionWithResponse(
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForPolicyDefinition(
@@ -619,7 +662,7 @@ PagedIterable listQueryResultsForPolicyDefinition(
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForPolicyDefinition(
@@ -639,6 +682,8 @@ PagedIterable listQueryResultsForPolicyDefinition(
/**
* Summarizes policy states for the subscription level policy definition.
*
+ * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In
+ * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.
* @param subscriptionId Microsoft Azure subscription ID.
* @param policyDefinitionName Policy definition name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -647,11 +692,16 @@ PagedIterable listQueryResultsForPolicyDefinition(
* @return summarize action results.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SummarizeResultsInner summarizeForPolicyDefinition(String subscriptionId, String policyDefinitionName);
+ SummarizeResultsInner summarizeForPolicyDefinition(
+ PolicyStatesSummaryResourceType policyStatesSummaryResource,
+ String subscriptionId,
+ String policyDefinitionName);
/**
* Summarizes policy states for the subscription level policy definition.
*
+ * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In
+ * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.
* @param subscriptionId Microsoft Azure subscription ID.
* @param policyDefinitionName Policy definition name.
* @param top Maximum number of records to return.
@@ -664,10 +714,11 @@ PagedIterable listQueryResultsForPolicyDefinition(
* @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 summarize action results.
+ * @return summarize action results along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response summarizeForPolicyDefinitionWithResponse(
+ PolicyStatesSummaryResourceType policyStatesSummaryResource,
String subscriptionId,
String policyDefinitionName,
Integer top,
@@ -686,7 +737,7 @@ Response summarizeForPolicyDefinitionWithResponse(
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForSubscriptionLevelPolicyAssignment(
@@ -716,7 +767,7 @@ PagedIterable listQueryResultsForSubscriptionLevelPolicyAssign
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForSubscriptionLevelPolicyAssignment(
@@ -736,6 +787,8 @@ PagedIterable listQueryResultsForSubscriptionLevelPolicyAssign
/**
* Summarizes policy states for the subscription level policy assignment.
*
+ * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In
+ * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.
* @param subscriptionId Microsoft Azure subscription ID.
* @param policyAssignmentName Policy assignment name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -745,11 +798,15 @@ PagedIterable listQueryResultsForSubscriptionLevelPolicyAssign
*/
@ServiceMethod(returns = ReturnType.SINGLE)
SummarizeResultsInner summarizeForSubscriptionLevelPolicyAssignment(
- String subscriptionId, String policyAssignmentName);
+ PolicyStatesSummaryResourceType policyStatesSummaryResource,
+ String subscriptionId,
+ String policyAssignmentName);
/**
* Summarizes policy states for the subscription level policy assignment.
*
+ * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In
+ * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.
* @param subscriptionId Microsoft Azure subscription ID.
* @param policyAssignmentName Policy assignment name.
* @param top Maximum number of records to return.
@@ -762,10 +819,11 @@ SummarizeResultsInner summarizeForSubscriptionLevelPolicyAssignment(
* @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 summarize action results.
+ * @return summarize action results along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response summarizeForSubscriptionLevelPolicyAssignmentWithResponse(
+ PolicyStatesSummaryResourceType policyStatesSummaryResource,
String subscriptionId,
String policyAssignmentName,
Integer top,
@@ -785,7 +843,7 @@ Response summarizeForSubscriptionLevelPolicyAssignmentWit
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForResourceGroupLevelPolicyAssignment(
@@ -819,7 +877,7 @@ PagedIterable listQueryResultsForResourceGroupLevelPolicyAssig
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForResourceGroupLevelPolicyAssignment(
@@ -840,6 +898,8 @@ PagedIterable listQueryResultsForResourceGroupLevelPolicyAssig
/**
* Summarizes policy states for the resource group level policy assignment.
*
+ * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In
+ * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.
* @param subscriptionId Microsoft Azure subscription ID.
* @param resourceGroupName Resource group name.
* @param policyAssignmentName Policy assignment name.
@@ -850,11 +910,16 @@ PagedIterable listQueryResultsForResourceGroupLevelPolicyAssig
*/
@ServiceMethod(returns = ReturnType.SINGLE)
SummarizeResultsInner summarizeForResourceGroupLevelPolicyAssignment(
- String subscriptionId, String resourceGroupName, String policyAssignmentName);
+ PolicyStatesSummaryResourceType policyStatesSummaryResource,
+ String subscriptionId,
+ String resourceGroupName,
+ String policyAssignmentName);
/**
* Summarizes policy states for the resource group level policy assignment.
*
+ * @param policyStatesSummaryResource The virtual resource under PolicyStates resource type for summarize action. In
+ * a given time range, 'latest' represents the latest policy state(s) and is the only allowed value.
* @param subscriptionId Microsoft Azure subscription ID.
* @param resourceGroupName Resource group name.
* @param policyAssignmentName Policy assignment name.
@@ -868,10 +933,11 @@ SummarizeResultsInner summarizeForResourceGroupLevelPolicyAssignment(
* @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 summarize action results.
+ * @return summarize action results along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response summarizeForResourceGroupLevelPolicyAssignmentWithResponse(
+ PolicyStatesSummaryResourceType policyStatesSummaryResource,
String subscriptionId,
String resourceGroupName,
String policyAssignmentName,
diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyTrackedResourcesClient.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyTrackedResourcesClient.java
index b5d666030045..4c2fde558440 100644
--- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyTrackedResourcesClient.java
+++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/PolicyTrackedResourcesClient.java
@@ -9,6 +9,7 @@
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
import com.azure.resourcemanager.policyinsights.fluent.models.PolicyTrackedResourceInner;
+import com.azure.resourcemanager.policyinsights.models.PolicyTrackedResourcesResourceType;
/** An instance of this class provides access to all the operations defined in PolicyTrackedResourcesClient. */
public interface PolicyTrackedResourcesClient {
@@ -16,108 +17,141 @@ public interface PolicyTrackedResourcesClient {
* Queries policy tracked resources under the management group.
*
* @param managementGroupName Management group name.
+ * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource
+ * type; only "default" is allowed.
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listQueryResultsForManagementGroup(String managementGroupName);
+ PagedIterable listQueryResultsForManagementGroup(
+ String managementGroupName, PolicyTrackedResourcesResourceType policyTrackedResourcesResource);
/**
* Queries policy tracked resources under the management group.
*
* @param managementGroupName Management group name.
+ * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource
+ * type; only "default" is allowed.
* @param top Maximum number of records to return.
* @param filter OData filter expression.
* @param context The context to associate with this operation.
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForManagementGroup(
- String managementGroupName, Integer top, String filter, Context context);
+ String managementGroupName,
+ PolicyTrackedResourcesResourceType policyTrackedResourcesResource,
+ Integer top,
+ String filter,
+ Context context);
/**
* Queries policy tracked resources under the subscription.
*
+ * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource
+ * type; only "default" is allowed.
+ * @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listQueryResultsForSubscription();
+ PagedIterable listQueryResultsForSubscription(
+ PolicyTrackedResourcesResourceType policyTrackedResourcesResource);
/**
* Queries policy tracked resources under the subscription.
*
+ * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource
+ * type; only "default" is allowed.
* @param top Maximum number of records to return.
* @param filter OData filter expression.
* @param context The context to associate with this operation.
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForSubscription(
- Integer top, String filter, Context context);
+ PolicyTrackedResourcesResourceType policyTrackedResourcesResource, Integer top, String filter, Context context);
/**
* Queries policy tracked resources under the resource group.
*
* @param resourceGroupName Resource group name.
+ * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource
+ * type; only "default" is allowed.
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listQueryResultsForResourceGroup(String resourceGroupName);
+ PagedIterable listQueryResultsForResourceGroup(
+ String resourceGroupName, PolicyTrackedResourcesResourceType policyTrackedResourcesResource);
/**
* Queries policy tracked resources under the resource group.
*
* @param resourceGroupName Resource group name.
+ * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource
+ * type; only "default" is allowed.
* @param top Maximum number of records to return.
* @param filter OData filter expression.
* @param context The context to associate with this operation.
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForResourceGroup(
- String resourceGroupName, Integer top, String filter, Context context);
+ String resourceGroupName,
+ PolicyTrackedResourcesResourceType policyTrackedResourcesResource,
+ Integer top,
+ String filter,
+ Context context);
/**
* Queries policy tracked resources under the resource.
*
* @param resourceId Resource ID.
+ * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource
+ * type; only "default" is allowed.
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listQueryResultsForResource(String resourceId);
+ PagedIterable listQueryResultsForResource(
+ String resourceId, PolicyTrackedResourcesResourceType policyTrackedResourcesResource);
/**
* Queries policy tracked resources under the resource.
*
* @param resourceId Resource ID.
+ * @param policyTrackedResourcesResource The name of the virtual resource under PolicyTrackedResources resource
+ * type; only "default" is allowed.
* @param top Maximum number of records to return.
* @param filter OData filter expression.
* @param context The context to associate with this operation.
* @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 query results.
+ * @return query results as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listQueryResultsForResource(
- String resourceId, Integer top, String filter, Context context);
+ String resourceId,
+ PolicyTrackedResourcesResourceType policyTrackedResourcesResource,
+ Integer top,
+ String filter,
+ Context context);
}
diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/RemediationsClient.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/RemediationsClient.java
index 9e0e7fcaf5b8..14fc4d02baac 100644
--- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/RemediationsClient.java
+++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/RemediationsClient.java
@@ -22,7 +22,8 @@ public interface RemediationsClient {
* @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 deployments for a remediation at management group scope.
+ * @return all deployments for a remediation at management group scope as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listDeploymentsAtManagementGroup(
@@ -38,7 +39,8 @@ PagedIterable listDeploymentsAtManagementGroup(
* @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 deployments for a remediation at management group scope.
+ * @return all deployments for a remediation at management group scope as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listDeploymentsAtManagementGroup(
@@ -66,7 +68,7 @@ PagedIterable listDeploymentsAtManagementGroup(
* @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 remediation definition.
+ * @return the remediation definition along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response cancelAtManagementGroupWithResponse(
@@ -79,7 +81,7 @@ Response cancelAtManagementGroupWithResponse(
* @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 remediations for the management group.
+ * @return all remediations for the management group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listForManagementGroup(String managementGroupId);
@@ -94,7 +96,7 @@ Response cancelAtManagementGroupWithResponse(
* @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 remediations for the management group.
+ * @return all remediations for the management group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listForManagementGroup(
@@ -125,7 +127,7 @@ RemediationInner createOrUpdateAtManagementGroup(
* @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 remediation definition.
+ * @return the remediation definition along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateAtManagementGroupWithResponse(
@@ -153,7 +155,7 @@ Response createOrUpdateAtManagementGroupWithResponse(
* @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 remediation at management group scope.
+ * @return an existing remediation at management group scope along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getAtManagementGroupWithResponse(
@@ -181,7 +183,7 @@ Response getAtManagementGroupWithResponse(
* @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 remediation definition.
+ * @return the remediation definition along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteAtManagementGroupWithResponse(
@@ -194,7 +196,7 @@ Response deleteAtManagementGroupWithResponse(
* @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 deployments for a remediation at subscription scope.
+ * @return all deployments for a remediation at subscription scope as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listDeploymentsAtSubscription(String remediationName);
@@ -208,7 +210,7 @@ Response deleteAtManagementGroupWithResponse(
* @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 deployments for a remediation at subscription scope.
+ * @return all deployments for a remediation at subscription scope as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listDeploymentsAtSubscription(
@@ -234,7 +236,7 @@ PagedIterable listDeploymentsAtSubscription(
* @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 remediation definition.
+ * @return the remediation definition along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response cancelAtSubscriptionWithResponse(String remediationName, Context context);
@@ -244,7 +246,7 @@ PagedIterable listDeploymentsAtSubscription(
*
* @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 remediations for the subscription.
+ * @return all remediations for the subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -258,7 +260,7 @@ PagedIterable listDeploymentsAtSubscription(
* @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 remediations for the subscription.
+ * @return all remediations for the subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Integer top, String filter, Context context);
@@ -285,7 +287,7 @@ PagedIterable listDeploymentsAtSubscription(
* @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 remediation definition.
+ * @return the remediation definition along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateAtSubscriptionWithResponse(
@@ -311,7 +313,7 @@ Response createOrUpdateAtSubscriptionWithResponse(
* @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 remediation at subscription scope.
+ * @return an existing remediation at subscription scope along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getAtSubscriptionWithResponse(String remediationName, Context context);
@@ -336,7 +338,7 @@ Response createOrUpdateAtSubscriptionWithResponse(
* @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 remediation definition.
+ * @return the remediation definition along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteAtSubscriptionWithResponse(String remediationName, Context context);
@@ -349,7 +351,8 @@ Response createOrUpdateAtSubscriptionWithResponse(
* @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 deployments for a remediation at resource group scope.
+ * @return all deployments for a remediation at resource group scope as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listDeploymentsAtResourceGroup(
@@ -365,7 +368,8 @@ PagedIterable listDeploymentsAtResourceGroup(
* @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 deployments for a remediation at resource group scope.
+ * @return all deployments for a remediation at resource group scope as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listDeploymentsAtResourceGroup(
@@ -393,7 +397,7 @@ PagedIterable listDeploymentsAtResourceGroup(
* @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 remediation definition.
+ * @return the remediation definition along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response cancelAtResourceGroupWithResponse(
@@ -406,7 +410,7 @@ Response cancelAtResourceGroupWithResponse(
* @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 remediations for the subscription.
+ * @return all remediations for the subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -421,7 +425,7 @@ Response cancelAtResourceGroupWithResponse(
* @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 remediations for the subscription.
+ * @return all remediations for the subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(
@@ -452,7 +456,7 @@ RemediationInner 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 the remediation definition.
+ * @return the remediation definition along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateAtResourceGroupWithResponse(
@@ -480,7 +484,7 @@ Response createOrUpdateAtResourceGroupWithResponse(
* @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 remediation at resource group scope.
+ * @return an existing remediation at resource group scope along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(
@@ -508,7 +512,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 remediation definition.
+ * @return the remediation definition along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(String resourceGroupName, String remediationName, Context context);
@@ -521,7 +525,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 all deployments for a remediation at resource scope.
+ * @return all deployments for a remediation at resource scope as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listDeploymentsAtResource(String resourceId, String remediationName);
@@ -536,7 +540,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 all deployments for a remediation at resource scope.
+ * @return all deployments for a remediation at resource scope as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listDeploymentsAtResource(
@@ -564,7 +568,7 @@ PagedIterable listDeploymentsAtResource(
* @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 remediation definition.
+ * @return the remediation definition along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response cancelAtResourceWithResponse(String resourceId, String remediationName, Context context);
@@ -576,7 +580,7 @@ PagedIterable listDeploymentsAtResource(
* @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 remediations for a resource.
+ * @return all remediations for a resource as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listForResource(String resourceId);
@@ -591,7 +595,7 @@ PagedIterable listDeploymentsAtResource(
* @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 remediations for a resource.
+ * @return all remediations for a resource as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listForResource(String resourceId, Integer top, String filter, Context context);
@@ -620,7 +624,7 @@ PagedIterable listDeploymentsAtResource(
* @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 remediation definition.
+ * @return the remediation definition along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateAtResourceWithResponse(
@@ -648,7 +652,7 @@ Response createOrUpdateAtResourceWithResponse(
* @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 remediation at resource scope.
+ * @return an existing remediation at resource scope along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getAtResourceWithResponse(String resourceId, String remediationName, Context context);
@@ -675,7 +679,7 @@ Response createOrUpdateAtResourceWithResponse(
* @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 remediation definition.
+ * @return the remediation definition along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteAtResourceWithResponse(String resourceId, String remediationName, Context context);
diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/AttestationInner.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/AttestationInner.java
index a449e250c40f..e21d96b22733 100644
--- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/AttestationInner.java
+++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/AttestationInner.java
@@ -10,7 +10,6 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.policyinsights.models.AttestationEvidence;
import com.azure.resourcemanager.policyinsights.models.ComplianceState;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.List;
@@ -18,8 +17,6 @@
/** An attestation resource. */
@Fluent
public final class AttestationInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(AttestationInner.class);
-
/*
* Properties for the attestation.
*/
@@ -27,8 +24,7 @@ public final class AttestationInner extends ProxyResource {
private AttestationProperties innerProperties = new AttestationProperties();
/*
- * Azure Resource Manager metadata containing createdBy and modifiedBy
- * information.
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
@@ -240,6 +236,52 @@ public OffsetDateTime lastComplianceStateChangeAt() {
return this.innerProperties() == null ? null : this.innerProperties().lastComplianceStateChangeAt();
}
+ /**
+ * Get the assessmentDate property: The time the evidence was assessed.
+ *
+ * @return the assessmentDate value.
+ */
+ public OffsetDateTime assessmentDate() {
+ return this.innerProperties() == null ? null : this.innerProperties().assessmentDate();
+ }
+
+ /**
+ * Set the assessmentDate property: The time the evidence was assessed.
+ *
+ * @param assessmentDate the assessmentDate value to set.
+ * @return the AttestationInner object itself.
+ */
+ public AttestationInner withAssessmentDate(OffsetDateTime assessmentDate) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AttestationProperties();
+ }
+ this.innerProperties().withAssessmentDate(assessmentDate);
+ return this;
+ }
+
+ /**
+ * Get the metadata property: Additional metadata for this attestation.
+ *
+ * @return the metadata value.
+ */
+ public Object metadata() {
+ return this.innerProperties() == null ? null : this.innerProperties().metadata();
+ }
+
+ /**
+ * Set the metadata property: Additional metadata for this attestation.
+ *
+ * @param metadata the metadata value to set.
+ * @return the AttestationInner object itself.
+ */
+ public AttestationInner withMetadata(Object metadata) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AttestationProperties();
+ }
+ this.innerProperties().withMetadata(metadata);
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -247,7 +289,7 @@ public OffsetDateTime lastComplianceStateChangeAt() {
*/
public void validate() {
if (innerProperties() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property innerProperties in model AttestationInner"));
@@ -255,4 +297,6 @@ public void validate() {
innerProperties().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(AttestationInner.class);
}
diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/AttestationProperties.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/AttestationProperties.java
index d5cef83d128d..bfa0e761f83f 100644
--- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/AttestationProperties.java
+++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/AttestationProperties.java
@@ -8,7 +8,6 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.policyinsights.models.AttestationEvidence;
import com.azure.resourcemanager.policyinsights.models.ComplianceState;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.List;
@@ -16,21 +15,16 @@
/** The properties of an attestation resource. */
@Fluent
public final class AttestationProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(AttestationProperties.class);
-
/*
- * The resource ID of the policy assignment that the attestation is setting
- * the state for.
+ * The resource ID of the policy assignment that the attestation is setting the state for.
*/
@JsonProperty(value = "policyAssignmentId", required = true)
private String policyAssignmentId;
/*
- * The policy definition reference ID from a policy set definition that the
- * attestation is setting the state for. If the policy assignment assigns a
- * policy set definition the attestation can choose a definition within the
- * set definition with this property or omit this and set the state for the
- * entire set definition.
+ * The policy definition reference ID from a policy set definition that the attestation is setting the state for.
+ * If the policy assignment assigns a policy set definition the attestation can choose a definition within the set
+ * definition with this property or omit this and set the state for the entire set definition.
*/
@JsonProperty(value = "policyDefinitionReferenceId")
private String policyDefinitionReferenceId;
@@ -48,8 +42,8 @@ public final class AttestationProperties {
private OffsetDateTime expiresOn;
/*
- * The person responsible for setting the state of the resource. This value
- * is typically an Azure Active Directory object ID.
+ * The person responsible for setting the state of the resource. This value is typically an Azure Active Directory
+ * object ID.
*/
@JsonProperty(value = "owner")
private String owner;
@@ -78,6 +72,18 @@ public final class AttestationProperties {
@JsonProperty(value = "lastComplianceStateChangeAt", access = JsonProperty.Access.WRITE_ONLY)
private OffsetDateTime lastComplianceStateChangeAt;
+ /*
+ * The time the evidence was assessed
+ */
+ @JsonProperty(value = "assessmentDate")
+ private OffsetDateTime assessmentDate;
+
+ /*
+ * Additional metadata for this attestation
+ */
+ @JsonProperty(value = "metadata")
+ private Object metadata;
+
/**
* Get the policyAssignmentId property: The resource ID of the policy assignment that the attestation is setting the
* state for.
@@ -246,6 +252,46 @@ public OffsetDateTime lastComplianceStateChangeAt() {
return this.lastComplianceStateChangeAt;
}
+ /**
+ * Get the assessmentDate property: The time the evidence was assessed.
+ *
+ * @return the assessmentDate value.
+ */
+ public OffsetDateTime assessmentDate() {
+ return this.assessmentDate;
+ }
+
+ /**
+ * Set the assessmentDate property: The time the evidence was assessed.
+ *
+ * @param assessmentDate the assessmentDate value to set.
+ * @return the AttestationProperties object itself.
+ */
+ public AttestationProperties withAssessmentDate(OffsetDateTime assessmentDate) {
+ this.assessmentDate = assessmentDate;
+ return this;
+ }
+
+ /**
+ * Get the metadata property: Additional metadata for this attestation.
+ *
+ * @return the metadata value.
+ */
+ public Object metadata() {
+ return this.metadata;
+ }
+
+ /**
+ * Set the metadata property: Additional metadata for this attestation.
+ *
+ * @param metadata the metadata value to set.
+ * @return the AttestationProperties object itself.
+ */
+ public AttestationProperties withMetadata(Object metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -253,7 +299,7 @@ public OffsetDateTime lastComplianceStateChangeAt() {
*/
public void validate() {
if (policyAssignmentId() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property policyAssignmentId in model AttestationProperties"));
@@ -262,4 +308,6 @@ public void validate() {
evidence().forEach(e -> e.validate());
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(AttestationProperties.class);
}
diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/CheckRestrictionsResultInner.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/CheckRestrictionsResultInner.java
index 70ec0ae7e3b4..bb65659b0f7f 100644
--- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/CheckRestrictionsResultInner.java
+++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/CheckRestrictionsResultInner.java
@@ -5,21 +5,16 @@
package com.azure.resourcemanager.policyinsights.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.policyinsights.models.CheckRestrictionsResultContentEvaluationResult;
import com.azure.resourcemanager.policyinsights.models.FieldRestrictions;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** The result of a check policy restrictions evaluation on a resource. */
@Immutable
public final class CheckRestrictionsResultInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckRestrictionsResultInner.class);
-
/*
- * The restrictions that will be placed on various fields in the resource
- * by policy.
+ * The restrictions that will be placed on various fields in the resource by policy.
*/
@JsonProperty(value = "fieldRestrictions", access = JsonProperty.Access.WRITE_ONLY)
private List fieldRestrictions;
diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/OperationsListResultsInner.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/OperationsListResultsInner.java
index dc796d05fa03..aa2a6285c37b 100644
--- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/OperationsListResultsInner.java
+++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/OperationsListResultsInner.java
@@ -5,17 +5,13 @@
package com.azure.resourcemanager.policyinsights.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.policyinsights.models.Operation;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** List of available operations. */
@Fluent
public final class OperationsListResultsInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsListResultsInner.class);
-
/*
* OData entity count; represents the number of operations returned.
*/
diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/PolicyEventInner.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/PolicyEventInner.java
index 06aced09743c..70a2bf276786 100644
--- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/PolicyEventInner.java
+++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/PolicyEventInner.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.policyinsights.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.policyinsights.models.ComponentEventDetails;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
@@ -19,18 +18,14 @@
/** Policy event record. */
@Fluent
public final class PolicyEventInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PolicyEventInner.class);
-
/*
- * OData entity ID; always set to null since policy event records do not
- * have an entity ID.
+ * OData entity ID; always set to null since policy event records do not have an entity ID.
*/
@JsonProperty(value = "@odata.id")
private String odataId;
/*
- * OData context string; used by OData clients to resolve type information
- * based on metadata.
+ * OData context string; used by OData clients to resolve type information based on metadata.
*/
@JsonProperty(value = "@odata.context")
private String odataContext;
@@ -66,8 +61,7 @@ public final class PolicyEventInner {
private String effectiveParameters;
/*
- * Flag which states whether the resource is compliant against the policy
- * assignment it was evaluated against.
+ * Flag which states whether the resource is compliant against the policy assignment it was evaluated against.
*/
@JsonProperty(value = "isCompliant")
private Boolean isCompliant;
@@ -151,43 +145,38 @@ public final class PolicyEventInner {
private String policySetDefinitionId;
/*
- * Policy set definition name, if the policy assignment is for a policy
- * set.
+ * Policy set definition name, if the policy assignment is for a policy set.
*/
@JsonProperty(value = "policySetDefinitionName")
private String policySetDefinitionName;
/*
- * Policy set definition owner, if the policy assignment is for a policy
- * set.
+ * Policy set definition owner, if the policy assignment is for a policy set.
*/
@JsonProperty(value = "policySetDefinitionOwner")
private String policySetDefinitionOwner;
/*
- * Policy set definition category, if the policy assignment is for a policy
- * set.
+ * Policy set definition category, if the policy assignment is for a policy set.
*/
@JsonProperty(value = "policySetDefinitionCategory")
private String policySetDefinitionCategory;
/*
- * Policy set definition parameters, if the policy assignment is for a
- * policy set.
+ * Policy set definition parameters, if the policy assignment is for a policy set.
*/
@JsonProperty(value = "policySetDefinitionParameters")
private String policySetDefinitionParameters;
/*
- * Comma separated list of management group IDs, which represent the
- * hierarchy of the management groups the resource is under.
+ * Comma separated list of management group IDs, which represent the hierarchy of the management groups the
+ * resource is under.
*/
@JsonProperty(value = "managementGroupIds")
private String managementGroupIds;
/*
- * Reference ID for the policy definition inside the policy set, if the
- * policy assignment is for a policy set.
+ * Reference ID for the policy definition inside the policy set, if the policy assignment is for a policy set.
*/
@JsonProperty(value = "policyDefinitionReferenceId")
private String policyDefinitionReferenceId;
@@ -205,15 +194,13 @@ public final class PolicyEventInner {
private String tenantId;
/*
- * Principal object ID for the user who initiated the resource operation
- * that triggered the policy event.
+ * Principal object ID for the user who initiated the resource operation that triggered the policy event.
*/
@JsonProperty(value = "principalOid")
private String principalOid;
/*
- * Components events records populated only when URL contains
- * $expand=components clause.
+ * Components events records populated only when URL contains $expand=components clause.
*/
@JsonProperty(value = "components")
private List components;
diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/PolicyMetadataInner.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/PolicyMetadataInner.java
index a98066f53746..7a19ceb2db15 100644
--- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/PolicyMetadataInner.java
+++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/PolicyMetadataInner.java
@@ -5,15 +5,11 @@
package com.azure.resourcemanager.policyinsights.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Policy metadata resource definition. */
@Fluent
public final class PolicyMetadataInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PolicyMetadataInner.class);
-
/*
* Properties of the policy metadata.
*/
diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/PolicyMetadataProperties.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/PolicyMetadataProperties.java
index 0f2769e9e4c4..fd17e61cda65 100644
--- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/PolicyMetadataProperties.java
+++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/PolicyMetadataProperties.java
@@ -5,15 +5,11 @@
package com.azure.resourcemanager.policyinsights.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The properties of the policy metadata. */
@Immutable
public final class PolicyMetadataProperties extends PolicyMetadataSlimProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PolicyMetadataProperties.class);
-
/*
* The description of the policy metadata.
*/
diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/PolicyMetadataSlimProperties.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/PolicyMetadataSlimProperties.java
index b493ad2333d0..ca2b46f1cbce 100644
--- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/PolicyMetadataSlimProperties.java
+++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/PolicyMetadataSlimProperties.java
@@ -5,15 +5,11 @@
package com.azure.resourcemanager.policyinsights.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The properties of the policy metadata, excluding properties containing large strings. */
@Immutable
public class PolicyMetadataSlimProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PolicyMetadataSlimProperties.class);
-
/*
* The policy metadata identifier.
*/
diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/PolicyStateInner.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/PolicyStateInner.java
index 26d0333302e2..ba8e6eba6c36 100644
--- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/PolicyStateInner.java
+++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/PolicyStateInner.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.policyinsights.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.policyinsights.models.ComponentStateDetails;
import com.azure.resourcemanager.policyinsights.models.PolicyEvaluationDetails;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
@@ -20,18 +19,14 @@
/** Policy state record. */
@Fluent
public final class PolicyStateInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PolicyStateInner.class);
-
/*
- * OData entity ID; always set to null since policy state records do not
- * have an entity ID.
+ * OData entity ID; always set to null since policy state records do not have an entity ID.
*/
@JsonProperty(value = "@odata.id")
private String odataId;
/*
- * OData context string; used by OData clients to resolve type information
- * based on metadata.
+ * OData context string; used by OData clients to resolve type information based on metadata.
*/
@JsonProperty(value = "@odata.context")
private String odataContext;
@@ -67,9 +62,8 @@ public final class PolicyStateInner {
private String effectiveParameters;
/*
- * Flag which states whether the resource is compliant against the policy
- * assignment it was evaluated against. This property is deprecated; please
- * use ComplianceState instead.
+ * Flag which states whether the resource is compliant against the policy assignment it was evaluated against. This
+ * property is deprecated; please use ComplianceState instead.
*/
@JsonProperty(value = "isCompliant")
private Boolean isCompliant;
@@ -153,43 +147,38 @@ public final class PolicyStateInner {
private String policySetDefinitionId;
/*
- * Policy set definition name, if the policy assignment is for a policy
- * set.
+ * Policy set definition name, if the policy assignment is for a policy set.
*/
@JsonProperty(value = "policySetDefinitionName")
private String policySetDefinitionName;
/*
- * Policy set definition owner, if the policy assignment is for a policy
- * set.
+ * Policy set definition owner, if the policy assignment is for a policy set.
*/
@JsonProperty(value = "policySetDefinitionOwner")
private String policySetDefinitionOwner;
/*
- * Policy set definition category, if the policy assignment is for a policy
- * set.
+ * Policy set definition category, if the policy assignment is for a policy set.
*/
@JsonProperty(value = "policySetDefinitionCategory")
private String policySetDefinitionCategory;
/*
- * Policy set definition parameters, if the policy assignment is for a
- * policy set.
+ * Policy set definition parameters, if the policy assignment is for a policy set.
*/
@JsonProperty(value = "policySetDefinitionParameters")
private String policySetDefinitionParameters;
/*
- * Comma separated list of management group IDs, which represent the
- * hierarchy of the management groups the resource is under.
+ * Comma separated list of management group IDs, which represent the hierarchy of the management groups the
+ * resource is under.
*/
@JsonProperty(value = "managementGroupIds")
private String managementGroupIds;
/*
- * Reference ID for the policy definition inside the policy set, if the
- * policy assignment is for a policy set.
+ * Reference ID for the policy definition inside the policy set, if the policy assignment is for a policy set.
*/
@JsonProperty(value = "policyDefinitionReferenceId")
private String policyDefinitionReferenceId;
@@ -213,8 +202,7 @@ public final class PolicyStateInner {
private List policyDefinitionGroupNames;
/*
- * Components state compliance records populated only when URL contains
- * $expand=components clause.
+ * Components state compliance records populated only when URL contains $expand=components clause.
*/
@JsonProperty(value = "components")
private List components;
diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/PolicyTrackedResourceInner.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/PolicyTrackedResourceInner.java
index 30d61cb870c4..69d28afe1e44 100644
--- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/PolicyTrackedResourceInner.java
+++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/PolicyTrackedResourceInner.java
@@ -5,18 +5,14 @@
package com.azure.resourcemanager.policyinsights.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.policyinsights.models.PolicyDetails;
import com.azure.resourcemanager.policyinsights.models.TrackedResourceModificationDetails;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
/** Policy tracked resource record. */
@Immutable
public final class PolicyTrackedResourceInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PolicyTrackedResourceInner.class);
-
/*
* The ID of the policy tracked resource.
*/
@@ -30,15 +26,13 @@ public final class PolicyTrackedResourceInner {
private PolicyDetails policyDetails;
/*
- * The details of the policy triggered deployment that created the tracked
- * resource.
+ * The details of the policy triggered deployment that created the tracked resource.
*/
@JsonProperty(value = "createdBy", access = JsonProperty.Access.WRITE_ONLY)
private TrackedResourceModificationDetails createdBy;
/*
- * The details of the policy triggered deployment that modified the tracked
- * resource.
+ * The details of the policy triggered deployment that modified the tracked resource.
*/
@JsonProperty(value = "lastModifiedBy", access = JsonProperty.Access.WRITE_ONLY)
private TrackedResourceModificationDetails lastModifiedBy;
diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/RemediationDeploymentInner.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/RemediationDeploymentInner.java
index ce34b4798317..f2fedde30554 100644
--- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/RemediationDeploymentInner.java
+++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/RemediationDeploymentInner.java
@@ -6,16 +6,12 @@
import com.azure.core.annotation.Immutable;
import com.azure.core.management.exception.ManagementError;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
/** Details of a single deployment created by the remediation. */
@Immutable
public final class RemediationDeploymentInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(RemediationDeploymentInner.class);
-
/*
* Resource ID of the resource that is being remediated by the deployment.
*/
diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/RemediationInner.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/RemediationInner.java
index 597536a1d097..db54bd890c89 100644
--- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/RemediationInner.java
+++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/RemediationInner.java
@@ -7,20 +7,16 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.policyinsights.models.RemediationDeploymentSummary;
import com.azure.resourcemanager.policyinsights.models.RemediationFilters;
import com.azure.resourcemanager.policyinsights.models.RemediationPropertiesFailureThreshold;
import com.azure.resourcemanager.policyinsights.models.ResourceDiscoveryMode;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
/** The remediation definition. */
@Fluent
public final class RemediationInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(RemediationInner.class);
-
/*
* Properties for the remediation.
*/
@@ -28,8 +24,7 @@ public final class RemediationInner extends ProxyResource {
private RemediationProperties innerProperties;
/*
- * Azure Resource Manager metadata containing createdBy and modifiedBy
- * information.
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/RemediationProperties.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/RemediationProperties.java
index 65f0de7f1511..9610a6981116 100644
--- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/RemediationProperties.java
+++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/RemediationProperties.java
@@ -5,20 +5,16 @@
package com.azure.resourcemanager.policyinsights.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.policyinsights.models.RemediationDeploymentSummary;
import com.azure.resourcemanager.policyinsights.models.RemediationFilters;
import com.azure.resourcemanager.policyinsights.models.RemediationPropertiesFailureThreshold;
import com.azure.resourcemanager.policyinsights.models.ResourceDiscoveryMode;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
/** The remediation properties. */
@Fluent
public final class RemediationProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(RemediationProperties.class);
-
/*
* The resource ID of the policy assignment that should be remediated.
*/
@@ -26,16 +22,14 @@ public final class RemediationProperties {
private String policyAssignmentId;
/*
- * The policy definition reference ID of the individual definition that
- * should be remediated. Required when the policy assignment being
- * remediated assigns a policy set definition.
+ * The policy definition reference ID of the individual definition that should be remediated. Required when the
+ * policy assignment being remediated assigns a policy set definition.
*/
@JsonProperty(value = "policyDefinitionReferenceId")
private String policyDefinitionReferenceId;
/*
- * The way resources to remediate are discovered. Defaults to
- * ExistingNonCompliant if not specified.
+ * The way resources to remediate are discovered. Defaults to ExistingNonCompliant if not specified.
*/
@JsonProperty(value = "resourceDiscoveryMode")
private ResourceDiscoveryMode resourceDiscoveryMode;
@@ -59,44 +53,39 @@ public final class RemediationProperties {
private OffsetDateTime lastUpdatedOn;
/*
- * The filters that will be applied to determine which resources to
- * remediate.
+ * The filters that will be applied to determine which resources to remediate.
*/
@JsonProperty(value = "filters")
private RemediationFilters filters;
/*
- * The deployment status summary for all deployments created by the
- * remediation.
+ * The deployment status summary for all deployments created by the remediation.
*/
@JsonProperty(value = "deploymentStatus", access = JsonProperty.Access.WRITE_ONLY)
private RemediationDeploymentSummary deploymentStatus;
/*
- * The remediation status message. Provides additional details regarding
- * the state of the remediation.
+ * The remediation status message. Provides additional details regarding the state of the remediation.
*/
@JsonProperty(value = "statusMessage", access = JsonProperty.Access.WRITE_ONLY)
private String statusMessage;
/*
- * The remediation correlation Id. Can be used to find events related to
- * the remediation in the activity log.
+ * The remediation correlation Id. Can be used to find events related to the remediation in the activity log.
*/
@JsonProperty(value = "correlationId", access = JsonProperty.Access.WRITE_ONLY)
private String correlationId;
/*
- * Determines the max number of resources that can be remediated by the
- * remediation job. If not provided, the default resource count is used.
+ * Determines the max number of resources that can be remediated by the remediation job. If not provided, the
+ * default resource count is used.
*/
@JsonProperty(value = "resourceCount")
private Integer resourceCount;
/*
- * Determines how many resources to remediate at any given time. Can be
- * used to increase or reduce the pace of the remediation. If not provided,
- * the default parallel deployments value is used.
+ * Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the
+ * remediation. If not provided, the default parallel deployments value is used.
*/
@JsonProperty(value = "parallelDeployments")
private Integer parallelDeployments;
diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/SlimPolicyMetadataInner.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/SlimPolicyMetadataInner.java
index df64930f9da9..1ef942f1369e 100644
--- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/SlimPolicyMetadataInner.java
+++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/SlimPolicyMetadataInner.java
@@ -5,15 +5,11 @@
package com.azure.resourcemanager.policyinsights.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Slim version of policy metadata resource definition, excluding properties with large strings. */
@Fluent
public final class SlimPolicyMetadataInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(SlimPolicyMetadataInner.class);
-
/*
* Properties of the policy metadata.
*/
diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/SummarizeResultsInner.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/SummarizeResultsInner.java
index bb2301c080c5..c6434ce42866 100644
--- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/SummarizeResultsInner.java
+++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/fluent/models/SummarizeResultsInner.java
@@ -5,27 +5,21 @@
package com.azure.resourcemanager.policyinsights.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.policyinsights.models.Summary;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** Summarize action results. */
@Fluent
public final class SummarizeResultsInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(SummarizeResultsInner.class);
-
/*
- * OData context string; used by OData clients to resolve type information
- * based on metadata.
+ * OData context string; used by OData clients to resolve type information based on metadata.
*/
@JsonProperty(value = "@odata.context")
private String odataContext;
/*
- * OData entity count; represents the number of summaries returned; always
- * set to 1.
+ * OData entity count; represents the number of summaries returned; always set to 1.
*/
@JsonProperty(value = "@odata.count")
private Integer odataCount;
diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/AttestationImpl.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/AttestationImpl.java
index 552246275e4c..8699c693296d 100644
--- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/AttestationImpl.java
+++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/AttestationImpl.java
@@ -76,6 +76,18 @@ public OffsetDateTime lastComplianceStateChangeAt() {
return this.innerModel().lastComplianceStateChangeAt();
}
+ public OffsetDateTime assessmentDate() {
+ return this.innerModel().assessmentDate();
+ }
+
+ public Object metadata() {
+ return this.innerModel().metadata();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
public AttestationInner innerModel() {
return this.innerObject;
}
@@ -201,4 +213,14 @@ public AttestationImpl withEvidence(List evidence) {
this.innerModel().withEvidence(evidence);
return this;
}
+
+ public AttestationImpl withAssessmentDate(OffsetDateTime assessmentDate) {
+ this.innerModel().withAssessmentDate(assessmentDate);
+ return this;
+ }
+
+ public AttestationImpl withMetadata(Object metadata) {
+ this.innerModel().withMetadata(metadata);
+ return this;
+ }
}
diff --git a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/AttestationsClientImpl.java b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/AttestationsClientImpl.java
index 0d8ac5a09c73..3a2b3fc2dfe0 100644
--- a/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/AttestationsClientImpl.java
+++ b/sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/AttestationsClientImpl.java
@@ -29,7 +29,6 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.policyinsights.fluent.AttestationsClient;
@@ -41,8 +40,6 @@
/** An instance of this class provides access to all the operations defined in AttestationsClient. */
public final class AttestationsClientImpl implements AttestationsClient {
- private final ClientLogger logger = new ClientLogger(AttestationsClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final AttestationsService service;
@@ -268,7 +265,8 @@ Mono> listForResourceNext(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(Integer top, String filter) {
@@ -284,7 +282,7 @@ private Mono> listSinglePageAsync(Integer top, S
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2022-09-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -319,7 +317,8 @@ private Mono> listSinglePageAsync(Integer top, S
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(Integer top, String filter, Context context) {
@@ -335,7 +334,7 @@ private Mono> listSinglePageAsync(Integer top, S
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2022-09-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -359,7 +358,7 @@ private Mono> listSinglePageAsync(Integer top, S
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(Integer top, String filter) {
@@ -372,7 +371,7 @@ private PagedFlux listAsync(Integer top, String filter) {
*
* @throws 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 PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync() {
@@ -391,7 +390,7 @@ private PagedFlux listAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(Integer top, String filter, Context context) {
@@ -405,7 +404,7 @@ private PagedFlux listAsync(Integer top, String filter, Contex
*
* @throws 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)
public PagedIterable list() {
@@ -423,7 +422,7 @@ public PagedIterable list() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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)
public PagedIterable list(Integer top, String filter, Context context) {
@@ -438,7 +437,7 @@ public PagedIterable list(Integer top, String filter, Context
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 an attestation resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createOrUpdateAtSubscriptionWithResponseAsync(
@@ -464,7 +463,7 @@ private Mono>> createOrUpdateAtSubscriptionWithRespons
} else {
parameters.validate();
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2022-09-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -490,7 +489,7 @@ private Mono>> createOrUpdateAtSubscriptionWithRespons
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 an attestation resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createOrUpdateAtSubscriptionWithResponseAsync(
@@ -516,7 +515,7 @@ private Mono>> createOrUpdateAtSubscriptionWithRespons
} else {
parameters.validate();
}
- final String apiVersion = "2021-01-01";
+ final String apiVersion = "2022-09-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -538,7 +537,7 @@ private Mono>> createOrUpdateAtSubscriptionWithRespons
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 PollerFlux} for polling of an attestation resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, AttestationInner> beginCreateOrUpdateAtSubscriptionAsync(
@@ -564,7 +563,7 @@ private PollerFlux, AttestationInner> beginCreateOr
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 PollerFlux} for polling of an attestation resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, AttestationInner> beginCreateOrUpdateAtSubscriptionAsync(
@@ -586,7 +585,7 @@ private PollerFlux, AttestationInner> beginCreateOr
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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)
public SyncPoller, AttestationInner> beginCreateOrUpdateAtSubscription(
@@ -603,7 +602,7 @@ public SyncPoller, AttestationInner> beginCreateOrU
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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)
public SyncPoller, AttestationInner> beginCreateOrUpdateAtSubscription(
@@ -619,7 +618,7 @@ public SyncPoller, AttestationInner> beginCreateOrU
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 an attestation resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono