All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.resourcemanager.mongocluster.models.MongoClusters Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure SDK for Mongo Cluster Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure Cosmos DB for MongoDB vCore resources including clusters and firewall rules.

The newest version!
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.resourcemanager.mongocluster.models;

import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;

/**
 * Resource collection API of MongoClusters.
 */
public interface MongoClusters {
    /**
     * Gets information about a mongo cluster.
     * 
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param mongoClusterName The name of the mongo cluster.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return information about a mongo cluster along with {@link Response}.
     */
    Response getByResourceGroupWithResponse(String resourceGroupName, String mongoClusterName,
        Context context);

    /**
     * Gets information about a mongo cluster.
     * 
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param mongoClusterName The name of the mongo cluster.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return information about a mongo cluster.
     */
    MongoCluster getByResourceGroup(String resourceGroupName, String mongoClusterName);

    /**
     * Deletes a mongo cluster.
     * 
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param mongoClusterName The name of the mongo cluster.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void deleteByResourceGroup(String resourceGroupName, String mongoClusterName);

    /**
     * Deletes a mongo cluster.
     * 
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param mongoClusterName The name of the mongo cluster.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void delete(String resourceGroupName, String mongoClusterName, Context context);

    /**
     * List all the mongo clusters in a given resource group.
     * 
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response of a MongoCluster list operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable listByResourceGroup(String resourceGroupName);

    /**
     * List all the mongo clusters in a given resource group.
     * 
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response of a MongoCluster list operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable listByResourceGroup(String resourceGroupName, Context context);

    /**
     * List all the mongo clusters in a given subscription.
     * 
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response of a MongoCluster list operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable list();

    /**
     * List all the mongo clusters in a given subscription.
     * 
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response of a MongoCluster list operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable list(Context context);

    /**
     * List mongo cluster connection strings. This includes the default connection string using SCRAM-SHA-256, as well
     * as other connection strings supported by the cluster.
     * 
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param mongoClusterName The name of the mongo cluster.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the connection strings for the given mongo cluster along with {@link Response}.
     */
    Response listConnectionStringsWithResponse(String resourceGroupName,
        String mongoClusterName, Context context);

    /**
     * List mongo cluster connection strings. This includes the default connection string using SCRAM-SHA-256, as well
     * as other connection strings supported by the cluster.
     * 
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param mongoClusterName The name of the mongo cluster.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the connection strings for the given mongo cluster.
     */
    ListConnectionStringsResult listConnectionStrings(String resourceGroupName, String mongoClusterName);

    /**
     * Check if mongo cluster name is available for use.
     * 
     * @param location The name of the Azure region.
     * @param body The CheckAvailability request.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the check availability result along with {@link Response}.
     */
    Response checkNameAvailabilityWithResponse(String location,
        CheckNameAvailabilityRequest body, Context context);

    /**
     * Check if mongo cluster name is available for use.
     * 
     * @param location The name of the Azure region.
     * @param body The CheckAvailability request.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the check availability result.
     */
    CheckNameAvailabilityResponse checkNameAvailability(String location, CheckNameAvailabilityRequest body);

    /**
     * Promotes a replica mongo cluster to a primary role.
     * 
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param mongoClusterName The name of the mongo cluster.
     * @param body The content of the action request.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void promote(String resourceGroupName, String mongoClusterName, PromoteReplicaRequest body);

    /**
     * Promotes a replica mongo cluster to a primary role.
     * 
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param mongoClusterName The name of the mongo cluster.
     * @param body The content of the action request.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void promote(String resourceGroupName, String mongoClusterName, PromoteReplicaRequest body, Context context);

    /**
     * Gets information about a mongo cluster.
     * 
     * @param id the resource ID.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return information about a mongo cluster along with {@link Response}.
     */
    MongoCluster getById(String id);

    /**
     * Gets information about a mongo cluster.
     * 
     * @param id the resource ID.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return information about a mongo cluster along with {@link Response}.
     */
    Response getByIdWithResponse(String id, Context context);

    /**
     * Deletes a mongo cluster.
     * 
     * @param id the resource ID.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void deleteById(String id);

    /**
     * Deletes a mongo cluster.
     * 
     * @param id the resource ID.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void deleteByIdWithResponse(String id, Context context);

    /**
     * Begins definition for a new MongoCluster resource.
     * 
     * @param name resource name.
     * @return the first stage of the new MongoCluster definition.
     */
    MongoCluster.DefinitionStages.Blank define(String name);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy