Interface PolicyFragmentsClient


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

    • listByService

      com.azure.core.http.rest.PagedIterable<PolicyFragmentContractInner> listByService(String resourceGroupName, String serviceName)
      Gets all policy fragments.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serviceName - The name of the API Management service.
      Returns:
      all policy fragments 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<PolicyFragmentContractInner> listByService(String resourceGroupName, String serviceName, String filter, String orderby, Integer top, Integer skip, com.azure.core.util.Context context)
      Gets all policy fragments.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serviceName - The name of the API Management service.
      filter - | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>.
      orderby - OData order by query option.
      top - Number of records to return.
      skip - Number of records to skip.
      context - The context to associate with this operation.
      Returns:
      all policy fragments 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

      PolicyFragmentsGetEntityTagResponse getEntityTagWithResponse(String resourceGroupName, String serviceName, String id, com.azure.core.util.Context context)
      Gets the entity state (Etag) version of a policy fragment.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serviceName - The name of the API Management service.
      id - A resource identifier.
      context - The context to associate with this operation.
      Returns:
      the entity state (Etag) version of a policy fragment.
      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 id)
      Gets the entity state (Etag) version of a policy fragment.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serviceName - The name of the API Management service.
      id - A resource identifier.
      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

      PolicyFragmentsGetResponse getWithResponse(String resourceGroupName, String serviceName, String id, PolicyFragmentContentFormat format, com.azure.core.util.Context context)
      Gets a policy fragment.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serviceName - The name of the API Management service.
      id - A resource identifier.
      format - Policy fragment content format.
      context - The context to associate with this operation.
      Returns:
      a policy fragment.
      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

      PolicyFragmentContractInner get(String resourceGroupName, String serviceName, String id)
      Gets a policy fragment.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serviceName - The name of the API Management service.
      id - A resource identifier.
      Returns:
      a policy fragment.
      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.
    • beginCreateOrUpdate

      com.azure.core.util.polling.SyncPoller<com.azure.core.management.polling.PollResult<PolicyFragmentContractInner>,PolicyFragmentContractInner> beginCreateOrUpdate(String resourceGroupName, String serviceName, String id, PolicyFragmentContractInner parameters)
      Creates or updates a policy fragment.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serviceName - The name of the API Management service.
      id - A resource identifier.
      parameters - The policy fragment contents to apply.
      Returns:
      the SyncPoller for polling of policy fragment 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.
    • beginCreateOrUpdate

      com.azure.core.util.polling.SyncPoller<com.azure.core.management.polling.PollResult<PolicyFragmentContractInner>,PolicyFragmentContractInner> beginCreateOrUpdate(String resourceGroupName, String serviceName, String id, PolicyFragmentContractInner parameters, String ifMatch, com.azure.core.util.Context context)
      Creates or updates a policy fragment.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serviceName - The name of the API Management service.
      id - A resource identifier.
      parameters - The policy fragment contents 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:
      the SyncPoller for polling of policy fragment 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

      PolicyFragmentContractInner createOrUpdate(String resourceGroupName, String serviceName, String id, PolicyFragmentContractInner parameters)
      Creates or updates a policy fragment.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serviceName - The name of the API Management service.
      id - A resource identifier.
      parameters - The policy fragment contents to apply.
      Returns:
      policy fragment 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

      PolicyFragmentContractInner createOrUpdate(String resourceGroupName, String serviceName, String id, PolicyFragmentContractInner parameters, String ifMatch, com.azure.core.util.Context context)
      Creates or updates a policy fragment.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serviceName - The name of the API Management service.
      id - A resource identifier.
      parameters - The policy fragment contents 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 fragment 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 id, String ifMatch, com.azure.core.util.Context context)
      Deletes a policy fragment.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serviceName - The name of the API Management service.
      id - A resource identifier.
      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.
      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 id, String ifMatch)
      Deletes a policy fragment.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serviceName - The name of the API Management service.
      id - A resource identifier.
      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.
      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.
    • listReferencesWithResponse

      com.azure.core.http.rest.Response<ResourceCollectionInner> listReferencesWithResponse(String resourceGroupName, String serviceName, String id, Integer top, Integer skip, com.azure.core.util.Context context)
      Lists policy resources that reference the policy fragment.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serviceName - The name of the API Management service.
      id - A resource identifier.
      top - Number of records to return.
      skip - Number of records to skip.
      context - The context to associate with this operation.
      Returns:
      a collection of resources 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.
    • listReferences

      ResourceCollectionInner listReferences(String resourceGroupName, String serviceName, String id)
      Lists policy resources that reference the policy fragment.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      serviceName - The name of the API Management service.
      id - A resource identifier.
      Returns:
      a collection of resources.
      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.