Interface SuppressionsClient
public interface SuppressionsClient
An instance of this class provides access to all the operations defined in SuppressionsClient.
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(String resourceUri, String recommendationId, String name, SuppressionContractInner suppressionContract) Enables the snoozed or dismissed attribute of a recommendation.com.azure.core.http.rest.Response<SuppressionContractInner>
createWithResponse
(String resourceUri, String recommendationId, String name, SuppressionContractInner suppressionContract, com.azure.core.util.Context context) Enables the snoozed or dismissed attribute of a recommendation.void
Enables the activation of a snoozed or dismissed recommendation.com.azure.core.http.rest.Response<Void>
deleteWithResponse
(String resourceUri, String recommendationId, String name, com.azure.core.util.Context context) Enables the activation of a snoozed or dismissed recommendation.Obtains the details of a suppression.com.azure.core.http.rest.Response<SuppressionContractInner>
getWithResponse
(String resourceUri, String recommendationId, String name, com.azure.core.util.Context context) Obtains the details of a suppression.com.azure.core.http.rest.PagedIterable<SuppressionContractInner>
list()
Retrieves the list of snoozed or dismissed suppressions for a subscription.com.azure.core.http.rest.PagedIterable<SuppressionContractInner>
Retrieves the list of snoozed or dismissed suppressions for a subscription.
-
Method Details
-
getWithResponse
com.azure.core.http.rest.Response<SuppressionContractInner> getWithResponse(String resourceUri, String recommendationId, String name, com.azure.core.util.Context context) Obtains the details of a suppression.- Parameters:
resourceUri
- The fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies.recommendationId
- The recommendation ID.name
- The name of the suppression.context
- The context to associate with this operation.- Returns:
- the details of the snoozed or dismissed rule; for example, the duration, name, and GUID associated with
the rule along with
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
get
Obtains the details of a suppression.- Parameters:
resourceUri
- The fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies.recommendationId
- The recommendation ID.name
- The name of the suppression.- Returns:
- the details of the snoozed or dismissed rule; for example, the duration, name, and GUID associated with the rule.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
createWithResponse
com.azure.core.http.rest.Response<SuppressionContractInner> createWithResponse(String resourceUri, String recommendationId, String name, SuppressionContractInner suppressionContract, com.azure.core.util.Context context) Enables the snoozed or dismissed attribute of a recommendation. The snoozed or dismissed attribute is referred to as a suppression. Use this API to create or update the snoozed or dismissed status of a recommendation.- Parameters:
resourceUri
- The fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies.recommendationId
- The recommendation ID.name
- The name of the suppression.suppressionContract
- The snoozed or dismissed attribute; for example, the snooze duration.context
- The context to associate with this operation.- Returns:
- the details of the snoozed or dismissed rule; for example, the duration, name, and GUID associated with
the rule along with
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
create
SuppressionContractInner create(String resourceUri, String recommendationId, String name, SuppressionContractInner suppressionContract) Enables the snoozed or dismissed attribute of a recommendation. The snoozed or dismissed attribute is referred to as a suppression. Use this API to create or update the snoozed or dismissed status of a recommendation.- Parameters:
resourceUri
- The fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies.recommendationId
- The recommendation ID.name
- The name of the suppression.suppressionContract
- The snoozed or dismissed attribute; for example, the snooze duration.- Returns:
- the details of the snoozed or dismissed rule; for example, the duration, name, and GUID associated with the rule.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
deleteWithResponse
com.azure.core.http.rest.Response<Void> deleteWithResponse(String resourceUri, String recommendationId, String name, com.azure.core.util.Context context) Enables the activation of a snoozed or dismissed recommendation. The snoozed or dismissed attribute of a recommendation is referred to as a suppression.- Parameters:
resourceUri
- The fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies.recommendationId
- The recommendation ID.name
- The name of the suppression.context
- The context to associate with this operation.- Returns:
- the
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
delete
Enables the activation of a snoozed or dismissed recommendation. The snoozed or dismissed attribute of a recommendation is referred to as a suppression.- Parameters:
resourceUri
- The fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies.recommendationId
- The recommendation ID.name
- The name of the suppression.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
list
com.azure.core.http.rest.PagedIterable<SuppressionContractInner> list()Retrieves the list of snoozed or dismissed suppressions for a subscription. The snoozed or dismissed attribute of a recommendation is referred to as a suppression.- Returns:
- the list of Advisor suppressions as paginated response with
PagedIterable
. - Throws:
com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
list
com.azure.core.http.rest.PagedIterable<SuppressionContractInner> list(Integer top, String skipToken, com.azure.core.util.Context context) Retrieves the list of snoozed or dismissed suppressions for a subscription. The snoozed or dismissed attribute of a recommendation is referred to as a suppression.- Parameters:
top
- The number of suppressions per page if a paged version of this API is being used.skipToken
- The page-continuation token to use with a paged version of this API.context
- The context to associate with this operation.- Returns:
- the list of Advisor suppressions as paginated response with
PagedIterable
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-