Interface PolicyRestrictionsClient


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

    • listByService

      com.azure.core.http.rest.PagedIterable<PolicyRestrictionContractInner> listByService(String resourceGroupName, String serviceName)
      Gets all policy restrictions of API Management services.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serviceName - The name of the API Management service.
      Returns:
      all policy restrictions of API Management services 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.
    • listByService

      com.azure.core.http.rest.PagedIterable<PolicyRestrictionContractInner> listByService(String resourceGroupName, String serviceName, com.azure.core.util.Context context)
      Gets all policy restrictions of API Management services.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serviceName - The name of the API Management service.
      context - The context to associate with this operation.
      Returns:
      all policy restrictions of API Management services 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.
    • getEntityTagWithResponse

      PolicyRestrictionsGetEntityTagResponse getEntityTagWithResponse(String resourceGroupName, String serviceName, String policyRestrictionId, com.azure.core.util.Context context)
      Gets the entity state (Etag) version of the policy restriction in the Api Management service.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serviceName - The name of the API Management service.
      policyRestrictionId - Policy restrictions after an entity level.
      context - The context to associate with this operation.
      Returns:
      the entity state (Etag) version of the policy restriction in the Api Management service.
      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.
    • getEntityTag

      void getEntityTag(String resourceGroupName, String serviceName, String policyRestrictionId)
      Gets the entity state (Etag) version of the policy restriction in the Api Management service.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serviceName - The name of the API Management service.
      policyRestrictionId - Policy restrictions after an entity level.
      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

      PolicyRestrictionsGetResponse getWithResponse(String resourceGroupName, String serviceName, String policyRestrictionId, com.azure.core.util.Context context)
      Get the policy restriction of the Api Management service.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serviceName - The name of the API Management service.
      policyRestrictionId - Policy restrictions after an entity level.
      context - The context to associate with this operation.
      Returns:
      the policy restriction of the Api Management service.
      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

      PolicyRestrictionContractInner get(String resourceGroupName, String serviceName, String policyRestrictionId)
      Get the policy restriction of the Api Management service.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serviceName - The name of the API Management service.
      policyRestrictionId - Policy restrictions after an entity level.
      Returns:
      the policy restriction of the Api Management service.
      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

      PolicyRestrictionsCreateOrUpdateResponse createOrUpdateWithResponse(String resourceGroupName, String serviceName, String policyRestrictionId, PolicyRestrictionContractInner parameters, String ifMatch, com.azure.core.util.Context context)
      Creates or updates the policy restriction configuration of the Api Management service.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serviceName - The name of the API Management service.
      policyRestrictionId - Policy restrictions after an entity level.
      parameters - The policy restriction to apply.
      ifMatch - ETag of the Entity. Not required when creating an entity, but required when updating an entity.
      context - The context to associate with this operation.
      Returns:
      policy restriction contract details.
      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

      PolicyRestrictionContractInner createOrUpdate(String resourceGroupName, String serviceName, String policyRestrictionId, PolicyRestrictionContractInner parameters)
      Creates or updates the policy restriction configuration of the Api Management service.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serviceName - The name of the API Management service.
      policyRestrictionId - Policy restrictions after an entity level.
      parameters - The policy restriction to apply.
      Returns:
      policy restriction contract details.
      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

      PolicyRestrictionsUpdateResponse updateWithResponse(String resourceGroupName, String serviceName, String policyRestrictionId, String ifMatch, PolicyRestrictionUpdateContract parameters, com.azure.core.util.Context context)
      Updates the policy restriction configuration of the Api Management service.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serviceName - The name of the API Management service.
      policyRestrictionId - Policy restrictions after an entity level.
      ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
      parameters - The policy restriction to apply.
      context - The context to associate with this operation.
      Returns:
      policy restriction contract details.
      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

      PolicyRestrictionContractInner update(String resourceGroupName, String serviceName, String policyRestrictionId, String ifMatch, PolicyRestrictionUpdateContract parameters)
      Updates the policy restriction configuration of the Api Management service.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serviceName - The name of the API Management service.
      policyRestrictionId - Policy restrictions after an entity level.
      ifMatch - ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
      parameters - The policy restriction to apply.
      Returns:
      policy restriction contract details.
      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 serviceName, String policyRestrictionId, String ifMatch, com.azure.core.util.Context context)
      Deletes the policy restriction configuration of the Api Management Service.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serviceName - The name of the API Management service.
      policyRestrictionId - Policy restrictions after an entity level.
      ifMatch - ETag of the Entity. Not required when creating an entity, but required when updating an entity.
      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 serviceName, String policyRestrictionId)
      Deletes the policy restriction configuration of the Api Management Service.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serviceName - The name of the API Management service.
      policyRestrictionId - Policy restrictions after an entity level.
      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.