Interface PoliciesClient


public interface PoliciesClient
An instance of this class provides access to all the operations defined in PoliciesClient.
  • Method Details

    • list

      com.azure.core.http.rest.PagedIterable<PolicyInner> list(String resourceGroupName, String labName, String policySetName)
      List policies in a given policy set.
      Parameters:
      resourceGroupName - The name of the resource group.
      labName - The name of the lab.
      policySetName - The name of the policy set.
      Returns:
      the response of a list operation 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.
    • list

      com.azure.core.http.rest.PagedIterable<PolicyInner> list(String resourceGroupName, String labName, String policySetName, String expand, String filter, Integer top, String orderby, com.azure.core.util.Context context)
      List policies in a given policy set.
      Parameters:
      resourceGroupName - The name of the resource group.
      labName - The name of the lab.
      policySetName - The name of the policy set.
      expand - Specify the $expand query. Example: 'properties($select=description)'.
      filter - The filter to apply to the operation. Example: '$filter=contains(name,'myName').
      top - The maximum number of resources to return from the operation. Example: '$top=10'.
      orderby - The ordering expression for the results, using OData notation. Example: '$orderby=name desc'.
      context - The context to associate with this operation.
      Returns:
      the response of a list operation 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.
    • getWithResponse

      com.azure.core.http.rest.Response<PolicyInner> getWithResponse(String resourceGroupName, String labName, String policySetName, String name, String expand, com.azure.core.util.Context context)
      Get policy.
      Parameters:
      resourceGroupName - The name of the resource group.
      labName - The name of the lab.
      policySetName - The name of the policy set.
      name - The name of the policy.
      expand - Specify the $expand query. Example: 'properties($select=description)'.
      context - The context to associate with this operation.
      Returns:
      policy 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

      PolicyInner get(String resourceGroupName, String labName, String policySetName, String name)
      Get policy.
      Parameters:
      resourceGroupName - The name of the resource group.
      labName - The name of the lab.
      policySetName - The name of the policy set.
      name - The name of the policy.
      Returns:
      policy.
      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.
    • createOrUpdateWithResponse

      com.azure.core.http.rest.Response<PolicyInner> createOrUpdateWithResponse(String resourceGroupName, String labName, String policySetName, String name, PolicyInner policy, com.azure.core.util.Context context)
      Create or replace an existing policy.
      Parameters:
      resourceGroupName - The name of the resource group.
      labName - The name of the lab.
      policySetName - The name of the policy set.
      name - The name of the policy.
      policy - A Policy.
      context - The context to associate with this operation.
      Returns:
      a Policy 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.
    • createOrUpdate

      PolicyInner createOrUpdate(String resourceGroupName, String labName, String policySetName, String name, PolicyInner policy)
      Create or replace an existing policy.
      Parameters:
      resourceGroupName - The name of the resource group.
      labName - The name of the lab.
      policySetName - The name of the policy set.
      name - The name of the policy.
      policy - A Policy.
      Returns:
      a Policy.
      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 resourceGroupName, String labName, String policySetName, String name, com.azure.core.util.Context context)
      Delete policy.
      Parameters:
      resourceGroupName - The name of the resource group.
      labName - The name of the lab.
      policySetName - The name of the policy set.
      name - The name of the policy.
      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

      void delete(String resourceGroupName, String labName, String policySetName, String name)
      Delete policy.
      Parameters:
      resourceGroupName - The name of the resource group.
      labName - The name of the lab.
      policySetName - The name of the policy set.
      name - The name of the policy.
      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.
    • updateWithResponse

      com.azure.core.http.rest.Response<PolicyInner> updateWithResponse(String resourceGroupName, String labName, String policySetName, String name, PolicyFragment policy, com.azure.core.util.Context context)
      Allows modifying tags of policies. All other properties will be ignored.
      Parameters:
      resourceGroupName - The name of the resource group.
      labName - The name of the lab.
      policySetName - The name of the policy set.
      name - The name of the policy.
      policy - A Policy.
      context - The context to associate with this operation.
      Returns:
      a Policy 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.
    • update

      PolicyInner update(String resourceGroupName, String labName, String policySetName, String name, PolicyFragment policy)
      Allows modifying tags of policies. All other properties will be ignored.
      Parameters:
      resourceGroupName - The name of the resource group.
      labName - The name of the lab.
      policySetName - The name of the policy set.
      name - The name of the policy.
      policy - A Policy.
      Returns:
      a Policy.
      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.