Interface SubscriptionsClient


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

      • list

        com.azure.core.http.rest.PagedIterable<SubscriptionContractInner> list​(String resourceGroupName,
                                                                               String serviceName)
        Lists all subscriptions of the API Management service instance.
        Parameters:
        resourceGroupName - The name of the resource group.
        serviceName - The name of the API Management service.
        Returns:
        paged Subscriptions list representation 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<SubscriptionContractInner> list​(String resourceGroupName,
                                                                               String serviceName,
                                                                               String filter,
                                                                               Integer top,
                                                                               Integer skip,
                                                                               com.azure.core.util.Context context)
        Lists all subscriptions of the API Management service instance.
        Parameters:
        resourceGroupName - The name of the resource group.
        serviceName - The name of the API Management service.
        filter - | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| user | expand | | |</br>.
        top - Number of records to return.
        skip - Number of records to skip.
        context - The context to associate with this operation.
        Returns:
        paged Subscriptions list representation 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.
      • getEntityTag

        void getEntityTag​(String resourceGroupName,
                          String serviceName,
                          String sid)
        Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier.
        Parameters:
        resourceGroupName - The name of the resource group.
        serviceName - The name of the API Management service.
        sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
        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

        SubscriptionsGetEntityTagResponse getEntityTagWithResponse​(String resourceGroupName,
                                                                   String serviceName,
                                                                   String sid,
                                                                   com.azure.core.util.Context context)
        Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier.
        Parameters:
        resourceGroupName - The name of the resource group.
        serviceName - The name of the API Management service.
        sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
        context - The context to associate with this operation.
        Returns:
        the entity state (Etag) version of the apimanagement subscription specified by its 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.
      • get

        SubscriptionContractInner get​(String resourceGroupName,
                                      String serviceName,
                                      String sid)
        Gets the specified Subscription entity.
        Parameters:
        resourceGroupName - The name of the resource group.
        serviceName - The name of the API Management service.
        sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
        Returns:
        the specified Subscription entity.
        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

        SubscriptionsGetResponse getWithResponse​(String resourceGroupName,
                                                 String serviceName,
                                                 String sid,
                                                 com.azure.core.util.Context context)
        Gets the specified Subscription entity.
        Parameters:
        resourceGroupName - The name of the resource group.
        serviceName - The name of the API Management service.
        sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
        context - The context to associate with this operation.
        Returns:
        the specified Subscription entity.
        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

        SubscriptionContractInner createOrUpdate​(String resourceGroupName,
                                                 String serviceName,
                                                 String sid,
                                                 SubscriptionCreateParameters parameters)
        Creates or updates the subscription of specified user to the specified product.
        Parameters:
        resourceGroupName - The name of the resource group.
        serviceName - The name of the API Management service.
        sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
        parameters - Create parameters.
        Returns:
        subscription 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.
      • createOrUpdateWithResponse

        SubscriptionsCreateOrUpdateResponse createOrUpdateWithResponse​(String resourceGroupName,
                                                                       String serviceName,
                                                                       String sid,
                                                                       SubscriptionCreateParameters parameters,
                                                                       Boolean notify,
                                                                       String ifMatch,
                                                                       AppType appType,
                                                                       com.azure.core.util.Context context)
        Creates or updates the subscription of specified user to the specified product.
        Parameters:
        resourceGroupName - The name of the resource group.
        serviceName - The name of the API Management service.
        sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
        parameters - Create parameters.
        notify - Notify change in Subscription State. - If false, do not send any email notification for change of state of subscription - If true, send email notification of change of state of subscription.
        ifMatch - ETag of the Entity. Not required when creating an entity, but required when updating an entity.
        appType - Determines the type of application which send the create user request. Default is legacy publisher portal.
        context - The context to associate with this operation.
        Returns:
        subscription 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

        SubscriptionContractInner update​(String resourceGroupName,
                                         String serviceName,
                                         String sid,
                                         String ifMatch,
                                         SubscriptionUpdateParameters parameters)
        Updates the details of a subscription specified by its identifier.
        Parameters:
        resourceGroupName - The name of the resource group.
        serviceName - The name of the API Management service.
        sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
        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 - Update parameters.
        Returns:
        subscription 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

        SubscriptionsUpdateResponse updateWithResponse​(String resourceGroupName,
                                                       String serviceName,
                                                       String sid,
                                                       String ifMatch,
                                                       SubscriptionUpdateParameters parameters,
                                                       Boolean notify,
                                                       AppType appType,
                                                       com.azure.core.util.Context context)
        Updates the details of a subscription specified by its identifier.
        Parameters:
        resourceGroupName - The name of the resource group.
        serviceName - The name of the API Management service.
        sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
        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 - Update parameters.
        notify - Notify change in Subscription State. - If false, do not send any email notification for change of state of subscription - If true, send email notification of change of state of subscription.
        appType - Determines the type of application which send the create user request. Default is legacy publisher portal.
        context - The context to associate with this operation.
        Returns:
        subscription 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.
      • delete

        void delete​(String resourceGroupName,
                    String serviceName,
                    String sid,
                    String ifMatch)
        Deletes the specified subscription.
        Parameters:
        resourceGroupName - The name of the resource group.
        serviceName - The name of the API Management service.
        sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
        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.
      • deleteWithResponse

        com.azure.core.http.rest.Response<Void> deleteWithResponse​(String resourceGroupName,
                                                                   String serviceName,
                                                                   String sid,
                                                                   String ifMatch,
                                                                   com.azure.core.util.Context context)
        Deletes the specified subscription.
        Parameters:
        resourceGroupName - The name of the resource group.
        serviceName - The name of the API Management service.
        sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
        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.
      • regeneratePrimaryKey

        void regeneratePrimaryKey​(String resourceGroupName,
                                  String serviceName,
                                  String sid)
        Regenerates primary key of existing subscription of the API Management service instance.
        Parameters:
        resourceGroupName - The name of the resource group.
        serviceName - The name of the API Management service.
        sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
        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.
      • regeneratePrimaryKeyWithResponse

        com.azure.core.http.rest.Response<Void> regeneratePrimaryKeyWithResponse​(String resourceGroupName,
                                                                                 String serviceName,
                                                                                 String sid,
                                                                                 com.azure.core.util.Context context)
        Regenerates primary key of existing subscription of the API Management service instance.
        Parameters:
        resourceGroupName - The name of the resource group.
        serviceName - The name of the API Management service.
        sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
        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.
      • regenerateSecondaryKey

        void regenerateSecondaryKey​(String resourceGroupName,
                                    String serviceName,
                                    String sid)
        Regenerates secondary key of existing subscription of the API Management service instance.
        Parameters:
        resourceGroupName - The name of the resource group.
        serviceName - The name of the API Management service.
        sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
        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.
      • regenerateSecondaryKeyWithResponse

        com.azure.core.http.rest.Response<Void> regenerateSecondaryKeyWithResponse​(String resourceGroupName,
                                                                                   String serviceName,
                                                                                   String sid,
                                                                                   com.azure.core.util.Context context)
        Regenerates secondary key of existing subscription of the API Management service instance.
        Parameters:
        resourceGroupName - The name of the resource group.
        serviceName - The name of the API Management service.
        sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
        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.
      • listSecrets

        SubscriptionKeysContractInner listSecrets​(String resourceGroupName,
                                                  String serviceName,
                                                  String sid)
        Gets the specified Subscription keys.
        Parameters:
        resourceGroupName - The name of the resource group.
        serviceName - The name of the API Management service.
        sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
        Returns:
        the specified Subscription keys.
        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.
      • listSecretsWithResponse

        SubscriptionsListSecretsResponse listSecretsWithResponse​(String resourceGroupName,
                                                                 String serviceName,
                                                                 String sid,
                                                                 com.azure.core.util.Context context)
        Gets the specified Subscription keys.
        Parameters:
        resourceGroupName - The name of the resource group.
        serviceName - The name of the API Management service.
        sid - Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
        context - The context to associate with this operation.
        Returns:
        the specified Subscription keys.
        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.